Give pages unique H1s

This commit is contained in:
Rowan Manning
2013-10-03 14:49:36 +01:00
parent 872cabc0e0
commit 84d36d383b
6 changed files with 19 additions and 8 deletions

9
app.js
View File

@@ -54,12 +54,13 @@ function initApp (config, callback) {
app.express.locals({ app.express.locals({
lang: 'en', lang: 'en',
year: (new Date()).getFullYear(), year: (new Date()).getFullYear(),
version : pkg.version, version: pkg.version,
repo : pkg.homepage, repo: pkg.homepage,
bugtracker : pkg.bugs, bugtracker: pkg.bugs,
rules : pkg.snifferules rules: pkg.snifferules
}); });
app.express.use(function (req, res, next) { app.express.use(function (req, res, next) {
res.locals.isHomePage = (req.path === '/');
res.locals.host = req.host; res.locals.host = req.host;
next(); next();
}); });

View File

@@ -97,6 +97,13 @@
color:lighten(@brand-danger, 8%); color:lighten(@brand-danger, 8%);
} }
/* Type */
.h1, .h2, .h3 {
margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2);
}
/* Task stats boxes */ /* Task stats boxes */
.task-stats { .task-stats {
margin-bottom:10px; margin-bottom:10px;

View File

@@ -6,7 +6,7 @@
<form role="form" class="col-md-12" action="/new" method="post"> <form role="form" class="col-md-12" action="/new" method="post">
<div class="legend"> <div class="legend">
<legend>Add a new URL</legend> <h1 class="h2 crunch-top">Add a new URL</h1>
</div> </div>
{{#error}} {{#error}}

View File

@@ -1,7 +1,10 @@
<header> <header>
<div role="banner" class="header"> <div role="banner" class="header">
<div class="container"> <div class="container">
<h1><a href="/">pa11y dashboard</a> - <span class="h3">your automated accessibility testing pal</span></h1> {{#if isHomePage}}<h1>{{else}}<div class="h1">{{/if}}
<a href="/">pa11y dashboard</a> -
<span class="h3">your automated accessibility testing pal</span>
{{#if isHomePage}}</h1>{{else}}</div>{{/if}}
</div> </div>
</div> </div>
</header> </header>

View File

@@ -3,7 +3,7 @@
<div class="row clearfix"> <div class="row clearfix">
<div class="col-md-12"> <div class="col-md-12">
<div class="h3 crunch well-med well pull-right"><span class="glyphicon glyphicon-calendar"></span>&nbsp;{{date-format mainResult.date format="DD MMM YYYY"}}</div> <div class="h3 crunch well-med well pull-right"><span class="glyphicon glyphicon-calendar"></span>&nbsp;{{date-format mainResult.date format="DD MMM YYYY"}}</div>
<h2 class="crunch-top">{{simplify-url task.url}}</h2> <h1 class="h2 crunch-top">{{simplify-url task.url}}</h1>
<p class="h4">({{task.standard}})</p> <p class="h4">({{task.standard}})</p>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="ruled task-header"> <div class="ruled task-header">
<div class="row clearfix"> <div class="row clearfix">
<div class="col-md-10"> <div class="col-md-10">
<h2 class="crunch-top">{{simplify-url task.url}}</h2> <h1 class="h2 crunch-top">{{simplify-url task.url}}</h1>
<p class="h4">({{task.standard}})</p> <p class="h4">({{task.standard}})</p>
</div> </div>
<div class="col-md-2 text-right run-details"> <div class="col-md-2 text-right run-details">