tonybtw.com

tonybtw.com

https://git.tonybtw.com/tonybtw.com.git git://git.tonybtw.com/tonybtw.com.git
5,111 bytes raw
1
<header class="site-header sticky z-30">
2
  <div class="site-masthead">
3
      <nav class="navbar container">
4
        <!-- Logo -->
5
        <div class="nav-logo">
6
          <a class="navbar-brand" href="/">Tony, btw.</a>
7
        </div>
8
9
        <!-- Hamburger Toggler -->
10
        <button id="nav-toggler" class="nav-toggle" aria-label="Open Mobile Menu">
11
          <svg viewBox="0 0 20 20" class="hamburger-icon" fill="currentColor">
12
            <path d="M0 3h20v2H0V3z m0 6h20v2H0V9z m0 6h20v2H0V0z"></path>
13
          </svg>
14
        </button>
15
16
        <!-- Desktop Nav -->
17
        <ul id="nav-menu" class="nav-menu">
18
          <!-- <li class="nav-item"><a class="nav-link" href="/">Home</a></li> -->
19
          <li class="nav-item"><a class="nav-link" href="/support/">Support</a></li>
20
          <li class="nav-item"><a class="nav-link" href="/tutorial/">Tutorials</a></li>
21
          <li class="nav-item"><a class="nav-link" href="/community/">Community</a></li>
22
            <div class="nav-right">
23
              <a href="https://discord.gg/CXAz6m4sWE" class="discord-desktop-btn" target="_blank" rel="noopener">
24
                <!-- 💬 Join Discord -->
25
                Join Discord
26
              </a>
27
            </div>
28
        </ul>
29
30
      </nav>
31
    </div>
32
</header>
33
34
<!-- Mobile Nav -->
35
<div id="mobile-nav-panel" class="mobile-nav hidden">
36
  <ul class="mobile-nav-list">
37
    <li><a class="mobile-nav-link" href="/">Home</a></li>
38
    <li><a class="mobile-nav-link" href="/support/">Support</a></li>
39
    <li><a class="mobile-nav-link" href="/tutorial/">Tutorials</a></li>
40
    <li><a class="mobile-nav-link" href="/community/">Community</a></li>
41
    <li class="mobile-nav-link">
42
      <a href="https://discord.gg/CXAz6m4sWE" target="_blank" rel="noopener">Join Discord</a>
43
    </li>
44
  </ul>
45
</div>
46
47
<!-- Discord Desktop -->
48
49
<style>
50
51
.navbar {
52
  display: flex;
53
  justify-content: space-between;
54
  align-items: flex-end; /* <--- this aligns logo + nav to bottom */
55
  padding: 1rem 0;
56
}
57
58
.nav-logo {
59
  font-size: 1.75rem;
60
  font-weight: bold;
61
  margin: 0;
62
  padding: 0;
63
  line-height: 1;
64
}
65
66
.navbar-brand {
67
  text-decoration: none;
68
  color: white;
69
}
70
71
.nav-menu {
72
  display: flex;
73
  align-items: flex-end; /* ensure nav links align with logo */
74
  gap: 1rem;
75
  list-style: none;
76
  margin: 0;
77
  padding: 0;
78
}
79
80
.navbar {
81
  display: flex;
82
  justify-content: space-between;
83
  align-items: center;
84
  flex-wrap: wrap;
85
}
86
87
.nav-logo .navbar-brand {
88
  font-size: 1.6rem;
89
  font-weight: bold;
90
  background: linear-gradient(to right, #7aa2f7, #ad8ee6);
91
  -webkit-background-clip: text;
92
  -webkit-text-fill-color: transparent;
93
  text-decoration: none;
94
}
95
96
.nav-menu {
97
  display: none;
98
  flex-direction: row;
99
  list-style: none;
100
  gap: 2rem;
101
  padding-left: 0;
102
}
103
104
.nav-item {
105
  display: inline-block;
106
}
107
108
.nav-link {
109
  text-decoration: none;
110
  color: #c0caf5;
111
  padding: 0.5rem 1rem;
112
}
113
114
.nav-link:hover {
115
  color: #7aa2f7;
116
}
117
118
.nav-toggle {
119
  display: inline-block;
120
  background: none;
121
  border: none;
122
  cursor: pointer;
123
}
124
125
.hamburger-icon {
126
  width: 24px;
127
  height: 24px;
128
  color: #c0caf5;
129
}
130
131
.nav-right {
132
  display: flex;
133
  align-items: center;
134
  gap: 1rem;
135
}
136
137
.theme-switcher {
138
  background: none;
139
  border: none;
140
  cursor: pointer;
141
}
142
143
.discord-btn {
144
  background-color: #7aa2f7;
145
  color: #1a1b26;
146
  padding: 0.4rem 0.8rem;
147
  border-radius: 4px;
148
  text-decoration: none;
149
  font-weight: bold;
150
  display: inline-flex;
151
  align-items: center;
152
  gap: 0.5rem;
153
}
154
155
.discord-btn:hover {
156
  background-color: #5e8eff;
157
}
158
159
/* Mobile nav panel */
160
.mobile-nav {
161
  background-color: #1a1b26;
162
  padding: 1rem;
163
}
164
165
.mobile-nav-list {
166
  list-style: none;
167
  padding-left: 0;
168
}
169
170
.mobile-nav-link {
171
  display: block;
172
  padding: 0.5rem 0;
173
  color: #c0caf5;
174
  text-decoration: none;
175
  border-bottom: 1px solid #292d3e;
176
}
177
178
.mobile-nav-link:hover {
179
  color: #7aa2f7;
180
}
181
182
.hidden {
183
  display: none !important;
184
}
185
186
/* Mobile only */
187
@media (max-width: 768px) {
188
  .nav-logo {
189
    padding-left: 1rem; 
190
  }
191
  .nav-toggle {
192
    padding-right: 1rem; 
193
  }
194
}
195
196
/* Show desktop nav at large screens */
197
@media screen and (min-width: 1024px) {
198
  .nav-menu {
199
    display: flex;
200
  }
201
202
  .nav-toggle {
203
    display: none;
204
  }
205
206
  .mobile-nav {
207
    display: none !important;
208
  }
209
}
210
</style>
211
212
<script>
213
  const navToggler = document.getElementById('nav-toggler');
214
  const mobileNav = document.getElementById('mobile-nav-panel');
215
  navToggler?.addEventListener('click', () => {
216
    mobileNav?.classList.toggle('hidden');
217
  });
218
219
  const themeSwitcherBtn = document.getElementById('theme-switcher-btn');
220
  const applyTheme = (theme) => {
221
    document.documentElement.classList.toggle('dark', theme === 'dark');
222
  };
223
  const toggleTheme = () => {
224
    const isDark = document.documentElement.classList.toggle('dark');
225
    localStorage.setItem('theme', isDark ? 'dark' : 'light');
226
  };
227
  const initialTheme = localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
228
  applyTheme(initialTheme);
229
  document.addEventListener('DOMContentLoaded', () => {
230
    themeSwitcherBtn?.addEventListener('click', toggleTheme);
231
  });
232
</script>