baseof: separate into header, footer
This commit is contained in:
parent
118bf1345e
commit
28aa04ddb6
|
@ -6,28 +6,12 @@
|
||||||
</head>
|
</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 }}">
|
||||||
{{- if $.Site.Params.SetThemeAuto -}}
|
{{- partial "header.html" . }}
|
||||||
<script>
|
|
||||||
setTheme();
|
|
||||||
</script>
|
|
||||||
{{- end -}}
|
|
||||||
<header class="header">
|
|
||||||
{{- partial "header.html" . }}
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="main">
|
<main class="main">
|
||||||
{{- block "main" . }}
|
{{- block "main" . }}
|
||||||
{{end }}
|
{{end }}
|
||||||
</main>
|
</main>
|
||||||
|
{{- partial "footer.html" . }}
|
||||||
<footer class="footer">
|
|
||||||
{{- partial "footer.html" . }}
|
|
||||||
</footer>
|
|
||||||
{{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
|
|
||||||
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
|
||||||
<script>
|
|
||||||
hljs.initHighlightingOnLoad();
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -1,5 +1,13 @@
|
||||||
<span>© {{ now.Year }} <a href="{{ "" | absURL }}">{{ .Site.Title }}</a></span>
|
<footer class="footer">
|
||||||
<span>·</span>
|
<span>© {{ now.Year }} <a href="{{ "" | absURL }}">{{ .Site.Title }}</a></span>
|
||||||
<span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
|
<span>·</span>
|
||||||
<span>·</span>
|
<span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
|
||||||
<span>Theme️ <a href="https://github.com/adityatelange/hugo-PaperMod" rel="noopener" target="_blank">PaperMod</a></span>
|
<span>·</span>
|
||||||
|
<span>Theme️ <a href="https://github.com/adityatelange/hugo-PaperMod" rel="noopener"
|
||||||
|
target="_blank">PaperMod</a></span>
|
||||||
|
</footer>
|
||||||
|
{{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}}
|
||||||
|
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
||||||
|
<script>
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
</script>
|
|
@ -1,16 +1,28 @@
|
||||||
<nav class="nav">
|
{{- if $.Site.Params.SetThemeAuto -}}
|
||||||
{{- if .IsHome }}
|
<script>
|
||||||
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
|
setTheme();
|
||||||
{{- else }}
|
</script>
|
||||||
<p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p>
|
{{- end -}}
|
||||||
{{- end }}
|
<header class="header">
|
||||||
{{- if .Site.Menus.main }}
|
{{- if $.Site.Params.SetThemeAuto -}}
|
||||||
<ul class="menu">
|
<script>
|
||||||
{{- range .Site.Menus.main }}
|
setTheme();
|
||||||
<li>
|
</script>
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
{{- end -}}
|
||||||
</li>
|
<nav class="nav">
|
||||||
|
{{- if .IsHome }}
|
||||||
|
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
|
||||||
|
{{- else }}
|
||||||
|
<p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
{{- if .Site.Menus.main }}
|
||||||
{{- end }}
|
<ul class="menu">
|
||||||
</nav>
|
{{- range .Site.Menus.main }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
</li>
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
</nav>
|
||||||
|
</header>
|
Loading…
Reference in New Issue