aboutsummaryrefslogtreecommitdiff
path: root/web/src/components
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-17 04:01:17 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-17 04:01:50 +0100
commita1fe3d8e4e72761f814a8876035c5c80cf068391 (patch)
tree69dd2f51ae7271265deebe4f11f1f5e5cb78c5a2 /web/src/components
parent46e436ca043c7a969e3296b368cc4a14550e375c (diff)
downloadFirmament-a1fe3d8e4e72761f814a8876035c5c80cf068391.tar.gz
Firmament-a1fe3d8e4e72761f814a8876035c5c80cf068391.tar.bz2
Firmament-a1fe3d8e4e72761f814a8876035c5c80cf068391.zip
feat(web): Move over some docsfeat/web
Diffstat (limited to 'web/src/components')
-rw-r--r--web/src/components/NavBar.astro16
-rw-r--r--web/src/components/NavLink.astro11
2 files changed, 19 insertions, 8 deletions
diff --git a/web/src/components/NavBar.astro b/web/src/components/NavBar.astro
index 5cecbb4..d98094f 100644
--- a/web/src/components/NavBar.astro
+++ b/web/src/components/NavBar.astro
@@ -1,4 +1,5 @@
---
+import NavLink from "./NavLink.astro";
export type Props = {
navStyle?: 'transparent' | 'full'
}
@@ -7,20 +8,19 @@ const navbar = Astro.props.navStyle ?? 'full';
---
<nav
- class={`max-w-screen-xl bg-gray-800 flex flex-wrap items-center justify-between mx-auto px-2 py-1 leading-tight ${navbar == 'transparent' ? 'bg-opacity-50 backdrop-blur-lg absolute z-10 w-full top-0' : ''}`}>
+ class={`bg-gray-800 flex flex-wrap items-center justify-between mx-auto px-2 py-2 leading-tight w-full ${navbar == 'transparent' ? 'bg-opacity-50 backdrop-blur-lg absolute z-10 top-0' : 'border-b-white border-b'}`}>
<a href="/" class="flex items-center space-x-3">
<!--<img src=""/> TODO: add logo -->
<span class="self-center font-semibold whitespace-nowrap">Firmament</span>
</a>
<div class="block w-auto">
<ul class="font-medium flex-row mt-0 flex border-0">
- <li>
- <a class="px-1"
- href="https://github.com/nea89o/Firmament/blob/master/docs/Texture%20Pack%20Format.md">Docs</a>
- </li>
- <li>
- <a class="px-1" href="/texture-packs">Texture Packs</a>
- </li>
+ <NavLink link="/docs/texture-pack-format">
+ Docs
+ </NavLink>
+ <NavLink link="/texture-packs">
+ Texture Packs
+ </NavLink>
</ul>
</div>
</nav>
diff --git a/web/src/components/NavLink.astro b/web/src/components/NavLink.astro
new file mode 100644
index 0000000..dce002b
--- /dev/null
+++ b/web/src/components/NavLink.astro
@@ -0,0 +1,11 @@
+---
+type Props = {
+ link: string
+};
+---
+
+<li class="px-0.5">
+ <a class="px-1 text-blue-500 hover:text-blue-400 transition ease-in-out duration-300" href={Astro.props.link}>
+ <slot></slot>
+ </a>
+</li>