diff --git a/src/App.svelte b/src/App.svelte index 2251418..0e9a0d5 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,8 +1,7 @@ - - showModal = false} /> - -
- {#each logos as logo} - { selectedLogo = logo; showModal = true; }}> - - - - - {/each} -
- - diff --git a/src/components/List.svelte b/src/components/List.svelte deleted file mode 100644 index c19265d..0000000 --- a/src/components/List.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - - showModal = false} /> - -
- {#each logos as logo} - { selectedLogo = logo; showModal = true; }}> - - - - - {/each} -
- - diff --git a/src/components/Actions.svelte b/src/components/LogoActions.svelte similarity index 99% rename from src/components/Actions.svelte rename to src/components/LogoActions.svelte index 3f6ea0a..0c16e06 100644 --- a/src/components/Actions.svelte +++ b/src/components/LogoActions.svelte @@ -1,5 +1,6 @@ + + + +
+ {#each logos as logo} +
+
openPreview(logo)} + on:keydown={(e) => (e.key === 'Enter' || e.key === ' ') && openPreview(logo)} + style="cursor:pointer;" + > + {#if isSvgLogo(logo)} + {#key theme + (logo._activeColor || '')} + + {/key} + {:else} + {logo.name} + {/if} +
+
+

{logo.name}

+
+ Format: {logo.format} + {#if logo.colors} +
+ logo._activeColor = undefined} + on:keydown|stopPropagation={(e) => (e.key === 'Enter' || e.key === ' ') && (logo._activeColor = undefined)} + > + + + + + + {#each logo.colors as colorObj} + logo._activeColor = colorObj.value} + on:keydown|stopPropagation={(e) => (e.key === 'Enter' || e.key === ' ') && (logo._activeColor = colorObj.value)} + > + {/each} +
+ {/if} +
+
+ +
+
+
+ {:else} +

No logos found matching your search criteria.

+ {/each} +
+ + diff --git a/src/components/LogoList.svelte b/src/components/LogoList.svelte new file mode 100644 index 0000000..22fc4d7 --- /dev/null +++ b/src/components/LogoList.svelte @@ -0,0 +1,187 @@ + + + + +
+ {#each logos as logo} +
+
openPreview(logo)} + on:keydown={(e) => (e.key === 'Enter' || e.key === ' ') && openPreview(logo)} + style="cursor:pointer;" + > + {#if isSvgLogo(logo)} + + {:else} + {logo.name} + {/if} +
+
+

{logo.name}

+
+ Format: {logo.format} +
+ {#if logo.colors} +
+ logo._activeColor = undefined} + on:keydown|stopPropagation={(e) => (e.key === 'Enter' || e.key === ' ') && (logo._activeColor = undefined)} + > + + + + + + {#each logo.colors as colorObj} + logo._activeColor = colorObj.value} + on:keydown|stopPropagation={(e) => (e.key === 'Enter' || e.key === ' ') && (logo._activeColor = colorObj.value)} + > + {/each} +
+ {/if} +
+
+ +
+
+ {:else} +

No logos found matching your search criteria.

+ {/each} +
+ + diff --git a/src/components/Preview.svelte b/src/components/LogoModal.svelte similarity index 86% rename from src/components/Preview.svelte rename to src/components/LogoModal.svelte index be5f3e0..9c8a592 100644 --- a/src/components/Preview.svelte +++ b/src/components/LogoModal.svelte @@ -1,9 +1,7 @@ - -
-
(e.key === 'Enter' || e.key === ' ') && onPreview && onPreview(e)} - tabindex="0" - role="button" - aria-label="Preview logo" - > - {#if logo.format && logo.format.toLowerCase() === 'svg'} - - {:else} - {logo.name} - {/if} -
-
-

{logo.name}

-
- Format: {logo.format} - {#if logo.colors} -
- logo._activeColor = undefined} - on:keydown|stopPropagation={(e) => (e.key === 'Enter' || e.key === ' ') && (logo._activeColor = undefined)}> - - - - - - {#each logo.colors as colorObj} - logo._activeColor = colorObj.value} - on:keydown|stopPropagation={(e) => (e.key === 'Enter' || e.key === ' ') && (logo._activeColor = colorObj.value)}> - {/each} -
- {/if} -
- {#if logo.tags && logo.tags.length} -
- {#each logo.tags as tag} - {#if getTagObj(tag).color} - {getTagObj(tag).text} - {:else} - {getTagObj(tag).text} - {/if} - {/each} -
- {/if} - -
- {#if showActions} -
- -
- {/if} -