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') { if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
window.BASE_URL = 'http://127.0.0.1:5000'; window.BASE_URL = 'http://127.0.0.1:5000';
window.IMG = "/assets/img"; window.DOC_ROOT = '';
window.CSS = "/assets/css";
window.JS = "/assets/js";
window.DOC = "/pages";
} else { } else {
window.BASE_URL = 'https://gammaworld.gmgauthier.com'; window.BASE_URL = 'https://gammaworld.gmgauthier.com';
window.IMG = "/gw/assets/img"; window.DOC_ROOT = '/gw';
window.CSS = "/gw/assets/css";
window.JS = "/gw/assets/js";
window.DOC = "/gw/pages";
} }
console.log(window.location.hostname) window.IMG = `${window.DOC_ROOT}/img`;
console.log(window.BASE_URL) window.CSS = `${window.DOC_ROOT}/css`;
window.JS = `${window.DOC_ROOT}/js`;
window.DOC = `${window.DOC_ROOT}/pages`;