Files
maupassant-hugo/layouts/_default/single.html
T

63 lines
2.5 KiB
HTML

{{ partial "head" . }}
<body>
{{ partial "header" . }}
<div id="body">
<div class="container">
<div class="col-group">
<div class="col-8" id="main">
<div class="res-cons">
<article class="post">
<header>
<h1 class="post-title">{{ .Title }}</h1>
</header>
<date class="post-meta meta-date">
{{ .Date.Year }}年{{ printf "%d" .Date.Month }}月{{ .Date.Day }}日
{{ printf "%02d" .Date.Hour }}:{{ printf "%02d" .Date.Minute }}
</date>
{{ with .Params.Categories }}
<div class="post-meta meta-category">
,归类于
{{ range . }}
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
<div class="post-content">
{{ .Content }}
</div>
<div class="post-meta meta-tags">
{{ if and (isset .Params "tags") .Params.tags }}
<ul class="clearfix">
{{ range .Params.Tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ else }}
没有标签
{{ end }}
</div>
{{ if eq .Type "post" }}
<div class="post-nav">
{{if .NextInSection}}
<a href="{{.NextInSection.Permalink}}" class="pre">{{.NextInSection.Title}}</a>
{{end}}
{{if .PrevInSection}}
<a href="{{.PrevInSection.Permalink}}" class="next">{{.PrevInSection.Title}}</a>
{{end}}
</div>
{{ end }}
</article>
{{ partial "comments" . }}
</div>
</div>
{{ partial "sidebar" . }}
</div>
</div>
</div>
{{ partial "footer" . }}
</body>
</html>