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> </h1>
{{ block "main" . -}}{{- end }} {{ block "main" . -}}{{- end }}
</main> </main>
<aside class="right-sidebar"> {{ block "sidebar" . -}}{{- end }}
{{- partial "sidebar" . }}
</aside>
</div> </div>
<footer> <footer>
{{- partial "footer" . -}} {{- partial "footer" . -}}

View File

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

View File

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

View File

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

View File

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