commit e974c25c0afda5aadedc0569ffa5c1348472582b
parent e8dd1c1e8aebbddeba7199682c36400cd2d4cff5
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Tue, 26 Jun 2018 16:37:43 -0500
Enclose all page-specific contents in <main> or <article> and wrap page headings in <header>.
Diffstat:
8 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/layouts/_default/home.html b/layouts/_default/home.html
@@ -1,9 +1,11 @@
{{ partial "header.html" . }}
-<h1>{{ .Site.Params.title }}</h1>
-{{ with .Site.Params.subtitle }}<span class="subtitle">{{.}}</span>{{ end }}
+<header>
+ <h1>{{ .Site.Params.title }}</h1>
+ {{ with .Site.Params.subtitle }}<aside class="subtitle">{{.}}</aside>{{ end }}
+</header>
-<main>{{ .Content }}</main>
+{{ .Content }}
<ul>
{{ range (first 5 (where .Data.Pages "Section" "!=" "") ) }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -1,7 +1,8 @@
{{ partial "header.html" . }}
-<h1>{{ partial "i18n_fallback.html" .Title }}</h1>
-<main>{{ .Content }}</main>
+<header><h1>{{ partial "i18n_fallback.html" .Title }}</h1></header>
+
+{{ .Content }}
<ul>
{{ range (where .Data.Pages "Section" "!=" "") }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -1,23 +1,24 @@
{{ partial "header.html" . }}
-
-<div class="article-meta">
-<h1><span class="title">{{ .Title }}</span></h1>
-{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
-{{ if (lt 0 .Params.date) }}<h2 class="date">{{ .Date.Format "2006-01-02" }}</h2>{{ end }}
-<p class="terms">
-{{ range $key, $_ := .Site.Taxonomies }}
- {{ with ($.Param $key) }}
- {{ partial "i18n_fallback" $key }} |
- {{ range $term := . }}
+<article>
+ <header class="article-meta">
+ <hgroup>
+ <h1 class="title">{{ .Title }}</h1>
+ {{ if (lt 0 .Params.date) }}<h2 class="date">{{ .Date.Format "2006-01-02" }}</h2>{{ end }}
+ </hgroup>
+ <p class="terms">
+ {{ range $key, $_ := .Site.Taxonomies }}
+ {{ with ($.Param $key) }}
+ {{ partial "i18n_fallback" $key }} |
+ {{ range $term := . }}
<a href="{{ print "/" $key "/" $term | urlize | relLangURL}}">{{ partial "i18n_fallback" $term }}</a> |
- {{ end }}
- <br/>
- {{ end }}
-{{ end }}
-</p>
-</div>
-
-<main>{{ .Content }}</main>
+ {{ end }}
+ <br/>
+ {{ end }}
+ {{ end }}
+ </p>
+ </header>
+ {{ .Content }}
+</article>
{{ partial "comment.html" . }}
{{ partial "footer.html" . }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
@@ -1,7 +1,8 @@
{{ partial "header.html" . }}
-<h1>{{ partial "i18n_fallback.html" .Title }}</h1>
-<main>{{ .Content }}</main>
+<header><h1>{{ partial "i18n_fallback.html" .Title }}</h1></header>
+
+{{ .Content }}
<ul class="terms">
{{ range $key, $value := .Data.Terms }}
diff --git a/layouts/partials/css/fonts.css b/layouts/partials/css/fonts.css
@@ -47,10 +47,6 @@ body {
font-family: "Noto Sans SC Sliced Override", "Oxygen", "Noto Sans SC Sliced", Candara, Calibri, Arial, sans-serif;
}
-.title {
- font-weight: bold;
-}
-
code {
font-family: "Iosevka Term", monospace;
font-size: 90%;
diff --git a/layouts/partials/css/style.css b/layouts/partials/css/style.css
@@ -14,7 +14,7 @@ body {
border-radius: 5px;
}
.menu, .article-meta, footer { text-align: center; }
-.title { font-size: 1.1em; line-height: 1.1em;}
+.title { font-size: 2em; line-height: 1.1em; }
hr { border: 1px dashed #ddd; }
.subtitle {
color: #700000;
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
@@ -1,6 +1,7 @@
-<hr/>
-<footer>
- {{ with .Site.Copyright }} {{ . | markdownify }} {{ end }}
-</footer>
-</body>
+ </main>
+ <hr/>
+ <footer>
+ {{ with .Site.Copyright }} {{ . | markdownify }} {{ end }}
+ </footer>
+ </body>
</html>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="{{.Site.Language}}">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- {{ partial "favicon.html" . }}
- {{ partial "stylesheet.html" . }}
- {{ partial "katex.html" . }}
- <title>{{ partial "i18n_fallback" .Title}} | {{.Site.Title}}</title>
-</head>
-<body>
-{{ partial "navigation_bar.html" . }}
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {{ partial "favicon.html" . }}
+ {{ partial "stylesheet.html" . }}
+ {{ partial "katex.html" . }}
+ <title>{{ partial "i18n_fallback" .Title}} | {{.Site.Title}}</title>
+ </head>
+ <body>
+ {{ partial "navigation_bar.html" . }}
+ <main>