From fd492aa5186475eacf3629b9fcec4decda5dd9d5 Mon Sep 17 00:00:00 2001 From: Snarr Date: Mon, 13 Jan 2025 22:06:34 -0500 Subject: [PATCH 01/10] add `Apache Kafka` --- src/data/svgs.ts | 6 ++++++ static/library/apache-kafka.svg | 1 + 2 files changed, 7 insertions(+) create mode 100644 static/library/apache-kafka.svg diff --git a/src/data/svgs.ts b/src/data/svgs.ts index a19ec677..9ec6ff69 100644 --- a/src/data/svgs.ts +++ b/src/data/svgs.ts @@ -3199,5 +3199,11 @@ export const svgs: iSVG[] = [ category: ['Config', 'Library', 'Devtool'], route: '/library/dotenv.svg', url: 'https://github.com/motdotla/dotenv' + }, + { + title: 'Apache Kafka', + category: 'Software', + route: '/library/apache-kafka.svg', + url: 'https://kafka.apache.org' } ]; diff --git a/static/library/apache-kafka.svg b/static/library/apache-kafka.svg new file mode 100644 index 00000000..270d48c9 --- /dev/null +++ b/static/library/apache-kafka.svg @@ -0,0 +1 @@ + \ No newline at end of file From b6a84bb0355c089d9673444abe1dcd0c1342266f Mon Sep 17 00:00:00 2001 From: Snarr Date: Mon, 13 Jan 2025 22:12:41 -0500 Subject: [PATCH 02/10] add `Apache Kafka` wordmark logo --- src/data/svgs.ts | 1 + static/library/apache-kafka-wordmark.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 static/library/apache-kafka-wordmark.svg diff --git a/src/data/svgs.ts b/src/data/svgs.ts index 9ec6ff69..09a6f87c 100644 --- a/src/data/svgs.ts +++ b/src/data/svgs.ts @@ -3204,6 +3204,7 @@ export const svgs: iSVG[] = [ title: 'Apache Kafka', category: 'Software', route: '/library/apache-kafka.svg', + wordmark: '/library/apache-kafka-wordmark.svg', url: 'https://kafka.apache.org' } ]; diff --git a/static/library/apache-kafka-wordmark.svg b/static/library/apache-kafka-wordmark.svg new file mode 100644 index 00000000..fdf52d4d --- /dev/null +++ b/static/library/apache-kafka-wordmark.svg @@ -0,0 +1 @@ + \ No newline at end of file From 3b2dc0b79dbed64cf2c49a8e6e09e548cd885b27 Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 11:40:10 +0000 Subject: [PATCH 03/10] =?UTF-8?q?=E2=9C=8D=EF=B8=8F=20Update=20warning=20m?= =?UTF-8?q?essage=20+=20add=20message=20to=20copy=20svg=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/copySvg.svelte | 8 ++++++++ src/components/warning.svelte | 12 ++++++------ src/ui/popover/popover-content.svelte | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/components/copySvg.svelte b/src/components/copySvg.svelte index 4f3ecaad..526319de 100644 --- a/src/components/copySvg.svelte +++ b/src/components/copySvg.svelte @@ -309,5 +309,13 @@ +
+

+ Remember to request permission from the creators for the use of the SVG. Modification is not + allowed. +

+
diff --git a/src/components/warning.svelte b/src/components/warning.svelte index 8a7b9a3a..dd3e224a 100644 --- a/src/components/warning.svelte +++ b/src/components/warning.svelte @@ -5,28 +5,28 @@ import { cn } from '@/utils/cn'; let warning = false; - let warningName = 'svgl_warning_message'; + let warningName = 'svgl_warn_message'; const initialValue = browser ? window.localStorage.getItem(warningName) : true; {#if !warning && !initialValue}

All SVGs include links to the respective products or companies that own them. Please contact the owner directly if you intend to use their logo.Please contact the owner directly if you need to use their logo. - If you are the owner of an SVG and prefer it not to be displayed here, + If you are the owner of an SVG and would like it removed, create an issue on GitHub.

diff --git a/src/ui/popover/popover-content.svelte b/src/ui/popover/popover-content.svelte index d6e3f769..796ce564 100644 --- a/src/ui/popover/popover-content.svelte +++ b/src/ui/popover/popover-content.svelte @@ -21,7 +21,7 @@ {sideOffset} {...$$restProps} class={cn( - 'z-50 w-auto rounded-md border border-neutral-200 bg-white p-3 shadow-md outline-none dark:border-neutral-800 dark:bg-neutral-900', + 'z-50 w-auto max-w-96 rounded-md border border-neutral-200 bg-white p-3 shadow-md outline-none dark:border-neutral-800 dark:bg-neutral-900', className )} > From a043abcefd0120e5f0aeee87a8e364dad291806a Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 11:54:53 +0000 Subject: [PATCH 04/10] =?UTF-8?q?=F0=9F=93=9D=20Add=20brand=20guidelines?= =?UTF-8?q?=20section=20+=20fixed=20``Request=20Logo``=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7485fdb9..3dd28ed2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Discover  ✦  - + Request logo  ✦  @@ -138,6 +138,19 @@ pnpm install } ``` +- **Add brand guidelines**: + +```json +{ + "title": "Title", + "category": "Category", + "route": "/library/your_logo.svg", + "wordmark": "/library/your_logo_wordmark.svg", + "brandUrl": "https://assets.website.com/brand-guidelines", + "url": "Website" +} +``` + > [!NOTE] > > - The list of categories is here: [`src/types/categories.ts`](https://github.com/pheralb/svgl/blob/main/src/types/categories.ts). You can add a new category if you need it. From d6a333c3160dd2c0157d3797bb7a76e16506435a Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 11:55:10 +0000 Subject: [PATCH 05/10] =?UTF-8?q?=F0=9F=93=9D=20Create=20custom=20pull=20r?= =?UTF-8?q?equest=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..21ec51d9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## 📝 About your SVG: + +- **Title**: +- **Category**: +- **Website URL**: +- **Description**: + +## 📷 Screenshots: + +✨ Add screenshots of the logo. + +## ✅ Checklist + +- [ ] I have permission to use this logo. +- [ ] The .svg URL I have provided is optimized for web use. +- [ ] The .svg size is less than **20kb**. From 4bceb2137c40e33fc5c6d782eabfdd3381399fd5 Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 11:56:00 +0000 Subject: [PATCH 06/10] =?UTF-8?q?=E2=9C=A8=20Add=20support=20for=20product?= =?UTF-8?q?=20brand=20guidelines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/svgCard.svelte | 24 +++++++++++++++++++----- src/data/svgs.ts | 1 + src/types/svg.ts | 1 + 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/svgCard.svelte b/src/components/svgCard.svelte index 078370bc..09cc8ab6 100644 --- a/src/components/svgCard.svelte +++ b/src/components/svgCard.svelte @@ -13,7 +13,8 @@ Sparkles, EllipsisIcon, TagIcon, - XIcon + XIcon, + PaletteIcon } from 'lucide-svelte'; // Components & styles: @@ -57,8 +58,10 @@ let maxVisibleCategories = 1; let moreTagsOptions = false; - // Global Images Styles: + // Global Styles: 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';
@@ -200,7 +203,7 @@ title="Website" target="_blank" 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} > @@ -210,7 +213,7 @@ on:click={() => { 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} @@ -219,5 +222,16 @@ {/if} {/if} + {#if svgInfo.brandUrl !== undefined} + + + + {/if}
diff --git a/src/data/svgs.ts b/src/data/svgs.ts index c513b883..94389b90 100644 --- a/src/data/svgs.ts +++ b/src/data/svgs.ts @@ -2667,6 +2667,7 @@ export const svgs: iSVG[] = [ light: '/library/vercel_wordmark.svg', dark: '/library/vercel_wordmark_dark.svg' }, + brandUrl: 'https://vercel.com/geist/brands', url: 'https://vercel.com/' }, { diff --git a/src/types/svg.ts b/src/types/svg.ts index 6d568e3b..6402e5b8 100644 --- a/src/types/svg.ts +++ b/src/types/svg.ts @@ -11,5 +11,6 @@ export interface iSVG { category: tCategory | tCategory[]; route: string | ThemeOptions; wordmark?: string | ThemeOptions; + brandUrl?: string; url: string; } From b29dfd8332f002c096c7b82d5401c4fd52c03e8d Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 16:05:41 +0000 Subject: [PATCH 07/10] =?UTF-8?q?=F0=9F=8E=A8=20New=20light/dark=20theme?= =?UTF-8?q?=20for=20Shiki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.css | 9 +++++++++ svelte.config.js | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app.css b/src/app.css index f85c976c..0f54e63a 100644 --- a/src/app.css +++ b/src/app.css @@ -72,3 +72,12 @@ src: url('/fonts/GeistMonoVariableVF.woff2') format('woff2'); font-display: swap; } + +html.dark .shiki, +html.dark .shiki span { + color: var(--shiki-dark) !important; + background-color: transparent !important; + font-style: var(--shiki-dark-font-style) !important; + font-weight: var(--shiki-dark-font-weight) !important; + text-decoration: var(--shiki-dark-text-decoration) !important; +} diff --git a/svelte.config.js b/svelte.config.js index aaa6f5c3..4d22ddad 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -36,11 +36,19 @@ const mdsvexOptions = { highlight: { highlighter: async (code, lang = 'text') => { const highlighter = await getHighlighter({ - themes: ['vesper'], + themes: ['github-light', 'github-dark'], langs: ['javascript', 'typescript', 'bash', 'json'] }); await highlighter.loadLanguage('javascript', 'typescript', 'bash'); - const html = escapeSvelte(highlighter.codeToHtml(code, { lang, theme: 'vesper' })); + const html = escapeSvelte( + highlighter.codeToHtml(code, { + lang, + themes: { + light: 'github-light', + dark: 'github-dark' + } + }) + ); return `{@html \`${html}\` }`; } } From a03589d795560745bf675d0adbecbbd783b33631 Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 16:05:54 +0000 Subject: [PATCH 08/10] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Upgrade=20API=20type?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/docs/api.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/docs/api.md b/src/docs/api.md index 76dc8036..fd8e41f9 100644 --- a/src/docs/api.md +++ b/src/docs/api.md @@ -39,17 +39,18 @@ export interface Category { - For SVGs: ```ts -type ThemeOptions = { - light: string; +export type ThemeOptions = { dark: string; + light: string; }; export interface iSVG { - id: number; + id?: number; title: string; - category: string | string[]; + category: tCategory | tCategory[]; route: string | ThemeOptions; wordmark?: string | ThemeOptions; + brandUrl?: string; url: string; } ``` From ba51ec699bfc98e18930cd8384ba8661c93210b2 Mon Sep 17 00:00:00 2001 From: pheralb Date: Wed, 15 Jan 2025 16:06:08 +0000 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=8E=A8=20Update=20codeblocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/api/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/+page.svelte b/src/routes/api/+page.svelte index b6d4ae5d..323430cb 100644 --- a/src/routes/api/+page.svelte +++ b/src/routes/api/+page.svelte @@ -42,7 +42,7 @@ 'prose dark:prose-invert', 'mx-auto max-w-3xl px-4 py-10', 'prose-h2:font-medium prose-h2:tracking-tight prose-h2:underline prose-h2:decoration-neutral-300 prose-h2:underline-offset-[6px] prose-h2:transition-opacity hover:prose-h2:opacity-70 dark:prose-h2:decoration-neutral-700/65', - 'prose-pre:m-0 prose-pre:border-neutral-200 dark:prose-pre:border dark:prose-pre:border-neutral-800/65' + 'prose-pre:m-0 prose-pre:border prose-pre:border-neutral-200 dark:prose-pre:border dark:prose-pre:border-neutral-800/65' )} > From 974cf4b3b08b3f38a9cc2c6a891134f7aa4439ad Mon Sep 17 00:00:00 2001 From: Pablo Hdez <62877300+pheralb@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:26:16 +0000 Subject: [PATCH 10/10] =?UTF-8?q?=E2=9C=8D=EF=B8=8F=20Update=20PULL=5FREQU?= =?UTF-8?q?EST=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 21ec51d9..c860dd55 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,5 +12,5 @@ ## ✅ Checklist - [ ] I have permission to use this logo. -- [ ] The .svg URL I have provided is optimized for web use. -- [ ] The .svg size is less than **20kb**. +- [ ] The ``.svg`` file is optimized for web use. +- [ ] The ``.svg`` size is less than **20kb**.