mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
feat(astro): add backlink component
This commit is contained in:
26
src/components/Backlink.astro
Normal file
26
src/components/Backlink.astro
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
import { Sprite } from 'astro-icon';
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
backLink?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { backLink } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
{
|
||||||
|
backLink && (
|
||||||
|
<a
|
||||||
|
class="back-link col-span-1 col-start-1 self-center justify-self-center transition-transform duration-500 ease-in-out hover:-translate-x-1 focus:-translate-x-1 print:hidden"
|
||||||
|
href={backLink}
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
aria-label="Back to overview"
|
||||||
|
class="back-link-button flex h-[40px] w-[40px] cursor-pointer items-center justify-center border-none text-[0]"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<Sprite name="ri:arrow-left-line" class="h-[25px] w-[25px]" />
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user