small fixes

This commit is contained in:
teldra 2022-04-06 19:06:41 +02:00
parent 81fe45bd1b
commit 9ecda4c451
5 changed files with 32 additions and 21 deletions

View File

@ -19,24 +19,25 @@ forms:
- name: categories
input_type: mc
placeholder: Kategorien
expanded: true
new: true
collapsed: true
- name: when
group: event
group: events
input_type: text
placeholder: Datum des Events
- name: price
group: event
group: events
input_type: text
placeholder: Preis
- name: contact
group: event
group: events
input_type: text
placeholder: Kontakt
- name: events
group: event
group: events
input_type: mc
placeholder: Eventkategorien
expanded: false
new: true
- name: featured
group: misc
@ -52,6 +53,7 @@ forms:
group: misc
input_type: mc
placeholder: Tags
expanded: false
new: true
- name: results
input_type: results

View File

@ -221,6 +221,9 @@ input, textarea {
margin-top: 1rem;
}
.lightborder {
}
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {...}

View File

@ -4,6 +4,9 @@ other = "News"
[events]
other = "Termine"
[event]
other = "Termin"
[contact]
other = "Kontakt"
@ -70,6 +73,9 @@ other = "Kurdî"
[or]
other = "oder"
[misc]
other = "Verschiedenes"
[all]
other = "Alle"

View File

@ -11,7 +11,7 @@
{{ if and .group (not (in $group .group))}}
<div class="margin_top_1rem">
{{ .group }}
{{ if i18n (singularize .group) }}{{ i18n (singularize .group) }}{{ else }}{{ .group }}{{ end }}
{{ partial "misc/expand" (dict "name" (printf "%sgroup" .group)) }}
</div>
{{ $group = $group | append .group }}
@ -26,17 +26,17 @@
<textarea name="{{ .name }}" id="{{ .name }}" rows="10" {{ if $pageform.placeholders }}placeholder="{{ .placeholder }}{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}></textarea>
</div>
{{ else if eq .input_type "radio" }}
<div class="radio {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<div class="radio {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="radio" name="{{ .name }}" id="{{ .name }}" value="{{ .placeholder }}" {{ .Scratch.Get "requiredtext" }}>{{ .placeholder }}</label>
</div>
{{ else if eq .input_type "checkbox" }}
<div class="checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<label><input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="{{ .placeholder }}" {{ .Scratch.Get "requiredtext" }}>{{ .placeholder }}</label>
<div class="checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="{{ .placeholder }}" {{ .Scratch.Get "requiredtext" }}>{{ if i18n .placeholder }}{{ i18n .placeholder }}{{ else }}{{ .placeholder }}{{ end }}</label>
</div>
{{ else if eq .input_type "results" }}
<div id='display' class="result" style="white-space: pre; display: none; background: var(--background-body); padding: .6rem 0 1rem 1rem;"></div>
{{ else if eq .input_type "submit" }}
<div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<input type="{{ .input_type }}" value="{{ i18n "generate" }}" onclick="showInput(event);" />
</div>
@ -70,16 +70,16 @@
<div class="margin_top_1rem {{- if .group }} visibleIf" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }} style="flex-direction: column;">
<div class="{{- if .group }}margin_left_1rem{{ end }}">
{{ .placeholder }}
{{ if ne .collapsed false }}{{ partial "misc/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}
{{ if ne .expanded true }}{{ partial "misc/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}
</div>
<div class="visibleIf checkbox" data-visibleif-rule="{{ $in0 }}cat == 'true'">
<div class="checkbox {{ if ne .expanded true }}visibleIf" data-visibleif-rule="{{ $in0 }}cat == 'true'{{end}}">
<div class="{{- if .group }}margin_left_1rem{{ end }} minmax" style="display: flex; flex-direction: column;">
<fieldset id="{{ $in0 }}" name="{{ $in0 }}" style="display: flex; flex-direction: row; padding: 0; border: none;">
<div class="{{- if .group }} margin_left_1rem{{ end }} minmax" style="display: flex; flex-direction: column;">
<fieldset id="{{ $in0 }}" name="{{ $in0 }}" style="display: flex; flex-direction: row; padding: 0; border: none; margin: 0 0 .3rem .5rem;">
{{ range sort $finale }}
<input type="checkbox" name="{{ $in0 }}" id="{{ $in0 }}-cat" value="{{ . }}"><label for="{{ $in0 }}-cat">{{ . }}</label>
{{ end }}
@ -104,11 +104,11 @@
{{ else }}
{{ if eq .name "name" }}
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label class="{{ if $pageform.placeholders }}sr-only{{ end }}" for="firstname">First name{{ .Scratch.Get "requiredstar" }}</label>
<input type="text" name="firstname" id="firstname" {{ if $pageform.placeholders }}placeholder="First name{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label class="{{ if $pageform.placeholders }}sr-only{{ end }}" for="lastname">Last name{{ .Scratch.Get "requiredstar" }}</label>
<input type="text" name="lastname" id="lastname" {{ if $pageform.placeholders }}placeholder="Last name{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
@ -117,17 +117,17 @@
<label class="{{ if $pageform.placeholders }}sr-only{{ end }}" for="address">Address{{ .Scratch.Get "requiredstar" }}</label>
<input type="text" name="address" id="address" {{ if $pageform.placeholders }}placeholder="Address{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true{{ end }}">
<label class="{{ if $pageform.placeholders }}sr-only{{ end }}" for="city">City{{ .Scratch.Get "requiredstar" }}</label>
<input type="text" name="city" id="city" {{ if $pageform.placeholders }}placeholder="City{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }}>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label class="{{ if $pageform.placeholders }}sr-only{{ end }}" for="postalcode">Postal code{{ .Scratch.Get "requiredstar" }}</label>
<input type="text" name="postalcode" id="postalcode" {{ if $pageform.placeholders }}placeholder="Postal code{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
{{ else }}
<div class="margin_top_1rem {{ if .group }} visibleIf margin_left_1rem" data-visibleif-rule=" {{ .group }}group == 'true'"{{ else }}" {{ end }} class="minmax">
<div class="margin_top_1rem {{ if .group }} visibleIf margin_left_1rem" data-visibleif-rule=" {{ .group }}group == 'true' {{ end }}" class="minmax">
<div class="minmax" style="display: flex; flex-direction: column;">
<label class="{{ if $pageform.placeholders }}sr-only{{ end }}" for="{{ .name }}">{{ .placeholder }}{{ .Scratch.Get "requiredstar" }}</label>
<input type="{{ .input_type }}" name="{{ .name }}" id="{{ .name }}" {{ if $pageform.placeholders }}placeholder="{{ .placeholder }}{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>

View File

@ -1,3 +1,3 @@
<input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="true" style="font-size: smaller;" />
<label for="{{ .name }}" style="font-size: smaller;"> {{ if i18n "expand" }}{{ i18n "expand" }}{{ else }}{{ "expand" }}{{ end }}</label>
<input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="true" style="font-size: smaller; margin-right: 0;" >
<label for="{{ .name }}" style="font-size: smaller; margin: 0;"> {{ if i18n "expand" }}{{ i18n "expand" }}{{ else }}{{ "expand" }}{{ end }}</label>