Skip to content

Commit

Permalink
Merge pull request #82 from alphagov/update_guidance_pages
Browse files Browse the repository at this point in the history
Update guidance pages
  • Loading branch information
timpaul committed Dec 3, 2015
2 parents e4e93b4 + 29c0b38 commit 3931b1f
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 57 deletions.
2 changes: 2 additions & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ router.get('/', function (req, res) {
res.render('index');
});


// Example route: Passing data into a page
router.get('/examples/template-data', function (req, res) {
res.render('examples/template-data', { 'name' : 'Foo' });
});
Expand Down
2 changes: 1 addition & 1 deletion app/views/examples/elements/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$content}}
<main id="content" role="main">

<a class="link-back" href="/examples/">Back to the GOV.UK prototype kit examples</a>
{{>includes/breadcrumb_examples}}

<form action="/" method="post" class="form">

Expand Down
2 changes: 1 addition & 1 deletion app/views/examples/elements/grid-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$content}}
<main id="content" role="main">

<a class="link-back" href="/examples/">Back to the GOV.UK prototype kit examples</a>
{{>includes/breadcrumb_examples}}

<h1 class="heading-xlarge">
New grid layout example
Expand Down
5 changes: 3 additions & 2 deletions app/views/examples/elements/radio-buttons-checkboxes.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{<layout}}

{{$content}}
<main id="content" role="main">
<a class="link-back" href="/examples/">Back to the GOV.UK prototype kit examples</a>
<main id="content" role="main">

{{>includes/breadcrumb_examples}}

<div class="grid-row">
<div class="column-two-thirds">
Expand Down
3 changes: 2 additions & 1 deletion app/views/examples/elements/toggled-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

{{$content}}
<main id="content" role="main">
<a class="link-back" href="/examples/">Back to the GOV.UK prototype kit examples</a>

{{>includes/breadcrumb_examples}}

<div class="grid-row">
<div class="column-two-thirds">
Expand Down
2 changes: 1 addition & 1 deletion app/views/examples/elements/typography.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$content}}
<main id="content" role="main">

<a class="link-back" href="/examples/">Back to the GOV.UK prototype kit examples</a>
{{>includes/breadcrumb_examples}}

<h1 class="heading-xlarge">
Typography
Expand Down
23 changes: 14 additions & 9 deletions app/views/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@

<main id="content" role="main">

<h1 class="heading-xlarge">Examples</h1>
<div id="global-breadcrumb">
<ol>
<li><a href="/">GOV.UK prototype kit</a></li>
</ol>
</div>

<h1 class="heading-xlarge">Example pages and patterns</h1>

<p class="text">
Use these as the basis for your prototypes.
We recommend making copies of the examples rather than directly editing them.
</p>


<div class="grid-row">

<div class="column-third">

<h2 class="heading-medium">Page elements</h2>

<ul class="list-bullet">
<li>
<a href="/examples/elements/grid-layout">
Expand Down Expand Up @@ -43,13 +53,11 @@ <h2 class="heading-medium">Page elements</h2>
</a>
</li>
</ul>

</div>

<div class="column-third">

<h2 class="heading-medium">Page templates</h2>

<ul class="list-bullet">
<li>
<a href="/examples/blank-govuk">
Expand Down Expand Up @@ -82,13 +90,11 @@ <h2 class="heading-medium">Page templates</h2>
</a>
</li>
</ul>

</div>

<div class="column-third">

<h2 class="heading-medium">Template features</h2>

<ul class="list-bullet">
<li>
<a href="/examples/template-data">
Expand All @@ -101,9 +107,8 @@ <h2 class="heading-medium">Template features</h2>
</a>
</li>
</ul>

</div>

</div>

</main>
Expand Down
20 changes: 15 additions & 5 deletions app/views/examples/template-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@

{{$content}}
<main id="content" role="main">
<h1 class="heading-xlarge">Example of using variables in pages</h1>
<dl>
<dt style="font-weight: bold; display: inline;">'name' variable: </dt>
<dd style="display: inline">{{ name }}</dd>
</dl>

{{>includes/breadcrumb_examples}}

<div class="grid-row">
<div class="column-two-thirds">

<h1 class="heading-xlarge">Passing data into pages</h1>

<p class="lede">The example route defined in '/routes.js' is passing the string '{{ name }}' to this page, via the 'name' variable.</p>

<p>Check our the source for this page at '/app/views/examples/template-data.html' to see how it works.</p>

</div>
</div>

</main>
{{/content}}

Expand Down
6 changes: 6 additions & 0 deletions app/views/includes/breadcrumb_examples.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div id="global-breadcrumb">
<ol>
<li><a href="/">GOV.UK prototype kit</a></li>
<li><a href="/examples">Examples</a></li>
</ol>
</div>
85 changes: 48 additions & 37 deletions app/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,56 @@
{{$content}}

<main id="content" role="main">
<div class="grid-row">
<div class="column-two-thirds">

<h1 class="heading-xlarge">Welcome to the GOV.UK prototyping kit</h1>
<!-- feel free to change this page to suit your needs -->

<p>This is the index.html page - we recommend you put links to key pages here.</p>

<h2 class="heading-large">Pages</h2>

<ul>
<li>
<a href="/examples">Example pages</a>
</li>
</ul>

<h2 class="heading-large">Resources</h2>

<ul class="list-bullet">
<li>
<a href="https://github.com/alphagov/govuk_prototype_kit/tree/master/docs">
GOV.UK kit documentation
</a>
</li>
<li>
<a href="http://govuk-elements.herokuapp.com/snippets/">
Guide to GOV.UK elements HTML
</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>
<h1 class="heading-xlarge">The GOV.UK prototype kit</h1>

<p>
This kit lets you rapidly create HTML prototypes of GOV.UK services.
</p>

<p>
It contains all you need to prototype anything from simple static pages to complex, data-driven transactions.
</p>

<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>


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

<ul class="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-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>

</div>
</div>
</main>

{{/content}}
Expand Down

0 comments on commit 3931b1f

Please sign in to comment.