2020-02-07 20:51:42 +01:00
|
|
|
'use strict';
|
|
|
|
|
2021-08-02 22:17:27 +02:00
|
|
|
/*
|
|
|
|
* UI Basics
|
|
|
|
*/
|
2020-02-07 20:51:42 +01:00
|
|
|
import '../scss/app.scss';
|
2018-02-05 12:11:01 +01:00
|
|
|
|
2021-02-26 05:28:19 +01:00
|
|
|
import MainUI from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_components/_main';
|
2021-08-02 22:17:27 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Extra functionality
|
|
|
|
*/
|
2021-04-28 17:34:53 +02:00
|
|
|
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_ui/_ui.carousel';
|
2021-08-02 22:17:27 +02:00
|
|
|
//import '@a2nt/meta-lightbox-react/src/js/app';
|
|
|
|
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_ui/_ui.instagram.feed';
|
2020-02-07 20:51:42 +01:00
|
|
|
|
2021-08-02 22:17:27 +02:00
|
|
|
// site specific modules
|
2020-02-07 20:51:42 +01:00
|
|
|
import './_layout';
|
2018-02-05 12:11:01 +01:00
|
|
|
|
2021-08-02 22:17:27 +02:00
|
|
|
/*
|
|
|
|
* Service workers
|
|
|
|
*/
|
2020-04-02 02:20:17 +02:00
|
|
|
// Register service worker
|
|
|
|
if ('serviceWorker' in navigator) {
|
2021-02-26 05:28:19 +01:00
|
|
|
const baseHref = (document.getElementsByTagName('base')[0] || {}).href;
|
|
|
|
const version = (document.querySelector('meta[name="swversion"]') || {})
|
|
|
|
.content;
|
|
|
|
if (baseHref) {
|
|
|
|
navigator.serviceWorker
|
|
|
|
.register(`${baseHref}sw.js?v=${version}`)
|
|
|
|
.then(() => {
|
|
|
|
console.log('Service Worker Registered');
|
|
|
|
});
|
|
|
|
}
|
2020-04-02 02:20:17 +02:00
|
|
|
}
|
|
|
|
|
2018-02-22 12:48:28 +01:00
|
|
|
function importAll(r) {
|
2021-02-26 05:28:19 +01:00
|
|
|
return r.keys().map(r);
|
2018-02-22 12:48:28 +01:00
|
|
|
}
|
|
|
|
|
2020-01-22 10:46:53 +01:00
|
|
|
const images = importAll(
|
2021-02-26 05:28:19 +01:00
|
|
|
require.context('../img/', false, /\.(png|jpe?g|svg)$/),
|
2020-01-22 10:46:53 +01:00
|
|
|
);
|
|
|
|
const fontAwesome = importAll(
|
2021-04-28 17:34:53 +02:00
|
|
|
require.context('font-awesome', false, /\.(otf|eot|ttf|woff|woff2)$/),
|
2020-01-22 10:46:53 +01:00
|
|
|
);
|