Skip to content

Commit

Permalink
style: Added that you can see on the bottom bar where you are
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed Jan 13, 2024
1 parent d8925c1 commit 138af8c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 35 deletions.
66 changes: 34 additions & 32 deletions apps/web/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface LayoutProps {
title?: string;
children: React.ReactNode;
classNameShareButton?: string;
page?: "home" | "locationsettings" | "settings" | "contact";
}

/* If you use this component,
Expand All @@ -24,6 +25,7 @@ const Layout: React.FC<LayoutProps> = ({
title,
children,
classNameShareButton,
page,
}) => {
const [navbarOpen, setNavbarOpen] = useState(false);

Expand Down Expand Up @@ -135,51 +137,51 @@ const Layout: React.FC<LayoutProps> = ({
<div className="mx-auto grid h-full max-w-lg grid-cols-4 font-medium">
<Link
href="/home"
className="group inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800"
className={cn(
"inline-flex flex-col items-center justify-center px-5 text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-500",
{
"text-blue-600 dark:text-blue-500": page === "home",
},
)}
>
<AiFillHome
className="mb-2 h-7 w-7 text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500"
aria-hidden="true"
/>
<span className="text-sm text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500">
{translation("menu home")}
</span>
<AiFillHome className="mb-2 h-7 w-7" aria-hidden="true" />
<span className="text-sm">{translation("menu home")}</span>
</Link>
<Link
href="/locationsettings"
className="group inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800"
className={cn(
"inline-flex flex-col items-center justify-center px-5 text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-500",
{
"text-blue-600 dark:text-blue-500": page === "locationsettings",
},
)}
>
<FaMapMarkedAlt
className="mb-2 h-7 w-7 text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500"
aria-hidden="true"
/>
<span className="text-sm text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500">
{translation("menu locations")}
</span>
<FaMapMarkedAlt className="mb-2 h-7 w-7" aria-hidden="true" />
<span className="text-sm">{translation("menu locations")}</span>
</Link>
<Link
href="/settings"
className="group inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800"
className={cn(
"inline-flex flex-col items-center justify-center px-5 text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-500",
{
"text-blue-600 dark:text-blue-500": page === "settings",
},
)}
>
<IoIosSettings
className="mb-2 h-7 w-7 text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500"
aria-hidden="true"
/>
<span className="text-sm text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500">
{translation("menu settings")}
</span>
<IoIosSettings className="mb-2 h-7 w-7 " aria-hidden="true" />
<span className="text-sm">{translation("menu settings")}</span>
</Link>
<Link
href="/contact"
className="group inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800"
className={cn(
"inline-flex flex-col items-center justify-center px-5 text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-500",
{
"text-blue-600 dark:text-blue-500": page === "contact",
},
)}
>
<IoMdContact
className="mb-2 h-7 w-7 text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500"
aria-hidden="true"
/>
<span className="text-sm text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500">
{translation("menu contact")}
</span>
<IoMdContact className="mb-2 h-7 w-7" aria-hidden="true" />
<span className="text-sm">{translation("menu contact")}</span>
</Link>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/pages/contact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const ContactUs = () => {
<Layout
title={translationCommon("menu contact")}
classNameShareButton="mt-24 md:mt-28"
page="contact"
>
<div className="flex w-full flex-col items-center">
<h1 className="mt-10 flex justify-center text-4xl font-bold">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const InternalHome = observer(() => {
];

return (
<Layout classNameShareButton="mt-44">
<Layout classNameShareButton="mt-44" page="home">
<div className="mt-24 flex flex-col items-center">
<h1 className="text-center text-4xl sm:text-5xl md:text-7xl">
{activeCity$.name.get()}
Expand Down
5 changes: 4 additions & 1 deletion apps/web/src/pages/locationsettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ const LocationSettings = observer(() => {

return (
<>
<Layout title={translationCommon("menu locations")}>
<Layout
title={translationCommon("menu locations")}
page="locationsettings"
>
<div className="flex w-full flex-col items-center">
<h1 className="mt-10 flex justify-center text-4xl font-bold">
{translationCommon("menu locations")}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Settings = observer(() => {

return (
<>
<Layout title={translationCommon("menu settings")}>
<Layout title={translationCommon("menu settings")} page="settings">
<div className="flex w-full flex-col items-center">
<h1 className="mt-10 flex justify-center text-4xl font-bold">
{translationCommon("menu settings")}
Expand Down

1 comment on commit 138af8c

@vercel
Copy link

@vercel vercel bot commented on 138af8c Jan 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.