gold / components /footer.js
CSNET's picture
เอกสารสรุปข้อมูล: ผลิตภัณฑ์อาหารพืช "ใจเกษตร"
d0b3857 verified
Raw History Blame Contribute Delete
5.79 kB
class CustomFooter extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
connectedCallback() {
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
margin-top: auto;
}
footer {
background: linear-gradient(135deg, #065f46, #047857);
color: white;
padding: 3rem 0 1rem;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.footer-section h3 {
color: #fbbf24;
margin-bottom: 1rem;
font-size: 1.25rem;
}
.footer-section p, .footer-section li {
color: #d1d5db;
line-height: 1.6;
}
.footer-section ul {
list-style: none;
padding: 0;
}
.footer-section li {
margin-bottom: 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.footer-bottom {
text-align: center;
padding-top: 2rem;
border-top: 1px solid rgba(255,255,255,0.2);
color: #9ca3af;
}
.social-links {
display: flex;
gap: 1rem;
margin-top: 1rem;
}
.social-link {
width: 2.5rem;
height: 2.5rem;
background: rgba(255,255,255,0.1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.social-link:hover {
background: #fbbf24;
transform: translateY(-2px);
}
@media (max-width: 768px) {
.footer-content {
grid-template-columns: 1fr;
text-align: center;
}
.social-links {
justify-content: center;
}
}
</style>
<footer>
<div class="container">
<div class="footer-content">
<div class="footer-section">
<h3>เกี่ยวกับใจเกษตร</h3>
<p>นวัตกรรมอาหารพืชเข้มข้นที่ช่วยเพิ่มผลผลิต ลดต้นทุน และเป็นมิตรต่อสิ่งแวดล้อม</p>
<div class="social-links">
<a href="#" class="social-link">
<i data-feather="facebook" class="w-5 h-5"></i>
</a>
<a href="#" class="social-link">
<i data-feather="phone" class="w-5 h-5"></i>
</a>
<a href="#" class="social-link">
<i data-feather="mail" class="w-5 h-5"></i>
</a>
</div>
</div>
<div class="footer-section">
<h3>ผลิตภัณฑ์</h3>
<ul>
<li><i data-feather="leaf" class="w-4 h-4"></i> สูตร 1 - บำรุงต้น ราก ใบ</li>
<li><i data-feather="leaf" class="w-4 h-4"></i> สูตร 2 - เพิ่มผลผลิต ติดดอก</li>
</ul>
</div>
<div class="footer-section">
<h3>ติดต่อเรา</h3>
<ul>
<li><i data-feather="message-circle" class="w-4 h-4"></i> Line: WP ใจเกษตร Openchat</li>
<li><i data-feather="phone" class="w-4 h-4"></i> โทร: 089-123-4567</li>
<li><i data-feather="map-pin" class="w-4 h-4"></i> กรุงเทพมหานคร</li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>&copy; 2024 ใจเกษตร. สงวนลิขสิทธิ์ทุกประการ.</p>
</div>
</div>
</footer>
`;
// Replace feather icons
feather.replace({ 'stroke-width': 2 });
}
}
customElements.define('custom-footer', CustomFooter);