refactor: lucide icons via astro-icon
This commit is contained in:
parent
c4b6e75915
commit
6764644c2e
10 changed files with 827 additions and 56 deletions
|
@ -9,9 +9,9 @@ import PostNavigation from '@components/PostNavigation.astro'
|
|||
import TableOfContents from '@components/TableOfContents.astro'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import { formatDate, parseAuthors, readingTime } from '@lib/utils'
|
||||
import { Icon } from 'astro-icon/components'
|
||||
import { Image } from 'astro:assets'
|
||||
import { type CollectionEntry, getCollection } from 'astro:content'
|
||||
import { ArrowUp, Hash } from 'lucide-react'
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = (await getCollection('blog'))
|
||||
|
@ -130,7 +130,7 @@ const authors = await parseAuthors(post.data.authors ?? [])
|
|||
href={`/tags/${tag}`}
|
||||
class={badgeVariants({ variant: 'secondary' })}
|
||||
>
|
||||
<Hash className="-translate-x-0.5 size-3" />
|
||||
<Icon name="lucide:hash" class="size-3 -translate-x-0.5" />
|
||||
{tag}
|
||||
</a>
|
||||
))
|
||||
|
@ -163,8 +163,9 @@ const authors = await parseAuthors(post.data.authors ?? [])
|
|||
title="Scroll to top"
|
||||
aria-label="Scroll to top"
|
||||
>
|
||||
<ArrowUp
|
||||
className="mx-auto size-4 transition-all group-hover:-translate-y-0.5"
|
||||
<Icon
|
||||
name="lucide:arrow-up"
|
||||
class="mx-auto size-4 transition-all group-hover:-translate-y-0.5"
|
||||
/>
|
||||
</Button>
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import BlogCard from '@components/BlogCard.astro'
|
|||
import Breadcrumbs from '@components/Breadcrumbs.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import { Icon } from 'astro-icon/components'
|
||||
import { type CollectionEntry, getCollection } from 'astro:content'
|
||||
import { Hash } from 'lucide-react'
|
||||
|
||||
type BlogPost = CollectionEntry<'blog'>
|
||||
|
||||
|
@ -43,7 +43,7 @@ export async function getStaticPaths() {
|
|||
<span
|
||||
class="flex items-center gap-x-1 rounded-full bg-secondary px-4 py-2 text-2xl font-bold"
|
||||
>
|
||||
<Hash className="size-6 -translate-x-0.5" strokeWidth={3} />{tag}
|
||||
<Icon name="lucide:hash" class="size-6 -translate-x-0.5" />{tag}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex flex-col gap-y-4">
|
||||
|
|
|
@ -4,8 +4,8 @@ import Container from '@components/Container.astro'
|
|||
import Link from '@components/Link.astro'
|
||||
import { badgeVariants } from '@components/ui/badge'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import { Icon } from 'astro-icon/components'
|
||||
import { getCollection } from 'astro:content'
|
||||
import { Hash } from 'lucide-react'
|
||||
|
||||
const blog = (await getCollection('blog')).filter((post) => !post.data.draft)
|
||||
|
||||
|
@ -27,7 +27,7 @@ const tags = blog
|
|||
href={`/tags/${tag}`}
|
||||
class={badgeVariants({ variant: 'secondary' })}
|
||||
>
|
||||
<Hash className="-translate-x-0.5 size-3" />
|
||||
<Icon name="lucide:hash" class="size-3 -translate-x-0.5" />
|
||||
{tag}
|
||||
</Link>
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue