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) {
|
(function(app) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -19,9 +16,7 @@
|
|||||||
form.classList.add('form--sent');
|
form.classList.add('form--sent');
|
||||||
|
|
||||||
// Get form data
|
// Get form data
|
||||||
// Explicitly add value of submit button (browser bug in Chrome/FF?)
|
|
||||||
var data = new FormData(form);
|
var data = new FormData(form);
|
||||||
data.append('_submit', form._submit.value);
|
|
||||||
|
|
||||||
// Send the form data via AJAX
|
// Send the form data via AJAX
|
||||||
var options = {
|
var options = {
|
||||||
@@ -61,7 +56,7 @@
|
|||||||
|
|
||||||
// Display the error to the user
|
// Display the error to the user
|
||||||
form.classList.remove('form--sent');
|
form.classList.remove('form--sent');
|
||||||
form.querySelector('.form__message').innerText = err;
|
form.querySelector('.form__message').innerHTML = err;
|
||||||
|
|
||||||
// Enable the submit button again
|
// Enable the submit button again
|
||||||
form._submit.disabled = false;
|
form._submit.disabled = false;
|
||||||
|
|||||||
@@ -46,5 +46,6 @@
|
|||||||
src: url(-cdd-cachebuster('/assets/fonts/' + $file + '.eot') + '?#') format('embedded-opentype'), // IE 9
|
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 + '.woff2')) format('woff2'),
|
||||||
url(-cdd-cachebuster('/assets/fonts/' + $file + '.woff')) format('woff');
|
url(-cdd-cachebuster('/assets/fonts/' + $file + '.woff')) format('woff');
|
||||||
|
font-display: swap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<a href="#top" class="footer__top">↑ <?= l::get('footer.top', 'Top') ?> ↑</a>
|
<a href="#top" class="footer__top">↑ <?= l::get('footer.top', 'Top') ?> ↑</a>
|
||||||
<div>
|
|
||||||
<?= $site->copyright() ?>
|
<?= $site->copyright()->kirbytext() ?>
|
||||||
</div>
|
|
||||||
<nav class="footer__nav">
|
<nav class="footer__nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><?= l::get('footer.madewith', 'Made with') ?> <a href="https://getkirby.com">Kirby</a></li><!--
|
<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
|
//=require flexismooth/flexismooth.js
|
||||||
|
|
||||||
(function(app) {
|
(function(app) {
|
||||||
@@ -56,10 +54,10 @@
|
|||||||
|
|
||||||
// Just scroll to the top/element if the link points to the current page
|
// 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
|
// 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;
|
var element;
|
||||||
if(target.hash) {
|
if(target.hash) {
|
||||||
if(mode === 'normal' && target.hash !== '#top') {
|
if(target.hash !== '#top') {
|
||||||
history.pushState({}, document.title, target.href);
|
history.pushState({}, document.title, target.href);
|
||||||
}
|
}
|
||||||
element = document.getElementById(target.hash.substr(1));
|
element = document.getElementById(target.hash.substr(1));
|
||||||
@@ -162,6 +160,9 @@
|
|||||||
if(app.go(link)) e.preventDefault();
|
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
|
// Listen on the popstate event on window
|
||||||
window.addEventListener('popstate', function(e) {
|
window.addEventListener('popstate', function(e) {
|
||||||
if(e.state !== null) app.go(window.location.href, 'popstate');
|
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