1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-28 16:48:00 +02:00

post actions fixes

This commit is contained in:
Matthias Kretschmann 2023-09-04 11:34:23 +01:00
parent 735a48c1c1
commit ea7eec99f8
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 8 additions and 5 deletions

View File

@ -6,7 +6,8 @@ type Props = {
url?: string
}
const { title, text, url } = Astro.props
const { title, text, url, icon } = Astro.props
const Icon = icon
---
<style>
@ -36,6 +37,7 @@ const { title, text, url } = Astro.props
.action:hover,
.action:focus {
cursor: pointer;
color: var(--text-color-light);
}
.action svg {
@ -49,7 +51,7 @@ const { title, text, url } = Astro.props
</style>
<a class="action" href={url}>
{/* <Icon name={icon} /> */}
<Icon />
<h1 class="actionTitle">{title}</h1>
<p class="actionText">{text}</p>
</a>

View File

@ -2,6 +2,7 @@
import config from '@config/blog.config.mjs'
import styles from './Actions.module.css'
import Action from './Action.astro'
import { Mastodon, Bitcoin, Github } from '@images/icons'
const githubLink = '?'
@ -10,19 +11,19 @@ const actions = [
title: 'Have a comment?',
text: 'Hit me up @krema@mas.to',
url: config.author.mastodon,
icon: 'Mastodon'
icon: Mastodon
},
{
title: 'Found something useful?',
text: 'Say thanks with BTC or ETH',
url: '/thanks',
icon: 'Bitcoin'
icon: Bitcoin
},
{
title: 'Edit on GitHub',
text: 'Contribute to this post',
url: githubLink,
icon: 'GitHub'
icon: Github
}
]
---