Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First crack at mobile-friendly subnav #37

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions frontend/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface NavProps {

export function Nav(props: NavProps) {
return (
<nav class="mt-3 border-b border-jsr-cyan-300/30 flex gap-1 flex-col md:flex-row md:max-w-full md:overflow-auto">
<nav class="mt-3 border-b gap-1 border-jsr-cyan-300/30 flex flex-wrap md:flex-nowrap flex-row max-w-full overflow-auto items-end">
{props.children}
</nav>
);
Expand All @@ -22,10 +22,8 @@ export interface NavItemProps {
export function NavItem(props: NavItemProps) {
return (
<a
class={`md:px-4 px-2 py-2 text-sm md:text-base leading-none rounded-t-md md:hover:bg-jsr-cyan-100 md:hover:border-b-2 ${
props.active
? "bg-jsr-cyan-200 md:bg-transparent border-b-2 border-jsr-cyan-700"
: "border-jsr-cyan-400"
class={`md:px-3 px-2 py-2 text-sm md:text-base min-h-10 leading-none rounded-none hover:bg-jsr-cyan-100 flex items-center ${
props.active ? "bg-jsr-cyan-100 font-semibold" : ""
}`}
href={props.href}
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,4 @@ body .ddoc .usage nav label {
--base-text-weight-semibold: 500;
--bgColor-muted: theme(colors.slate.50);
}
}
}
Loading