-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.html
229 lines (206 loc) · 7.99 KB
/
navbar.html
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Navbar Component</title>
<!-- Tailwind -->
<script src="https://cdn-tailwindcss.vercel.app/"></script>
<!-- AlpineJS -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.8.1/cdn.min.js"
defer></script>
<!-- https://preview.keenthemes.com/metronic8/demo10/pages/user-profile/followers.html# -->
</head>
<body>
<!-- Slider Component Container -->
<div
class="flex flex-col items-center justify-center mt-32"
x-cloak
x-data="appData()"
x-init="appInit()">
<div class="flex flex-col">
<!-- Page Scroll Progress -->
<div
class="fixed inset-x-0 top-0 z-50 h-0.5 mt-0.5 bg-blue-500"
:style="`width: ${percent}%`"></div>
<!-- Navbar -->
<nav
class="flex justify-between md:justify-around py-4 bg-white/80 backdrop-blur-md shadow-md w-full fixed top-0 left-0 right-0 z-10 px-8 md:px-0">
<!-- Logo Container -->
<div class="flex items-center">
<!-- Logo -->
<a class="cursor-pointer">
<h3 class="text-2xl font-medium text-blue-500">
<img
class="h-10 object-cover"
src="https://stackoverflow.design/assets/img/logos/so/logo-stackoverflow.svg"
alt="Store Logo" />
</h3>
</a>
</div>
<!-- Links Section -->
<div
class="items-center md:space-x-8 justify-center justify-items-start md:justify-items-center md:flex md:pt-2 w-full left-0 top-16 px-5 md:px-10 py-3 md:py-0 border-t md:border-t-0">
<a
class="flex text-gray-600 hover:text-blue-500 cursor-pointer transition-colors duration-300">
Home
</a>
<a
class="flex text-gray-600 cursor-pointer transition-colors duration-300 font-semibold text-blue-600">
Themes
</a>
<a
class="flex text-gray-600 hover:text-blue-500 cursor-pointer transition-colors duration-300">
Developers
</a>
<a
class="flex text-gray-600 hover:text-blue-500 cursor-pointer transition-colors duration-300">
Pricing
</a>
<a
class="flex text-gray-600 hover:text-blue-500 cursor-pointer transition-colors duration-300">
Blog
</a>
<a
class="flex text-gray-600 hover:text-blue-500 cursor-pointer transition-colors duration-300">
About Us
</a>
</div>
<!-- Auth Links -->
<div class="flex items-center space-x-5 hidden md:flex">
<!-- Register -->
<a
class="flex text-gray-600 hover:text-blue-500 cursor-pointer transition-colors duration-300">
<svg
class="fill-current h-5 w-5 mr-2 mt-0.5"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24">
<path
d="M12 0L11.34 .03L15.15 3.84L16.5 2.5C19.75 4.07 22.09 7.24 22.45 11H23.95C23.44 4.84 18.29 0 12 0M12 4C10.07 4 8.5 5.57 8.5 7.5C8.5 9.43 10.07 11 12 11C13.93 11 15.5 9.43 15.5 7.5C15.5 5.57 13.93 4 12 4M12 6C12.83 6 13.5 6.67 13.5 7.5C13.5 8.33 12.83 9 12 9C11.17 9 10.5 8.33 10.5 7.5C10.5 6.67 11.17 6 12 6M.05 13C.56 19.16 5.71 24 12 24L12.66 23.97L8.85 20.16L7.5 21.5C4.25 19.94 1.91 16.76 1.55 13H.05M12 13C8.13 13 5 14.57 5 16.5V18H19V16.5C19 14.57 15.87 13 12 13M12 15C14.11 15 15.61 15.53 16.39 16H7.61C8.39 15.53 9.89 15 12 15Z" />
</svg>
Register
</a>
<!-- Login -->
<a
class="flex text-gray-600 cursor-pointer transition-colors duration-300 font-semibold text-blue-600">
<svg
class="fill-current h-5 w-5 mr-2 mt-0.5"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24">
<path
d="M10,17V14H3V10H10V7L15,12L10,17M10,2H19A2,2 0 0,1 21,4V20A2,2 0 0,1 19,22H10A2,2 0 0,1 8,20V18H10V20H19V4H10V6H8V4A2,2 0 0,1 10,2Z" />
</svg>
Login
</a>
</div>
<!-- Hamberger Menu -->
<button
class="w-10 h-10 md:hidden justify-self-end rounded-full hover:bg-gray-100">
<svg
class="mx-auto"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24">
<path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
</svg>
</button>
</nav>
</div>
<!-- Dummy Scrollable Content -->
<div class="flex flex-wrap" style="width: 1000px">
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
<div class="bg-orange-200 h-52 w-52 m-5"></div>
</div>
<!-- Notes -->
<span class="text-center font-bold my-20">
MDI (npm i @mdi/font) reuqired for icons
<hr class="my-4" />
<a
href="https://egoistdeveloper.github.io/twcss-to-sass-playground/"
target="_blank"
class="text-blue-600">
Convetert to SASS
</a>
</span>
</div>
<script>
const appData = () => {
return {
percent: 0,
appInit() {
// source: https://codepen.io/A_kamel/pen/qBmmGKJ
window.addEventListener("scroll", () => {
let winScroll =
document.body.scrollTop || document.documentElement.scrollTop,
height =
document.documentElement.scrollHeight -
document.documentElement.clientHeight;
this.percent = Math.round((winScroll / height) * 100);
});
},
};
};
</script>
</body>
</html>