summaryrefslogtreecommitdiff
path: root/layouts/partials/header.html
diff options
context:
space:
mode:
authornanxiaobei <nanxiaobei@gmail.com>2020-03-09 23:56:47 +0800
committernanxiaobei <nanxiaobei@gmail.com>2020-03-09 23:56:47 +0800
commitae2b0c9d966fef37ba36c80c44eaacf212fd9fb1 (patch)
treea8fbd9d9f5ac0243c7c371e7566e2d85148bf823 /layouts/partials/header.html
parent47ee6db428fd95cec7f282d3efa647cb9175dcff (diff)
update html format
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html38
1 files changed, 19 insertions, 19 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index c21ac8c..b2a821b 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -7,20 +7,20 @@
<!-- Title -->
<title>
{{- if not .IsHome }}
- {{- if eq .Kind "page" }}{{ .Title }}
- {{- else if eq .Data.Singular "tag" }}{{ .Data.Term }}
- {{- else }}Posts
- {{- end }} - {{ end }}
+ {{- if eq .Kind "page" }}{{ .Title }}{{ else if .Data.Term }}{{ .Data.Term }}{{ else }}Tags{{ end }}
+ {{- print " - " }}
+ {{- end }}
+
{{- .Site.Title -}}
</title>
<!-- Meta -->
{{- if eq .Kind "page" }}
<meta name="description" content="{{ .Summary }}">
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
- {{ else }}
+ {{- else }}
<meta name="description" content="{{ .Site.Params.description }}">
<meta name="author" content="{{ .Site.Params.author }}">
- {{ end -}}
+ {{- end }}
<!-- Styles -->
<link href="{{ "an-old-hope.min.css" | absURL }}" rel="stylesheet">
<link href="{{ "style.css" | absURL }}" rel="stylesheet">
@@ -28,14 +28,14 @@
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<link rel="icon" href="{{ "favicon.ico" | absURL }}">
<!-- Generator -->
- {{ hugo.Generator }}
+ {{- hugo.Generator }}
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }}">
<!-- Misc -->
- {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
- {{ template "_internal/google_analytics_async.html" . }}
- {{ template "_internal/opengraph.html" . }}
- {{ end }}
+ {{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+ {{- template "_internal/google_analytics_async.html" . }}
+ {{- template "_internal/opengraph.html" . }}
+ {{- end }}
<!-- Script -->
<script>
function setTheme() {
@@ -80,26 +80,26 @@
}
</script>
</head>
- <body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
+ <body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}">
<script>
setTheme();
</script>
<header class="header">
<nav class="nav">
- {{ if .IsHome }}
+ {{- if .IsHome }}
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
- {{ else }}
+ {{- else }}
<p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p>
- {{ end }}
- {{ if .Site.Menus.main }}
+ {{- end }}
+ {{- if .Site.Menus.main }}
<ul class="menu">
- {{ range .Site.Menus.main }}
+ {{- range .Site.Menus.main }}
<li>
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
- {{ end }}
+ {{- end }}
</ul>
- {{ end }}
+ {{- end }}
</nav>
</header>
<main class="main">