diff --git a/src/App.svelte b/src/App.svelte index f019872..a8fb55a 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -12,10 +12,11 @@ import ItemDetail from "./ItemDetail.svelte" import ItemList from "./ItemList.svelte" import AdvancedSearch from "./AdvancedSearch.svelte" - import { SearchIcon } from "@rgossiaux/svelte-heroicons/outline"; + import { SearchIcon, CogIcon, BookmarkAltIcon, BookmarkIcon } from "@rgossiaux/svelte-heroicons/outline"; let currentView = "/topics"; let randomItemId; + let alltopics = []; function getRandomItemId(){ fetch('/learn.json?_shape=array&sql=select+rowid+from+items+order+by+random()+limit+1').then(r => r.json()) @@ -24,6 +25,12 @@ }); } + $: fetch(`/learn/topics.json?_shape=array&_size=5000`) + .then(r => r.json()) + .then(data => { + alltopics = data; + }); + async function hashchange() { // the poor man's router! const path = window.location.hash.slice(1); @@ -45,14 +52,14 @@ - + {#if currentView === "/home" || currentView === "/"} {:else if currentView === "/game"} {:else if currentView === "/topics"} - + {:else if currentView.startsWith("/topic/")} {:else if currentView === "/formats"} @@ -93,17 +100,18 @@
- + Want to learn - + Finished learning
- + Datasette +
\ No newline at end of file diff --git a/src/SkillTree.svelte b/src/SkillTree.svelte index b6d98f8..fa53fa3 100644 --- a/src/SkillTree.svelte +++ b/src/SkillTree.svelte @@ -1,90 +1,78 @@ +
- + {#if currentParent}
+ + + +
{/if} -{#each edges as edge} - -{/each} - -{#each nodes as node} - -{/each} +

{currentChild.name}

- - - Hello - - -
+
+ + {#each siblings(currentParent, currentChild) as sibling} + + {/each} + +
+
- - \ No newline at end of file +
+ {#each currentChild.children as grandchild, i (grandchild)} + + {/each} +
\ No newline at end of file diff --git a/src/TopicList.svelte b/src/TopicList.svelte index e31e333..b4cfdfc 100644 --- a/src/TopicList.svelte +++ b/src/TopicList.svelte @@ -1,6 +1,7 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/TopicMasonryGrid.svelte b/src/TopicMasonryGrid.svelte index 51593c5..041e70a 100644 --- a/src/TopicMasonryGrid.svelte +++ b/src/TopicMasonryGrid.svelte @@ -1,7 +1,7 @@ @@ -87,12 +89,13 @@
-
+
-
+
+ {#if showNotificationBell || showProfileMenu}
{#if showNotificationBell} diff --git a/src/tailwindui/ComboBox.svelte b/src/tailwindui/ComboBox.svelte new file mode 100644 index 0000000..efa446e --- /dev/null +++ b/src/tailwindui/ComboBox.svelte @@ -0,0 +1,44 @@ + + +
+
+ + + +
    + {#each options as option} + +
  • + + {option.label} + + + {#if selected && selected.value == option.value} + + + + + {/if} +
  • + {/each} +
+
+
\ No newline at end of file diff --git a/src/tailwindui/SearchForm.svelte b/src/tailwindui/SearchForm.svelte index 13fc826..f4f373e 100644 --- a/src/tailwindui/SearchForm.svelte +++ b/src/tailwindui/SearchForm.svelte @@ -1,6 +1,15 @@ -
- -
-
- -
- -
+ + + + + + { return {label: t.display_name, value: t.name}; }).sort((a,b) => a.label.localeCompare(b.label))} selected={null}/> + + + Any format + Books + Videos + Podcasts + + + + Any level + Childlike + Beginner + Intermediate + Advanced + Research + + + + + Sort by + Rating + Year + Name + -
    -
  • -

    Clients

    -
      - -
    • Workflow Inc.
    • -
    • Multinational LLC.
    • -
    -
  • -
  • -

    Projects

    -
      - -
    • Workflow Inc. / Website Redesign
    • -
    • Multinational LLC. / Animation
    • -
    -
  • -
\ No newline at end of file