add slug
s, fix tables
This commit is contained in:
parent
0d44f0764e
commit
eff55debea
23 changed files with 90 additions and 70 deletions
|
@ -1,5 +1,6 @@
|
|||
{{ define "title" }}
|
||||
{{ .Page.Title | plainify }} | {{ .Site.Title }}
|
||||
{{ .Page.Title | plainify }} |
|
||||
{{ .Site.Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-class" }}--list{{ end }}
|
||||
|
@ -8,30 +9,34 @@
|
|||
{{ 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>
|
||||
{{ .Content }}
|
||||
</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>
|
||||
{{ .Content }}
|
||||
</header>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<main class="site-content__body">
|
||||
{{ if .File }}
|
||||
{{ if ( eq .File.Dir "log/" ) }}
|
||||
{{ .Scratch.Set "listMode" "log" }}
|
||||
{{ else if ( eq .File.Dir "wishlist/" ) }}
|
||||
{{ .Scratch.Set "listMode" "wishlist" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if ( in "log/ wishlist/" .File.Dir ) }}
|
||||
{{ partial "table" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ define "main-body" }}
|
||||
<main class="site-content__body">
|
||||
{{ if .File }}
|
||||
{{ if ( eq .File.Dir "log/" ) }}
|
||||
{{ .Scratch.Set "listMode" "log" }}
|
||||
{{ else if ( eq .File.Dir "wishlist/" ) }}
|
||||
{{ .Scratch.Set "listMode" "wishlist" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if ( in "log/ wishlist/" .File.Dir ) }}
|
||||
{{ partial "table" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
{{ .Scratch.Set "page" .Page.Slug }}
|
||||
{{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }}
|
||||
|
||||
{{ .Scratch.Get .Page.Slug }}
|
||||
{{ if ( eq ( .Scratch.Get "page" ) "current" ) }}
|
||||
{{ .Scratch.Set "listMode" "current" }}
|
||||
{{ else if ( eq ( .Scratch.Get "page" ) "log" ) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue