Skip to content

Commit 7723583

Browse files
committed
Layout files with header, section and footer tags. Fixed typo “Cookbok”. Sub menu in all layouts.
1 parent 95e98a2 commit 7723583

File tree

4 files changed

+58
-40
lines changed

4 files changed

+58
-40
lines changed

_layouts/chapter.html

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@
55
<link rel="stylesheet" href="/css/default.css" type="text/css">
66
</head>
77
<body>
8-
<div class="header">
9-
<h1><a href="/">CoffeeScript Cookbook</a></h1>
10-
<a href="/chapters">Chapter Index</a> |
11-
<a href="/contributing">Contributing</a> |
12-
<a href="/authors">Authors</a> |
13-
<a href="/license">License</a>
14-
</div>
15-
16-
<h1>Chapter: {{ page.title }}</h1>
17-
18-
{{ content }}
19-
<hr />
20-
<p>Don't see the recipe you want? Add it yourself by reading the <a href="/contributing">Contributor's Guide</a>, or request it by adding it to <a href="/wanted-recipes">Wanted Recipes</a>.</p>
21-
<p><a href="/license"><img border="0" src="/images/cc_by_badge.png"></a></p>
22-
</body>
8+
<header>
9+
<h1><a href="/">CoffeeScript Cookbook</a></h1>
10+
<a href="/chapters">Chapter Index</a> |
11+
<a href="/contributing">Contributing</a> |
12+
<a href="/authors">Authors</a> |
13+
<a href="/license">License</a>
14+
</header>
15+
<section class="content">
16+
<h2>{{ page.title }}</h2>
17+
{{ content }}
18+
</section>
19+
<footer>
20+
<p>Don't see the recipe you want? Add it yourself by reading the <a href="/contributing">Contributor's Guide</a>, or request it by adding it to <a href="/wanted-recipes">Wanted Recipes</a>.</p>
21+
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
22+
</footer>
23+
</body>
2324
</html>
2425

_layouts/default.html

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@
55
<link rel="stylesheet" href="/css/default.css" type="text/css">
66
</head>
77
<body>
8-
<div class="header">
9-
<h1><a href="/">CoffeeScript Cookbook</a></h1>
10-
<a href="/chapters">Chapter Index</a> |
11-
<a href="/contributing">Contributing</a> |
12-
<a href="/authors">Authors</a> |
13-
<a href="/license">License</a>
14-
</div>
15-
{{ content }}
16-
<hr />
17-
<p>Don't see a recipe you want? See an entire missing chapter? Add it yourself by reading the <a href="/contributing">Contributor's Guide</a>, or request it by adding it to <a href="/wanted-recipes">Wanted Recipes</a>.</p>
18-
<p><a href="/license"><img border="0" src="/images/cc_by_badge.png"></a></p>
19-
</body>
8+
<header>
9+
<h1><a href="/">CoffeeScript Cookbook</a></h1>
10+
<a href="/chapters">Chapter Index</a> |
11+
<a href="/contributing">Contributing</a> |
12+
<a href="/authors">Authors</a> |
13+
<a href="/license">License</a>
14+
</header>
15+
<section class="content">
16+
{{ content }}
17+
</section>
18+
<footer>
19+
<p>Don't see a recipe you want? See an entire missing chapter? Add it yourself by reading the <a href="/contributing">Contributor's Guide</a>, or request it by adding it to <a href="/wanted-recipes">Wanted Recipes</a>.</p>
20+
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
21+
</footer>
22+
</body>
2023
</html>
2124

_layouts/recipe.html

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@
55
<link rel="stylesheet" href="/css/default.css" type="text/css">
66
</head>
77
<body>
8-
<div class="header">
9-
<h2>
10-
<a href="/">CoffeeScript Cookbok:</a>
11-
<a href="/chapters">Chapters</a> &raquo;
12-
<a href="/chapters/{{ page.chapter | downcase }}">{{ page.chapter }}</a> &raquo;
13-
{{ page.title }}</h2>
14-
</div>
15-
{{ content }}
16-
<hr />
17-
<p>Is this recipe wrong, incomplete, or non idiomatic? Help fix it by reading the <a href="/contributing">Contributor's Guide</a>!</p>
18-
<p><a href="/license"><img border="0" src="/images/cc_by_badge.png"></a></p>
8+
<header>
9+
<h1>
10+
<a href="/">CoffeeScript Cookbook</a> &raquo;
11+
<a href="/chapters/{{ page.chapter | downcase }}">{{ page.chapter }}</a> &raquo;
12+
{{ page.title }}
13+
</h1>
14+
<a href="/chapters">Chapter Index</a> |
15+
<a href="/contributing">Contributing</a> |
16+
<a href="/authors">Authors</a> |
17+
<a href="/license">License</a>
18+
</header>
19+
<section class="content">
20+
{{ content }}
21+
</section>
22+
<footer>
23+
<p>Is this recipe wrong, incomplete, or non idiomatic? Help fix it by reading the <a href="/contributing">Contributor's Guide</a>!</p>
24+
<a href="/license"><img src="/images/cc_by_badge.png" /></a>
25+
</footer>
1926
</body>
2027
</html>
2128

css/default.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
margin: 0;
1111
}
1212

13+
article, header, section, footer {
14+
display: block;
15+
}
16+
1317
/* Colors */
1418

1519
a, .header a:visited {
@@ -22,9 +26,12 @@ a:hover {
2226
text-shadow: 0 0 0 #DCEEF5;
2327
}
2428

25-
hr {
29+
footer {
2630
border-top: 1px solid #eee;
31+
padding-top: 22px;
2732
margin: 21px 0 22px 0;
33+
color: #888;
34+
font-size: 14px;
2835
}
2936

3037
/* Layout (margins, padding) */
@@ -35,7 +42,7 @@ pre {
3542
margin: 22px 0;
3643
}
3744

38-
p, .header { margin-bottom: 22px; }
45+
p, header, section { margin-bottom: 22px; }
3946

4047
ul {
4148
list-style: none;

0 commit comments

Comments
 (0)