salloum.ch/themes/hugo-blog-awesome/layouts/_default/single.html

36 lines
1.3 KiB
HTML

{{ define "main" }}
<div class="wrapper post">
<main class="page-content" aria-label="Content">
<article>
<header class="header">
<h1 class="header-title">{{ .Title }}</h1>
{{ with .Date }}
{{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }}
<div class="post-meta">
<time datetime="{{ $ISO_time }}" itemprop="datePublished"> {{ . | time.Format ":date_medium" }} </time>
</div>
{{ end }}
</header>
{{- if .Site.Params.toc -}}
{{ if not (eq .Params.toc false) }}
{{ $tocOpen := "" }}
{{ if or .Site.Params.tocOpen .Params.tocOpen }}
{{ if not (eq .Params.tocOpen false) }}
{{ $tocOpen = "open" }}
{{ end }}
{{ end }}
<details class="toc" {{ $tocOpen }}>
<summary><b>{{ T "single.table_of_contents" }}</b></summary>
{{ .TableOfContents }}
</details>
{{ end }}
{{- end -}}
<div class="page-content">
{{ .Content }}
</div>
</article>
{{- partial "comments.html" . -}}
</main>
</div>
{{ end }}