diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index e409339..db8bc91 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -207,6 +207,12 @@ export default function Navbar({ onSignIn, onRegister, onSearch }) { // The section bar is wanted when you decide to go elsewhere and in the way // every other moment, so it leaves on the way down and returns on the way up. const sectionBarHidden = useHidingBar() + // Bringing the bar back without scrolling for it. The row hides while you + // read, which is right, but the only way to see it again was to scroll up — + // no use to a reader who is looking for the way out of the page they are on + // rather than the way back up it. Hovering the logo peeks it back; leaving + // the header lets it go again. + const [peek, setPeek] = useState(false) // Registered by the quiz player while it is on screen without a rail. const sessionDrawer = useSessionDrawer() const [jobs, setJobs] = useState([]) @@ -270,12 +276,13 @@ export default function Navbar({ onSignIn, onRegister, onSearch }) { ] : [] return ( -
+
setPeek(false)}> {/* Two bars, as on a reference site: who you are and what you are looking for stays put; where you are going gets out of the way while you read. */}
- setMenuOpen(false)}>🏥 PedsHub + setMenuOpen(false)} + onMouseEnter={() => setPeek(true)} onFocus={() => setPeek(true)}>🏥 PedsHub {user && } {user ? ( @@ -333,7 +340,7 @@ export default function Navbar({ onSignIn, onRegister, onSearch }) { {user && !inSession && ( /* Focus-within keeps it open for a keyboard user tabbing into links that are visually gone. */ -
+
window.location.reload()} /> {/* The bar used to hide its scrollbar and fade the right edge, diff --git a/frontend/src/index.css b/frontend/src/index.css index 1bcdbe1..0203e6f 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -320,6 +320,28 @@ html, body { overflow-x: hidden; } .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); } [data-theme="minimal"] .form-group input:focus { box-shadow: 0 0 0 2px #09090b18; } +/* The same two controls outside a .form-group wrapper. Four pages — articles, + flashcards, the article editor, the category tree — write `.form-label` and + `.input` directly, and neither class was defined anywhere, so a label fell + back to inline and sat flush against an unbordered box: "Titlee.g. Febrile + seizures". Defined here rather than fixed on one page, because the classes + were always meant to be the standalone form of the rules above, and a form + should not look different for having no wrapper around it. */ +.form-label { + display: block; font-weight: 500; margin-bottom: 6px; + font-size: 0.85rem; color: var(--text-muted); +} +.form-label + .input, .form-label + textarea.input { margin-bottom: 12px; } +.input { + width: 100%; padding: 9px 13px; + border: 1px solid var(--border); border-radius: 8px; + font-size: 0.9rem; background: var(--input-bg); color: var(--text); + font-family: inherit; +} +[data-theme="minimal"] .input { border-radius: 6px; } +.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); } +[data-theme="minimal"] .input:focus { box-shadow: 0 0 0 2px #09090b18; } + /* ── Question card (quiz-taking) ────────────────────────────── */ .question-card { background: var(--card-bg);