File size: 2,587 Bytes
6a073e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e92b0de
 
6a073e2
 
e92b0de
 
6a073e2
 
 
 
 
 
 
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
class WormateNav extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                nav {
                    background: #1a1a2e;
                    color: white;
                    padding: 1rem;
                    position: fixed;
                    top: 0;
                    left: 0;
                    right: 0;
                    z-index: 100;
                    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
                }
                
                .nav-container {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    max-width: 1200px;
                    margin: 0 auto;
                }
                
                .logo {
                    font-family: 'Press Start 2P', cursive;
                    font-size: 1.2rem;
                    color: #ff6b6b;
                    text-decoration: none;
                }
                
                .nav-links {
                    display: flex;
                    gap: 1.5rem;
                }
                
                .nav-link {
                    color: white;
                    text-decoration: none;
                    font-family: 'Press Start 2P', cursive;
                    font-size: 0.8rem;
                    transition: all 0.3s;
                }
                
                .nav-link:hover {
                    color: #ff6b6b;
                }
                
                @media (max-width: 768px) {
                    .nav-container {
                        flex-direction: column;
                        gap: 1rem;
                    }
                    
                    .nav-links {
                        gap: 1rem;
                    }
                }
            </style>
            
            <nav>
                <div class="nav-container">
                    <a href="#" class="logo">WORMATE.IO</a>
                    
                    <div class="nav-links">
                        <a href="index.html" class="nav-link">HOME</a>
                        <a href="index.html#play" class="nav-link">PLAY</a>
                        <a href="#" class="nav-link">SKINS</a>
                        <a href="#" class="nav-link">LEADERBOARD</a>
                        <a href="about.html" class="nav-link">ABOUT</a>
</div>
                </div>
            </nav>
        `;
    }
}

customElements.define('wormate-nav', WormateNav);