CSNET's picture
ช่วยออกแบบและทำ Dashboard Report ยอดขายของสินค้าทุกตัว ตามนี้ทีข้อมูลการขายรายปีดังนี้
24834c1 verified
Raw History Blame Contribute Delete
9.19 kB
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
footer {
background: #1f2937;
color: white;
margin-top: 4rem;
}
.footer-container {
max-width: 1280px;
margin: 0 auto;
padding: 3rem 2rem 1.5rem;
}
.footer-content {
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr;
gap: 3rem;
margin-bottom: 2rem;
}
.footer-brand {
display: flex;
flex-direction: column;
gap: 1rem;
}
.brand-name {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 1.5rem;
font-weight: 700;
color: white;
}
.brand-description {
color: #9ca3af;
line-height: 1.6;
max-width: 350px;
}
.social-links {
display: flex;
gap: 0.75rem;
}
.social-link {
background: rgba(255, 255, 255, 0.1);
width: 40px;
height: 40px;
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
color: white;
text-decoration: none;
transition: background 0.2s;
}
.social-link:hover {
background: rgba(255, 255, 255, 0.2);
}
.footer-section h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 1rem;
color: white;
}
.footer-links {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.footer-links a {
color: #9ca3af;
text-decoration: none;
font-size: 0.875rem;
transition: color 0.2s;
}
.footer-links a:hover {
color: white;
}
.footer-bottom {
border-top: 1px solid #374151;
padding-top: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.copyright {
color: #9ca3af;
font-size: 0.875rem;
}
.footer-bottom-links {
display: flex;
gap: 1.5rem;
list-style: none;
}
.footer-bottom-links a {
color: #9ca3af;
text-decoration: none;
font-size: 0.875rem;
transition: color 0.2s;
}
.footer-bottom-links a:hover {
color: white;
}
@media (max-width: 768px) {
.footer-content {
grid-template-columns: 1fr;
gap: 2rem;
}
.footer-container {
padding: 2rem 1rem 1rem;
}
.footer-bottom {
flex-direction: column;
text-align: center;
}
}
</style>
<footer>
<div class="footer-container">
<div class="footer-content">
<div class="footer-brand">
<div class="brand-name">
<i data-feather="trending-up" style="width: 32px; height: 32px;"></i>
SalesFlow
</div>
<p class="brand-description">
ระบบวิเคราะห์และรายงานยอดขายที่ช่วยให้คุณติดตามธุรกิจได้อย่างมีประสิทธิภาพ
</p>
<div class="social-links">
<a href="#" class="social-link">
<i data-feather="facebook"></i>
</a>
<a href="#" class="social-link">
<i data-feather="twitter"></i>
</a>
<a href="#" class="social-link">
<i data-feather="linkedin"></i>
</a>
<a href="#" class="social-link">
<i data-feather="instagram"></i>
</a>
</div>
</div>
<div class="footer-section">
<h3>ผลิตภัณฑ์</h3>
<ul class="footer-links">
<li><a href="#">แดชบอร์ด</a></li>
<li><a href="#">รายงาน</a></li>
<li><a href="#">การวิเคราะห์</a></li>
<li><a href="#">การส่งออกข้อมูล</a></li>
</ul>
</div>
<div class="footer-section">
<h3>บริษัท</h3>
<ul class="footer-links">
<li><a href="#">เกี่ยวกับเรา</a></li>
<li><a href="#">ทีมงาน</a></li>
<li><a href="#">อาชีพ</a></li>
<li><a href="#">ติดต่อเรา</a></li>
</ul>
</div>
<div class="footer-section">
<h3>สนับสนุน</h3>
<ul class="footer-links">
<li><a href="#">ศูนย์ช่วยเหลือ</a></li>
<li><a href="#">เอกสาร</a></li>
<li><a href="#">คู่มือการใช้</a></li>
<li><a href="#">อัปเดต</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p class="copyright">
© 2024 SalesFlow. สงวนลิขสิทธิ์
</p>
<ul class="footer-bottom-links">
<li><a href="#">นโยบายความเป็นส่วนตัว</a></li>
<li><a href="#">เงื่อนไขการใช้งาน</a></li>
<li><a href="#">คุกกี้</a></li>
</ul>
</div>
</div>
</footer>
`;
// Initialize Feather Icons inside Shadow DOM
const icons = this.shadowRoot.querySelectorAll('[data-feather]');
icons.forEach(icon => {
const iconName = icon.getAttribute('data-feather');
icon.outerHTML = feather.icons[iconName].toSvg({
width: 20,
height: 20
});
});
}
}
customElements.define('custom-footer', CustomFooter);