|
1 | 1 | <script lang="ts"> |
2 | 2 | import { |
| 3 | + ArrowRight01Icon, |
| 4 | + ArrowUpRight01Icon, |
3 | 5 | BootstrapIcon, |
4 | 6 | Cancel01Icon, |
5 | 7 | ChevronDownIcon, |
6 | 8 | GithubIcon, |
| 9 | + Linkedin01Icon, |
7 | 10 | Menu01Icon, |
8 | 11 | TailwindcssIcon, |
9 | | - ArrowRight01Icon, |
10 | | - Linkedin01Icon, |
11 | | - ArrowUpRight01Icon, |
12 | 12 | } from "@hugeicons/core-free-icons"; |
13 | 13 | import { HugeiconsIcon } from "@hugeicons/svelte"; |
14 | 14 | import type { Snippet } from "svelte"; |
|
41 | 41 |
|
42 | 42 | const footerLinks = ["Home", "Features", "About", "FAQ", "Docs"]; |
43 | 43 |
|
44 | | - const socials = [ |
| 44 | + const socials: Array<{ label: string; icon: typeof GithubIcon | typeof Linkedin01Icon; href: string }> = [ |
45 | 45 | { label: "Github", icon: GithubIcon, href: "https://github.com/polinema-ui/website" }, |
46 | 46 | { label: "LinkedIn", icon: Linkedin01Icon, href: "#" }, |
47 | 47 | ]; |
|
50 | 50 | fetchGithubStars("polinema-ui/website").then((count) => (githubStars = count)); |
51 | 51 |
|
52 | 52 | const onScroll = () => (scrolled = window.scrollY > 20); |
53 | | -
|
54 | 53 | window.addEventListener("scroll", onScroll, { passive: true }); |
55 | 54 |
|
56 | 55 | return () => window.removeEventListener("scroll", onScroll); |
|
66 | 65 | <a href={localizeHref("#home")} aria-label="Polinema UI home" class="flex shrink-0 items-center"> |
67 | 66 | <img src="/logo.png" alt="Polinema UI Logo" class="h-4.5 w-auto object-contain sm:h-5" /> |
68 | 67 | </a> |
69 | | - |
70 | 68 | <nav aria-label="Primary navigation" class="hidden md:flex"> |
71 | 69 | <ul class="flex items-center gap-1"> |
72 | 70 | {#each MENUS as item (item.label)} |
73 | 71 | {@const isActive = activeItem === item.label} |
74 | | - |
75 | 72 | <li> |
76 | 73 | <a |
77 | 74 | href={localizeHref(item.href)} |
|
87 | 84 | {/each} |
88 | 85 | </ul> |
89 | 86 | </nav> |
90 | | - |
91 | 87 | <aside class="hidden items-center gap-1.5 sm:gap-2 md:flex"> |
92 | 88 | <Button |
93 | 89 | href={localizeHref("https://github.com/polinema-ui/website")} |
|
99 | 95 | <HugeiconsIcon icon={GithubIcon} size={14} color="#1a1a1a" /> |
100 | 96 | <span class="font-medium">{githubStars}</span> |
101 | 97 | </Button> |
102 | | - |
103 | 98 | <Root bind:open={dropdownOpen}> |
104 | 99 | <Trigger |
105 | 100 | class="flex h-8 cursor-pointer items-center gap-1.5 rounded-lg border border-gray-200/80 bg-white px-2.5 text-xs font-medium text-neutral-800 transition-all hover:bg-gray-100 active:scale-95 sm:h-9 sm:gap-2 sm:px-3 sm:text-[13px]" |
|
111 | 106 | <HugeiconsIcon icon={BootstrapIcon} size={15} color="#7952b3" /> |
112 | 107 | <span class="hidden sm:inline">Bootstrap 5</span> |
113 | 108 | {/if} |
114 | | - |
115 | 109 | <span class="transition-transform duration-200 {dropdownOpen ? 'rotate-180' : ''}"> |
116 | 110 | <HugeiconsIcon icon={ChevronDownIcon} size={13} color="#1c1c1c" /> |
117 | 111 | </span> |
118 | 112 | </Trigger> |
119 | | - |
120 | 113 | <Content class="z-50 min-w-36 rounded-xl border border-neutral-200/80 bg-white p-1 shadow-xl"> |
121 | 114 | <Item |
122 | 115 | onclick={() => (selectedFramework = "Tailwind 4")} |
|
125 | 118 | <HugeiconsIcon icon={TailwindcssIcon} size={15} color="#06b6d4" /> |
126 | 119 | <span>Tailwind 4</span> |
127 | 120 | </Item> |
128 | | - |
129 | 121 | <Item |
130 | 122 | onclick={() => (selectedFramework = "Bootstrap 5")} |
131 | 123 | class="flex cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-2 text-xs font-medium text-neutral-800 transition-colors select-none hover:bg-[#f4f4f0]" |
|
136 | 128 | </Content> |
137 | 129 | </Root> |
138 | 130 | </aside> |
139 | | - |
140 | 131 | <button |
141 | 132 | type="button" |
142 | 133 | onclick={() => (mobileMenuOpen = !mobileMenuOpen)} |
|
160 | 151 | <ul class="flex flex-col divide-y divide-neutral-100"> |
161 | 152 | {#each MENUS as item (item.label)} |
162 | 153 | {@const isActive = activeItem === item.label} |
163 | | - |
164 | 154 | <li> |
165 | 155 | <a |
166 | 156 | class="flex items-center justify-between py-4 text-lg font-semibold tracking-tight transition-colors {isActive |
|
172 | 162 | mobileMenuOpen = false; |
173 | 163 | }} |
174 | 164 | > |
175 | | - <span>{item.label}</span> |
176 | | - |
| 165 | + <h5>{item.label}</h5> |
177 | 166 | {#if isActive} |
178 | 167 | <span class="h-2 w-2 rounded-full bg-blue-600"></span> |
179 | 168 | {/if} |
|
182 | 171 | {/each} |
183 | 172 | </ul> |
184 | 173 | </nav> |
185 | | - |
186 | | - <footer class="flex flex-col gap-3 border-t border-neutral-200/80 pt-5"> |
| 174 | + <section class="flex flex-col gap-3 border-t border-neutral-200/80 pt-5"> |
187 | 175 | <Button |
188 | 176 | href={localizeHref("https://github.com/polinema-ui/website")} |
189 | 177 | target="_blank" |
|
195 | 183 | <HugeiconsIcon icon={GithubIcon} size={18} color="#1a1a1a" /> |
196 | 184 | <span>GitHub Repository</span> |
197 | 185 | </span> |
198 | | - |
199 | 186 | <span class="rounded-lg bg-neutral-100 px-2 py-0.5 text-xs font-bold text-neutral-800"> |
200 | 187 | {githubStars} ★ |
201 | 188 | </span> |
202 | 189 | </Button> |
203 | | - |
204 | 190 | <div class="grid grid-cols-2 gap-1.5 rounded-xl bg-neutral-100 p-1.5"> |
205 | 191 | <button |
206 | 192 | class="flex items-center justify-center gap-2 rounded-lg py-2.5 text-xs font-medium transition-all {selectedFramework === |
|
216 | 202 | <HugeiconsIcon icon={TailwindcssIcon} size={16} color="#06b6d4" /> |
217 | 203 | <span>Tailwind 4</span> |
218 | 204 | </button> |
219 | | - |
220 | 205 | <button |
221 | 206 | class="flex items-center justify-center gap-2 rounded-lg py-2.5 text-xs font-medium transition-all {selectedFramework === |
222 | 207 | 'Bootstrap 5' |
|
232 | 217 | <span>Bootstrap 5</span> |
233 | 218 | </button> |
234 | 219 | </div> |
235 | | - </footer> |
| 220 | + </section> |
236 | 221 | </aside> |
237 | 222 | {/if} |
238 | 223 |
|
239 | 224 | {@render children()} |
240 | 225 |
|
241 | | -<!-- Footer --> |
242 | 226 | <footer class="bg-white px-5 pt-12 pb-6 text-black sm:px-10 sm:pt-20 lg:px-18"> |
243 | 227 | <div class="mx-auto grid max-w-295 gap-10 md:grid-cols-[1.5fr_.65fr_.85fr] md:gap-20 lg:gap-32"> |
244 | 228 | <section> |
|
248 | 232 | > |
249 | 233 | Sign up for our newsletter to get latest insights and updates |
250 | 234 | </h2> |
251 | | - |
252 | 235 | <form class="max-w-75.75" action="#"> |
253 | 236 | <label class="sr-only" for="footer-email">Email address</label> |
254 | | - |
255 | 237 | <input |
256 | | - id="footer-email" |
257 | 238 | type="email" |
258 | 239 | placeholder="Enter email address" |
259 | 240 | required |
260 | 241 | class="text-blackbg-black focus:border-blackbg-black w-full border-0 border-b border-[#686868] bg-transparent px-0 py-3 text-[15px] outline-none placeholder:text-[#a0a0a0]" |
261 | 242 | /> |
262 | | - |
263 | 243 | <Button |
264 | | - class="mt-5 flex cursor-pointer items-center gap-2 rounded-lg border-none bg-blue-600 px-6 py-3 text-sm font-medium text-white shadow-[0_1px_0_rgba(255,255,255,0.2)_inset,0_8px_20px_rgba(37,99,235,0.35)] transition-all duration-200 hover:bg-blue-700 hover:shadow-[0_1px_0_rgba(255,255,255,0.2)_inset,0_12px_24px_rgba(37,99,235,0.4)] active:scale-95 sm:px-7 sm:py-3.5 sm:text-[15px]" |
| 244 | + class="mt-5 flex cursor-pointer items-center gap-2 rounded-lg border-none bg-blue-600 px-6 py-2! text-xs font-medium text-white shadow-[0_1px_0_rgba(255,255,255,0.2)_inset,0_8px_20px_rgba(37,99,235,0.35)] transition-all duration-200 hover:bg-blue-700 hover:shadow-[0_1px_0_rgba(255,255,255,0.2)_inset,0_12px_24px_rgba(37,99,235,0.4)] active:scale-95 sm:px-7! sm:py-3.5! sm:text-sm" |
265 | 245 | > |
266 | | - <span>Subscribe Now</span> |
| 246 | + Subscribe Now |
267 | 247 | <HugeiconsIcon icon={ArrowRight01Icon} size={16} color="currentColor" /> |
268 | 248 | </Button> |
269 | 249 | </form> |
270 | 250 | </section> |
271 | | - |
272 | 251 | <nav aria-label="Footer links"> |
273 | | - <p class="mb-2 text-xs text-[#a0a0a0]">Links</p> |
274 | | - |
| 252 | + <p class="mb-1 text-xs text-[#a0a0a0] lg:mb-2">Links</p> |
275 | 253 | {#each footerLinks as link (link)} |
276 | 254 | <a |
277 | 255 | href={localizeHref(`#${link.toLowerCase()}`)} |
278 | | - class="block text-[17px] leading-[1.6] transition-opacity hover:opacity-50" |
| 256 | + class="block text-sm leading-[1.6] transition-opacity hover:opacity-50 lg:text-base" |
279 | 257 | > |
280 | 258 | {link} |
281 | 259 | </a> |
282 | 260 | {/each} |
283 | 261 | </nav> |
284 | | - |
285 | 262 | <section aria-label="Contact information"> |
286 | | - <p class="mb-2 text-xs text-[#a0a0a0]">Get In Touch</p> |
287 | | - |
288 | | - <a class="block text-lg leading-[1.6] transition-opacity hover:opacity-50" href="mailto:polinemaui@gmail.com"> |
| 263 | + <p class="mb-1 text-xs text-[#a0a0a0] lg:mb-2">Get In Touch</p> |
| 264 | + <a |
| 265 | + class="block text-sm leading-[1.6] transition-opacity hover:opacity-50 lg:text-lg" |
| 266 | + target="_blank" |
| 267 | + href="mailto:polinemaui@gmail.com" |
| 268 | + > |
289 | 269 | polinemaui@gmail.com |
290 | 270 | </a> |
291 | | - |
292 | | - <p class="mt-8 mb-2 text-xs text-[#a0a0a0]">Offline</p> |
293 | | - |
294 | | - <address class="max-w-53.75 text-lg leading-[1.45] not-italic"> |
| 271 | + <p class="mt-6 mb-1 text-xs text-[#a0a0a0] lg:mt-8 lg:mb-2">Offline</p> |
| 272 | + <address class="text-sm leading-[1.45] not-italic lg:text-lg"> |
295 | 273 | Politeknik Negeri Malang<br /> |
296 | 274 | Indonesia |
297 | 275 | </address> |
298 | 276 | </section> |
299 | 277 | </div> |
300 | | - |
301 | | - <!-- Socials + Brand --> |
302 | 278 | <div class="mx-auto mt-14 grid max-w-295 items-end gap-10 md:grid-cols-[245px_1fr] md:gap-20 lg:gap-32"> |
303 | | - <div class="border-t border-black/10"> |
| 279 | + <ul class="border-t border-black/10"> |
304 | 280 | {#each socials as social (social.label)} |
305 | | - <a |
306 | | - href={social.href} |
307 | | - target={social.label === "Github" ? "_blank" : undefined} |
308 | | - rel={social.label === "Github" ? "noopener noreferrer" : undefined} |
309 | | - class="flex justify-between border-b border-black/10 py-3 text-sm transition-opacity hover:opacity-50" |
310 | | - > |
311 | | - <span class="flex items-center gap-2"> |
312 | | - <HugeiconsIcon icon={social.icon} size={16} strokeWidth={1.8} aria-hidden="true" /> |
313 | | - {social.label} |
314 | | - </span> |
315 | | - |
316 | | - <HugeiconsIcon icon={ArrowUpRight01Icon} size={16} strokeWidth={1.8} aria-hidden="true" /> |
317 | | - </a> |
| 281 | + <li> |
| 282 | + <a |
| 283 | + href={social.href} |
| 284 | + target={social.label === "Github" ? "_blank" : undefined} |
| 285 | + rel={social.label === "Github" ? "noopener noreferrer" : undefined} |
| 286 | + class="flex justify-between border-b border-black/10 py-3 text-sm transition-opacity hover:opacity-50" |
| 287 | + > |
| 288 | + <span class="flex items-center gap-2"> |
| 289 | + <HugeiconsIcon icon={social.icon} size={16} strokeWidth={1.8} aria-hidden="true" /> |
| 290 | + {social.label} |
| 291 | + </span> |
| 292 | + <HugeiconsIcon icon={ArrowUpRight01Icon} size={16} strokeWidth={1.8} aria-hidden="true" /> |
| 293 | + </a> |
| 294 | + </li> |
318 | 295 | {/each} |
319 | | - </div> |
320 | | - |
321 | | - <div |
322 | | - class="overflow-hidden bg-linear-to-b from-black via-black to-[#ffff] bg-clip-text text-[clamp(5rem,8vw,9rem)] leading-[.75] font-bold -tracking-widest text-transparent" |
| 296 | + </ul> |
| 297 | + <h2 |
| 298 | + class="overflow-hidden bg-linear-to-b from-black via-black to-[#ffff] bg-clip-text text-center text-[clamp(3.5rem,11.5vw,8rem)] leading-[.75] font-bold -tracking-widest whitespace-nowrap text-transparent" |
323 | 299 | > |
324 | 300 | POLINEMA UI |
325 | | - </div> |
| 301 | + </h2> |
326 | 302 | </div> |
327 | | - |
328 | | - <div class="mx-auto mt-12 max-w-295 border-t border-black/10 pt-4 text-center text-xs text-black"> |
| 303 | + <h6 class="mx-auto mt-12 max-w-295 border-t border-black/10 pt-4 text-center text-xs text-black"> |
329 | 304 | Copyright © Polinema UI. All Rights Reserved |
330 | | - </div> |
| 305 | + </h6> |
331 | 306 | </footer> |
0 commit comments