File size: 3,683 Bytes
2f9a6bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomFooter extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                :host {
                    display: block;
                    width: 100%;
                    background-color: #f8fafc;
                    border-top: 1px solid #e2e8f0;
                }
                
                footer {
                    max-width: 1200px;
                    margin: 0 auto;
                    padding: 3rem 2rem;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    text-align: center;
                }
                
                .footer-logo {
                    font-size: 1.5rem;
                    font-weight: 700;
                    color: #0ea5e9;
                    margin-bottom: 1.5rem;
                    text-decoration: none;
                }
                
                .footer-links {
                    display: flex;
                    gap: 1.5rem;
                    margin-bottom: 2rem;
                }
                
                .footer-link {
                    color: #475569;
                    text-decoration: none;
                    transition: color 0.2s;
                }
                
                .footer-link:hover {
                    color: #0ea5e9;
                }
                
                .social-links {
                    display: flex;
                    gap: 1.5rem;
                    margin-bottom: 2rem;
                }
                
                .social-link {
                    color: #64748b;
                    transition: color 0.2s;
                }
                
                .social-link:hover {
                    color: #0ea5e9;
                }
                
                .copyright {
                    color: #94a3b8;
                    font-size: 0.875rem;
                }
            </style>
            
            <footer>
                <a href="/" class="footer-logo">CodeCanvas</a>
                
                <div class="footer-links">
                    <a href="#projects" class="footer-link">Projects</a>
                    <a href="#writing" class="footer-link">Writing</a>
                    <a href="#contact" class="footer-link">Contact</a>
                </div>
                
                <div class="social-links">
                    <a href="#" class="social-link">
                        <i data-feather="github"></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="mail"></i>
                    </a>
                </div>
                
                <p class="copyright">© ${new Date().getFullYear()} CodeCanvas Chronicles. All rights reserved.</p>
            </footer>
        `;
        
        // Initialize Feather icons
        const featherScript = document.createElement('script');
        featherScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js';
        this.shadowRoot.appendChild(featherScript);
        
        featherScript.onload = () => {
            if (window.feather) {
                window.feather.replace();
            }
        };
    }
}

customElements.define('custom-footer', CustomFooter);