From 3f8fa1844353e40451fe929e6b4455d39e79ee79 Mon Sep 17 00:00:00 2001 From: Achim Vedam Date: Fri, 19 Apr 2019 10:12:24 +0200 Subject: [PATCH] docs changes --- site/src/routes/docs/_GuideContents.svelte | 53 +++------------ site/src/routes/docs/index.svelte | 79 ++++++++-------------- 2 files changed, 39 insertions(+), 93 deletions(-) diff --git a/site/src/routes/docs/_GuideContents.svelte b/site/src/routes/docs/_GuideContents.svelte index 3b488e1ffa..7b200052eb 100644 --- a/site/src/routes/docs/_GuideContents.svelte +++ b/site/src/routes/docs/_GuideContents.svelte @@ -7,38 +7,6 @@ export let show_contents; export let prevent_sidebar_scroll = false; - onMount(() => { - // ------------------------------------------ - // TODO – smooth-scroll - // must be something that makes more sense - // this one is too annoying (area too tall) - // maybe svelte-transitions are a solution? - // unfortunately I have no idea how. For now. - // ------------------------------------------ - // methods: { - // scrollTo(e, item) { - // e.preventDefault(); - // let top = document.querySelector('#' + item).getBoundingClientRect().top; - // window.scrollTo({ - // top, - // behavior: "smooth" - // }); - // } - // }, - - const onhashchange = _ => { - // TODO wire this up - // this.store.set({active_section: window.location.hash.slice(1) }); - }; - - window.addEventListener('hashchange', onhashchange, false); - onhashchange(); - - return () => { - window.removeEventListener('hashchange', onhashchange, false); - }; - }); - let ul; afterUpdate(() => { @@ -75,22 +43,22 @@ .reference-toc li { display: block; line-height: 1.2; - margin: 0 0 4.8rem 0; + margin: 0 0 4rem 0; } a { position: relative; - opacity: 0.7; + opacity: 0.75; transition: opacity 0.2s; } .section { display: block; padding: 0 0 .8rem 0; - font: 400 var(--h6) var(--font); + font-size: var(--h6); text-transform: uppercase; - letter-spacing: 0.12em; - font-weight: 700; + letter-spacing: 0.1em; + font-weight: 600; } .subsection { @@ -107,18 +75,15 @@ } .subsection[data-level="4"] { - padding-left: 1em; + padding-left: 1.2rem; } - .active { - opacity: 1; - /* font-weight: 700; */ - } + .active { opacity: 1 } .icon-container { position: absolute; - top: -.3rem; - right: 3.2rem; + top: -.2rem; + right: 2.4rem; } diff --git a/site/src/routes/docs/index.svelte b/site/src/routes/docs/index.svelte index 1ac4e74858..4272d0dd94 100644 --- a/site/src/routes/docs/index.svelte +++ b/site/src/routes/docs/index.svelte @@ -74,7 +74,6 @@