initial commit
This commit is contained in:
commit
5c664be9a8
55 changed files with 8825 additions and 0 deletions
56
layouts/_default/section.html
Normal file
56
layouts/_default/section.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
{{ 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">
|
||||
{{- .Scratch.Set "section" ( first 1 ( split .File.Dir "/" ) ) -}}
|
||||
{{- $section := .Scratch.Get "section" -}}
|
||||
{{ if ( or ( in "books" ( delimit $section "" ) ) ( in "games" ( delimit $section "" ) ) ) }}
|
||||
<a href="/{{ delimit $section "" }}/current">Current</a> ~
|
||||
{{ end }}
|
||||
<a href="/{{ delimit $section "" }}/log">Log</a> ~
|
||||
<a href="/{{ delimit $section "" }}/wishlist">Wishlist</a>
|
||||
|
||||
<h1 class="page-title">{{ .Title | safeHTML }}
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="feed-icon" src="/images/feed-icon.svg">
|
||||
</a>
|
||||
{{ end }}
|
||||
</h1>
|
||||
{{ .Content }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<main class="site-content__body">
|
||||
{{ if .File }}
|
||||
|
||||
{{ .Scratch.Set "page" ( index ( split .File.Dir "/" ) 1 ) }}
|
||||
{{ 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 }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue