From d9eced756d6012bcb4036970fe7ca4d4b6b7edf4 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Sun, 7 Jan 2024 16:12:15 +0100 Subject: Branding page + branding assets --- .../components/page/branding/BrandingImage.astro | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 apps/website/src/components/page/branding/BrandingImage.astro (limited to 'apps/website/src/components/page') diff --git a/apps/website/src/components/page/branding/BrandingImage.astro b/apps/website/src/components/page/branding/BrandingImage.astro new file mode 100644 index 0000000..f85364d --- /dev/null +++ b/apps/website/src/components/page/branding/BrandingImage.astro @@ -0,0 +1,30 @@ +--- +interface Props { + type: 'badges' | 'logos' | 'mods' + name: string + altText?: string + extensions?: ('png' | 'svg')[] + maxWidth?: number + background?: string +} + +const { + name, + type, + altText, + background = 'white', + maxWidth = 300, + extensions = ['png', 'svg'], +} = Astro.props; + +const path = `/media/branding/${type}/${name}`; +--- + +
+
+ {extensions.map(ext => ( + .{ext.toUpperCase()} + ))} +
+ {altText} +
-- cgit From 651684e9c6c8509001f3757b51c8aefbadbd6613 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Sun, 7 Jan 2024 16:30:40 +0100 Subject: Branding page mod names --- apps/website/src/components/page/branding/BrandingImage.astro | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/website/src/components/page') diff --git a/apps/website/src/components/page/branding/BrandingImage.astro b/apps/website/src/components/page/branding/BrandingImage.astro index f85364d..e112691 100644 --- a/apps/website/src/components/page/branding/BrandingImage.astro +++ b/apps/website/src/components/page/branding/BrandingImage.astro @@ -2,6 +2,7 @@ interface Props { type: 'badges' | 'logos' | 'mods' name: string + nameFormatted?: string altText?: string extensions?: ('png' | 'svg')[] maxWidth?: number @@ -12,6 +13,7 @@ const { name, type, altText, + nameFormatted, background = 'white', maxWidth = 300, extensions = ['png', 'svg'], @@ -27,4 +29,5 @@ const path = `/media/branding/${type}/${name}`; ))} {altText} + {nameFormatted && {nameFormatted}} -- cgit