diff --git a/public/88x31.gif b/public/88x31.gif new file mode 100644 index 0000000..da7cd4c Binary files /dev/null and b/public/88x31.gif differ diff --git a/src/components/Badges.astro b/src/components/Badges.astro index 1b4e49f..98aa8d1 100644 --- a/src/components/Badges.astro +++ b/src/components/Badges.astro @@ -18,10 +18,23 @@ const { badges } = Astro.props;
{badges.map((badge) => { - // probably could be a lot cleaner, but i dont care - if (!images[badge.imagePath]) throw new Error(`"${badge.imagePath}" does not exist in glob for wildcard in badges`); - if (badge.href !== undefined) return {badge.alt}; - else return {badge.alt}; + // hopefully we can dedupe this sometime.... + const isTreatedAsPublic = images[badge.imagePath] === undefined; + const hasHref = badge.href !== undefined; + + return <> + {hasHref ? + {isTreatedAsPublic + ? {badge.alt} + : {badge.alt} + } + : <> + {isTreatedAsPublic + ? {badge.alt} + : {badge.alt} + } + } + ; })}