67 lines
1.7 KiB
HTML
67 lines
1.7 KiB
HTML
{{ define "title" }}
|
|
{{ .Page.Title | plainify }} |
|
|
{{ .Site.Title }}
|
|
{{ end }}
|
|
|
|
{{ define "main-class" }}--section{{ end }}
|
|
|
|
{{ define "main-type" }}.{{ .Params.mainType }}{{ end }}
|
|
{{ define "item-type" }}{{ .Params.itemsType }}{{ end }}
|
|
|
|
{{ define "main-header" }}
|
|
<header class="site-content__header">
|
|
<h1 class="page-title">
|
|
{{ .Title | safeHTML }}
|
|
{{ range .AlternativeOutputFormats -}}
|
|
<a href="{{ .RelPermalink }}">
|
|
<img
|
|
class="feed-icon"
|
|
src="/images/feed-icon.svg"
|
|
/>
|
|
</a>
|
|
{{ end }}
|
|
</h1>
|
|
|
|
{{ with ( default .Parent.Sections .Sections ) }}
|
|
<nav class="section-nav">
|
|
<ul>
|
|
{{ range .ByWeight }}
|
|
<li>
|
|
{{ if eq . $.Page }}
|
|
<p style="margin: 0;">{{ .Title }}</p>
|
|
{{ else }}
|
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|
|
{{ end }}
|
|
|
|
|
|
<div class="section__desc">
|
|
{{ .Content }}
|
|
</div>
|
|
</header>
|
|
{{ end }}
|
|
|
|
{{ define "main-body" }}
|
|
<main class="site-content__body">
|
|
{{ .Scratch.Set "page" .Page.Slug }}
|
|
{{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }}
|
|
|
|
{{ if ( eq ( .Scratch.Get "page" ) "current" ) }}
|
|
{{ .Scratch.Set "listMode" "current" }}
|
|
{{ else if ( eq ( .Scratch.Get "page" ) "log" ) }}
|
|
{{ .Scratch.Set "listMode" "log" }}
|
|
{{ else if ( eq ( .Scratch.Get "page" ) "wishlist" ) }}
|
|
{{ .Scratch.Set "listMode" "wishlist" }}
|
|
{{ end }}
|
|
|
|
{{ partial "stats" . }}
|
|
|
|
{{ partial "table" . }}
|
|
|
|
{{ end }}
|
|
</main>
|
|
{{ end }}
|