Skip to content

Commit

Permalink
feat: header reorganisation (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
jog1t committed Sep 26, 2024
1 parent 2fadb14 commit 8982218
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
3 changes: 3 additions & 0 deletions apps/hub/public/icon-white-borderless.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 18 additions & 10 deletions apps/hub/src/components/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useAuth } from "@/domains/auth/contexts/auth";
import {
AssetImage,
Button,
Flex,
Sheet,
Expand All @@ -11,7 +10,6 @@ import { Icon, faBars } from "@rivet-gg/icons";
import { Link } from "@tanstack/react-router";
import { Breadcrumbs } from "../breadcrumbs/breadcrumbs";
import { MobileBreadcrumbs } from "../breadcrumbs/mobile-breadcrumbs";
import { CommandPanel } from "../command-panel";
import { HeaderRouteLoader } from "./header-route-loader";
import { HeaderSubNav } from "./header-sub-nav";
import { MobileHeaderSubNav } from "./mobile-header-sub-nav";
Expand Down Expand Up @@ -60,9 +58,9 @@ export function Header() {
href="/"
className="flex items-center gap-2 text-lg font-semibold"
>
<AssetImage
<img
className="h-6"
src="/logo/icon-white.svg"
src="/icon-white-borderless.svg"
alt="Rivet logo"
/>
</Link>
Expand All @@ -71,6 +69,9 @@ export function Header() {
</Flex>
</div>
<Flex direction="col" justify="end" gap="6">
<NavItem asChild>
<Link search={{ modal: "feedback" }}>Feedback</Link>
</NavItem>
<NavItem asChild>
<a
href="https://rivet.gg/changelog"
Expand Down Expand Up @@ -104,19 +105,17 @@ export function Header() {
</Sheet>
<nav className="flex-1 font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6">
<Link to="/">
<AssetImage
className="h-8"
alt="Rivet Logo"
src="/logo/icon-white.svg"
<img
className="h-6"
src="/icon-white-borderless.svg"
alt="Rivet logo"
/>
</Link>
<div className="hidden md:flex">
<Breadcrumbs />
</div>
</nav>
<div className="gap-6 font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm">
<CommandPanel />

<NavItem
asChild
className="hidden md:inline-block border px-4 py-2 rounded-md"
Expand All @@ -132,6 +131,15 @@ export function Header() {
Changelog
</a>
</NavItem>
<NavItem asChild className="hidden md:inline-block">
<a
href="https://rivet.gg/support"
target="_blank"
rel="noreferrer"
>
Help
</a>
</NavItem>
<NavItem asChild className="hidden md:inline-block">
<a href="https://rivet.gg/docs" target="_blank" rel="noreferrer">
Docs
Expand Down
18 changes: 11 additions & 7 deletions apps/hub/src/layouts/root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CommandPanel } from "@/components/command-panel";
import { NavItem } from "@/components/header/nav-item";
import { AssetImage, cn } from "@rivet-gg/components";
import { cn } from "@rivet-gg/components";
import { Icon, faDiscord, faGithub, faXTwitter } from "@rivet-gg/icons";
import { useMatches } from "@tanstack/react-router";
import type { ReactNode } from "react";
Expand Down Expand Up @@ -39,12 +40,12 @@ const Footer = () => {
<footer className="text-muted-foreground bg-background p-4 text-center text-sm border-t mt-8">
<div className="container">
<div className="flex items-center justify-between">
<div className="flex gap-4 items-center">
<div className="flex gap-4 items-center justify-between w-full lg:w-auto lg:justify-normal">
<div className="flex gap-4 items-center">
<AssetImage
src="/logo/icon-white.svg"
<img
src="/icon-white-borderless.svg"
alt="Rivet"
className="h-8"
className="h-6"
/>
&copy; {new Date().getFullYear()}
</div>
Expand All @@ -58,8 +59,11 @@ const Footer = () => {
All services are online
</a>
</div>
<div>
<CommandPanel />
</div>
</div>
<div className="flex items-center justify-between mt-8 mb-4">
<div className="flex flex-col lg:flex-row items-center justify-between mt-4 gap-4 lg:gap-0 lg:mt-8 mb-4">
<div className="text-base flex items-center gap-4">
<NavItem
href="https://rivet.gg/discord"
Expand All @@ -83,7 +87,7 @@ const Footer = () => {
<Icon icon={faXTwitter} />
</NavItem>
</div>
<div className="flex items-center gap-8">
<div className="flex items-center flex-wrap justify-between lg:justify-normal w-full lg:w-auto gap-4 lg:gap-8">
<NavItem href="https://rivet.gg" target="_blank" rel="noreferrer">
Home
</NavItem>
Expand Down

0 comments on commit 8982218

Please sign in to comment.