mirror of
https://github.com/kremalicious/blog.git
synced 2024-06-28 16:48:00 +02:00
39 lines
684 B
Plaintext
39 lines
684 B
Plaintext
|
---
|
||
|
type Props = {
|
||
|
name: string
|
||
|
url: string
|
||
|
count?: number
|
||
|
style?: any
|
||
|
}
|
||
|
|
||
|
const { name, url, count, style } = Astro.props
|
||
|
---
|
||
|
|
||
|
<style>
|
||
|
.tag {
|
||
|
color: var(--text-color-light);
|
||
|
margin-left: calc(var(--spacer) / 2);
|
||
|
margin-right: calc(var(--spacer) / 2);
|
||
|
margin-bottom: calc(var(--spacer) / 2);
|
||
|
white-space: nowrap;
|
||
|
display: inline-block;
|
||
|
}
|
||
|
|
||
|
.tag::before {
|
||
|
content: '#';
|
||
|
margin-right: 1px;
|
||
|
opacity: 0.65;
|
||
|
}
|
||
|
|
||
|
.count {
|
||
|
font-size: var(--font-size-small);
|
||
|
margin-left: calc(var(--spacer) / 6);
|
||
|
opacity: 0.65;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<a class="tag" href={url} style={style}>
|
||
|
{name}
|
||
|
{count && <span class="count">{count}</span>}
|
||
|
</a>
|