mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
chore: replace UpLink with preact component
This commit is contained in:
@@ -3,7 +3,7 @@ import Legal from './Legal.astro';
|
||||
import RSSLink from './RSSLink.astro';
|
||||
import SocialLinks from './SocialLinks.astro';
|
||||
import Subnavigation from './Subnavigation.astro';
|
||||
import UpLink from './UpLink.astro';
|
||||
import { UpLink } from '.';
|
||||
---
|
||||
|
||||
<footer
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
import { Sprite } from 'astro-icon';
|
||||
|
||||
import { Link } from '.';
|
||||
---
|
||||
|
||||
<div class="flex flex-1 justify-end">
|
||||
<Link
|
||||
id="up-link"
|
||||
class="transition-transform duration-500 ease-in-out hover:-translate-y-1 focus:-translate-y-1"
|
||||
href="#top"
|
||||
>
|
||||
<button
|
||||
aria-label="Back to top"
|
||||
class="flex h-clickarea w-clickarea cursor-pointer items-center justify-center"
|
||||
>
|
||||
<Sprite name="ri:arrow-up-line" class="h-icon-small w-icon-small" />
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
21
src/components/UpLink.tsx
Normal file
21
src/components/UpLink.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { FunctionalComponent } from 'preact';
|
||||
|
||||
import { Link } from '.';
|
||||
import { ArrowUp } from './icons';
|
||||
|
||||
export const UpLink: FunctionalComponent = ({ ...props }) => (
|
||||
<div class="flex flex-1 justify-end" {...props}>
|
||||
<Link
|
||||
id="up-link"
|
||||
class="transition-transform duration-500 ease-in-out hover:-translate-y-1 focus:-translate-y-1"
|
||||
href="#top"
|
||||
>
|
||||
<button
|
||||
aria-label="Back to top"
|
||||
class="flex h-clickarea w-clickarea cursor-pointer items-center justify-center"
|
||||
>
|
||||
<ArrowUp class="icon h-icon w-icon" />
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
@@ -30,4 +30,5 @@ export * from './Text';
|
||||
export * from './TextLink';
|
||||
export * from './Title';
|
||||
export * from './UnorderedList';
|
||||
export * from './UpLink';
|
||||
export * from './Verse';
|
||||
|
||||
Reference in New Issue
Block a user