diff options
author | LynithDev <61880709+LynithDev@users.noreply.github.com> | 2024-01-07 16:12:15 +0100 |
---|---|---|
committer | LynithDev <61880709+LynithDev@users.noreply.github.com> | 2024-01-07 16:12:26 +0100 |
commit | d9eced756d6012bcb4036970fe7ca4d4b6b7edf4 (patch) | |
tree | 0978135eb09f402b664e7ede22cccef0fc9a44a5 /apps/website/src/components/page/branding/BrandingImage.astro | |
parent | 5ae26d7962c12d641892aefec05b22ab4502b43e (diff) | |
download | Nexus-d9eced756d6012bcb4036970fe7ca4d4b6b7edf4.tar.gz Nexus-d9eced756d6012bcb4036970fe7ca4d4b6b7edf4.tar.bz2 Nexus-d9eced756d6012bcb4036970fe7ca4d4b6b7edf4.zip |
Branding page + branding assets
Diffstat (limited to 'apps/website/src/components/page/branding/BrandingImage.astro')
-rw-r--r-- | apps/website/src/components/page/branding/BrandingImage.astro | 30 |
1 files changed, 30 insertions, 0 deletions
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}`; +--- + +<div class={`relative rounded-md bg-${background} border border-1 border-gray-400 flex flex-col justify-center items-center p-8`}> + <div class="absolute top-0 right-0 flex flex-row gap-x-2"> + {extensions.map(ext => ( + <a target="_blank" class="text-xs px-0.5 hover:underline" href={`${path}.${ext}`}>.{ext.toUpperCase()}</a> + ))} + </div> + <img style={`max-width: ${maxWidth}px;`} src={`${path}.svg`} alt={altText}> +</div> |