refactor: enhance home page structure and content management

This commit is contained in:
Wini_Fy
2026-02-05 21:19:51 +07:00
parent 3ac250b6a8
commit 7ec9bccad5
11 changed files with 951 additions and 602 deletions

View File

@@ -88,15 +88,15 @@
<div class="card-body">
<div class="tab-content">
<%- include('sections/hero') %>
<%- include('sections/whyChooseUs') %>
<%- include('sections/visaSolutions') %>
<%- include('sections/visaCountries') %>
<%- include('sections/testimonials') %>
<%- include('sections/videoGallery') %>
<%- include('sections/faq') %>
<%- include('sections/achievements') %>
<%- include('sections/partners') %>
<%- include('sections/blogPreview') %>
<%- include('sections/whyChooseUs') %>
<%- include('sections/visaSolutions') %>
<%- include('sections/visaCountries') %>
<%- include('sections/testimonials') %>
<%- include('sections/videoGallery') %>
<%- include('sections/faq') %>
<%- include('sections/achievements') %>
<%- include('sections/partners') %>
<%- include('sections/blogPreview') %>
</div>
</div>
</div>
@@ -136,9 +136,9 @@
document.addEventListener("DOMContentLoaded", function () {
const form = document.querySelector("form");
if (form) {
form.addEventListener("submit", function(e) {
form.addEventListener("submit", function (e) {
console.log("Form submitting, collecting data from scrapers...");
// Tự động thu gom dữ liệu từ các section đã đăng ký
Object.keys(window.homeScrapers).forEach(section => {
const input = document.getElementById(section + 'Json');
@@ -164,7 +164,7 @@
// --- UTILITIES (Dùng chung) ---
function initImageUploads() {
document.addEventListener("click", function(e) {
document.addEventListener("click", function (e) {
const btn = e.target.closest(".btn-upload-image");
if (btn) {
document.getElementById("currentImageType").value = btn.dataset.imageType;