mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +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 }}
|
||||
|
||||
@ -39,4 +39,4 @@
|
||||
</footer>
|
||||
{{- end }}
|
||||
|
||||
{{- partial "footer.html" . }}
|
||||
{{ end }}{{/* end main */}}
|
@ -1,4 +1,4 @@
|
||||
{{- partial "header.html" . }}
|
||||
{{ define "main" }}
|
||||
|
||||
<article class="post-single">
|
||||
<header class="post-header">
|
||||
@ -26,4 +26,4 @@
|
||||
{{- end }}
|
||||
</article>
|
||||
|
||||
{{- partial "footer.html" . }}
|
||||
{{ end }}{{/* end main */}}
|
@ -1,16 +1,5 @@
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<span>© {{ now.Year }} <a href="{{ "" | absURL }}">{{ .Site.Title }}</a></span>
|
||||
<span>·</span>
|
||||
<span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</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>
|
||||
<span>© {{ now.Year }} <a href="{{ "" | absURL }}">{{ .Site.Title }}</a></span>
|
||||
<span>·</span>
|
||||
<span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
|
||||
<span>·</span>
|
||||
<span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
|
@ -1,16 +1,4 @@
|
||||
<!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">
|
||||
<nav class="nav">
|
||||
<nav class="nav">
|
||||
{{- if .IsHome }}
|
||||
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
|
||||
{{- else }}
|
||||
@ -25,6 +13,4 @@
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</nav>
|
||||
</header>
|
||||
<main class="main">
|
||||
</nav>
|
Loading…
Reference in New Issue
Block a user