mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 10:31:39 +01:00
new layout
- create baseof - separate list, single - header, footer
This commit is contained in:
parent
2e0ef75edf
commit
8a0783adfb
31
layouts/_default/baseof.html
Normal file
31
layouts/_default/baseof.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Site.LanguageCode }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
{{- partial "head.html" . }}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}">
|
||||||
|
<script>
|
||||||
|
setTheme();
|
||||||
|
</script>
|
||||||
|
<header class="header">
|
||||||
|
{{- partial "header.html" . }}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="main">
|
||||||
|
{{- block "main" . }}
|
||||||
|
{{end }}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
{{- partial "footer.html" . }}
|
||||||
|
</footer>
|
||||||
|
{{ $highlight := resources.Get "highlight.min.js" | minify }}
|
||||||
|
<script src="{{ $highlight.Permalink }}"></script>
|
||||||
|
<script>
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -1,4 +1,4 @@
|
|||||||
{{- partial "header.html" . }}
|
{{ define "main" }}
|
||||||
|
|
||||||
{{- $scope := .Site }}
|
{{- $scope := .Site }}
|
||||||
|
|
||||||
@ -39,4 +39,4 @@
|
|||||||
</footer>
|
</footer>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- partial "footer.html" . }}
|
{{ end }}{{/* end main */}}
|
@ -1,4 +1,4 @@
|
|||||||
{{- partial "header.html" . }}
|
{{ define "main" }}
|
||||||
|
|
||||||
<article class="post-single">
|
<article class="post-single">
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
@ -26,4 +26,4 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{{- partial "footer.html" . }}
|
{{ end }}{{/* end main */}}
|
@ -1,16 +1,5 @@
|
|||||||
</main>
|
<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/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
|
||||||
<span>·</span>
|
|
||||||
<span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
|
|
||||||
</footer>
|
|
||||||
{{ $highlight := resources.Get "highlight.min.js" | minify }}
|
|
||||||
<script src="{{ $highlight.Permalink }}"></script>
|
|
||||||
<script>
|
|
||||||
hljs.initHighlightingOnLoad();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,16 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<nav class="nav">
|
||||||
<html lang="{{ .Site.LanguageCode }}">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
{{- partial "head.html" . }}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<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>
|
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
@ -25,6 +13,4 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
|
||||||
<main class="main">
|
|
Loading…
Reference in New Issue
Block a user