diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-03-21 13:32:12 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-03-21 13:32:12 +0100 |
commit | 6fe35cbd50d318bed8d12c5d9fc2602f8936f883 (patch) | |
tree | 6b9c9f891552a1beacdc11f646b7dd9000d46021 /templates | |
parent | 35c4aba3471691685592547300ca5bb588adeb53 (diff) |
Switched from CDN to a npm+bundler for css framework
and crypto-js
Diffstat (limited to 'templates')
-rw-r--r-- | templates/layouts/mainlayout.html.ep | 7 | ||||
-rw-r--r-- | templates/webmail/login.html.ep | 19 |
2 files changed, 5 insertions, 21 deletions
diff --git a/templates/layouts/mainlayout.html.ep b/templates/layouts/mainlayout.html.ep index 51f873d..2cd4671 100644 --- a/templates/layouts/mainlayout.html.ep +++ b/templates/layouts/mainlayout.html.ep @@ -6,10 +6,9 @@ <meta charset=utf-8> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" - integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/grids-responsive-min.css"> - %= stylesheet '/style.css' + %# <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous"> + %# <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/grids-responsive-min.css"> + %= stylesheet '/css/style.css' <title> %= title || 'JWebmail' diff --git a/templates/webmail/login.html.ep b/templates/webmail/login.html.ep index 28768e3..706dc1c 100644 --- a/templates/webmail/login.html.ep +++ b/templates/webmail/login.html.ep @@ -28,7 +28,7 @@ %= hidden_field challenge => rand % } <div class="pure-controls"> - %= submit_button ucfirst l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => '') : () + %= submit_button ucfirst l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => undef) : () </div> </fieldset> % end @@ -36,22 +36,7 @@ </div> % if ($uses_cram) { -<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js" - integrity="sha512-E8QSvWZ0eCLGk4km3hxSsNmGWbLtSCSUcewDQPQWZF6pEU8GlT8a5fF32wOl1i8ftdMhssTrF/OhyGWwonTcXA==" - crossorigin="anonymous" referrerpolicy="no-referrer"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/hmac-md5.min.js" - integrity="sha512-gy8JaBxTrtIxNLe1FfMAXey61VjQk3Af4EyY/EpVfmWPH16iCgdRZMHEFgKIyxMrarlc6+rDf6WneGL4SWqnpg==" - crossorigin="anonymous" referrerpolicy="no-referrer"></script> - -<script> - document.login1.submit_button.disabled = false; - - document.forms.login1.addEventListener("formdata", (form_data_evt) => { - const form_data = form_data_evt.formData; - const res = CryptoJS.HmacMD5(form_data.get("challenge"), form_data.get("password")) - form_data.set("password", res) - }); -</script> +%= javascript '/src/login_cram.js' % } %= javascript begin |