diff options
author | 2021-07-19 19:36:09 -0500 | |
---|---|---|
committer | 2021-07-19 19:36:09 -0500 | |
commit | 325e8cba2d63eae909a8f6ca1f92722ed2f514db (patch) | |
tree | af7fcf9452364ec0dea03de66d9b9618b5d3c0bd /docs/src/components | |
parent | 7f57651686fb63e2158aa512a0b00dc262ee7425 (diff) | |
download | astro-325e8cba2d63eae909a8f6ca1f92722ed2f514db.tar.gz astro-325e8cba2d63eae909a8f6ca1f92722ed2f514db.tar.zst astro-325e8cba2d63eae909a8f6ca1f92722ed2f514db.zip |
Improve docs theme (#717)
* Revert "Revert "New getting started guide (#715)""
This reverts commit dc4ba25b01254ed1c2088c081e8c861172ae58a4.
* style: update docs theme
* style: implement feedback
* feat: remove FOUC
* Update docs/src/pages/404.astro
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
* Fix 404 title prop
* chore: implement feedback
* fix: ul, ol styles
* fix: center logo on mobile
* fix: improve navbar header contrast
* fix: improve logo overlap
* fix: `.nav-link` radius
* fix: small mobile tweaks
* feat: improve nav styles
* feat: improve embed styles
* fix: feedback items
* fix: make header sticky on mobile
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
Diffstat (limited to 'docs/src/components')
-rw-r--r-- | docs/src/components/SiteSidebar.astro | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/docs/src/components/SiteSidebar.astro b/docs/src/components/SiteSidebar.astro index 6d003d71d..7edfda514 100644 --- a/docs/src/components/SiteSidebar.astro +++ b/docs/src/components/SiteSidebar.astro @@ -23,25 +23,34 @@ const {currentPage} = Astro.props; <style> nav { - position: sticky; - min-height: calc(100vh - 3.5rem); - height: calc(100vh - 3.5rem); - top: 3.5rem; + width: 100%; + margin-right: 1rem; } .nav-groups { height: 100%; padding: 2rem 0; - overflow: auto; + overflow-x: visible; + overflow-y: auto; + max-height: 100vh; } .nav-groups > li + li { margin-top: 2rem; } + .nav-groups > :first-child { + padding-top: 2rem; + } + + .nav-groups > :last-child { + padding-bottom: 2rem; + margin-bottom: var(--theme-navbar-height); + } + .nav-group-title { font-size: 1.0rem; font-weight: 700; - padding: 0.1rem 2rem; + padding: 0.1rem 1rem; text-transform: uppercase; margin-bottom: 0.5rem; } @@ -49,7 +58,7 @@ const {currentPage} = Astro.props; .nav-link a { font-size: 1.0rem; margin: 1px; - padding: 0.3rem 2rem; + padding: 0.3rem 1rem; font: inherit; color: inherit; text-decoration: none; @@ -66,4 +75,25 @@ const {currentPage} = Astro.props; font-weight: 600; } -</style>
\ No newline at end of file + :global(:root.theme-dark) .nav-link.is-active a { + color: var(--color-white); + } + + @media (min-width: 60em) { + .nav-link a { + border-radius: 999px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .nav-groups { + padding: 0; + } + } + + @media (min-width: 86.25em) { + .nav-link a { + border-radius: 8px; + } + } + +</style> |