diff options
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/baseof.html | 10 | ||||
-rw-r--r-- | layouts/_default/list.html | 29 | ||||
-rw-r--r-- | layouts/_default/single.html | 37 | ||||
-rw-r--r-- | layouts/_default/term.html | 70 |
4 files changed, 64 insertions, 82 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 52e5df2..bf3d511 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,9 +1,13 @@ <!DOCTYPE html> <html lang="{{ .Site.LanguageCode }}"> {{- partial "head/head.html" . -}} - <body> - <div id="content"> - {{- block "main" . }}{{- end }} + <body class="{{ block `body-class` . }}{{ end }}"> + <div class="container extended flex on-phone--column align-items--flex-start {{ block `container-class` . }}{{end}}"> + {{ partial "sidebar/left.html" . }} + <main class="main full-width"> + {{- block "main" . }}{{- end }} + </main> + {{- block "right-sidebar" . -}}{{ end }} </div> {{ partial "footer/script.html" . }} {{ partial "footer/style.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 54206c4..8bd33d0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,24 +1,19 @@ -{{ define "body_class" }}3-column{{ end }} {{ define "main" }} -<div class="container extended flex on-phone--column align-items--flex-start"> - {{ partialCached "sidebar/left.html" . }} + <div class="widget"> + <h3 class="widget-title">{{ .Title }}</h3> + </div> - <main class="main full-width"> - <div class="widget"> - <h3 class="widget-title">{{ .Title }}</h3> - </div> + <section class="article-list--compact"> + {{ range .Paginator.Pages }} + {{ partial "article-list/compact" . }} + {{ end }} + </section> - <section class="article-list--compact"> - {{ range .Paginator.Pages }} - {{ partial "article-list/compact" . }} - {{ end }} - </section> + {{- partial "pagination.html" . -}} - {{- partial "pagination.html" . -}} - - {{ partialCached "footer/footer" . }} - </main> + {{ partialCached "footer/footer" . }} +{{ end }} +{{ define "right-sidebar" }} {{ partialCached "sidebar/right.html" . }} -</div> {{ end }}
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 82013b3..aabeee7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,30 +1,21 @@ -{{ define "body_class" }}2-column{{ end }} +{{ define "container-class" }}article-page with-toolbar{{ end }} {{ define "main" }} -<div class="container extended flex on-phone--column align-items--flex-start article-page with-toolbar"> - {{ partial "sidebar/left.html" . }} - - <div class="flex column do-not-overflow full-width"> - <main class="main"> - <div id="article-toolbar"> - <a href="{{ .Site.BaseURL }}" class="back-home"> - {{ (resources.Get "icons/back.svg").Content | safeHTML }} - <span>Back</span> - </a> - </div> - - {{ partial "article/article.html" . }} + <div id="article-toolbar"> + <a href="{{ .Site.BaseURL }}" class="back-home"> + {{ (resources.Get "icons/back.svg").Content | safeHTML }} + <span>Back</span> + </a> + </div> - {{ partial "article/components/related-contents" . }} + {{ partial "article/article.html" . }} - {{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}} - {{ partial "comments/include" . }} - {{ end }} + {{ partial "article/components/related-contents" . }} - {{ partialCached "footer/footer" . }} - </main> - </div> -</div> + {{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}} + {{ partial "comments/include" . }} + {{ end }} -{{- partial "article/components/photoswipe.html" . -}} + {{ partialCached "footer/footer" . }} + {{- partial "article/components/photoswipe.html" . -}} {{ end }}
\ No newline at end of file diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 9bf62fe..0d0a35f 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -1,45 +1,37 @@ -{{ define "body_class" }}2-column{{ end }} {{ define "main" }} -<div class="container extended flex on-phone--column"> - {{ partial "sidebar/left.html" . }} + <h3 class="taxonomy-type">{{ .Type | singularize | humanize }}</h3> + <div class="taxonomy-card"> + <div class="taxonomy-details"> + <h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3> + <h1 class="taxonomy-term">{{ .Title }}</h1> + {{ with .Params.description }} + <h2 class="taxonomy-description">{{ . }}</h2> + {{ end }} + </div> - <main class="main"> - - <h3 class="taxonomy-type">{{ .Type | singularize | humanize }}</h3> - <div class="taxonomy-card"> - <div class="taxonomy-details"> - <h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3> - <h1 class="taxonomy-term">{{ .Title }}</h1> - {{ with .Params.description }} - <h2 class="taxonomy-description">{{ . }}</h2> + {{ $image := partial "helper/image" (dict "Context" . "Type" "taxonomy") }} + {{ if $image.exists }} + <div class="taxonomy-image"> + {{ if $image.resource }} + {{- $thumbnail := $image.resource.Fill "120x120" -}} + <img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}" + height="{{ $thumbnail.Height }}" loading="lazy"> + {{ else }} + <img src="{{ $image.permalink }}" loading="lazy"> {{ end }} </div> + {{ end }} + </div> + + <section class="article-list--compact"> + {{ $v2 := where .Pages "Params.hidden" "!=" true }} + {{ $pag := .Paginate (.Pages) }} + {{ range $pag.Pages }} + {{ partial "article-list/compact" . }} + {{ end }} + </section> + + {{- partial "pagination.html" . -}} - {{ $image := partial "helper/image" (dict "Context" . "Type" "taxonomy") }} - {{ if $image.exists }} - <div class="taxonomy-image"> - {{ if $image.resource }} - {{- $thumbnail := $image.resource.Fill "120x120" -}} - <img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}" - height="{{ $thumbnail.Height }}" loading="lazy"> - {{ else }} - <img src="{{ $image.permalink }}" loading="lazy"> - {{ end }} - </div> - {{ end }} - </div> - - <section class="article-list--compact"> - {{ $v2 := where .Pages "Params.hidden" "!=" true }} - {{ $pag := .Paginate (.Pages) }} - {{ range $pag.Pages }} - {{ partial "article-list/compact" . }} - {{ end }} - </section> - - {{- partial "pagination.html" . -}} - - {{ partialCached "footer/footer" . }} - </main> -</div> + {{ partialCached "footer/footer" . }} {{ end }}
\ No newline at end of file |