diff options
| author | Nikhil M Warrier <nikhilmw.dev@gmail.com> | 2026-03-03 09:00:53 +0530 |
|---|---|---|
| committer | Nikhil M Warrier <nikhilmw.dev@gmail.com> | 2026-03-03 09:00:53 +0530 |
| commit | c1c7ca70783cbb38cf35fe0c9fb05dd626f46c08 (patch) | |
| tree | 2941afd019e4e073f195929ede6792a6d45af5dd /src/components | |
| parent | b1cc6aef5d01b59daf64d12a8e9264324540d8b7 (diff) | |
Rename Author to Member, add Codeberg icons
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/MemberCard.astro (renamed from src/components/AuthorCard.astro) | 23 | ||||
| -rw-r--r-- | src/components/PostNavigation.astro | 6 |
2 files changed, 16 insertions, 13 deletions
diff --git a/src/components/AuthorCard.astro b/src/components/MemberCard.astro index 9f178fa..b98e3ee 100644 --- a/src/components/AuthorCard.astro +++ b/src/components/MemberCard.astro @@ -7,20 +7,21 @@ import type { CollectionEntry } from 'astro:content' import SocialIcons from './SocialIcons.astro' interface Props { - author: CollectionEntry<'authors'> + member: CollectionEntry<'members'> } -const { author } = Astro.props -const { name, avatar, bio, pronouns } = author.data +const { member } = Astro.props +const { name, avatar, bio, pronouns } = member.data const currentPath = Astro.url.pathname -const isAuthorPage = currentPath === `/authors/${author.id}` +const isAuthorPage = currentPath === `/members/${member.id}` const socialLinks: SocialLink[] = [ - author.data.website && { href: author.data.website, label: 'Website' }, - author.data.github && { href: author.data.github, label: 'GitHub' }, - author.data.twitter && { href: author.data.twitter, label: 'Twitter' }, - author.data.linkedin && { href: author.data.linkedin, label: 'LinkedIn' }, - author.data.mail && { href: `mailto:${author.data.mail}`, label: 'Email' }, + member.data.website && { href: member.data.website, label: 'Website' }, + member.data.github && { href: member.data.github, label: 'GitHub' }, + member.data.codeberg && { href: member.data.codeberg, label: 'Codeberg' }, + member.data.twitter && { href: member.data.twitter, label: 'Twitter' }, + member.data.linkedin && { href: member.data.linkedin, label: 'LinkedIn' }, + member.data.mail && { href: `mailto:${member.data.mail}`, label: 'Email' }, ].filter(Boolean) as SocialLink[] --- @@ -29,7 +30,7 @@ const socialLinks: SocialLink[] = [ > <div class="flex flex-wrap gap-4"> <Link - href={`/authors/${author.id}`} + href={`/members/${member.id}`} class={cn('block', isAuthorPage && 'pointer-events-none')} > <AvatarComponent @@ -38,7 +39,7 @@ const socialLinks: SocialLink[] = [ alt={`Avatar of ${name}`} fallback={name[0]} className={cn( - 'size-32 rounded-md [&>[data-slot="avatar-fallback"]]:rounded-md', + '.:data-[slot="avatar-fallback"]:rounded-md size-32 rounded-md', !isAuthorPage && 'hover:ring-primary transition-shadow duration-300 hover:cursor-pointer hover:ring-2', )} diff --git a/src/components/PostNavigation.astro b/src/components/PostNavigation.astro index bca228a..2e8b93e 100644 --- a/src/components/PostNavigation.astro +++ b/src/components/PostNavigation.astro @@ -19,7 +19,8 @@ const isSubpost = !!parentPost class={cn( buttonVariants({ variant: 'outline' }), 'rounded-lg group flex items-center justify-start size-full', - !olderPost && 'pointer-events-none opacity-0 cursor-not-allowed', + !olderPost && + 'pointer-events-none opacity-0 invisible cursor-not-allowed', )} aria-disabled={!olderPost} > @@ -71,7 +72,8 @@ const isSubpost = !!parentPost class={cn( buttonVariants({ variant: 'outline' }), 'rounded-lg group flex items-center justify-end size-full', - !newerPost && 'pointer-events-none opacity-0 cursor-not-allowed', + !newerPost && + 'pointer-events-none opacity-0 invisible cursor-not-allowed', )} aria-disabled={!newerPost} > |
