This commit is contained in:
teldra 2022-03-26 20:28:14 +01:00
parent 88cedf5cdb
commit 2e14d28f6d
5 changed files with 15 additions and 9 deletions

View File

@ -13,9 +13,7 @@
</h1>
{{ block "main" . -}}{{- end }}
</main>
<aside class="right-sidebar">
{{- partial "sidebar" . }}
</aside>
{{ block "sidebar" . -}}{{- end }}
</div>
<footer>
{{- partial "footer" . -}}

View File

@ -163,3 +163,7 @@
{{ end }}
</div>
{{- end -}}
{{ define "sidebar" }}
{{- partial "sidebar" . }}
{{ end }}

View File

@ -1,5 +1,4 @@
{{ define "title" }}
{{ if and (isset .Params "categories") (eq .Section "events") }}{{ index .Params.categories 0 }}: {{ end }}{{- .Title -}}
{{ end }}
{{ define "main" }}
@ -24,7 +23,7 @@
{{ end }}
{{ else }}
<article>
<h1>{{ if and (isset .Params "categories") (eq .Section "events") }}{{ index .Params.categories 0 }}: {{ end }}{{- .Title -}}</h1>
{{ if and (ne .Params.when "") (ne .Params.when nil) }}
<div style="margin-bottom: .4em;"><b>{{ .Params.when }}</b></div>
{{ end }}
@ -55,6 +54,5 @@
{{- .Content -}}
</div>
</div>
</article>
{{ end }}
{{ end }}

View File

@ -3,10 +3,10 @@
{{ end }}
{{ define "main" }}
<article>
{{ .Content }}
</article>
{{ .Content }}
<h2>{{ "news" | T }}</h2>
{{ $s := .Site.Params }}
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }}
{{- $paginator := slice -}}
@ -160,3 +160,7 @@
</div>
{{ end }}
{{ define "sidebar" }}
{{- partial "sidebar" . }}
{{ end }}

View File

@ -1,3 +1,4 @@
<aside class="right-sidebar">
{{ $s := .Site.Params }}
<section class="sidebar_inner">
<div id="nav-posts">
@ -40,3 +41,4 @@
</section>
</aside>