forked from MinhQuan/PresentCorpo
footer: add footer loader
This commit is contained in:
@@ -377,7 +377,8 @@
|
||||
<!-- Footer Component -->
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="productPages/productMain/productMain.js"></script>
|
||||
<script src="productPages/productMain/productMain.js?v=1.0"></script>
|
||||
<script src="/components/header/headerLoader.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
////views/productPages/productMain/productMain.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Product page specific JavaScript
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
@@ -36,7 +30,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
if (hash) {
|
||||
// Find the tab with matching data-category
|
||||
const tab = document.querySelector(
|
||||
`.category-tab[data-category="${hash}"]`
|
||||
`.category-tab[data-category="${hash}"]`,
|
||||
);
|
||||
if (tab) {
|
||||
// Remove active class from all tabs and contents
|
||||
|
||||
@@ -142,6 +142,7 @@
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="components/header/headerLoader.js"></script>
|
||||
<script src="productPages/productSeparateCommerceLNG/productSeparateCommerceLNG.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
<script src="productPages/productSeparateCommerceLNG/productSeparateCommerceLNG.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
////views/productPages/productSeparateCommerceLNG/productSeparateCommerceLNG.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Set products nav item as active
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="components/header/headerLoader.js"></script>
|
||||
<script src="productPages/productSeparateCommercePNG/productSeparateCommercePNG.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
<script src="productPages/productSeparateCommercePNG/productSeparateCommercePNG.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
////views/productPages/productSeparateCommercePNG/productSeparateCommercePNG.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Set products nav item as active
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
+2
-1
@@ -137,6 +137,7 @@
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="components/header/headerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionGasMeter/productSeparateProductionGasMeter.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionGasMeter/productSeparateProductionGasMeter.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
-6
@@ -1,10 +1,4 @@
|
||||
// views/productPages/productSeparateProductionGasMeter/productSeparateProductionGasMeter.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Set products nav item as active
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="components/header/headerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionPRU/productSeparateProductionPRU.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionPRU/productSeparateProductionPRU.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
// views/productPages/productSeparateProductionPRU/productSeparateProductionPRU.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Set products nav item as active
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
+2
-1
@@ -137,6 +137,7 @@
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="components/header/headerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionPressureRegulatorValve/productSeparateProductionPressureRegulatorValve.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionPressureRegulatorValve/productSeparateProductionPressureRegulatorValve.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
-6
@@ -1,10 +1,4 @@
|
||||
// views/productPages/productSeparateProductionPressureRegulatorValve/productSeparateProductionPressureRegulatorValve.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Set products nav item as active
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
+2
-1
@@ -137,6 +137,7 @@
|
||||
<div id="footer"></div>
|
||||
|
||||
<script src="components/header/headerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionVaporizer/productSeparateProductionVaporizer.js"></script>
|
||||
<script src="/components/footer/footerLoader.js"></script>
|
||||
<script src="productPages/productSeparateProductionVaporizer/productSeparateProductionVaporizer.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
-6
@@ -1,10 +1,4 @@
|
||||
// views/productPages/productSeparateProductionVaporizer/productSeparateProductionVaporizer.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
// Set products nav item as active
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
Reference in New Issue
Block a user