Merge branch 'master' into dev
All checks were successful
website-dev / dev-build (push) Successful in 49s
All checks were successful
website-dev / dev-build (push) Successful in 49s
This commit is contained in:
18
layouts/_default/terms.html
Normal file
18
layouts/_default/terms.html
Normal file
@ -0,0 +1,18 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<section class="section" data-pagefind-body>
|
||||
<div class="container">
|
||||
<div class="tag-list">
|
||||
{{ $transliterations := site.Data.transliterations.transliterations }}
|
||||
{{ range $name, $items := .Data.Terms }}
|
||||
{{ if eq $.Data.Plural "tags" }}
|
||||
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}">{{ $name }}</a>
|
||||
{{ else if eq $.Data.Plural "categories" }}
|
||||
<a href="{{ `categories/` | relURL }}{{ $name | urlize | lower }}">{{ if (index $transliterations $name) }}{{ index $transliterations $name }}{{ else }}{{ $name | title }}{{end}}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ end }}
|
@ -13,12 +13,21 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<h4 class="mb-4">Tags</h4>
|
||||
<h4 class="mb-4"><a href="{{ `tags/` | relURL }}">Tags</a></h4>
|
||||
{{ if isset .Site.Taxonomies "tags" }}
|
||||
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
|
||||
<div class="tag-list">
|
||||
{{ $tags := dict }}
|
||||
{{ range $name, $items := .Site.Taxonomies.tags }}
|
||||
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}">{{ $name }}</a>
|
||||
{{ $tags = merge $tags (dict (print $name) (dict "name" $name "items" $items "len" (len $items))) }}
|
||||
{{ end }}
|
||||
{{ range (sort $tags "len" "desc") }}
|
||||
{{ $pages := sort .items "Params.date" "desc" }}
|
||||
{{ if or (gt (len $pages) 2) (gt ((index $pages 0).Params.date | time.AsTime).Unix (sub now.Unix 7889229)) }}
|
||||
{{ $size := "1rem" }}
|
||||
{{ if gt (len $pages) 3 }}{{ $size = "1.25rem" }}{{ else if lt (len $pages) 2 }}{{ $size = ".75rem" }}{{ end }}
|
||||
<a href="{{ `tags/` | relURL }}{{ .name | urlize | lower }}" style="font-size: {{ $size }};">{{ .name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<a href="{{ .Permalink }}"><img src="{{ .Params.Image | relURL }}" class="rounded-circle m-3 object-cover" height="128px" width="128px"></a>
|
||||
</div>
|
||||
<div class="flex-grow card-body min-w-0">
|
||||
<a href="/cantorpreis"><h3 class="card-title">Cantorpreisträger:in</h3></a>
|
||||
<a href="/cantorpreis"><h3 class="card-title">Cantorpreisträger</h3></a>
|
||||
<a href="{{ .Permalink }}"><p class="h4 card-text">{{ .Params.name }}</p></a>
|
||||
</div>
|
||||
</div>
|
||||
@ -22,7 +22,7 @@
|
||||
<a href="{{ .Permalink }}"><h3 class="card-title">{{ .Title }}</h3></a>
|
||||
{{ $abiturdurchschnitte := getJSON "static/data/abiturdurchschnitte.json" }}
|
||||
{{ range $abiturdurchschnitte.abiturdurchschnitte }}
|
||||
{{ if eq (string (index . "jahr")) "2008" }}<a href="/chronikseiten/abiturdurchschnitte"><p class="h4 card-text">Abiturdurchschnitt: {{ .schnitt }}</p></a>{{ end }}
|
||||
{{ if eq (string (index . "jahr")) $.Title }}<a href="/chronikseiten/abiturdurchschnitte"><p class="h4 card-text">Abiturdurchschnitt: {{ .schnitt }}</p></a>{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="">
|
||||
|
@ -1,39 +1,25 @@
|
||||
{{ $dir := (.Get "dir") }}
|
||||
{{ if $dir }}
|
||||
<div class="card border-primary rounded-3">
|
||||
<div class="carousel carousel-dark slide mb-0" data-bs-ride="true" id='slider-{{ md5 (.Get "dir") }}'>
|
||||
{{ $dir := (.Get "dir") }}
|
||||
{{ with $dir }}
|
||||
{{ $files := readDir (print "/static/" .) }}
|
||||
<div class="carousel-indicators mb-0">
|
||||
{{ range $index, $file := $files }}
|
||||
{{ $isimg := lower $file.Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)" }}
|
||||
{{ if $isimg }}
|
||||
{{ $linkURL := print $.Site.BaseURL "/" ($.Get "dir") "/" $file.Name | absURL }}
|
||||
{{ if eq $index 0 }}
|
||||
<button type="button mb-5" data-bs-target="#slider-{{ md5 $dir }}" data-bs-slide-to="{{ $index }}" class="active"></button>
|
||||
{{ else }}
|
||||
<button type="button mb-5" data-bs-target="#slider-{{ md5 $dir }}" data-bs-slide-to="{{ $index }}"></button>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="carousel carousel-dark slide mb-0" data-bs-ride="true" id='slider-{{ md5 $dir }}'>
|
||||
{{ $images := slice }}
|
||||
{{ range readDir (print "/static/" $dir) }}
|
||||
{{ if (lower .Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)") }}
|
||||
{{ $images = $images | append . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="carousel-inner mb-0">
|
||||
{{ range $index, $file := $files }}
|
||||
{{ $isimg := lower $file.Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)" }}
|
||||
{{ if $isimg }}
|
||||
{{ $linkURL := print $.Site.BaseURL "/" ($.Get "dir") "/" $file.Name | absURL }}
|
||||
{{ if eq $index 0 }}
|
||||
<div class="carousel-item mb-0 active">
|
||||
<img src="{{ $linkURL }}" class="d-block w-100 mb-0 rounded-3">
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="carousel-item mb-0">
|
||||
<img src="{{ $linkURL }}" class="d-block w-100 mb-0 rounded-3">
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="carousel-indicators mb-0">
|
||||
{{ range $index, $image := $images }}
|
||||
<button type="button mb-5" data-bs-target="#slider-{{ md5 $dir }}" data-bs-slide-to="{{ $index }}" {{ if eq $index 0 }}class="active"{{ end }}></button>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="carousel-inner mb-0">
|
||||
{{ range $index, $image := $images }}
|
||||
<div class="carousel-item mb-0 {{ if eq $index 0 }}active{{end}}">
|
||||
<img src='{{ print $.Site.BaseURL $dir "/" $image.Name | absURL }}' class="d-block w-100 mb-0 rounded-3">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<button class="carousel-control-prev mb-0" type="button" data-bs-target="#slider-{{ md5 $dir }}" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Zurück</span>
|
||||
@ -43,4 +29,5 @@
|
||||
<span class="visually-hidden">Vor</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user