File size: 4,363 Bytes
9dfae78 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
}
footer {
background-color: #f9fafb;
border-top: 1px solid #e5e7eb;
padding: 40px 0 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 16px;
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 32px;
margin-bottom: 32px;
}
.footer-column h3 {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 16px;
color: #1f2937;
}
.footer-column ul {
list-style: none;
}
.footer-column ul li {
margin-bottom: 12px;
}
.footer-column ul li a {
text-decoration: none;
color: #6b7280;
transition: color 0.3s ease;
}
.footer-column ul li a:hover {
color: #3b82f6;
}
.social-links {
display: flex;
gap: 16px;
margin-top: 16px;
}
.social-links a {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: #e5e7eb;
color: #4b5563;
transition: all 0.3s ease;
}
.social-links a:hover {
background-color: #3b82f6;
color: white;
}
.copyright {
padding-top: 24px;
border-top: 1px solid #e5e7eb;
text-align: center;
color: #6b7280;
font-size: 0.875rem;
}
@media (max-width: 768px) {
.footer-content {
grid-template-columns: 1fr;
}
}
</style>
<footer>
<div class="container">
<div class="footer-content">
<div class="footer-column">
<h3>PromptCraft Studio</h3>
<p class="text-gray-600">Creating the perfect prompts for your AI-generated artwork needs.</p>
<div class="social-links">
<a href="#"><i data-feather="twitter"></i></a>
<a href="#"><i data-feather="instagram"></i></a>
<a href="#"><i data-feather="github"></i></a>
<a href="#"><i data-feather="linkedin"></i></a>
</div>
</div>
<div class="footer-column">
<h3>Resources</h3>
<ul>
<li><a href="#">Prompt Guide</a></li>
<li><a href="#">AI Art Tutorials</a></li>
<li><a href="#">Model Comparisons</a></li>
<li><a href="#">Community Gallery</a></li>
</ul>
</div>
<div class="footer-column">
<h3>Company</h3>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="footer-column">
<h3>Legal</h3>
<ul>
<li><a href="#">Terms of Service</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="#">Cookie Policy</a></li>
<li><a href="#">Licensing</a></li>
</ul>
</div>
</div>
<div class="copyright">
<p>© 2023 PromptCraft Studio. All rights reserved.</p>
</div>
</div>
</footer>
`;
// Initialize Feather Icons
const script = document.createElement('script');
script.src = "https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js";
script.onload = () => {
if (this.shadowRoot) {
feather.replace();
}
};
this.shadowRoot.appendChild(script);
}
}
customElements.define('custom-footer', CustomFooter); |