small fixes

This commit is contained in:
teldra 2022-04-03 01:27:41 +02:00
parent a3334c177f
commit 12ac6cf0e9
4 changed files with 55 additions and 55 deletions

View File

@ -2,59 +2,11 @@
{{ end }}
{{ define "main" }}
{{ if eq .Description "nottranslated" }}
{{ partial "nottranslated.html" . }}
{{ else if eq .Description "generator" }}
{{ partial "generator.html" . }}
{{ else }}
<div id="articletitle">
<h1>{{- .Title -}}</h1>
</div>
<article>
<div id="articlecontent">
<div id="articlemeta">
{{ if and (ne .Params.when "") (ne .Params.when nil) }}
<div style="margin-bottom: .4em;"><b>{{ .Params.when }}</b></div>
{{ end }}
{{ if and (ne .Params.price "") (ne .Params.price nil) }}
{{ if eq .Params.price "free" }}
<div style="margin-bottom: .4em;">Der Eintritt ist frei.</div>
{{ if eq .Description "nottranslated" }}
{{ partial "orga/nottranslated.html" . }}
{{ else if eq .Description "generator" }}
{{ partial "orga/generator.html" . }}
{{ else }}
<div style="margin-bottom: .4em;">Eintritt: {{ .Params.price }}</div>
{{ partial "single/article" . }}
{{ end }}
{{ end }}
{{ if and (ne .Params.register "") (ne .Params.register nil) }}
<div>Anmeldung unter {{ .Params.register | markdownify }} erwünscht</div>
{{ end }}
{{ if and (ne .Params.covid "") (ne .Params.covid nil) }}
<div>Es gilt die {{ .Params.covid }} Regel</div>
{{ end }}
{{ if and (ne .Params.contact "") (ne .Params.contact nil) }}
<div>Kontakt: <a href="mailto://{{ .Params.contact }}">{{ .Params.contact }}</a></div>
{{ end }}
</div>
<div id="articleinner">
<div id="articledata">
{{- if .Resources.ByType "image" -}}
{{ if eq .Content "" }}
<div class="notext">
{{ else }}
<div class="text">
{{ end }}
{{ range .Resources.ByType "image" }}
{{- $pic := . -}}
{{- $thumb := $pic.Resize "1024x" }}
<a href="{{ . }}"><img src="{{- $thumb.Permalink -}}"/></a>
{{ end }}
</div>
{{- end }}
<div id="articletext">
{{- .Content -}}
</div>
</div>
</div>
</div>
</article>
{{ end }}
{{ end }}

View File

@ -0,0 +1,48 @@
<div id="articletitle">
<h1>{{- .Title -}}</h1>
</div>
<article>
<div id="articlecontent">
<div id="articlemeta">
{{ if and (ne .Params.when "") (ne .Params.when nil) }}
<div style="margin-bottom: .4em;"><b>{{ .Params.when }}</b></div>
{{ end }}
{{ if and (ne .Params.price "") (ne .Params.price nil) }}
{{ if eq .Params.price "free" }}
<div style="margin-bottom: .4em;">Der Eintritt ist frei.</div>
{{ else }}
<div style="margin-bottom: .4em;">Eintritt: {{ .Params.price }}</div>
{{ end }}
{{ end }}
{{ if and (ne .Params.register "") (ne .Params.register nil) }}
<div>Anmeldung unter {{ .Params.register | markdownify }} erwünscht</div>
{{ end }}
{{ if and (ne .Params.covid "") (ne .Params.covid nil) }}
<div>Es gilt die {{ .Params.covid }} Regel</div>
{{ end }}
{{ if and (ne .Params.contact "") (ne .Params.contact nil) }}
<div>Kontakt: <a href="mailto://{{ .Params.contact }}">{{ .Params.contact }}</a></div>
{{ end }}
</div>
<div id="articleinner">
<div id="articledata">
{{- if .Resources.ByType "image" -}}
{{ if eq .Content "" }}
<div class="notext">
{{ else }}
<div class="text">
{{ end }}
{{ range .Resources.ByType "image" }}
{{- $pic := . -}}
{{- $thumb := $pic.Resize "1024x" }}
<a href="{{ . }}"><img src="{{- $thumb.Permalink -}}"/></a>
{{ end }}
</div>
{{- end }}
<div id="articletext">
{{- .Content -}}
</div>
</div>
</div>
</div>
</article>