File size: 2,777 Bytes
cb0b79d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c4d70c7
 
cb0b79d
c4d70c7
 
 
 
 
 
cb0b79d
 
 
 
 
 
 
 
 
c4d70c7
cb0b79d
c4d70c7
 
 
 
 
 
cb0b79d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CustomNavbar extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        :host {
          display: block;
          position: sticky;
          top: 0;
          z-index: 50;
          background: rgba(255, 255, 255, 0.95);
          backdrop-filter: blur(12px);
          border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        nav {
          max-width: 1280px;
          margin: 0 auto;
          padding: 1rem;
          display: flex;
          align-items: center;
          justify-content: space-between;
        }
        
        .logo {
          display: flex;
          align-items: center;
          gap: 0.75rem;
          text-decoration: none;
        }
        
        .logo-icon {
          font-size: 1.75rem;
        }
        
        .logo-text {
          font-size: 1.25rem;
          font-weight: 700;
          color: #1e293b;
          background: linear-gradient(45deg, #6d28d9, #ec4899);
          -webkit-background-clip: text;
          background-clip: text;
          -webkit-text-fill-color: transparent;
        }
        
        .nav-links {
          display: none;
          gap: 2rem;
          align-items: center;
        }
        .nav-link {
          color: #64748b;
          font-weight: 500;
          text-decoration: none;
          transition: color 0.2s;
          padding: 0.5rem;
          border-radius: 0.25rem;
        }

        .nav-link:focus {
          outline: 2px solid #7c3aed;
          outline-offset: 2px;
        }
.nav-link:hover {
          color: #6d28d9;
        }
        .cta-btn {
          padding: 0.5rem 1.5rem;
          border-radius: 0.5rem;
          font-weight: 600;
          background: linear-gradient(45deg, #6d28d9, #ec4899);
          color: white;
          transition: all 0.2s;
          outline: none;
        }

        .cta-btn:focus {
          outline: 2px solid #7c3aed;
          outline-offset: 2px;
        }
.cta-btn:hover {
          transform: translateY(-2px);
          box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }
        
        @media (min-width: 768px) {
          .nav-links {
            display: flex;
          }
        }
      </style>
      
      <nav>
        <a href="/" class="logo">
          <span class="logo-icon">πŸš€</span>
          <span class="logo-text">MissionQuest</span>
        </a>
        
        <div class="nav-links">
          <a href="#missions" class="nav-link">Missions</a>
          <a href="#how-it-works" class="nav-link">Comment Γ§a marche</a>
          <a href="#get-started" class="cta-btn">Commencer</a>
        </div>
      </nav>
    `;
  }
}

customElements.define('custom-navbar', CustomNavbar);