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

create 404 page #118

Merged
merged 2 commits into from
Nov 12, 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
42 changes: 41 additions & 1 deletion src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
import Image from "next/image";
import Button from "@/components/Button";
import Logo from "@/public/Footer.webp";
import Link from "next/link";
import { links } from "@/data/Footer";

const NotFound = () => {
return <div>404 Page Not Found</div>;
return (
<div className="flex h-[820px] w-full flex-col items-center justify-center bg-gradient-to-b from-hlg-dark-gray via-hlg-dark-gray to-hlg-red-200">
<Image
src={Logo}
alt="Highlander Gloves Logo"
className="absolute left-8 size-[620px] translate-y-20 transform items-end"
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to use % values for size?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when I try using %, it makes the photo compressed

Copy link
Contributor

Choose a reason for hiding this comment

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

ok np

/>
<div className="flex flex-col items-center justify-center pt-20">
<div className="relative flex items-center justify-center rounded-3xl bg-hlg-red-200 px-28 py-8 text-3xl">
<p className="absolute translate-x-2 translate-y-2 self-center font-archivo-black text-9xl text-black">
404
</p>
<p className="relative font-archivo-black text-9xl">404</p>
</div>
<p className="relative pb-10 pt-4 font-archivo-narrow text-[8.125rem]">
Page Not Found
</p>
<div className="relative">
<Button txt="Back To Home" link="/" />
</div>
</div>
<div className="m-auto mb-0 mr-5 flex items-end gap-4 p-4 pr-0 text-black">
{links.map((link, index) => (
<Link
key={index}
href={link.link}
target="_blank"
className="text-4xl"
>
{link.icon}
</Link>
))}
</div>
</div>
);
};

export default NotFound;
32 changes: 24 additions & 8 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
"use client";
import Link from "next/link";
import Image from "next/image";
import { links } from "@/data/Footer";
import logo from "@/public/Footer.webp";
import { usePathname } from "next/navigation";

const Footer = () => {
const pathname = usePathname();
const paths = [
"/",
"/about",
"/events",
"/fight-team",
"/board",
"/board",
"/gallery",
"news",
];
if (!paths.includes(pathname)) {
return null;
}
return (
<div className="relative flex h-[186px] flex-row overflow-hidden bg-gradient-to-b from-black to-hlg-red-200 font-archivo-black md:h-[375px]">
{/* Information Text */}
Expand All @@ -14,29 +30,29 @@ const Footer = () => {
</div>
<div className="absolute z-50 m-auto ml-[46%] mt-[5.65%] flex flex-col text-right font-anton text-[12px] text-[#B5B5B5] text-shadow-footerMobile md:ml-[66%] md:mt-[5%] md:text-2xl md:text-shadow">
<p className="md:text-5xl">CONTACT INFORMATION</p>
<p className="pt-2 md:pt-[6%]">2060 Chicago Avenue A23</p>
<p className="pt-1 md:pt-[3%]">Riverside, CA 92507</p>
<p className="pt-1 md:pt-[3%]">United States</p>
<p className="pt-1 md:pt-[3%]">email: [email protected]</p>
<p className="pt-[6%]">2060 Chicago Avenue A23</p>
<p className="pt-[3%]">Riverside, CA 92507</p>
<p className="pt-[3%]">United States</p>
<p className="pt-[3%]">email: [email protected]</p>
</div>

{/* Logo Backdrop */}
<div className="absolute md:static">
<div className="absolute-bottom">
<Image
src={logo}
alt="footer-logo"
className="relative mt-[15%] h-[45%] w-[45%] object-contain md:left-[-40%] md:top-[22%] md:mt-0 md:h-[115%] md:w-[115%]"
className="relative left-[-40%] top-[22%] h-[115%] w-[115%] object-contain"
/>
</div>

{/* Links */}
<div className="m-auto mb-0 mr-3 flex items-end gap-2 p-4 pr-0 transition-transform duration-300 hover:-translate-y-1 md:mr-5 md:gap-4">
<div className="m-auto mb-0 mr-5 flex items-end gap-4 p-4 pr-0">
{links.map((link, index) => (
<Link
key={index}
href={link.link}
target="_blank"
className="text-3xl md:text-4xl"
className="text-4xl"
>
{link.icon}
</Link>
Expand Down
Loading