Persovt's picture
Создай сайт визиту для маркетолога со стажем 10 лет с кейсами
8309ac6 verified
Raw History Blame Contribute Delete
10.3 kB
class CustomFooter extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
width: 100%;
}
footer {
background: rgba(17, 24, 39, 0.9);
border-top: 1px solid rgba(55, 65, 81, 0.5);
}
.social-link {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
background: rgba(55, 65, 81, 0.3);
transition: all 0.3s ease;
}
.social-link:hover {
background: linear-gradient(135deg, #c026d3, #86198f);
transform: translateY(-3px);
box-shadow: 0 10px 20px rgba(192, 38, 211, 0.2);
}
.footer-link {
position: relative;
padding: 0.25rem 0;
transition: color 0.3s ease;
}
.footer-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 1px;
background: linear-gradient(90deg, #c026d3, #86198f);
transition: width 0.3s ease;
}
.footer-link:hover::after {
width: 100%;
}
.back-to-top {
position: fixed;
bottom: 2rem;
right: 2rem;
width: 50px;
height: 50px;
border-radius: 12px;
background: linear-gradient(135deg, #c026d3, #86198f);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transform: translateY(20px);
transition: all 0.3s ease;
box-shadow: 0 10px 25px rgba(192, 38, 211, 0.3);
z-index: 999;
cursor: pointer;
}
.back-to-top.visible {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.back-to-top:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(192, 38, 211, 0.4);
}
</style>
<footer class="py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-8">
<!-- Company Info -->
<div>
<div class="flex items-center space-x-3 mb-4">
<div class="w-10 h-10 rounded-lg bg-gradient-to-br from-secondary-500 to-pink-500 flex items-center justify-center">
<i data-feather="trending-up" class="w-6 h-6 text-white"></i>
</div>
<div>
<span class="text-xl font-bold bg-gradient-to-r from-secondary-400 to-pink-400 bg-clip-text text-transparent">Conversion Catalyst</span>
<span class="block text-xs text-gray-400">Pro Marketing</span>
</div>
</div>
<p class="text-gray-400 mb-4">Transforming businesses through data-driven marketing strategies since 2014.</p>
<div class="flex space-x-3">
<a href="https://linkedin.com" target="_blank" class="social-link">
<i data-feather="linkedin" class="w-5 h-5"></i>
</a>
<a href="https://twitter.com" target="_blank" class="social-link">
<i data-feather="twitter" class="w-5 h-5"></i>
</a>
<a href="https://instagram.com" target="_blank" class="social-link">
<i data-feather="instagram" class="w-5 h-5"></i>
</a>
<a href="mailto:contact@conversioncatalyst.pro" class="social-link">
<i data-feather="mail" class="w-5 h-5"></i>
</a>
</div>
</div>
<!-- Quick Links -->
<div>
<h3 class="text-lg font-semibold mb-4">Quick Links</h3>
<ul class="space-y-2">
<li><a href="#cases" class="footer-link text-gray-400 hover:text-white">Case Studies</a></li>
<li><a href="#services" class="footer-link text-gray-400 hover:text-white">Services</a></li>
<li><a href="#process" class="footer-link text-gray-400 hover:text-white">Process</a></li>
<li><a href="#testimonials" class="footer-link text-gray-400 hover:text-white">Testimonials</a></li>
<li><a href="#contact" class="footer-link text-gray-400 hover:text-white">Contact</a></li>
</ul>
</div>
<!-- Services -->
<div>
<h3 class="text-lg font-semibold mb-4">Services</h3>
<ul class="space-y-2">
<li><a href="#" class="footer-link text-gray-400 hover:text-white">Marketing Strategy</a></li>
<li><a href="#" class="footer-link text-gray-400 hover:text-white">Campaign Management</a></li>
<li><a href="#" class="footer-link text-gray-400 hover:text-white">Content Marketing</a></li>
<li><a href="#" class="footer-link text-gray-400 hover:text-white">Social Media Marketing</a></li>
<li><a href="#" class="footer-link text-gray-400 hover:text-white">SEO & Analytics</a></li>
</ul>
</div>
<!-- Contact Info -->
<div>
<h3 class="text-lg font-semibold mb-4">Contact Info</h3>
<ul class="space-y-3">
<li class="flex items-start">
<i data-feather="mail" class="w-5 h-5 text-secondary-400 mr-3 mt-1"></i>
<span class="text-gray-400">contact@conversioncatalyst.pro</span>
</li>
<li class="flex items-start">
<i data-feather="phone" class="w-5 h-5 text-secondary-400 mr-3 mt-1"></i>
<span class="text-gray-400">+1 (555) 123-4567</span>
</li>
<li class="flex items-start">
<i data-feather="map-pin" class="w-5 h-5 text-secondary-400 mr-3 mt-1"></i>
<span class="text-gray-400">New York, NY 10001</span>
</li>
</ul>
</div>
</div>
<div class="pt-8 border-t border-gray-800 text-center">
<p class="text-gray-500 text-sm">
&copy; 2014-2024 Conversion Catalyst Pro. All rights reserved.
<span class="block md:inline">Designed with <i data-feather="heart" class="w-4 h-4 inline text-red-400 mx-1"></i> for marketers.</span>
</p>
</div>
</div>
<!-- Back to Top Button -->
<div id="backToTop" class="back-to-top">
<i data-feather="arrow-up" class="w-6 h-6 text-white"></i>
</div>
</footer>
`;
// Initialize after rendering
setTimeout(() => {
this.initializeFooter();
}, 0);
}
initializeFooter() {
// Back to top functionality
const backToTop = this.shadowRoot.getElementById('backToTop');
window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTop.classList.add('visible');
} else {
backToTop.classList.remove('visible');
}
});
if (backToTop) {
backToTop.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
}
// Initialize Feather icons in shadow DOM
this.initializeIcons();
}
initializeIcons() {
// Wait for feather to be available
if (typeof feather !== 'undefined') {
const icons = this.shadowRoot.querySelectorAll('[data-feather]');
icons.forEach(icon => {
feather.replace(icon);
});
} else {
// Retry after a short delay
setTimeout(() => this.initializeIcons(), 100);
}
}
}
customElements.define('custom-footer', CustomFooter);