diff --git a/public/global.css b/public/global.css index 6d23231..f2af672 100644 --- a/public/global.css +++ b/public/global.css @@ -93,3 +93,11 @@ textarea { width: 50%; cursor: pointer; } + +.tierline { + display: flex; +} + +.buttons { + margin-left: auto; +} diff --git a/src/App.svelte b/src/App.svelte index 898a85c..5a1fcca 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -39,13 +39,15 @@ relpermalink = repo.relpermalink protocol = document.location.protocol.substring(0,4) - let xastiers = Object.keys(repo.frontmatter).filter(t => t.startsWith("has_")) let tkey = Object.keys(repo.frontmatter).filter(t => t.toLowerCase() == "title")[0] title = repo.frontmatter[tkey] - hastiers = xastiers[0].substr(4) - tiers = METASP[xastiers[0].split("has_")[1]].tiers.filter(t => repo.frontmatter[xastiers].includes(t.file)).reverse() - if (xastiers.length == 1) { - candidates = diffArrr(METASP[xastiers[0].split("has_")[1]].tiers, tiers) + let xastiers = Object.keys(repo.frontmatter).filter(t => t.startsWith("has_")) + if (xastiers.length > 0) { + hastiers = xastiers[0].substr(4) + tiers = METASP[xastiers[0].split("has_")[1]].tiers.filter(t => repo.frontmatter[xastiers].includes(t.file)).reverse() + if (xastiers.length == 1) { + candidates = diffArrr(METASP[xastiers[0].split("has_")[1]].tiers, tiers) + } } } el.src = `../js/repo/${location.hash.substring(1)}.js` @@ -78,8 +80,10 @@
+ {#if hastiers} + {/if} {#if document.location.protocol.substring(0,4) != "file"} diff --git a/src/SpHasCandidates.svelte b/src/SpHasCandidates.svelte index cc949dd..9d6304e 100644 --- a/src/SpHasCandidates.svelte +++ b/src/SpHasCandidates.svelte @@ -23,6 +23,6 @@ diff --git a/src/SpHasTiers.svelte b/src/SpHasTiers.svelte index 63e7bc2..103d655 100644 --- a/src/SpHasTiers.svelte +++ b/src/SpHasTiers.svelte @@ -24,10 +24,14 @@
{#each tiers as tier, i (tier.file)}
- - - - +
+ ({tier.title}) +
+
+ + + +
{/each}
diff --git a/src/SpTitle.svelte b/src/SpTitle.svelte index 94f20b7..5584c53 100644 --- a/src/SpTitle.svelte +++ b/src/SpTitle.svelte @@ -3,4 +3,4 @@ - +