|
1 | 1 | ---
|
2 |
| -import Footer from "../components/Footer.astro" |
3 | 2 | import Root from "./Root.astro"
|
4 |
| -
|
| 3 | +import MainNav from "../components/layout/MainNav.astro" |
| 4 | +import Footer from "../components/layout/Footer.astro" |
5 | 5 | export interface Props {
|
6 | 6 | title: string
|
7 | 7 | }
|
8 | 8 |
|
9 | 9 | const { title } = Astro.props
|
10 |
| -const currentRoute = new URL(Astro.request.url).pathname |
11 |
| -
|
12 |
| -const navLinks = [ |
13 |
| - { href: "/leaderboards/ranked_1v1", text: "Leaderboard" }, |
14 |
| - { href: "/stats", text: "Stats" }, |
15 |
| - { href: "/social", text: "Content" }, |
16 |
| - { href: "/api", text: "API" }, |
17 |
| - { href: "/tools", text: "Tools" }, |
18 |
| - // { href: "/creators", text: "Creators" }, |
19 |
| -] |
20 | 10 | ---
|
21 | 11 |
|
22 | 12 | <Root title={title}>
|
23 |
| - <div class="sticky top-0 z-10 w-full border-b border-gray-700/50 bg-gray-800/80 backdrop-blur-md"> |
24 |
| - <nav class="font-display mx-auto flex max-w-screen-2xl flex-wrap items-center gap-y-2 py-2 md:min-h-16 md:py-4"> |
25 |
| - <a |
26 |
| - href="/" |
27 |
| - class="basis-full whitespace-nowrap px-4 pr-2 text-xl font-extrabold text-gray-200 md:basis-auto md:px-7 md:pr-3" |
28 |
| - > |
29 |
| - Stormgate World</a |
30 |
| - > |
31 |
| - |
32 |
| - <div class="flex flex-auto flex-wrap gap-1 gap-y-2 pl-2 pr-4 md:gap-4 md:px-4 md:pr-7"> |
33 |
| - { |
34 |
| - navLinks.map(({ href, text }) => ( |
35 |
| - <a |
36 |
| - href={href} |
37 |
| - class:list={[ |
38 |
| - "font-bold rounded px-2 text-sm xs:text-base md:px-3 py-1 md:py-1.5", |
39 |
| - currentRoute === href ? "bg-white/5 text-gray-50" : "hover:bg-white/5 text-gray-200 ", |
40 |
| - ]} |
41 |
| - > |
42 |
| - {text} |
43 |
| - </a> |
44 |
| - )) |
45 |
| - } |
46 |
| - |
47 |
| - <div class="flex-auto"></div> |
48 |
| - <a |
49 |
| - href="https://playstormgate.com" |
50 |
| - target="_blank" |
51 |
| - class="hidden whitespace-nowrap rounded-md border-white/20 bg-gray-100/20 px-6 py-2 text-sm font-bold text-gray-100 transition hover:bg-gray-100/30 sm:block" |
52 |
| - data-class="bg-white rounded-full text-sm mr-4 px-6 py-2 border text-black my-6 inline-block font-bold border-white hover:bg-gray-100 transition" |
53 |
| - > |
54 |
| - Official Website |
55 |
| - </a> |
56 |
| - </div> |
57 |
| - </nav> |
58 |
| - </div> |
| 13 | + <MainNav /> |
59 | 14 | <slot />
|
60 | 15 | <Footer />
|
61 | 16 | </Root>
|
0 commit comments