refactor to add captcha dynamically
This commit is contained in:
parent
d5867d2a7d
commit
c35cc45ef6
1 changed files with 12 additions and 11 deletions
|
|
@ -4,20 +4,21 @@
|
|||
{{ .Content }}
|
||||
</div>
|
||||
{{/* TODO Cleanup */}}
|
||||
{{ $useCaptcha := site.Params.useCaptcha }}
|
||||
{{ if $useCaptcha }}
|
||||
{{ $captchaSystemJS := resources.Get "vendor/captcha-system/js/main.js" | minify }}
|
||||
{{ $captchaSystemCSS := resources.Get "vendor/captcha-system/css/main.css" | minify }}
|
||||
<script src="{{ $captchaSystemJS.RelPermalink }}"></script>
|
||||
<link rel="stylesheet" href="{{ $captchaSystemCSS.RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ if eq .Params.bestellformular true }}
|
||||
{{ $formularjs := resources.Get "js/bestellformular.js" | minify }}
|
||||
{{/* <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> */}}
|
||||
{{/* {{ $formularjs := resources.Get "js/bestellformular.js" | js.Build (dict "minify" true) }} */}}
|
||||
{{ $formularjs := resources.Get "js/bestellformular.js" }}
|
||||
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
|
||||
<script>{{ $formularjs.Content | safeJS }}</script>
|
||||
|
||||
{{ else if eq .Params.kontaktformular true }}
|
||||
{{ $formularjs := resources.Get "js/kontaktformular.js" | minify }}
|
||||
{{/* <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> */}}
|
||||
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
|
||||
<script>{{ $formularjs.Content | safeJS }}</script>
|
||||
{{/* TODO Captcha rauswerfen, falls wir es nicht mehr brauchen */}}
|
||||
{{/* {{ $captchaSystemJS := resources.Get "vendor/captcha-system/js/main.js" | minify }} */}}
|
||||
{{/* {{ $captchaSystemCSS := resources.Get "vendor/captcha-system/css/main.css" | minify }} */}}
|
||||
{{/* <script src="{{ $captchaSystemJS.RelPermalink }}"></script> */}}
|
||||
{{/* <link rel="stylesheet" href="{{ $captchaSystemCSS.RelPermalink }}"> */}}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue