Hugo内容
This commit is contained in:
25
Hugo/themes/nostyleplease/layouts/posts/baseof.html
Normal file
25
Hugo/themes/nostyleplease/layouts/posts/baseof.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ $.Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
<body a="{{ $.Site.Params.theme_config.appearance | default "auto" }}">
|
||||
<main class="page-content" aria-label="Content">
|
||||
<div class="w">
|
||||
<div class="post-meta">
|
||||
{{ partial "back_link.html" .}}
|
||||
<p>
|
||||
<time datetime="{{ .Date }}">
|
||||
{{ .Date | time.Format site.Params.theme_config.date_format }}
|
||||
</time>
|
||||
</p>
|
||||
</div>
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
{{- if .Params.custom_js -}}
|
||||
{{- range .Params.custom_js -}}
|
||||
{{ $js := resources.Get (print "js/" . ".js") }}
|
||||
<script type="text/javascript" src="{{ $js.RelPermalink }}"></script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</html>
|
||||
21
Hugo/themes/nostyleplease/layouts/posts/list.html
Normal file
21
Hugo/themes/nostyleplease/layouts/posts/list.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<!-- divide post list by year -->
|
||||
{{ if .Site.Params.theme_config.isListGroupByDate }}
|
||||
{{ range .Pages.GroupByDate "2006 Year" }}
|
||||
<p>{{ .Key }}</p>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ partial "post_list.html" (dict "context" . "section" .Section)}}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
14
Hugo/themes/nostyleplease/layouts/posts/single.html
Normal file
14
Hugo/themes/nostyleplease/layouts/posts/single.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ if .Params.toc }}
|
||||
<aside {{ if .Params.tocBorder }} class="toc" {{ end }}>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user