kopia lustrzana https://github.com/learn-awesome/learndb
misc
rodzic
642c03b51b
commit
7aedaa3df5
|
@ -3,7 +3,7 @@
|
||||||
import * as TailwindUI from "./tailwindui/index"
|
import * as TailwindUI from "./tailwindui/index"
|
||||||
|
|
||||||
import Home from "./Home.svelte"
|
import Home from "./Home.svelte"
|
||||||
import Explore from "./Explore.svelte"
|
import SkillTree from "./SkillTree.svelte"
|
||||||
import TopicList from "./TopicList.svelte"
|
import TopicList from "./TopicList.svelte"
|
||||||
import TopicDetail from "./TopicDetail.svelte"
|
import TopicDetail from "./TopicDetail.svelte"
|
||||||
import FormatList from "./FormatList.svelte"
|
import FormatList from "./FormatList.svelte"
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
import AdvancedSearch from "./AdvancedSearch.svelte"
|
import AdvancedSearch from "./AdvancedSearch.svelte"
|
||||||
|
|
||||||
let sidebarItems = [
|
let sidebarItems = [
|
||||||
{text: "Explore", link: "#/explore", icon: "home"},
|
{text: "Game", link: "#/game", icon: "home"},
|
||||||
{text: "Topics", link: "#/topics", icon: "home"},
|
{text: "Topics", link: "#/topics", icon: "home"},
|
||||||
{text: "Formats", link: "#/formats", icon: "home"},
|
{text: "Formats", link: "#/formats", icon: "home"},
|
||||||
{text: "Random item", link: "#/item/1", icon: "home"},
|
{text: "Random item", link: "#/item/1", icon: "home"},
|
||||||
|
@ -51,12 +51,12 @@
|
||||||
<TailwindUI.AppShell {sidebarItems}>
|
<TailwindUI.AppShell {sidebarItems}>
|
||||||
{#if currentView === "/home" || currentView === "/"}
|
{#if currentView === "/home" || currentView === "/"}
|
||||||
<Home/>
|
<Home/>
|
||||||
{:else if currentView === "/explore"}
|
{:else if currentView === "/game"}
|
||||||
<Explore/>
|
<SkillTree/>
|
||||||
{:else if currentView === "/topics"}
|
{:else if currentView === "/topics"}
|
||||||
<TopicList/>
|
<TopicList/>
|
||||||
{:else if currentView.startsWith("/topic/")}
|
{:else if currentView.startsWith("/topic/")}
|
||||||
<TopicDetail topicname={currentView.split("/")[2]}/>
|
<TopicDetail topicname={currentView.split("/").slice(2).join("/")}/>
|
||||||
{:else if currentView === "/formats"}
|
{:else if currentView === "/formats"}
|
||||||
<FormatList/>
|
<FormatList/>
|
||||||
{:else if currentView.startsWith("/format/")}
|
{:else if currentView.startsWith("/format/")}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<h1>Skill tree</h1>
|
|
@ -42,13 +42,13 @@
|
||||||
|
|
||||||
// Now move child-less top-level objects under Misc
|
// Now move child-less top-level objects under Misc
|
||||||
let count = [...tempmap.keys()].filter(k => tempmap.get(k).length == 0).length;
|
let count = [...tempmap.keys()].filter(k => tempmap.get(k).length == 0).length;
|
||||||
console.log({count}, tempmap.size);
|
// console.log({count}, tempmap.size);
|
||||||
if(count > 15){
|
if(count > 15){
|
||||||
console.log("pruning")
|
// console.log("pruning")
|
||||||
let misc = [];
|
let misc = [];
|
||||||
[...tempmap.keys()].forEach(key => {
|
[...tempmap.keys()].forEach(key => {
|
||||||
if(tempmap.get(key).length == 0) {
|
if(tempmap.get(key).length == 0) {
|
||||||
console.log({key});
|
// console.log({key});
|
||||||
misc.push(key);
|
misc.push(key);
|
||||||
tempmap.delete(key);
|
tempmap.delete(key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main>
|
<main class="bg-gray-100">
|
||||||
<div class="py-6">
|
<div class="py-6">
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
Ładowanie…
Reference in New Issue