Review and map fixes

pull/58/head
Nilesh 2022-12-26 11:26:42 +00:00
rodzic a03960b619
commit e6f7138a5d
4 zmienionych plików z 9 dodań i 12 usunięć

Wyświetl plik

@ -84,13 +84,13 @@ rect.parent,
<p id="chart"></p>
<script type="text/javascript">
function hierarchy(topic_array, parent_id){
function hierarchy(topic_array, parent_name){
// this is different from TopicMasonryGrid because this needs a specific object structure down to all leafs, not a map with just 2 levels
// every node needs id, name. Leaf nodes need a value like 100. Non-leafs need a children[].
// see: https://github.com/mekarpeles/math.mx/blob/master/static/data/simple.json
const nest = (items, id) =>
items
.filter(item => item.parent_id === id)
.filter(item => item.parent_name === id)
.map(item => ({ ...item, children: nest(items, item.name), value: 100 }))
.map(item => {
return item.children.length == 0 ?

Wyświetl plik

@ -8,14 +8,11 @@
<span class="block text-secondary text-3xl mt-2">Humanity's learning map</span>
</span>
</h1>
<p class="mt-3 text-base text-neutral_Light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">This is a collection of learning resources organized by topics, formats, difficulty levels, and quality tags like visual / interactive / challenging etc. It also includes reviews from experts and metadata like paywall/loginwall to help you find the best resource for your learning goals.</p>
<p class="mt-3 text-base text-neutral_Light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">This is a collection of learning resources organized by topics, formats, difficulty level, reviews by experts and quality tags like visual / interactive / challenging etc. For books or research papers, there are direct links thanks to projects like InternetArchive, LibGen, Arxiv, SciHub, IPFS etc.</p>
<p class="mt-3 text-base text-neutral_Light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">For certain resources like research paper or books, there will be direct links thanks to projects like InternetArchive, LibGen, Arxiv, SciHub etc.</p>
<p class="mt-3 text-base text-neutral_Light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">This is an <a href="https://github.com/learn-awesome/learndb" target="_blank" rel="noreferrer" class="underline text-secondary">open-source project</a>.</p>
<p class="mt-3 text-base text-neutral_Light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">This requires us to build a giant taxonomy of all human knowledge. Arranging topics in a hierarchy is not sufficient. Instead we are creating a graph of topics and levels with multiple types of edges: "is-a-subtopic-of", "is-a-prerequisite-of" etc. If you are an expert or educator in some domain, you can contribute to this project via our GitHub repository.</p>
<p class="mt-3 text-base text-neutral_Light sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">In conjunction with this, we're also building an online game where this is presented as a skill-tree for life and allows you to chase ambitious life goals and keep track of your progress while inspiring and being inspired by your friends. More on this will be revealed soon.</p>
</div>
</div>
</main>
</main>

Wyświetl plik

@ -11,12 +11,12 @@
}
</style>
<article class="px-3 py-4 bg-neutral_light text-neutral_dark rounded-lg text-xs w-48 max-w-sm shrink-0 md:w-full">
<h3 class="font-semibold">{review.blurb && review.blurb.toString().slice(0,10)}...</h3>
<p class="mt-2 line-clamp">{review.blurb}</p>
<h3 class="font-semibold">{(review.blurb && (review.blurb.slice(0,10) + "...")) || ""}</h3>
<p class="mt-2 line-clamp">{review.blurb || ""}</p>
<div class="mt-3 flex flex-col">
{#if review.rating}
<sl-rating readonly value={review.rating}></sl-rating>
{/if}
<span class="font-bold">{review.by}</span>
<span class="font-bold">{review.by_creator}</span>
</div>
</article>

Wyświetl plik

@ -4,7 +4,7 @@ import fs from 'fs';
function copyTopicJSONToPublic(){
// This is needed for map.html which needs to fetch all topics from server
console.log("Copying db/topics.json to public/ ...");
console.log("Copying db/topics.json to public/alltopics.json ...");
fs.copyFileSync("db/topics.json", "public/alltopics.json")
}