mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 13:55:27 +00:00
72636fd664
* Initial work on hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use module Signed-off-by: jolheiser <john.olheiser@gmail.com> * Format Signed-off-by: jolheiser <john.olheiser@gmail.com> * At least return and debug log a captcha error Signed-off-by: jolheiser <john.olheiser@gmail.com> * Pass context to hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add context to recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * fix lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Finish hcaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update example config Signed-off-by: jolheiser <john.olheiser@gmail.com> * Apply error fix for recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change recaptcha ChallengeTS to string Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net>
39 lines
1 KiB
Cheetah
39 lines
1 KiB
Cheetah
{{/*
|
|
<html>
|
|
<body>
|
|
<div>
|
|
*/}}
|
|
|
|
{{template "custom/body_inner_post" .}}
|
|
|
|
</div>
|
|
|
|
{{template "custom/body_outer_post" .}}
|
|
|
|
{{template "base/footer_content" .}}
|
|
{{if .RequireSimpleMDE}}
|
|
<script src="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.js"></script>
|
|
<script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
|
|
<script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js"></script>
|
|
<script>
|
|
CodeMirror.modeURL = "{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js";
|
|
</script>
|
|
{{end}}
|
|
|
|
<!-- Third-party libraries -->
|
|
{{if .RequireU2F}}
|
|
<script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js"></script>
|
|
{{end}}
|
|
{{if .EnableCaptcha}}
|
|
{{if eq .CaptchaType "recaptcha"}}
|
|
<script src='{{ URLJoin .RecaptchaURL "api.js"}}' async></script>
|
|
{{end}}
|
|
{{if eq .CaptchaType "hcaptcha"}}
|
|
<script src='https://hcaptcha.com/1/api.js' async></script>
|
|
{{end}}
|
|
{{end}}
|
|
<script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
|
|
{{template "custom/footer" .}}
|
|
</body>
|
|
</html>
|