small fixes

This commit is contained in:
teldra 2022-04-12 08:05:51 +02:00
parent 78dc68af57
commit c74db78060
4 changed files with 64 additions and 8 deletions

View File

@ -2,3 +2,4 @@
title: "Archiv"
layout: "archive"
---
ewdsfsdf

View File

@ -2,7 +2,7 @@
title: "Katzengejammer"
date: "2022-04-04T23:16:00+02:00"
when: "Montag, 04.04.2022, 23.23 Uhr"
events: ["Konzert"]
events: ["Konzerte"]
price: "free"
foundations: ["brentrup","aktionmensch"]
covid: "Keine Masken mehr!"

View File

@ -1,7 +1,6 @@
{{ if ne .context.Content "" }}
<section>
{{ partial "snippets/content" (dict "content" .context.Content) }}
</section>
{{ end }}
<section>
{{ partial "debug" (dict "context" . "caller" "archive.html" )}}
@ -9,12 +8,12 @@
{{range where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $date := .Date }}
{{ if gt $prev ($date.Format "2006") }}
<h2>{{ $date.Format "2006" }}</h2>
<h2 style="margin-bottom: 0;">{{ $date.Format "2006" }}</h2>
{{end}}
<div class="frow">
<div class="frow" style="margin-bottom: .2rem; margin-left: .2rem;">
<div class="underline"><a href="{{.Permalink}}">{{ .Title }}</a></div>
<div>{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}</div><br>
</div>
<div style="margin-left: .2rem;">{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006" }}</div>
</div>
{{ $prev = $date.Format "2006"}}
{{end}}
</section>

View File

@ -106,7 +106,63 @@
</div>
{{ else if eq .input_type "rb" }}
{{ $in0 := .title }}
{{- $finale := slice -}}
{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ if eq .title "tags" }}
{{ range $pages }}
{{- with .Params.tags -}}
{{- $finale = $finale | append . -}}
{{ end }}
{{ end }}
{{ else if eq .title "foundations" }}
{{ range resources.Match "/foundations/*" }}
{{ $n := path.Base (strings.TrimSuffix (path.Ext .Name) .Name) }}
{{- $finale = $finale | append $n -}}
{{ end }}
{{ range $pages }}
{{- with .Params.foundations -}}
{{- $finale = $finale | append . -}}
{{ end }}
{{ end }}
{{ else }}
{{ range $pages }}
{{ range .Param $in0 }}
{{- $finale = $finale | append . -}}
{{ end }}
{{ end }}
{{ end }}
{{- $finale = $finale | uniq -}}
<div class="margin_top_1rem column {{- if .group }} visibleIf" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<div class="{{- if .group }}margin_left_1rem{{ end }}">
{{ .name }}
{{ if ne .expanded true }}{{ partial "layout/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}}
</div>
<div class="checkbox {{ if ne .expanded true }}visibleIf margin_left_1rem stretch" data-visibleif-rule="{{ $in0 }}cat == 'true'{{end}}">
<div class="column margin_left_1rem">
<fieldset id="{{ $in0 }}" name="{{ $in0 }}" class="fieldset">
{{ range sort $finale }}
<input type="radio" name="{{ $in0 }}" id="{{ $in0 }}-cat" value="{{ . }}"><label for="{{ $in0 }}-cat">{{ . }}</label>
{{ end }}
</fieldset>
{{ if .new }}
<label id="label" for="new{{- .title -}}">{{ .new }} <span class="font_size_smaller">({{- $divide -}}{{- if .help -}}, {{ .help }}{{ end }})</span></label>
<input type="text" name="new{{- .title -}}" id="new{{- .title -}}" value="" {{ if .placeholder }}placeholder="{{ .placeholder }}"{{ end }} />
{{ end }}
</div>
</div>
</div>