Skip to content

Commit 4bceb21

Browse files
committed
✨ Add support for product brand guidelines
1 parent d6a333c commit 4bceb21

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/components/svgCard.svelte

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
Sparkles,
1414
EllipsisIcon,
1515
TagIcon,
16-
XIcon
16+
XIcon,
17+
PaletteIcon
1718
} from 'lucide-svelte';
1819
1920
// Components & styles:
@@ -57,8 +58,10 @@
5758
let maxVisibleCategories = 1;
5859
let moreTagsOptions = false;
5960
60-
// Global Images Styles:
61+
// Global Styles:
6162
const globalImageStyles = 'mb-4 mt-2 h-10 select-none pointer-events-none';
63+
const btnStyles =
64+
'flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40';
6265
</script>
6366

6467
<div
@@ -175,7 +178,7 @@
175178
: svgInfo.route
176179
);
177180
}}
178-
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40"
181+
class={btnStyles}
179182
>
180183
<ChevronsRight size={iconSize} strokeWidth={iconStroke} />
181184
</button>
@@ -200,7 +203,7 @@
200203
title="Website"
201204
target="_blank"
202205
rel="noopener noreferrer"
203-
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40"
206+
class={btnStyles}
204207
>
205208
<LinkIcon size={iconSize} strokeWidth={iconStroke} />
206209
</a>
@@ -210,7 +213,7 @@
210213
on:click={() => {
211214
wordmarkSvg = !wordmarkSvg;
212215
}}
213-
class="flex items-center space-x-2 rounded-md p-2 duration-100 hover:bg-neutral-200 dark:hover:bg-neutral-700/40"
216+
class={btnStyles}
214217
>
215218
{#if wordmarkSvg}
216219
<Sparkles size={iconSize} strokeWidth={iconStroke} />
@@ -219,5 +222,16 @@
219222
{/if}
220223
</button>
221224
{/if}
225+
{#if svgInfo.brandUrl !== undefined}
226+
<a
227+
href={svgInfo.brandUrl}
228+
title="Brand Assets"
229+
target="_blank"
230+
rel="noopener noreferrer"
231+
class={btnStyles}
232+
>
233+
<PaletteIcon size={iconSize} strokeWidth={iconStroke} />
234+
</a>
235+
{/if}
222236
</div>
223237
</div>

src/data/svgs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,6 +2667,7 @@ export const svgs: iSVG[] = [
26672667
light: '/library/vercel_wordmark.svg',
26682668
dark: '/library/vercel_wordmark_dark.svg'
26692669
},
2670+
brandUrl: 'https://vercel.com/geist/brands',
26702671
url: 'https://vercel.com/'
26712672
},
26722673
{

src/types/svg.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ export interface iSVG {
1111
category: tCategory | tCategory[];
1212
route: string | ThemeOptions;
1313
wordmark?: string | ThemeOptions;
14+
brandUrl?: string;
1415
url: string;
1516
}

0 commit comments

Comments
 (0)