Add support for product brand guidelines

This commit is contained in:
pheralb 2025-01-15 11:56:00 +00:00
parent d6a333c316
commit 4bceb2137c
3 changed files with 21 additions and 5 deletions

View File

@ -13,7 +13,8 @@
Sparkles, Sparkles,
EllipsisIcon, EllipsisIcon,
TagIcon, TagIcon,
XIcon XIcon,
PaletteIcon
} from 'lucide-svelte'; } from 'lucide-svelte';
// Components & styles: // Components & styles:
@ -57,8 +58,10 @@
let maxVisibleCategories = 1; let maxVisibleCategories = 1;
let moreTagsOptions = false; let moreTagsOptions = false;
// Global Images Styles: // Global Styles:
const globalImageStyles = 'mb-4 mt-2 h-10 select-none pointer-events-none'; const globalImageStyles = 'mb-4 mt-2 h-10 select-none pointer-events-none';
const btnStyles =
'flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40';
</script> </script>
<div <div
@ -175,7 +178,7 @@
: svgInfo.route : svgInfo.route
); );
}} }}
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40" class={btnStyles}
> >
<ChevronsRight size={iconSize} strokeWidth={iconStroke} /> <ChevronsRight size={iconSize} strokeWidth={iconStroke} />
</button> </button>
@ -200,7 +203,7 @@
title="Website" title="Website"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40" class={btnStyles}
> >
<LinkIcon size={iconSize} strokeWidth={iconStroke} /> <LinkIcon size={iconSize} strokeWidth={iconStroke} />
</a> </a>
@ -210,7 +213,7 @@
on:click={() => { on:click={() => {
wordmarkSvg = !wordmarkSvg; wordmarkSvg = !wordmarkSvg;
}} }}
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40" class={btnStyles}
> >
{#if wordmarkSvg} {#if wordmarkSvg}
<Sparkles size={iconSize} strokeWidth={iconStroke} /> <Sparkles size={iconSize} strokeWidth={iconStroke} />
@ -219,5 +222,16 @@
{/if} {/if}
</button> </button>
{/if} {/if}
{#if svgInfo.brandUrl !== undefined}
<a
href={svgInfo.brandUrl}
title="Brand Assets"
target="_blank"
rel="noopener noreferrer"
class={btnStyles}
>
<PaletteIcon size={iconSize} strokeWidth={iconStroke} />
</a>
{/if}
</div> </div>
</div> </div>

View File

@ -2667,6 +2667,7 @@ export const svgs: iSVG[] = [
light: '/library/vercel_wordmark.svg', light: '/library/vercel_wordmark.svg',
dark: '/library/vercel_wordmark_dark.svg' dark: '/library/vercel_wordmark_dark.svg'
}, },
brandUrl: 'https://vercel.com/geist/brands',
url: 'https://vercel.com/' url: 'https://vercel.com/'
}, },
{ {

View File

@ -11,5 +11,6 @@ export interface iSVG {
category: tCategory | tCategory[]; category: tCategory | tCategory[];
route: string | ThemeOptions; route: string | ThemeOptions;
wordmark?: string | ThemeOptions; wordmark?: string | ThemeOptions;
brandUrl?: string;
url: string; url: string;
} }