From 0da0ccfc374dd164b8293c3afcd431686b57dabb Mon Sep 17 00:00:00 2001 From: pheralb Date: Mon, 25 Aug 2025 19:07:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Add=20new=20UI=20components:=20C?= =?UTF-8?q?ontainer,=20Grid,=20Header,=20ModeToggle,=20Search,=20SvgCard?= =?UTF-8?q?=20&=20CopySvg,=20DownloadSvg=20with=20improved=20functionality?= =?UTF-8?q?=20and=20styling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/container.svelte | 11 + src/components/copySvg.svelte | 551 ++++++++++++++++++++++++++++ src/components/downloadSvg.svelte | 282 ++++++++++++++ src/components/grid.svelte | 16 + src/components/layout/header.svelte | 71 ++++ src/components/modeToggle.svelte | 26 ++ src/components/search.svelte | 88 +++++ src/components/svgCard.svelte | 213 +++++++++++ 8 files changed, 1258 insertions(+) create mode 100644 src/components/container.svelte create mode 100644 src/components/copySvg.svelte create mode 100644 src/components/downloadSvg.svelte create mode 100644 src/components/grid.svelte create mode 100644 src/components/layout/header.svelte create mode 100644 src/components/modeToggle.svelte create mode 100644 src/components/search.svelte create mode 100644 src/components/svgCard.svelte diff --git a/src/components/container.svelte b/src/components/container.svelte new file mode 100644 index 0000000..799d6d2 --- /dev/null +++ b/src/components/container.svelte @@ -0,0 +1,11 @@ + + +
+ {@render children?.()} +
diff --git a/src/components/copySvg.svelte b/src/components/copySvg.svelte new file mode 100644 index 0000000..55176dd --- /dev/null +++ b/src/components/copySvg.svelte @@ -0,0 +1,551 @@ + + + + + {#if optionsOpen} + + {:else if isLoading} + + {:else} + + {/if} + + + + + Source +
+ + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+
+ + +
+ + +
+
+ + +
+ + + + + +
+
+ + +
+ + +
+
+ + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+
+
+

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

+
+
+
diff --git a/src/components/downloadSvg.svelte b/src/components/downloadSvg.svelte new file mode 100644 index 0000000..d22e22f --- /dev/null +++ b/src/components/downloadSvg.svelte @@ -0,0 +1,282 @@ + + +{#if typeof svgInfo.route === "string" && svgInfo.wordmark === undefined} + +{:else} + + + + + + + Download {svgInfo.title} SVG + + This logo has multiple options to download: + + +
+ {#if typeof svgInfo.route === "string"} +
+ {svgInfo.title} + +
+ {:else} +
+ {svgInfo.title} + + + + + +
+ {/if} + + {#if typeof svgInfo.wordmark === "string" && svgInfo.wordmark !== undefined} +
+ {svgInfo.title} + +
+ {/if} + + {#if typeof svgInfo.wordmark !== "string" && svgInfo.wordmark !== undefined} +
+ {svgInfo.title} + + + + + +
+ {/if} +
+ +

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

+
+
+
+{/if} diff --git a/src/components/grid.svelte b/src/components/grid.svelte new file mode 100644 index 0000000..47b3936 --- /dev/null +++ b/src/components/grid.svelte @@ -0,0 +1,16 @@ + + +
+ {@render children?.()} +
diff --git a/src/components/layout/header.svelte b/src/components/layout/header.svelte new file mode 100644 index 0000000..a4cf878 --- /dev/null +++ b/src/components/layout/header.svelte @@ -0,0 +1,71 @@ + + +
+ +
diff --git a/src/components/modeToggle.svelte b/src/components/modeToggle.svelte new file mode 100644 index 0000000..df67d73 --- /dev/null +++ b/src/components/modeToggle.svelte @@ -0,0 +1,26 @@ + + + diff --git a/src/components/search.svelte b/src/components/search.svelte new file mode 100644 index 0000000..8559ec6 --- /dev/null +++ b/src/components/search.svelte @@ -0,0 +1,88 @@ + + +
+ + + {#if !searchValue} +
+ + K +
+ {/if} +
diff --git a/src/components/svgCard.svelte b/src/components/svgCard.svelte new file mode 100644 index 0000000..9816a96 --- /dev/null +++ b/src/components/svgCard.svelte @@ -0,0 +1,213 @@ + + +
+ + {#if wordmarkSvg == true && svgInfo.wordmark !== undefined} + {svgInfo.title} + {svgInfo.title} + {:else} + {svgInfo.title} + {svgInfo.title} + {/if} + +
+

+ {svgInfo.title} +

+
+ {#if Array.isArray(svgInfo.category)} + {#each svgInfo.category.slice(0, maxVisibleCategories) as c, index} + + {c} + + {/each} + + {#if svgInfo.category.length > maxVisibleCategories} + (moreTagsOptions = isOpen)} + > + + {#if moreTagsOptions} + + {:else} + + {/if} + + +

More tags:

+ {#each svgInfo.category.slice(maxVisibleCategories) as c} + + + {c} + + {/each} +
+
+ {/if} + {:else} + + {svgInfo.category} + + {/if} +
+
+ +
+ {#if wordmarkSvg && svgInfo.wordmark !== undefined} + + {:else} + + {/if} + + { + const dark = document.documentElement.classList.contains("dark"); + return dark; + }} + /> + + + + + {#if svgInfo.wordmark !== undefined} + + {/if} + {#if svgInfo.brandUrl !== undefined} + + + + {/if} +
+