From ea4483604f5689b07a90dfedf4d567fe969fe996 Mon Sep 17 00:00:00 2001
From: Nilesh <19304+nileshtrivedi@users.noreply.github.com>
Date: Mon, 30 May 2022 12:18:19 +0100
Subject: [PATCH] misc changes
---
README.md | 27 +++++++++++----------------
src/AdvancedSearch.svelte | 30 +++++++++++++++++-------------
src/App.svelte | 9 +++++----
src/FormatDetail.svelte | 34 +++++++++++++++++++++++++++++++---
src/SearchForm.svelte | 19 ++++++++++++++++++-
src/TopicDetail.svelte | 20 ++++++++------------
6 files changed, 90 insertions(+), 49 deletions(-)
diff --git a/README.md b/README.md
index 0292538..93d0642 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,16 @@
-# Learndb
+# LearnAwesome
-Non-social version of https://learnawesome.org/
+An offline-browsable collection of learning resources organized by topics, formats, difficulty level etc.
-Run `datasette . -o` in the top-level directory.
+## Users
-Schema:
- - Format: inline string like book, course, video, audio, podcast, newsletter, game, toy, website, article etc
- - Topic (id - using slash or dot separator for hierarchy, display_name, image)
- - Why not an inline string?
- - Need to support Special characters (dot, hyphen etc), preserve capitalization etc
- - Hierarchy may change over time
- - Item (id, name, description, image, []{format, URL/hash}, rating, topic_id: [], creator_ids: [], year, difficulty, cost, quality_tags, extra_data: {})
- - Creator (id, name, description, category, social_urls_or_ids, photo)
- - Review/Recommendation (id, item_id, by: item_id/creator_id, rating, blurb, URL, quality_tags)
+Run `datasette . -o` in the top-level directory which opens the Datasette default view. Click on "home" in the top-left to open the custom UI which is much nicer.
-Additional pages:
-- Syllabus page per topic
-- Format page
+## Developers
-To generate the sqlite database from the source files, run `generatedb.sh`
+When you modify the *.csv files in `db/`, generate the sqlite database with `./generatedb.sh`.
+Run `npm run dev` to keep building the JS bundle as you edit the source code.
+
+## Details
+
+The dataset here is identical to https://learnawesome.org/. But this runs on your computer so there are no user accounts, no social features like learning feeds or ActivityPub. Your bookmarks will be saved in browser's localStorage.
\ No newline at end of file
diff --git a/src/AdvancedSearch.svelte b/src/AdvancedSearch.svelte
index 3f21087..8934762 100644
--- a/src/AdvancedSearch.svelte
+++ b/src/AdvancedSearch.svelte
@@ -1,4 +1,8 @@
-
+
-
-
-
+
+ {#if showSearch}
+
+
+
+
-
\ No newline at end of file
+
+ {/if}
+
\ No newline at end of file
diff --git a/src/App.svelte b/src/App.svelte
index 6a6c73a..b72b551 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -17,6 +17,7 @@
let currentView = "/topics";
let randomItemId;
let alltopics = [];
+ let showSearch = false;
function getRandomItemId(){
fetch('/learn.json?_shape=array&sql=select+rowid+from+items+order+by+random()+limit+1').then(r => r.json())
@@ -70,13 +71,13 @@
{:else if currentView == "/random"}
{#if randomItemId}{/if}
- {:else if currentView === "/search"}
-
{:else if currentView === "/wanttolearn"}
{:else if currentView === "/finishedlearning"}
{/if}
+
+
@@ -92,10 +93,10 @@