theme/layouts/post/single.html

41 lines
1.1 KiB
HTML

{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<section class="section">
<div class="container is-centered page">
<div class="content">
<h2>
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h2>
<p>
<i>{{ .Date.Format "Mon Jan 2, 2006" }}</i>
{{ i18n "authored_by" }}
<b>
{{ if .Params.authors }}
{{ $s := newScratch }}
{{ $s.Set "len" (len .Params.authors) }}
{{ $s.Add "len" -1 }}
{{ range $idx, $author := .Params.authors -}}
<a class="author" href="{{ if hasPrefix $author "https://" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
{{ path.BaseName $author }}
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
{{- end }}
{{ else }}
<a class="author" href="{{ if hasPrefix .Params.author "https://" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
</a>
{{ end }}
</b>
</p>
{{ .Content }}
{{ partial "discourse.html" . }}
</div>
</div>
</section>
{{ partial "footer.html" . }}