mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
also add csp nonce when loading javascript files Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
62 lines
2.4 KiB
HTML
62 lines
2.4 KiB
HTML
<!--
|
|
Copyright (C) 2023 Nicola Murino
|
|
|
|
This WebUI uses the KeenThemes Mega Bundle, a proprietary theme:
|
|
|
|
https://keenthemes.com/products/templates-mega-bundle
|
|
|
|
KeenThemes HTML/CSS/JS components are allowed for use only within the
|
|
SFTPGo product and restricted to be used in a resealable HTML template
|
|
that can compete with KeenThemes products anyhow.
|
|
|
|
This WebUI is allowed for use only within the SFTPGo product and
|
|
therefore cannot be used in derivative works/products without an
|
|
explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|
-->
|
|
{{- define "baselogin"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>{{.Branding.Name}} - {{template "title" .}}</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="shortcut icon" href="{{.StaticURL}}{{.Branding.FaviconPath}}" />
|
|
{{- template "fonts" . }}
|
|
{{- range .Branding.DefaultCSS}}
|
|
<link href="{{$.StaticURL}}{{.}}" rel="stylesheet" type="text/css">
|
|
{{- end}}
|
|
{{- template "globalstyle" .CSPNonce }}
|
|
{{- range .Branding.ExtraCSS}}
|
|
<link href="{{$.StaticURL}}{{.}}" rel="stylesheet" type="text/css">
|
|
{{- end}}
|
|
{{- template "commonjs" .CSPNonce}}
|
|
</head>
|
|
|
|
<body class="app-blank">
|
|
{{- template "theme-setup" .CSPNonce}}
|
|
<div class="d-flex flex-column flex-root">
|
|
<div class="d-flex flex-column flex-column-fluid bgi-position-y-bottom position-x-center bgi-no-repeat bgi-size-contain bgi-attachment-fixed">
|
|
<div class="d-flex flex-center flex-column flex-column-fluid p-10 pb-lg-20">
|
|
<div class="w-lg-500px w-md-450px w-sm-400px bg-body rounded shadow-sm p-10 p-lg-15 mx-auto">
|
|
{{template "content" .}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/plugins/global/plugins.bundle.js"></script>
|
|
<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/js/scripts.bundle.js"></script>
|
|
{{- template "basejs" .CSPNonce }}
|
|
<script type="text/javascript" {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}}>
|
|
KTUtil.onDOMContentLoaded(function () {
|
|
$('#sign_in_form').submit(function (event) {
|
|
let submitButton = document.querySelector('#sign_in_submit');
|
|
submitButton.setAttribute('data-kt-indicator', 'on');
|
|
submitButton.disabled = true;
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
{{- end}}
|