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

1
app.js
View File

@@ -60,6 +60,7 @@ function initApp (config, callback) {
rules: pkg.snifferules
});
app.express.use(function (req, res, next) {
res.locals.isHomePage = (req.path === '/');
res.locals.host = req.host;
next();
});

View File

@@ -97,6 +97,13 @@
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 {
margin-bottom:10px;

View File

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

View File

@@ -1,7 +1,10 @@
<header>
<div role="banner" class="header">
<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>
</header>

View File

@@ -3,7 +3,7 @@
<div class="row clearfix">
<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>
<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>
</div>
</div>

View File

@@ -2,7 +2,7 @@
<div class="ruled task-header">
<div class="row clearfix">
<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>
</div>
<div class="col-md-2 text-right run-details">