mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-04 04:25:28 +00:00
refactor: migrate components to Preact
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
---
|
||||
import cx from 'classnames';
|
||||
|
||||
import data from '../data/subnavigation.json';
|
||||
|
||||
import Link from './Link.astro';
|
||||
import { Link } from '.';
|
||||
|
||||
const currentPath = new URL(Astro.request.url).pathname;
|
||||
---
|
||||
@@ -13,9 +15,10 @@ const currentPath = new URL(Astro.request.url).pathname;
|
||||
<li>
|
||||
<Link
|
||||
href={url}
|
||||
class={`font-light decoration-4 underline-offset-auto hover:underline hover:decoration-shibui-900/20 dark:hover:decoration-shibui-100/20 ${
|
||||
currentPath === url && 'underline !decoration-accent decoration-4'
|
||||
}`}
|
||||
class={cx(
|
||||
'font-light decoration-4 underline-offset-auto hover:underline hover:decoration-shibui-900/20 dark:hover:decoration-shibui-100/20',
|
||||
{ 'underline !decoration-accent decoration-4': currentPath === url }
|
||||
)}
|
||||
>
|
||||
{title}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user