mhsf-dev/apps/www/src/components/feat/footer/footer.tsx

114 lines
5.0 KiB
TypeScript
Raw Normal View History

2025-04-29 19:00:26 -05:00
"use client";
2025-04-04 21:10:56 -05:00
import { BrandingGenericIcon, Discord } from "../icons/branding-icons";
2025-03-02 18:28:20 -06:00
import { Link } from "../../util/link";
import { FooterStatus } from "./status";
2025-04-04 21:10:50 -05:00
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
2025-04-04 21:10:56 -05:00
import { Button } from "@/components/ui/button";
import Github from "@/components/ui/github";
import Image from "next/image"
2025-04-21 23:25:26 -05:00
import { usePathname } from "next/navigation";
2025-04-29 19:00:26 -05:00
const hideFooterPages = ["/home"]
2025-03-02 18:28:20 -06:00
export function Footer() {
2025-04-21 23:25:26 -05:00
const pathname = usePathname();
2025-04-29 19:00:26 -05:00
2025-04-21 23:25:26 -05:00
if (!hideFooterPages.includes(pathname ?? ""))
return (
<footer className="w-full mt-15 border-t border-neutral-500/20 bg-neutral-100 dark:border-neutral-700/50 dark:bg-neutral-900 text-muted-foreground">
<div className="flex justify-between items-start p-[20px]">
<span className="flex items-center gap-4">
<Link href="Special:Root">
<BrandingGenericIcon className="max-w-[32px] max-h-[32px]" />
</Link>
<ul className="grid grid-cols-2 md:flex gap-4 p-0 m-0 w-full md:items-center items-start list-none">
<li className="text-sm">
<Link
href="/home"
className="text-muted-foreground hover:text-shadcn-primary transition-colors"
>
Home
</Link>
</li>
<li className="text-sm">
<Link
href="/servers"
className="text-muted-foreground hover:text-shadcn-primary transition-colors"
>
Servers
</Link>
</li>
<li className="text-sm">
<Link
href="/support"
className="text-muted-foreground hover:text-shadcn-primary transition-colors"
>
Contact
</Link>
</li>
</ul>
</span>
<div className="block">
<div className="flex items-center mb-2 justify-end gap-2">
2025-04-04 21:10:50 -05:00
2025-04-21 23:25:26 -05:00
<DropdownMenu>
2025-04-29 19:00:26 -05:00
<DropdownMenuTrigger asChild>
2025-04-21 23:25:26 -05:00
<Button variant="tertiary" size="square-md" className="flex items-center">
<Discord className="w-[1.25em] h-[1.25em]" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
2025-05-04 22:43:15 -05:00
<Link href="https://t.mhsf.app/d/m" noextraicons>
2025-04-21 23:25:26 -05:00
<DropdownMenuItem className="py-2 flex items-center gap-2">
<Image className="max-w-[30px] max-h-[30px] rounded border border-muted-foreground" src="https://avatars.githubusercontent.com/u/16529253?s=200&v=4" alt="Minehut" width={30} height={30} />
<span className="block">
Minehut Discord
<small className="flex">Not officially owned by MHSF, however conversations about MHSF and related take place there.</small>
</span>
</DropdownMenuItem>
</Link>
2025-05-04 22:43:15 -05:00
<Link href="https://t.mhsf.app/d/u" noextraicons>
2025-04-21 23:25:26 -05:00
<DropdownMenuItem className="py-2 flex items-center gap-2">
<BrandingGenericIcon className="max-w-[30px] max-h-[30px] rounded border border-muted-foreground" width={30} height={30} />
<span className="block">
MHSF Discord
<small className="flex">A read-only server for updates related to MHSF.</small>
</span>
</DropdownMenuItem>
</Link>
</DropdownMenuContent>
</DropdownMenu>
2025-05-04 22:43:15 -05:00
<Link href="https://github.com/DeveloLongScript/MHSF" noextraicons>
2025-04-04 21:10:56 -05:00
<Button variant="tertiary" size="square-md" className="flex items-center">
2025-04-21 23:25:26 -05:00
<Github className="w-[1.25em] h-[1.25em]" />
2025-04-04 21:10:56 -05:00
</Button>
2025-04-21 23:25:26 -05:00
</Link>
2025-04-04 21:10:56 -05:00
2025-04-21 23:25:26 -05:00
</div>
<FooterStatus />
2025-04-04 21:10:56 -05:00
2025-04-21 23:25:26 -05:00
</div>
2025-04-04 21:10:56 -05:00
</div>
2025-05-04 22:43:15 -05:00
<span className="block px-4 lg:-translate-y-12">
2025-04-21 23:25:26 -05:00
<small className="text-[0.75rem]">
MHSF is an open-source project licensed under the MIT license. MHSF is
not officially affiliated with with Minehut, Super League Enterprise,
or GamerSafer in any way. <br className="spacing-3" />
Spamming, abusing or misusing the Minehut API and/or MHSF will get
your IP blocked, we are not responsible for IP blocks.{" "}
<strong>You have been warned.</strong>
<br className="spacing-3" />
If you're worried, please review the{" "}
<Link href="https://support.minehut.com/hc/en-us/articles/27075816947731-Minehut-Rules">
Rules
</Link>
, <Link href="https://minehut.com/terms-of-service">ToS</Link> &{" "}
<Link href="https://t.mhsf.app/pr">Platform Rules</Link>.
</small>
</span>
</footer>
);
return null;
2025-03-02 18:28:20 -06:00
}