footer: add footer loader

This commit is contained in:
2026-06-03 03:42:39 +07:00
parent b7c10621b1
commit 42429b1509
29 changed files with 39 additions and 101 deletions
+2 -1
View File
@@ -197,6 +197,7 @@
<!-- Scripts -->
<script src="/components/header/headerLoader.js"></script>
<script src="contactPages/contactMain.js"></script>
<script src="/components/footer/footerLoader.js"></script>
<script src="contactPages/contactMain.js?v=1.0"></script>
</body>
</html>
+2 -8
View File
@@ -1,10 +1,4 @@
////views\contactPage\contactMain.js
// Load footer
fetch("components/footer/footer.html")
.then((response) => response.text())
.then((data) => {
document.getElementById("footer").innerHTML = data;
});
document.addEventListener("DOMContentLoaded", function () {
// Focus and blur effects for form elements
@@ -34,7 +28,7 @@ document.addEventListener("DOMContentLoaded", function () {
// Form progress bar
const progressBar = document.querySelector(".form-progress-bar");
const formInputs = document.querySelectorAll(
".contact-form input, .contact-form textarea"
".contact-form input, .contact-form textarea",
);
const totalInputs = formInputs.length;
@@ -197,7 +191,7 @@ document.addEventListener("DOMContentLoaded", function () {
// Show error message
showMessage(
"error",
"Đã xảy ra lỗi khi gửi tin nhắn. Vui lòng thử lại sau."
"Đã xảy ra lỗi khi gửi tin nhắn. Vui lòng thử lại sau.",
);
});
}