small fixes

This commit is contained in:
teldra 2022-05-09 23:01:43 +02:00
parent 320d39d608
commit 1199306d16
5 changed files with 46 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 123 KiB

View File

@ -58,7 +58,7 @@ forms:
name: "Eventkategorie"
expanded: false
new: "Neue Events"
help: "gerne Plural, möglichst wenige"
help: "Singular, möglichst wenige"
placeholder: "Konzert"
- title: covid
group: misc

View File

@ -21,8 +21,7 @@
}
.header {
flex-grow: 0;
height: 4rem;
min-height: 4rem;
min-height: 5rem;
display: flex;
align-items: center;
justify-content: space-between;
@ -58,7 +57,7 @@
}
.banner {
display: flex; align-items: center; height: 33vh; background-position: top; background-repeat: no-repeat; background-attachment: fixed;
display: flex; align-items: center; background-position: top; background-repeat: no-repeat; background-attachment: fixed;
font-size: 115%;
h1 {
margin-left: auto;
@ -138,3 +137,24 @@ img.dark-shadow{
text-shadow: 0px 3px 3px rgba(0, 0, 0, 1);
color: white;
}
fieldset {
display: flex; flex-wrap: wrap; flex-direction: row; padding: 0; border: none; margin: 0 0 .3rem .5rem;
}
.w100 {
width: 100%;
}
.column {
flex-direction: column;
}
#result {
white-space: pre; display: none; background: var(--background-body);
padding: 1rem 0 1rem 1rem;
margin-top: 1rem;
-webkit-user-select: all;
user-select: all;
}

View File

@ -22,20 +22,20 @@
{{ if eq .input_type "title" }}
<h3 {{ if .group }}class="visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ end }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</h3>
{{ else if eq .input_type "textarea" }}
<div {{ if .group }}class="visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ end }}>
<label {{ if $pageform.names }}sr-only{{ end }} for="{{ .title }}">{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<textarea name="{{ .title }}" id="{{ .title }}" rows="10" {{ if .placeholder }}placeholder="{{ .placeholder }}"{{ end }}></textarea>
<div class="w100 {{ if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true' {{ end }}">
<label class="w100 {{ if $pageform.names }}sr-only{{ end }}" for="{{ .title }}">{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<textarea class="w100" name="{{ .title }}" id="{{ .title }}" rows="10" {{ if .placeholder }}placeholder="{{ .placeholder }}"{{ end }}></textarea>
</div>
{{ else if eq .input_type "radio" }}
<div class="radio {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="radio" name="{{ .title }}" id="{{ .title }}" value="{{ .name }}" {{ .Scratch.Get "requiredtext" }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
</div>
{{ else if eq .input_type "checkbox" }}
<div class="checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<div class="w100 checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="checkbox" name="{{ .title }}" id="{{ .title }}" value="{{ .name }}">{{- $name -}}{{- if .help }} ({{ .help }}){{ end }}</label>
</div>
{{ else if eq .input_type "results" }}
<div id='result'></div>
<div id='result' class="w100"></div>
{{ else if eq .input_type "submit" }}
<div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<input type="{{ .input_type }}" value="{{- $name -}}" onclick="showInput(event);" />
@ -73,15 +73,15 @@
{{ 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 }}">
<div class="margin_top_1rem column {{ if .group }} visibleIf" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<div class="w100 {{ 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="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 }}
@ -89,8 +89,8 @@
{{ 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 }} />
<label for="new{{- .title -}}">{{ .new }} <span class="font_size_smaller">({{- $divide -}}{{- if .help -}}, {{ .help }}{{ end }})</span></label>
<input class="w100" type="text" name="new{{- .title -}}" id="new{{- .title -}}" value="" {{ if .placeholder }}placeholder="{{ .placeholder }}"{{ end }} />
{{ end }}
</div>
</div>
@ -123,10 +123,10 @@
<input type="text" name="postalcode" id="postalcode" {{ if $pageform.names }}placeholder="Postal code{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
{{ else }}
<div class="margin_top_1rem {{ if .group }} visibleIf stretch margin_left_1rem" data-visibleif-rule=" {{ .group }}group == 'true' {{ end }}">
<div class="column">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="{{ .title }}">{{ .name }}{{- if .required -}}{{- " *" -}}{{- end -}}{{- if .help }} ({{ .help }}){{ end }}</label>
<input type="{{ .input_type }}" name="{{ .title }}" id="{{ .title }}" placeholder="{{ .placeholder }}">
<div class="margin_top_1rem w100 {{ if .group }} visibleIf stretch margin_left_1rem" data-visibleif-rule=" {{ .group }}group == 'true' {{ end }}">
<div class="column w100">
<label class="w100 {{ if $pageform.names }}sr-only{{ end }}" for="{{ .title }}">{{ .name }}{{- if .required -}}{{- " *" -}}{{- end -}}{{- if .help }} ({{ .help }}){{ end }}</label>
<input class="w100" type="{{ .input_type }}" name="{{ .title }}" id="{{ .title }}" placeholder="{{ .placeholder }}">
</div>
</div>
{{ end }}

View File

@ -18,15 +18,18 @@
{{ if resources.GetMatch $banner }}
{{ $img = (resources.GetMatch $banner).Fill "1280x480 smart" }}
{{ end }}
{{ $height := safeCSS "min-height: 460px; max-height: 480px;" }}
{{ if and (resources.GetMatch $banner) (ne .Params.banner false) }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}});" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}}); {{ $height }}" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
{{ else if and (.Resources.Match "banner*") (ne .Params.banner false) }}
{{ $img = (.Resources.GetMatch "banner*").Fill "1280x480 smart" }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}});" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}}); {{ $height }}" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
{{ else if and (.Resources.ByType "image") (ne .Params.banner false) }}
{{ $img = (index (.Resources.ByType "image") 0).Fill "1280x480 smart" }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}});" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
{{ $height = safeCSS (printf "height: calc(%spx - 5rem);" (string $img.Height)) }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)), url({{- $img.Permalink -}}); {{ $height }}" class="banner banner-shadow"><h1 class="dark-shadow">{{ $title }}</h1></div>
{{ else }}
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1))" class="banner"><h1>{{ $title }}</h1></div>
<div style="background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)); {{ $height }}" class="banner"><h1>{{ $title }}</h1></div>
{{ end }}