Skip to content

Commit

Permalink
🖊️ Improve UX for small viewports (#438)
Browse files Browse the repository at this point in the history
* fix: disable wrapping of navbar, disable shrinkage

* fix: use sticky rather than fixed

This allows us to scroll

* chore: add changeset
  • Loading branch information
agoose77 authored Aug 1, 2024
1 parent 61e24ac commit cdddd32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-jars-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@myst-theme/site': patch
---

Improve navbar UX for small viewports
6 changes: 3 additions & 3 deletions packages/site/src/components/Navigation/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export function TopNav({ hideToc }: { hideToc?: boolean }) {
const { title, nav, actions } = config ?? {};
const { logo, logo_dark, logo_text } = config?.options ?? {};
return (
<div className="bg-white/80 backdrop-blur dark:bg-stone-900/80 shadow dark:shadow-stone-700 p-3 md:px-8 fixed w-screen top-0 z-30 h-[60px]">
<nav className="flex items-center justify-between flex-wrap max-w-[1440px] mx-auto">
<div className="flex flex-row xl:min-w-[19.5rem] mr-2 sm:mr-7 justify-start items-center">
<div className="bg-white/80 backdrop-blur dark:bg-stone-900/80 shadow dark:shadow-stone-700 p-3 md:px-8 sticky w-screen top-0 z-30 h-[60px]">
<nav className="flex items-center justify-between flex-nowrap max-w-[1440px] mx-auto">
<div className="flex flex-row xl:min-w-[19.5rem] mr-2 sm:mr-7 justify-start items-center shrink-0">
{!hideToc && (
<div className="block xl:hidden">
<button
Expand Down

0 comments on commit cdddd32

Please sign in to comment.