Skip to content

Commit

Permalink
Move local stylesheet to partial & tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
tombye committed Feb 23, 2014
1 parent b0abed7 commit 9472294
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 11 deletions.
8 changes: 0 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,20 @@ app.set('views', __dirname + '/views');
app.use('/public', express.static(__dirname + '/public'));
app.use('/public', express.static(__dirname + '/govuk/public'));

var commonHead = '<link href="/public/stylesheets/application.css" rel="stylesheet" type="text/css" />';

// routes

app.get('/', function (req, res) {

var head = commonHead;

res.render('index',
{'pageTitle': 'index',
'head' : head,
'assetPath' : '/public/'});

});

app.get('/sample', function (req, res) {

var head = commonHead;

res.render('sample',
{'pageTitle': 'sample',
'head' : head,
'assetPath' : '/public/'});
});

Expand Down
10 changes: 9 additions & 1 deletion public/sass/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@
@include ie-lte(6) {
width: 990px;
}
}
}
.page-header {
padding: 0 32px;

h1 {
@include bold-48;
padding: 25px 0 15px;
}
}
15 changes: 15 additions & 0 deletions public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,18 @@ Example usage:
#content {
margin: 0 auto;
max-width: 1020px; }

.page-header {
padding: 0 32px; }
.page-header h1 {
font-family: "nta", Arial, sans-serif;
font-size: 48px;
line-height: 1.04167;
font-weight: 400;
text-transform: none;
font-weight: 700;
padding: 25px 0 15px; }
@media (max-width: 640px) {
.page-header h1 {
font-size: 32px;
line-height: 1.09375; } }
1 change: 1 addition & 0 deletions views/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link href="/public/stylesheets/application.css" rel="stylesheet" type="text/css" />
9 changes: 7 additions & 2 deletions views/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{<govuk_template}}

{{$head}}
{{>head}}
{{/head}}

{{$propositionHeader}}
{{>propositional_navigation}}
{{/propositionHeader}}
Expand All @@ -8,8 +12,9 @@

{{$content}}
<main id="content" role="main">

<h1>Welcome to the GOV.UK prototyping kit</h1>
<header class="page-header">
<h1>Welcome to the GOV.UK prototyping kit</h1>
</header>

</main>
{{/content}}
Expand Down

0 comments on commit 9472294

Please sign in to comment.