Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: Split documentation in to sub-app #158

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f3bdb39
First pass moving docs and examples to /docs
edwardhorsford Feb 16, 2016
c884782
Test code for sub-apps
edwardhorsford Feb 16, 2016
aacfdb2
Scope views between apps
edwardhorsford Feb 16, 2016
43bdbf8
Continue spliting app and docs
edwardhorsford Feb 18, 2016
b1f77c0
Updates to install page
edwardhorsford Feb 18, 2016
53a6fee
Minor updates
edwardhorsford Feb 18, 2016
6e0eb56
Minor updates
edwardhorsford Feb 18, 2016
20e6d8c
Correct captitalisation of Node
edwardhorsford Feb 18, 2016
ee78ceb
Set up markdown rendering of .md files. And lots of other stuff. Soz
edwardhorsford Feb 19, 2016
fd818f5
Add sync-request module
edwardhorsford Feb 19, 2016
b78b8b2
Cleanup
edwardhorsford Feb 19, 2016
8247887
Add config to redirect root to /docs
edwardhorsford Feb 25, 2016
9484071
Compare to string, not boolean
edwardhorsford Feb 25, 2016
ae6a935
Compare to string, not boolean
edwardhorsford Feb 25, 2016
8114a1f
Clean up links in documentation
edwardhorsford Feb 25, 2016
f68cc70
Style blockquotes in markdown
edwardhorsford Feb 25, 2016
9e5ae99
Remove old dependency
edwardhorsford Feb 25, 2016
1884995
Cleanup
edwardhorsford Feb 25, 2016
f7dbae6
Merge branch 'split-docs-app' of github.com:alphagov/govuk_prototype_…
edwardhorsford Feb 25, 2016
4594605
First pass moving docs and examples to /docs
edwardhorsford Feb 16, 2016
6e29b3e
Test code for sub-apps
edwardhorsford Feb 16, 2016
d42fa85
Scope views between apps
edwardhorsford Feb 16, 2016
09e830b
Continue spliting app and docs
edwardhorsford Feb 18, 2016
c312416
Updates to install page
edwardhorsford Feb 18, 2016
107ea90
Minor updates
edwardhorsford Feb 18, 2016
0fe33a2
Minor updates
edwardhorsford Feb 18, 2016
7b64c19
Correct captitalisation of Node
edwardhorsford Feb 18, 2016
4831fbd
Set up markdown rendering of .md files. And lots of other stuff. Soz
edwardhorsford Feb 19, 2016
ea4d661
Add sync-request module
edwardhorsford Feb 19, 2016
dd1f946
Cleanup
edwardhorsford Feb 19, 2016
7db7812
Add config to redirect root to /docs
edwardhorsford Feb 25, 2016
351b096
Compare to string, not boolean
edwardhorsford Feb 25, 2016
bfc1f57
Compare to string, not boolean
edwardhorsford Feb 25, 2016
2ee7e2a
Clean up links in documentation
edwardhorsford Feb 25, 2016
9494168
Style blockquotes in markdown
edwardhorsford Feb 25, 2016
9bbc3d3
Remove old dependency
edwardhorsford Feb 25, 2016
47922de
Cleanup
edwardhorsford Feb 25, 2016
0ca614e
Compare against boolean
edwardhorsford Feb 25, 2016
a92f906
Fix merge conflicts
edwardhorsford Feb 25, 2016
5d0f904
Add nunjucks as a dependency
edwardhorsford Feb 25, 2016
e35cb6c
Remove express nunjucks as a dependency
edwardhorsford Feb 25, 2016
8fe7065
Styling cleanup and more comments
edwardhorsford Mar 1, 2016
20abd2c
Cache releaseUrl for life of running app
edwardhorsford Mar 2, 2016
b1c6cc0
Move releaseUrl variable to separate section
edwardhorsford Mar 2, 2016
6788a5b
Update index page to link to docs
edwardhorsford Mar 2, 2016
5d42919
Fix link to github
edwardhorsford Mar 4, 2016
aead7e8
Fix content for community link
edwardhorsford Mar 4, 2016
a3d0309
Change CMD to Command Prompt
edwardhorsford Mar 4, 2016
dc9ea70
Update examples page and rename filename
edwardhorsford Mar 30, 2016
ad8cb60
Convert zipball_url to non api zip url
edwardhorsford Apr 5, 2016
be585a6
Remove the 'g' after password
gemmaleigh Aug 16, 2016
478f7d5
Fix the typo in guides
gemmaleigh Aug 16, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = function(grunt){
sourcemap: true,
includePaths: [
'govuk_modules/govuk_template/assets/stylesheets',
'govuk_modules/govuk_frontend_toolkit/stylesheets'
'govuk_modules/govuk_frontend_toolkit/stylesheets',
'docs/assets/sass'
],
outputStyle: 'expanded'
},
Expand All @@ -18,8 +19,8 @@ module.exports = function(grunt){
cwd: "app/assets/sass",
src: ["*.scss"],
dest: "public/stylesheets/",
ext: ".css"
}]
ext: ".css",
}],
}
},

Expand Down
1 change: 1 addition & 0 deletions app/assets/sass/application.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Import GOV.UK elements, this will import the frontend toolkit and some base styles.
// Take a look in _govuk-elements.scss to see which files are imported.
@import 'govuk-elements';
@import 'documentation';

// Take a look at patterns.scss to see which files are imported.
@import 'patterns';
Expand Down
5 changes: 4 additions & 1 deletion app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ module.exports = {
useAuth: 'true',

// Cookie warning - update link to service's cookie page.
cookieText: 'GOV.UK uses cookies to make the site simpler. <a href="#" title="Find out more about cookies">Find out more about cookies</a>'
cookieText: 'GOV.UK uses cookies to make the site simpler. <a href="#" title="Find out more about cookies">Find out more about cookies</a>',

// Enable or disable built-in docs and examples.
useDocs: 'true'

};

29 changes: 0 additions & 29 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,7 @@ router.get('/', function (req, res) {
});


// Example routes - feel free to delete these

// Passing data into a page

router.get('/examples/template-data', function (req, res) {

res.render('examples/template-data', { 'name' : 'Foo' });

});

// Branching

router.get('/examples/over-18', function (req, res) {

// get the answer from the query string (eg. ?over18=false)
var over18 = req.query.over18;

if (over18 == "false"){

// redirect to the relevant page
res.redirect("/examples/under-18");

} else {

// if over18 is any other value (or is missing) render the page requested
res.render('examples/over-18');

}

});

// add your routes here

Expand Down
121 changes: 0 additions & 121 deletions app/views/examples/index.html

This file was deleted.

46 changes: 8 additions & 38 deletions app/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,19 @@
<div class="grid-row">
<div class="column-two-thirds">

<h1 class="heading-xlarge">The GOV.UK prototype kit</h1>
<h1 class="heading-xlarge">Welcome to the GOV.UK prototype kit</h1>

<p>
This kit lets you rapidly create HTML prototypes of GOV.UK services.
This page is your index page. You can find it in <span class="code">/app/views/index.html</span>.
</p>
<p>Once you're familiar with the kit, you'll probably want to replace this page with one about your prototype.</p>

<p>
It contains all you need to prototype anything from simple static pages to complex, data-driven transactions.
</p>
<h2 class="heading-medium">Documentation</h2>
<p>Documentation, examples and templates are available at <a href="/docs/">http://localhost:3000/docs/</a></p>
<ol>

<h2 class="heading-medium">About this page</h2>

<p>We recommend you add links to your prototype to this page, rather than delete it.
You'll find this page in the kit at '/app/views/index.html'.</p>
<p>You can change the service name by editing the file '/app/config.js'.</p>

<h2 class="heading-medium">Examples and documentation</h2>

<ul class="list list-bullet">
<li><a href="/examples">Example pages and patterns</a></li>
<li><a href="https://github.com/alphagov/govuk_prototype_kit/tree/master/docs">
Read the full documentation</a></li>
</ul>

<h2 class="heading-medium">Other resources</h2>

<ul class="list list-bullet">
<li>
<a href="http://govuk-elements.herokuapp.com/snippets/">
Guide to GOV.UK Elements
</a>
</li>
<li>
<a href="https://www.gov.uk/service-manual">
Service design manual
</a>
</li>
<li>
<a href="https://www.gov.uk/design-principles">
Government Digital Service Design Principles
</a>
</li>
</ul>
<h2 class="heading-medium">Setting up your prototype</h2>
<p>You can edit prototype settings here: <span class="code">/app/config.js</span></p>

</div>
</div>
Expand Down
51 changes: 51 additions & 0 deletions docs/assets/sass/documentation.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.markdown {
h1 {
@extend .heading-xlarge;
}

h2 {
@extend .heading-large;
}

h3 {
@extend .heading-medium;
}

h4 {
@extend .heading-small;
}

code {
background: $grey-4;
padding: 3px;
font-size: 1em;
}

pre > code {
@extend .code;
display: block;
@extend .panel;
@extend .panel-border-wide;
font-family: monospace;
margin-bottom: 15px;
}

img {
max-width: 100%;
}

ul {
@extend .list;
@extend .list-bullet;
}

blockquote {
@extend .panel;
@extend .panel-border-wide;
}

strong {
font-weight: 700;
}
}

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Instructions for developers
# Advanced install guide

It's built on the [Express](http://expressjs.com/) framework, and uses these GOV.UK resources:

Expand All @@ -8,7 +8,8 @@ It's built on the [Express](http://expressjs.com/) framework, and uses these GOV

## Requirements

node.js - version 4.x.x
* Node.js - version 4.x.x
* command line tools (mac)

## Install dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ The install may take up to a minute.
---
[Previous page (requirements)](requirements.md)

[Next page (run the kit)](run-the-kit.md)

---
[Documentation index](../README.md)

[Next page (run the kit)](run-the-kit.md)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ You’ll use a copy of the kit for each different prototype you want to make - t

---
[Next page (requirements)](requirements.md)

---
[Documentation index](../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Macs come with `Terminal.app`. It’s located in the `Utilities` folder in the `

### Windows users

This guide will use `Git Bash` as a terminal instead of the existing `CMD` application. Git Bash is more fully featured and uses the same commands as Mac and Linux, so instructions in this guide work for all.
This guide will use `Git Bash` as a terminal instead of the existing `Command Prompt` application. Git Bash is more fully featured and uses the same commands as Mac and Linux, so instructions in this guide work for all.

Installing `git bash` installs two things for you: a terminal (for entering commands), and git (used later to share your work with others).

Expand Down Expand Up @@ -104,7 +104,7 @@ If you don’t have command line tools, it will open an installer. Follow the in
---
[Previous page (introduction)](introduction.md)

---

[Next page (install the kit)](install-the-kit.md)

---
[Documentation index](../README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ In terminal press the `ctrl` and `c` keys together.

The kit is now installed. Congratulations!

---
[Previous page (install the kit)](install-the-kit.md)
Next you may want to try out some of the [examples or tutorials](/docs/guides-and-examples).

---
[Documentation index](../README.md)
[Previous page (install the kit)](install-the-kit.md)
File renamed without changes.
Loading