small fixes
This commit is contained in:
parent
f1b1a35a3c
commit
a71bf8ebb8
|
@ -27,9 +27,22 @@ form {
|
||||||
max-width: 1920px;
|
max-width: 1920px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.generator {
|
||||||
font-size: .8em;
|
.button {
|
||||||
padding: .5em;
|
font-size: .8em;
|
||||||
|
border-radius: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: var(--background);
|
||||||
|
padding-right: 2em;
|
||||||
|
padding-left: 2em;
|
||||||
|
&:hover {
|
||||||
|
background: var(--background-alt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.textarea {
|
||||||
|
margin-top: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
|
@ -6,6 +6,7 @@ description: "generator"
|
||||||
type: "tools"
|
type: "tools"
|
||||||
tool: "generator"
|
tool: "generator"
|
||||||
divide: "Getrennt durch Komma"
|
divide: "Getrennt durch Komma"
|
||||||
|
js: ["visibleIf.js","generator.js"]
|
||||||
forms:
|
forms:
|
||||||
- to: info@bunteshaus.de
|
- to: info@bunteshaus.de
|
||||||
realnames: false
|
realnames: false
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Test"
|
||||||
|
js: ["test.js"]
|
||||||
|
---
|
||||||
|
{{< test >}}
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
{{ $translation := index $b 1 }}
|
{{ $translation := index $b 1 }}
|
||||||
{{ $n := index $b 0 }}
|
{{ $n := index $b 0 }}
|
||||||
{{ $nn := printf "%s;%s" $button_target $n}}
|
{{ $nn := printf "%s;%s" $button_target $n}}
|
||||||
<button class="button" onclick="button({{- $nn -}})" type="button" value="{{ $n }}">{{ $translation }}</button>
|
<button class="button tabs" onclick="button({{- $nn -}})" type="button" value="{{ $n }}">{{ $translation }}</button>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<textarea class="w100" name="{{ .title }}" id="{{ .title }}" rows="10" {{ if .placeholder }}placeholder="{{ .placeholder }}"{{ end }}></textarea>
|
<textarea class="w100 textarea" name="{{ .title }}" id="{{ .title }}" rows="10" {{ if .placeholder }}placeholder="{{ .placeholder }}"{{ end }}></textarea>
|
||||||
</div>
|
</div>
|
||||||
{{ else if eq .input_type "radio" }}
|
{{ else if eq .input_type "radio" }}
|
||||||
<div class="radio {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
|
<div class="radio {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
{{ $direction = .direction }}
|
{{ $direction = .direction }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="margin_left_1rem" style="display: flex; flex: 0 1 auto; flex-wrap: wrap;">
|
<div class="margin_left_1rem" style="display: flex; flex: 0 1 auto; flex-wrap: wrap;">
|
||||||
<button class="button" type="button" value="Clear" onclick="clearThis({{ .title }});" />Clear</button>
|
<button style="background: #8e3333;" class="button" type="button" value="Clear" onclick="clearThis({{ .title }});" />Clear</button>
|
||||||
{{ $button_target := .title }}
|
{{ $button_target := .title }}
|
||||||
{{ range sort $finale }}
|
{{ range sort $finale }}
|
||||||
{{ if . }}
|
{{ if . }}
|
||||||
|
|
|
@ -2,5 +2,3 @@
|
||||||
<div class="generator">
|
<div class="generator">
|
||||||
{{ partial "tools/generator/form" (dict "context" . "form" 0) }}
|
{{ partial "tools/generator/form" (dict "context" . "form" 0) }}
|
||||||
</div>
|
</div>
|
||||||
<script defer src="{{ "/js/visibleIf.js" | urlize | relURL }}"></script>
|
|
||||||
<script defer src="{{ "/js/generator.js" | urlize | relURL }}"></script>
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<noscript><p><b>Bitte aktiviere Javascript, sonst funktioniert der Generator nicht.</b></p></noscript>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
|
@ -15,5 +15,11 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<article>
|
<article>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
{{ if .Params.js }}
|
||||||
|
{{ range .Params.js }}
|
||||||
|
{{ $js := printf "/js/%s" . | safeURL }}
|
||||||
|
<script defer src="{{ $js | urlize }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -38,7 +38,7 @@ function Input(str) {
|
||||||
typeInInputfield(out);
|
typeInInputfield(out);
|
||||||
var end = id.value.length;
|
var end = id.value.length;
|
||||||
id.setSelectionRange(end, end);
|
id.setSelectionRange(end, end);
|
||||||
id.focus();
|
id.focus({preventScroll: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ function button(str) {
|
||||||
typeInTextarea(out);
|
typeInTextarea(out);
|
||||||
var end = id.value.length;
|
var end = id.value.length;
|
||||||
id.setSelectionRange(end, end);
|
id.setSelectionRange(end, end);
|
||||||
id.focus();
|
id.focus({preventScroll: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
Loading…
Reference in New Issue