2021-08-02 22:17:27 +02:00
|
|
|
/*
|
2021-08-19 00:10:45 +02:00
|
|
|
* UI Basics
|
2021-08-02 22:17:27 +02:00
|
|
|
*/
|
2021-08-19 00:10:45 +02:00
|
|
|
import "../scss/app.scss";
|
2018-02-05 12:11:01 +01:00
|
|
|
|
2021-08-19 00:10:45 +02:00
|
|
|
import MainUI from "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/main";
|
2021-08-02 22:17:27 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Extra functionality
|
|
|
|
*/
|
2021-08-19 00:10:45 +02:00
|
|
|
import "@a2nt/meta-lightbox-js/src/js/app";
|
|
|
|
import Collapse from "bootstrap/js/src/collapse";
|
|
|
|
import "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/carousel";
|
2021-08-09 18:41:48 +02:00
|
|
|
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/instagram.feed';
|
2020-02-07 20:51:42 +01:00
|
|
|
|
2021-08-09 15:54:55 +02:00
|
|
|
/*
|
|
|
|
* AJAX functionality
|
|
|
|
*/
|
2021-08-09 18:41:48 +02:00
|
|
|
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/links';
|
2021-08-19 00:10:45 +02:00
|
|
|
import "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/online";
|
|
|
|
import "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/lazy-images";
|
2021-08-09 15:54:55 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Site specific modules
|
|
|
|
*/
|
2021-08-19 00:10:45 +02:00
|
|
|
import "./layout";
|
|
|
|
|
|
|
|
("use strict");
|
|
|
|
|
|
|
|
function importAll(r) {
|
|
|
|
return r.keys().map(r);
|
|
|
|
}
|
|
|
|
|
|
|
|
const images = importAll(
|
|
|
|
require.context("../img/", false, /\.(png|webp|jpg|jpeg|gif|svg)$/)
|
|
|
|
);
|
|
|
|
const fontAwesome = importAll(
|
|
|
|
require.context("font-awesome", false, /\.(otf|eot|ttf|woff|woff2)$/)
|
|
|
|
);
|
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
|
2021-08-19 00:10:45 +02:00
|
|
|
if ("serviceWorker" in navigator) {
|
|
|
|
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
|
|
|
}
|