Refactor: Update category structure, mega menu, footer, and remove unused pages
- Move DURGO from ระบบน้ำ to อุปกรณ์ปรับอากาศ - Add -category suffix to อุปกรณ์ดับเพลิง and ฉนวนหุ้มท่อ category pages - Update Header mega menu with correct category slugs - Fix Footer layout: split categories to 2 columns, remove quick links - Delete unused pages: all-projects, join-us, services, product - All product images fixed to 1:1 aspect ratio
This commit is contained in:
@@ -42,6 +42,73 @@ const siteUrl = 'https://dealplustech.co.th';
|
||||
<meta property="twitter:description" content={description} />
|
||||
<meta property="twitter:image" content={new URL(image, siteUrl)} />
|
||||
|
||||
<!-- Structured Data - Organization -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
"name": "Deal Plus Tech",
|
||||
"alternateName": "ดีล พลัส เทค",
|
||||
"url": "https://dealplustech.co.th",
|
||||
"logo": "https://dealplustech.co.th/images/logo/dealplustech-logo.png",
|
||||
"description": "ผู้เชี่ยวชาญระบบน้ำ ให้คำแนะนำและจำหน่ายท่อ PPR ตราช้าง ท่อพีพีอาร์ ท่อ HDPE รั้วตาข่าย คุณภาพสูง ราคาถูก",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "9/69 ซอยนครลุง 17 แขวงบางไผ่ เขตบางแค",
|
||||
"addressLocality": "กรุงเทพมหานคร",
|
||||
"postalCode": "10160",
|
||||
"addressCountry": "TH"
|
||||
},
|
||||
"telephone": "+6690-555-1415",
|
||||
"email": "dealplustech@gmail.com",
|
||||
"sameAs": [
|
||||
"https://www.facebook.com/Dealplustech/"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Structured Data - WebSite with Search -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"name": "Deal Plus Tech",
|
||||
"url": "https://dealplustech.co.th",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": "https://dealplustech.co.th/all-products?q={search_term_string}",
|
||||
"query-input": "required name=search_term_string"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Structured Data - LocalBusiness -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "LocalBusiness",
|
||||
"name": "Deal Plus Tech",
|
||||
"image": "https://dealplustech.co.th/images/logo/dealplustech-logo.png",
|
||||
"priceRange": "฿฿",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "9/69 ซอยนครลุง 17 แขวงบางไผ่ เขตบางแค",
|
||||
"addressLocality": "กรุงเทพมหานคร",
|
||||
"postalCode": "10160",
|
||||
"addressCountry": "TH"
|
||||
},
|
||||
"telephone": "+6690-555-1415",
|
||||
"openingHoursSpecification": [
|
||||
{
|
||||
"@type": "OpeningHoursSpecification",
|
||||
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
||||
"opens": "08:30",
|
||||
"closes": "17:30"
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
@@ -221,5 +288,113 @@ const siteUrl = 'https://dealplustech.co.th';
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Enhanced Scroll Animation Initialization -->
|
||||
<script>
|
||||
// Intersection Observer for scroll animations
|
||||
(function() {
|
||||
// Check for reduced motion preference
|
||||
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
if (prefersReducedMotion) {
|
||||
// If user prefers reduced motion, show all elements immediately
|
||||
document.querySelectorAll('.stagger-item, .stagger-from-left, .stagger-from-right, .stagger-scale, .fade-reveal, .img-reveal, .animate-on-scroll').forEach(el => {
|
||||
el.classList.add('revealed', 'visible');
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const observerOptions = {
|
||||
root: null,
|
||||
rootMargin: '0px 0px -50px 0px',
|
||||
threshold: 0.1
|
||||
};
|
||||
|
||||
const animationObserver = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('revealed', 'visible');
|
||||
// Unobserve after animation to save resources
|
||||
animationObserver.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
}, observerOptions);
|
||||
|
||||
// Observe all animated elements
|
||||
const animatedSelectors = [
|
||||
'.stagger-item',
|
||||
'.stagger-from-left',
|
||||
'.stagger-from-right',
|
||||
'.stagger-scale',
|
||||
'.fade-reveal',
|
||||
'.img-reveal',
|
||||
'.animate-on-scroll'
|
||||
];
|
||||
|
||||
animatedSelectors.forEach(selector => {
|
||||
document.querySelectorAll(selector).forEach(el => {
|
||||
animationObserver.observe(el);
|
||||
});
|
||||
});
|
||||
|
||||
// Image lazy load with skeleton
|
||||
const imageObserver = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
const img = entry.target;
|
||||
const src = img.dataset.src;
|
||||
|
||||
if (src) {
|
||||
img.src = src;
|
||||
img.removeAttribute('data-src');
|
||||
|
||||
img.onload = () => {
|
||||
img.classList.remove('skeleton-image');
|
||||
img.classList.add('loaded');
|
||||
};
|
||||
|
||||
img.onerror = () => {
|
||||
img.classList.remove('skeleton-image');
|
||||
img.classList.add('error');
|
||||
};
|
||||
}
|
||||
|
||||
imageObserver.unobserve(img);
|
||||
}
|
||||
});
|
||||
}, { rootMargin: '50px' });
|
||||
|
||||
document.querySelectorAll('img[data-src]').forEach(img => {
|
||||
imageObserver.observe(img);
|
||||
});
|
||||
|
||||
// Stagger animation for children within containers
|
||||
document.querySelectorAll('.stagger-container').forEach(container => {
|
||||
const children = container.querySelectorAll('.stagger-item');
|
||||
children.forEach((child, index) => {
|
||||
if (!child.hasAttribute('data-delay')) {
|
||||
child.setAttribute('data-delay', String((index % 8) + 1));
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
// Smooth scroll for anchor links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const targetId = this.getAttribute('href');
|
||||
if (targetId && targetId !== '#') {
|
||||
const target = document.querySelector(targetId);
|
||||
if (target) {
|
||||
target.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user