diff --git a/.eslintrc.json b/.eslintrc.json index 0e446b9..bc927c6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,6 +11,19 @@ }, "plugins": ["@typescript-eslint", "react"], "rules": { - "no-console": "warn" + "no-console": "warn", + "no-restricted-imports": [ + "error", + { + "name": "next/link", + "message": "Please import `@navigation` instead.", + "importNames": ["default"] + }, + { + "name": "next/navigation", + "message": "Please import `@navigation` instead.", + "importNames": ["redirect", "permanenRedirect", "useRouter", "useNavigation"] + } + ] } } diff --git a/messages/en.json b/messages/en.json new file mode 100644 index 0000000..ab89489 --- /dev/null +++ b/messages/en.json @@ -0,0 +1,6 @@ +{ + "HomePage": { + "title": "Hello world", + "about": "About page" + } +} diff --git a/next.config.mjs b/next.config.mjs index 23e3526..1a9794e 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -12,6 +12,7 @@ const nextConfig = { }, ], }, + trailingSlash: true, }; export default withNextIntl(nextConfig); diff --git a/package.json b/package.json index d6820f6..33c2e98 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ }, "resolutions": { "wrap-ansi": "7.0.0", - "string-width": "4.1.0" + "string-width": "4.1.0", + "@typescript-eslint/typescript-estree": "^5.59.2" } } diff --git a/public/assets/icons/ic_figma.svg b/public/assets/icons/ic_figma.svg new file mode 100644 index 0000000..e49d222 --- /dev/null +++ b/public/assets/icons/ic_figma.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/assets/icons/ic_golang.svg b/public/assets/icons/ic_golang.svg new file mode 100644 index 0000000..165c94b --- /dev/null +++ b/public/assets/icons/ic_golang.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/assets/icons/ic_hmc-full-dark.svg b/public/assets/icons/ic_hmc-full-dark.svg new file mode 100644 index 0000000..7df1ca3 --- /dev/null +++ b/public/assets/icons/ic_hmc-full-dark.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/public/assets/icons/ic_hmc-full.svg b/public/assets/icons/ic_hmc-full.svg new file mode 100644 index 0000000..73d9d0a --- /dev/null +++ b/public/assets/icons/ic_hmc-full.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/public/assets/icons/ic_instagram.svg b/public/assets/icons/ic_instagram.svg index 7362c4f..8be3255 100644 --- a/public/assets/icons/ic_instagram.svg +++ b/public/assets/icons/ic_instagram.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/public/assets/icons/ic_linkedin.svg b/public/assets/icons/ic_linkedin.svg new file mode 100644 index 0000000..7caf80f --- /dev/null +++ b/public/assets/icons/ic_linkedin.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/ic_python.svg b/public/assets/icons/ic_python.svg new file mode 100644 index 0000000..d741b1a --- /dev/null +++ b/public/assets/icons/ic_python.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/icons/ic_qoute.svg b/public/assets/icons/ic_qoute.svg new file mode 100644 index 0000000..1c99266 --- /dev/null +++ b/public/assets/icons/ic_qoute.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/ic_react.svg b/public/assets/icons/ic_react.svg new file mode 100644 index 0000000..96d61d8 --- /dev/null +++ b/public/assets/icons/ic_react.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/images/illustrations/about.webp b/public/assets/images/illustrations/about.webp new file mode 100644 index 0000000..04a7f7c Binary files /dev/null and b/public/assets/images/illustrations/about.webp differ diff --git a/public/assets/images/illustrations/classes.png b/public/assets/images/illustrations/classes.png new file mode 100644 index 0000000..04920ca Binary files /dev/null and b/public/assets/images/illustrations/classes.png differ diff --git a/public/assets/images/illustrations/discuss.png b/public/assets/images/illustrations/discuss.png new file mode 100644 index 0000000..2e7a050 Binary files /dev/null and b/public/assets/images/illustrations/discuss.png differ diff --git a/public/assets/images/illustrations/hero-section.png b/public/assets/images/illustrations/hero-section.png deleted file mode 100644 index 13c04cf..0000000 Binary files a/public/assets/images/illustrations/hero-section.png and /dev/null differ diff --git a/public/assets/images/illustrations/hero-section.webp b/public/assets/images/illustrations/hero-section.webp new file mode 100644 index 0000000..dc2cd8d Binary files /dev/null and b/public/assets/images/illustrations/hero-section.webp differ diff --git a/public/assets/images/illustrations/partnership.png b/public/assets/images/illustrations/partnership.png new file mode 100644 index 0000000..e36aafc Binary files /dev/null and b/public/assets/images/illustrations/partnership.png differ diff --git a/public/assets/images/illustrations/shape-about1.svg b/public/assets/images/illustrations/shape-about1.svg new file mode 100644 index 0000000..295db78 --- /dev/null +++ b/public/assets/images/illustrations/shape-about1.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/illustrations/shape-about2.svg b/public/assets/images/illustrations/shape-about2.svg new file mode 100644 index 0000000..d3bc159 --- /dev/null +++ b/public/assets/images/illustrations/shape-about2.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/illustrations/shape-overlay.svg b/public/assets/images/illustrations/shape-overlay.svg new file mode 100644 index 0000000..4afaf33 --- /dev/null +++ b/public/assets/images/illustrations/shape-overlay.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/assets/images/peoples/ades.webp b/public/assets/images/peoples/ades.webp new file mode 100644 index 0000000..5dc3d94 Binary files /dev/null and b/public/assets/images/peoples/ades.webp differ diff --git a/public/assets/images/peoples/afandy.webp b/public/assets/images/peoples/afandy.webp new file mode 100644 index 0000000..086a927 Binary files /dev/null and b/public/assets/images/peoples/afandy.webp differ diff --git a/public/assets/images/peoples/akwan.webp b/public/assets/images/peoples/akwan.webp new file mode 100644 index 0000000..ef01c18 Binary files /dev/null and b/public/assets/images/peoples/akwan.webp differ diff --git a/public/assets/images/peoples/alung.webp b/public/assets/images/peoples/alung.webp new file mode 100644 index 0000000..ec9b7d6 Binary files /dev/null and b/public/assets/images/peoples/alung.webp differ diff --git a/public/assets/images/peoples/anggi.webp b/public/assets/images/peoples/anggi.webp new file mode 100644 index 0000000..93570da Binary files /dev/null and b/public/assets/images/peoples/anggi.webp differ diff --git a/public/assets/images/peoples/cipta.webp b/public/assets/images/peoples/cipta.webp new file mode 100644 index 0000000..ad66c76 Binary files /dev/null and b/public/assets/images/peoples/cipta.webp differ diff --git a/public/assets/images/peoples/faldi.webp b/public/assets/images/peoples/faldi.webp new file mode 100644 index 0000000..8517e5b Binary files /dev/null and b/public/assets/images/peoples/faldi.webp differ diff --git a/public/assets/images/peoples/fendi.webp b/public/assets/images/peoples/fendi.webp new file mode 100644 index 0000000..b62955a Binary files /dev/null and b/public/assets/images/peoples/fendi.webp differ diff --git a/public/assets/images/peoples/nadya.webp b/public/assets/images/peoples/nadya.webp new file mode 100644 index 0000000..d51d96c Binary files /dev/null and b/public/assets/images/peoples/nadya.webp differ diff --git a/public/assets/images/peoples/vicky.webp b/public/assets/images/peoples/vicky.webp new file mode 100644 index 0000000..ba37c05 Binary files /dev/null and b/public/assets/images/peoples/vicky.webp differ diff --git a/public/assets/images/peoples/widya.webp b/public/assets/images/peoples/widya.webp new file mode 100644 index 0000000..fce3f94 Binary files /dev/null and b/public/assets/images/peoples/widya.webp differ diff --git a/public/assets/images/peoples/yaya.webp b/public/assets/images/peoples/yaya.webp new file mode 100644 index 0000000..e2f27a5 Binary files /dev/null and b/public/assets/images/peoples/yaya.webp differ diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx new file mode 100644 index 0000000..e08c782 --- /dev/null +++ b/src/app/[locale]/about/page.tsx @@ -0,0 +1,6 @@ +import AboutPage from "@/features/about"; + +const About = () => { + return ; +}; +export default About; diff --git a/src/app/[locale]/globals.css b/src/app/[locale]/globals.css index 8cbfcc1..45b94c1 100644 --- a/src/app/[locale]/globals.css +++ b/src/app/[locale]/globals.css @@ -6,6 +6,8 @@ :root { --hmc-primary: #0f3665; --hmc-primary-foreground: #fff; + --hmc-tertiary: #04bce9; + --hmc-tertiary-foreground: #fff; --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; --card: 0 0% 100%; @@ -36,6 +38,8 @@ .dark { --hmc-primary: #fff; --hmc-primary-foreground: #0f3665; + --hmc-tertiary: #fff; + --hmc-tertiary-foreground: #0f3665; --background: 222.2 84% 4.9%; --foreground: 210 40% 98%; --card: 222.2 84% 4.9%; diff --git a/src/app/page.tsx b/src/app/page.tsx index 77d15e3..da7881c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,4 +1,4 @@ -import { redirect } from "next/navigation"; +import { redirect } from "@/lib/navigation"; export default function RootPage() { redirect("/en"); diff --git a/src/components/common/footer/Footer.tsx b/src/components/common/footer/Footer.tsx new file mode 100644 index 0000000..a14392f --- /dev/null +++ b/src/components/common/footer/Footer.tsx @@ -0,0 +1,75 @@ +import React from "react"; +import { dataFooter } from "./constants"; +import { Link } from "@/lib/navigation"; +import Image from "next/image"; +import { Button } from "@/components/ui/button"; + +const Footer = () => { + const date = new Date(); + const { resource, social_media, contact } = dataFooter; + return ( + <> +
+
+
+ hammercode-logo + + {/* Resources */} +
+

{resource.title}

+
+ {resource.data.map((data) => ( + + {data.name} + + ))} +
+
+ + {/* Social Media */} +
+

{social_media.title}

+
+ {social_media.data.map((data) => ( + + {data.name} + + ))} +
+
+ + {/* Contact */} +
+

{contact.title}

+
+ {contact.data.map((data) => ( + + ))} +
+
+
+
+
+ + + ); +}; + +export default Footer; diff --git a/src/components/common/footer/constants.ts b/src/components/common/footer/constants.ts new file mode 100644 index 0000000..83c66c2 --- /dev/null +++ b/src/components/common/footer/constants.ts @@ -0,0 +1,55 @@ +import { FooterType } from "./types"; + +export const dataFooter: FooterType = { + resource: { + title: "Resources", + data: [ + { + name: "Home", + navigate_url: "/", + }, + { + name: "About Us", + navigate_url: "/about", + }, + ], + }, + social_media: { + title: "Let's Join", + data: [ + { + name: "Discord", + navigate_url: "https://discord.com/invite/M9mNK6MBbu", + }, + { + name: "Instagram", + navigate_url: "https://instagram.com/hmrcode", + }, + { + name: "Linkedin", + navigate_url: "https://www.linkedin.com/company/hammercode", + }, + { + name: "Github", + navigate_url: "https://github.com/hammer-code", + }, + ], + }, + contact: { + title: "Contact", + data: [ + { + value: "6281355893352", + navigate_url: "https://wa.me/6281355893352", + }, + { + value: "hammercode28@gmail.com", + navigate_url: "hammercode28@gmail.com", + }, + { + value: "Jl. Lagarutu No. 28, Tanamodindi, Palu", + navigate_url: undefined, + }, + ], + }, +}; diff --git a/src/components/common/footer/types.ts b/src/components/common/footer/types.ts new file mode 100644 index 0000000..49e726f --- /dev/null +++ b/src/components/common/footer/types.ts @@ -0,0 +1,24 @@ +type Resource = { + name: string; + navigate_url: string; +}; + +type Contact = { + value: string; + navigate_url?: string; +}; + +export type FooterType = { + resource: { + title: string; + data: Resource[]; + }; + social_media: { + title: string; + data: Resource[]; + }; + contact: { + title: string; + data: Contact[]; + }; +}; diff --git a/src/components/common/mode-toggle/index.tsx b/src/components/common/mode-toggle/index.tsx index f9091bc..ab0d340 100644 --- a/src/components/common/mode-toggle/index.tsx +++ b/src/components/common/mode-toggle/index.tsx @@ -1,34 +1,25 @@ -"use client"; - import * as React from "react"; import { Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; import { Button } from "@/components/ui/button"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; export function ModeToggle() { - const { setTheme } = useTheme(); + const { theme, setTheme } = useTheme(); + + const handleSetTheme = () => { + if (theme === "light") { + setTheme("dark"); + } else { + setTheme("light"); + } + }; return ( - - - - - - setTheme("light")}>Light - setTheme("dark")}>Dark - setTheme("system")}>System - - + ); } diff --git a/src/components/common/navbar/constant.ts b/src/components/common/navbar/constant.ts index 35c0f6f..ea7c658 100644 --- a/src/components/common/navbar/constant.ts +++ b/src/components/common/navbar/constant.ts @@ -10,8 +10,8 @@ export const LINK: NavbarListProps[] = [ id: "2", href: "/events", }, - { - id: "3", - href: "/contact", - }, + // { + // id: "3", + // href: "/contact", + // }, ]; diff --git a/src/components/common/navbar/index.tsx b/src/components/common/navbar/index.tsx index b8301df..c2e758d 100644 --- a/src/components/common/navbar/index.tsx +++ b/src/components/common/navbar/index.tsx @@ -1,4 +1,4 @@ -import Link from "next/link"; +import { Link } from "@/lib/navigation"; import NavbarList from "./NavbarList"; import { ModeToggle } from "../mode-toggle"; @@ -9,14 +9,14 @@ import { LINK } from "./constant"; const Navbar = () => { const t = useTranslations("Layout"); return ( -
+
-