diff --git a/src/components/downloadSvg.svelte b/src/components/downloadSvg.svelte new file mode 100644 index 0000000..665e34e --- /dev/null +++ b/src/components/downloadSvg.svelte @@ -0,0 +1,230 @@ + + +{#if typeof svgInfo.route === 'string'} + { + if (typeof svgInfo.route === 'string') { + downloadSvg(svgInfo.route); + return; + } + }} + > + + +{:else} + + + + + + + Download {svgInfo.title} + This logo has multiple options to download. + + + + + + downloadAllVariants(svgInfo)} + > + + Light & dark variants + + + { + if (typeof svgInfo.route !== 'string') { + downloadSvg(svgInfo.route.light); + return; + } + }} + > + + Only light variant + + + { + if (typeof svgInfo.route !== 'string') { + downloadSvg(svgInfo.route.dark); + return; + } + }} + > + + Only dark variant + + + + {#if typeof svgInfo.wordmark === 'string' && svgInfo.wordmark !== undefined} + + + { + if (typeof svgInfo.wordmark === 'string') { + downloadSvg(svgInfo.wordmark); + return; + } + }} + > + + Wordmark logo + + + {/if} + + {#if typeof svgInfo.wordmark !== 'string' && svgInfo.wordmark !== undefined} + + + { + if (typeof svgInfo.wordmark !== 'string') { + downloadAllVariants(svgInfo); + return; + } + }} + > + + Light & dark variants + + + { + if (typeof svgInfo.wordmark !== 'string') { + downloadSvg(svgInfo.wordmark?.light); + return; + } + }} + > + + Wordmark light variant + + + { + if (typeof svgInfo.wordmark !== 'string') { + downloadSvg(svgInfo.wordmark?.dark); + return; + } + }} + > + + Wordmark dark variant + + + {/if} + + + +{/if} diff --git a/src/components/svgCard.svelte b/src/components/svgCard.svelte index a309c7f..655629b 100644 --- a/src/components/svgCard.svelte +++ b/src/components/svgCard.svelte @@ -1,35 +1,23 @@
Light & dark variants
Wordmark logo