feat: add More and Download links

This commit is contained in:
Stefan Imhoff
2023-04-24 13:13:30 +02:00
parent 0e537e89d5
commit d6674f7504
4 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
---
import { Sprite } from 'astro-icon';
import { TextLink } from '../components';
export interface Props {
href: string;
text: string;
}
const { href, text, ...props } = Astro.props;
---
<TextLink class="group" href={href} {...props}>
{text}
<span class="more-icon relative inline-flex mis-[0.2em] block-start-[0.2em]">
<Sprite
name="ri:download-line"
aria-hidden="true"
class="h-icon w-icon group-hover:translate-y-1 transition-transform duration-500 ease-in-out"
/>
</span>
</TextLink>

View File

@@ -0,0 +1,23 @@
---
import { Sprite } from 'astro-icon';
import { TextLink } from '../components';
export interface Props {
href: string;
text: string;
}
const { href, text, ...props } = Astro.props;
---
<TextLink class="group" href={href} {...props}>
{text}
<span class="more-icon relative inline-flex mis-[0.2em] block-start-[0.2em]">
<Sprite
name="ri:arrow-right-line"
aria-hidden="true"
class="h-icon w-icon group-hover:translate-x-1 transition-transform duration-500 ease-in-out"
/>
</span>
</TextLink>

View File

@@ -1,3 +1,7 @@
// @ts-nocheck
import DownloadLink from './DownloadLink.astro';
import MoreLink from './MoreLink.astro';
export * from './AffiliateLink';
export * from './AmazonBook';
export * from './Banner';
@@ -22,3 +26,4 @@ export * from './Title';
export * from './UnorderedList';
export * from './Verse';
export * from './YouTubeVideo';
export { DownloadLink, MoreLink };

View File

@@ -5,10 +5,12 @@ import {
Book,
ColorSwatch,
Divider,
DownloadLink,
Flag,
Headline,
Image,
ListItem,
MoreLink,
NetflixFlag,
OdyseeVideo,
OrderedList,
@@ -30,6 +32,7 @@ export const mapping = {
Banner,
Book,
ColorSwatch,
DownloadLink,
Flag,
h1: Title,
h2: Headline,
@@ -40,6 +43,7 @@ export const mapping = {
hr: Divider,
img: Image,
li: ListItem,
MoreLink,
NetflixFlag,
OdyseeVideo,
ol: OrderedList,