From c31d6e8a7e8d5009f4929112db79e56d5e19ffc7 Mon Sep 17 00:00:00 2001 From: cssbubble Date: Fri, 27 May 2022 13:03:49 +0100 Subject: [PATCH] pri and sec colors added, minor ui changes --- src/App.svelte | 54 ++++++++++++++------ src/BookCard.svelte | 2 +- src/ButtonGroup.svelte | 2 +- src/FormatDetail.svelte | 4 +- src/FormatList.svelte | 2 +- src/ItemDetail.svelte | 93 +++++++++++++++++++++++++--------- src/TopicDetail.svelte | 17 +++---- src/TopicMasonryGrid.svelte | 12 ++--- src/VideoCard.svelte | 35 ++++++++----- src/tailwindui/AppShell.svelte | 6 +-- templates/index.html | 37 ++++++++++++-- 11 files changed, 186 insertions(+), 78 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 0c8f8da..0f3a9bf 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -46,14 +46,38 @@ onMount(getRandomItemId); onMount(hashchange); - + + +
+
+ Light +
+ + +
+
+ Dark +
+
+ + {#if currentView === "/home" || currentView === "/"} @@ -83,34 +107,34 @@ - - + +

Topics

- - + +

Formats

- - + +

Random Item

- - + +

Search


- - + +

Want to learn

- - + +

Finished learning


- - + +

Datasette

diff --git a/src/BookCard.svelte b/src/BookCard.svelte index 9431c6c..d9f5764 100644 --- a/src/BookCard.svelte +++ b/src/BookCard.svelte @@ -2,7 +2,7 @@ export let item; - + {item.name}

diff --git a/src/ButtonGroup.svelte b/src/ButtonGroup.svelte index 66dde61..e2f950f 100644 --- a/src/ButtonGroup.svelte +++ b/src/ButtonGroup.svelte @@ -23,7 +23,7 @@ {i == 0 && 'rounded-l-md'} {i == tabs.length-1 && 'rounded-r-md'} border border-gray-800 text-sm font-medium focus:z-10 focus:outline-none - {currentlySelected === i? 'bg-green-800 text-white' : 'bg-gray-100 text-gray-800'} + {currentlySelected === i? 'bg-lightButton2 text-lightButton1' : 'bg-gray-100 text-gray-800'} " > {tab} diff --git a/src/FormatDetail.svelte b/src/FormatDetail.svelte index fdd55be..4ff1e1b 100644 --- a/src/FormatDetail.svelte +++ b/src/FormatDetail.svelte @@ -1,6 +1,6 @@ - + + + -
+
{#each formats.filter(f => items.filter(x => x.links.includes(f.id + '|')).length > 0) as format} @@ -65,13 +67,8 @@ {#if format.id == 'book'} -
-<<<<<<< HEAD - {#each items.filter(x => x.links.includes(format.id + '|')) as item} - -======= +
{#each filteredItems.filter(x => x.links.includes(format.id + '|')) as item} ->>>>>>> upstream/main {/each}
@@ -79,7 +76,7 @@ {:else if format.id == 'video'} -
+
{#each filteredItems.filter(x => x.links.includes(format.id + '|')) as item} {/each} @@ -88,7 +85,7 @@ {:else} -
+
{#each filteredItems.filter(x => x.links.includes(format.id + '|')) as item} {/each} diff --git a/src/TopicMasonryGrid.svelte b/src/TopicMasonryGrid.svelte index a3eb5d3..5de9295 100644 --- a/src/TopicMasonryGrid.svelte +++ b/src/TopicMasonryGrid.svelte @@ -66,9 +66,9 @@ -
+
- All Topics + All Topics {#if topic} {#if topic.parent_id} @@ -86,16 +86,16 @@
{#each [...map.entries()] as parent} -
+ diff --git a/src/VideoCard.svelte b/src/VideoCard.svelte index 78d9b25..4a81515 100644 --- a/src/VideoCard.svelte +++ b/src/VideoCard.svelte @@ -1,40 +1,49 @@ - +
- {#if item.image || thumbnail_image_url} - + {#if item.image || get_thumbnail_image_url(item)} +
- {item.name} - + {item.name} + +
{:else} - + {/if}
- {item.name} - {item.creators} + {item.name} + {item.creators}
diff --git a/src/tailwindui/AppShell.svelte b/src/tailwindui/AppShell.svelte index ed2f979..18179fd 100644 --- a/src/tailwindui/AppShell.svelte +++ b/src/tailwindui/AppShell.svelte @@ -34,7 +34,7 @@ From: "translate-x-0" To: "-translate-x-full" --> -
+