Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanxiaobei/hugo-paper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanxiaobei <nanxiaobei@gmail.com>2020-03-09 18:56:47 +0300
committernanxiaobei <nanxiaobei@gmail.com>2020-03-09 18:56:47 +0300
commitae2b0c9d966fef37ba36c80c44eaacf212fd9fb1 (patch)
treea8fbd9d9f5ac0243c7c371e7566e2d85148bf823 /layouts
parent47ee6db428fd95cec7f282d3efa647cb9175dcff (diff)
update html format
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html4
-rw-r--r--layouts/_default/single.html26
-rw-r--r--layouts/partials/header.html38
3 files changed, 34 insertions, 34 deletions
diff --git a/layouts/404.html b/layouts/404.html
index aab2e1f..ab966ff 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,3 +1,3 @@
-{{ partial "header.html" . }}
+{{- partial "header.html" . }}
<div class="not-found">404</div>
-{{ partial "footer.html" . }} \ No newline at end of file
+{{- partial "footer.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 896588a..f32960a 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,28 +1,28 @@
-{{ partial "header.html" . }}
+{{- partial "header.html" . }}
<article class="post-single">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<div class="post-meta">
- {{- if or .Params.author .Site.Params.author -}}
- {{ .Params.author | default .Site.Params.author }} · {{ end }}
+ {{- if or .Params.author .Site.Params.author }}
+ {{- .Params.author | default .Site.Params.author }} · {{ end }}
{{- .Date.Format "January 2, 2006" -}}
</div>
</header>
<div class="post-content">{{ .Content }}</div>
- {{ if .Params.tags }}
+ {{- if .Params.tags }}
<footer class="post-footer">
<ul class="post-tags">
- {{ range .Params.tags }}
- {{ $href := print (absURL "tags/") (urlize .) }}
+ {{- range .Params.tags }}
+ {{- $href := print (absURL "tags/") (urlize .) }}
<li><a href="{{ $href }}">{{ . }}</a></li>
- {{ end }}
+ {{- end }}
</ul>
</footer>
- {{ end }}
+ {{- end }}
<!-- Comments area start -->
- {{ if not (eq .Params.comments false) }}
- {{ if .Site.DisqusShortname }}
+ {{- if not (eq .Params.comments false) }}
+ {{- if .Site.DisqusShortname }}
<div id="disqus_thread"></div>
<script>
var disqus_shortname = '{{ .Site.DisqusShortname }}';
@@ -38,8 +38,8 @@
<a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
<!-- Comments area end -->
- {{ end }}
- {{ end }}
+ {{- end }}
+ {{- end }}
</article>
-{{ partial "footer.html" . }}
+{{- partial "footer.html" . }}
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">