From a7694b9b8eccb56dfbef0ce55c53b2c11c80d209 Mon Sep 17 00:00:00 2001 From: cssbubble Date: Wed, 1 Jun 2022 07:20:01 +0100 Subject: [PATCH] search field, generic card --- src/AdvancedSearch.svelte | 2 +- src/App.svelte | 6 +++--- src/GenericCard.svelte | 10 +--------- src/ItemCard.svelte | 3 ++- src/ItemDetail.svelte | 2 +- src/SearchForm.svelte | 15 +++++++++++++-- src/TopicMasonryGrid.svelte | 4 ++-- src/VideoCard.svelte | 4 +++- templates/index.html | 2 +- 9 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/AdvancedSearch.svelte b/src/AdvancedSearch.svelte index 5d9810b..32a1d3a 100644 --- a/src/AdvancedSearch.svelte +++ b/src/AdvancedSearch.svelte @@ -31,7 +31,7 @@ -
+

Random Topic

- +

Random Item

- diff --git a/src/GenericCard.svelte b/src/GenericCard.svelte index ce4bbb0..f72bc81 100644 --- a/src/GenericCard.svelte +++ b/src/GenericCard.svelte @@ -3,19 +3,11 @@ export let item; - + diff --git a/src/ItemCard.svelte b/src/ItemCard.svelte index 5e9dfdc..d42fbdb 100644 --- a/src/ItemCard.svelte +++ b/src/ItemCard.svelte @@ -5,6 +5,7 @@ import GenericCard from "./GenericCard.svelte" export let item; export let displayType = null; + export let showBadge = false; {#if item.links.includes('book|') && item.links.includes('video|')} @@ -18,5 +19,5 @@ {:else if item.links.includes('video|')} {:else} - + {/if} \ No newline at end of file diff --git a/src/ItemDetail.svelte b/src/ItemDetail.svelte index 0d490e2..5b6026b 100644 --- a/src/ItemDetail.svelte +++ b/src/ItemDetail.svelte @@ -103,7 +103,7 @@

{item.name}

-

{item.description}

+ {item.creators}
diff --git a/src/SearchForm.svelte b/src/SearchForm.svelte index 901fd10..eaf6801 100644 --- a/src/SearchForm.svelte +++ b/src/SearchForm.svelte @@ -13,7 +13,8 @@ format: "", level: "", quality: "", - sortby: "rating" + sortby: "rating", + tag: "" }; const dispatch = createEventDispatcher(); @@ -22,7 +23,7 @@ -
+ @@ -40,6 +41,16 @@ {/if} + + Any tag + Inspirational + Educational + Challenging + Entertaining + Visual + Interactive + + Any level Childlike diff --git a/src/TopicMasonryGrid.svelte b/src/TopicMasonryGrid.svelte index 611b53c..c9b50d4 100644 --- a/src/TopicMasonryGrid.svelte +++ b/src/TopicMasonryGrid.svelte @@ -94,9 +94,9 @@ { format_topic_name(parent[0]) } {/if} -
+
{#each parent[1].sort((t1,t2) => (t1.sort_index || 100) - (t2.sort_index || 100)) as child} - {format_topic_name(child)} + {format_topic_name(child)} {/each}
diff --git a/src/VideoCard.svelte b/src/VideoCard.svelte index 85b9ec6..bb5d8a1 100644 --- a/src/VideoCard.svelte +++ b/src/VideoCard.svelte @@ -1,4 +1,5 @@ @@ -45,6 +46,7 @@ {item.name} {item.creators}
+
diff --git a/templates/index.html b/templates/index.html index 86a70b9..55dff58 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,7 +27,7 @@ lightPrimary: 'rgb(30 64 175)', //blue-800 lightSecondary: 'rgb(75 85 99)', //gray-600 lightTertiary: 'rgb(168 85 247)', //purple-500 - lightBg: 'rgb(239 246 255)', //blue-50 + lightBg: '#fafafa', //zinc-50 lightPrimCont: '#dbeafe', // blue-200 lightButtonBg: 'rgb(20 83 45)', //green-900