Compare commits
7
Commits
f9c5f3db5a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66862856e4 | ||
|
|
69b3f079ea | ||
|
|
a42ea124cc | ||
|
|
32645c0414 | ||
|
|
12acbfc16b | ||
|
|
35c60ca0d9 | ||
|
|
c8e5bd98cc |
@@ -1,6 +1,3 @@
|
||||
//=require element-closest/closest.js
|
||||
//=require whatwg-fetch/fetch.js
|
||||
|
||||
(function(app) {
|
||||
'use strict';
|
||||
|
||||
@@ -19,9 +16,7 @@
|
||||
form.classList.add('form--sent');
|
||||
|
||||
// Get form data
|
||||
// Explicitly add value of submit button (browser bug in Chrome/FF?)
|
||||
var data = new FormData(form);
|
||||
data.append('_submit', form._submit.value);
|
||||
|
||||
// Send the form data via AJAX
|
||||
var options = {
|
||||
@@ -61,7 +56,7 @@
|
||||
|
||||
// Display the error to the user
|
||||
form.classList.remove('form--sent');
|
||||
form.querySelector('.form__message').innerText = err;
|
||||
form.querySelector('.form__message').innerHTML = err;
|
||||
|
||||
// Enable the submit button again
|
||||
form._submit.disabled = false;
|
||||
|
||||
@@ -46,5 +46,6 @@
|
||||
src: url(-cdd-cachebuster('/assets/fonts/' + $file + '.eot') + '?#') format('embedded-opentype'), // IE 9
|
||||
url(-cdd-cachebuster('/assets/fonts/' + $file + '.woff2')) format('woff2'),
|
||||
url(-cdd-cachebuster('/assets/fonts/' + $file + '.woff')) format('woff');
|
||||
font-display: swap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<footer class="footer">
|
||||
<a href="#top" class="footer__top">↑ <?= l::get('footer.top', 'Top') ?> ↑</a>
|
||||
<div>
|
||||
<?= $site->copyright() ?>
|
||||
</div>
|
||||
|
||||
<?= $site->copyright()->kirbytext() ?>
|
||||
|
||||
<nav class="footer__nav">
|
||||
<ul>
|
||||
<li><?= l::get('footer.madewith', 'Made with') ?> <a href="https://getkirby.com">Kirby</a></li><!--
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//=require element-closest/closest.js
|
||||
//=require whatwg-fetch/fetch.js
|
||||
//=require flexismooth/flexismooth.js
|
||||
|
||||
(function(app) {
|
||||
@@ -56,10 +54,10 @@
|
||||
|
||||
// Just scroll to the top/element if the link points to the current page
|
||||
// In this case, we also don't want to reload, so we return true
|
||||
if(target.pathname === window.location.pathname) {
|
||||
if(mode === 'normal' && target.pathname === window.location.pathname) {
|
||||
var element;
|
||||
if(target.hash) {
|
||||
if(mode === 'normal' && target.hash !== '#top') {
|
||||
if(target.hash !== '#top') {
|
||||
history.pushState({}, document.title, target.href);
|
||||
}
|
||||
element = document.getElementById(target.hash.substr(1));
|
||||
@@ -162,6 +160,9 @@
|
||||
if(app.go(link)) e.preventDefault();
|
||||
});
|
||||
|
||||
// Replace the state for the normal page load
|
||||
history.replaceState({}, document.title, window.location.href);
|
||||
|
||||
// Listen on the popstate event on window
|
||||
window.addEventListener('popstate', function(e) {
|
||||
if(e.state !== null) app.go(window.location.href, 'popstate');
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
//=require element-closest/element-closest.js
|
||||
//=require promise-polyfill/dist/polyfill.js
|
||||
//=require whatwg-fetch/dist/fetch.umd.js
|
||||
Reference in New Issue
Block a user