feat: add active state underline to nav
This commit is contained in:
		| @@ -4,7 +4,7 @@ import Logo from "./Logo.astro"; | ||||
| import ToggleTheme from "@components/ThemeToggle.svelte"; | ||||
|  | ||||
| function isActive(path: string) { | ||||
|   return Astro.url.pathname === path ? "active" : ""; | ||||
|   return Astro.url.pathname === path; | ||||
| } | ||||
|  | ||||
| const t = useTranslations(Astro.url); | ||||
| @@ -47,7 +47,7 @@ const paths = [ | ||||
|       <li | ||||
|         class={` | ||||
|           flex items-center flex-1 border-t-1 border-b-1 border-neutral | ||||
|           ${isActive(link) ? "bg-light" : "bg"} | ||||
|           ${isActive(link) ? "bg-light underline" : "bg"} | ||||
|           ${i === 0 ? "rounded-bl-md border-l-1" : "border-l-1"} | ||||
|           ${i === paths.length - 1 ? "rounded-tr-md !border-r-1" : ""} | ||||
|         `} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user