hugo-tufte/layouts/partials/content.header.html

40 lines
871 B
HTML
Raw Normal View History

<section>
2023-04-15 01:36:29 +02:00
<h1 class="content-title">
{{ if .IsNode }}
{{ .Title }}
2023-04-15 01:36:29 +02:00
{{ else }}
{{ .Title }}{{ if .Draft }} :: Draft {{end}}
2023-04-15 01:36:29 +02:00
{{ end }}
</h1>
{{ if .IsPage }}
{{ if .Params.subtitle }}
2023-04-17 18:20:14 +02:00
<h3 class=subtitle>{{ .Params.subtitle }}</h3>
2023-04-15 01:36:29 +02:00
{{ end }}
{{ if or (eq .Type "post") (.Params.meta) }}
<span class="content-meta">
{{ if .Params.author }}
2023-04-17 18:20:14 +02:00
<p class="author">{{ .Params.author }}</p>
2023-04-15 01:36:29 +02:00
{{ end }}
{{ if not .Params.hidedate }}
2023-04-17 18:20:14 +02:00
<p class="date">{{ .Date.Format "2006-01-02" }}</p>
2023-04-15 01:36:29 +02:00
{{end }}
{{ if not .Params.hidereadtime }}
{{ .ReadingTime }} min read
2023-04-15 01:36:29 +02:00
{{ end }}
{{ if .Params.categories }}
{{ range .Params.categories }}
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
2021-07-21 20:23:55 +02:00
{{ end }}
2023-04-15 01:36:29 +02:00
{{ end }}
</span>
2021-07-21 20:23:55 +02:00
{{ end }}
2023-04-15 01:36:29 +02:00
{{ end }}
</section>