brainbaking/themes/brainbaking-minimal/layouts/partials/single-header.html

68 lines
2.6 KiB
HTML

<header>
{{ if .Title }}
{{ if (not .Params.disableComments) }}
<a href="/">
<svg class="logo" style="position: absolute; left: 2rem;"><title>Brain Baking home</title><use xlink:href='#logo'></use></svg>
</a>
{{ end }}
<h1 class="p-name" id="header">
{{ with .Params.icontag }}
<svg class='icon'><title>page type</title><use xlink:href='#{{ . }}'></use></svg>
{{ end }}
{{ .Title }}
</h1>
{{ end }}
{{ if isset .Params "subtitle" }}
<h2 class="p-summary">{{ .Params.subtitle }}</h2>
{{ end }}
{{ if isset .Params "date" }}
<h3>
{{ if isset .Params "date" }}
<svg class='icon icon-text' width='24' height='24'>
<title>published icon</title>
<use xlink:href='#cal1'></use>
</svg>
<time datetime='{{ .Date.Format "2006-01-02" }}' class="dt-published">
<a class="u-url u-uid" href="{{ .RelPermalink }}">
{{ .Date.Format (.Site.Params.dateFormat | default "2 January 2006") }}
</a>
</time>
{{ end }}
{{ if isset .Params "categories" }}
&nbsp;|&nbsp;
<span title="Categories">
<svg class='icon icon-text' width='24' height='24'>
<title>category icon</title>
<use xlink:href='#folder'></use>
</svg>
{{ range .Params.categories }}
<a class="p-category" href="/categories/{{ . }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
{{ if (and (isset .Params "context") (not (eq .Params.context ""))) }}
&nbsp;|&nbsp;
<svg class='icon icon-text' width='24' height='24'>
<use xlink:href='#discuss'></use>
</svg>
<a href="{{ .Params.context }}" class="u-in-reply-to">In reply to</a>{{ with .Params.rsvp }}&nbsp;(RSVP: <span class="p-rsvp">{{ . }}</span>){{ end }}<br/>
{{ end }}
</h3>
{{ end }}
{{ if isset $.Params "tags" }}
<svg class='icon icon-text' width='24' height='24'>
<title>tags icon</title>
<use xlink:href='#tag'></use>
</svg>
{{ end }}
<span class='list-tags'>
{{ range .Params.tags }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag p-category">{{ . }}</kbd></a>
{{ end }}
</span>
</header>