use more globals for doc root

This commit is contained in:
Greg Gauthier 2024-07-17 00:23:53 +01:00
parent 38aad36fc8
commit 00ed3d48fc

View File

@ -1,17 +1,13 @@
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
window.BASE_URL = 'http://127.0.0.1:5000';
window.IMG = "/assets/img";
window.CSS = "/assets/css";
window.JS = "/assets/js";
window.DOC = "/pages";
window.DOC_ROOT = '';
} else {
window.BASE_URL = 'https://gammaworld.gmgauthier.com';
window.IMG = "/gw/assets/img";
window.CSS = "/gw/assets/css";
window.JS = "/gw/assets/js";
window.DOC = "/gw/pages";
window.DOC_ROOT = '/gw';
}
console.log(window.location.hostname)
console.log(window.BASE_URL)
window.IMG = `${window.DOC_ROOT}/img`;
window.CSS = `${window.DOC_ROOT}/css`;
window.JS = `${window.DOC_ROOT}/js`;
window.DOC = `${window.DOC_ROOT}/pages`;