From 6539d9bbda5c8c82c997b64126572bb3f03f4320 Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Sat, 11 May 2024 22:12:49 +0700 Subject: [PATCH 1/7] feat: add hero section --- src/apps/home/default.tsx | 11 +++++++++++ src/apps/home/modules/hero.tsx | 15 +++++++++++++++ src/apps/home/modules/homepage.tsx | 7 ------- src/apps/home/modules/index.ts | 3 ++- src/apps/main.tsx | 4 ++-- 5 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 src/apps/home/modules/hero.tsx delete mode 100644 src/apps/home/modules/homepage.tsx diff --git a/src/apps/home/default.tsx b/src/apps/home/default.tsx index e69de29..cf7f0e2 100644 --- a/src/apps/home/default.tsx +++ b/src/apps/home/default.tsx @@ -0,0 +1,11 @@ +import { Navbar } from "@/components"; +import { Hero } from "./modules"; + +export const LandingPage = () => { + return ( + <> + <Navbar /> + <Hero /> + </> + ); +}; diff --git a/src/apps/home/modules/hero.tsx b/src/apps/home/modules/hero.tsx new file mode 100644 index 0000000..3d4898e --- /dev/null +++ b/src/apps/home/modules/hero.tsx @@ -0,0 +1,15 @@ +export const Hero = () => { + return ( + <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16"> + <div className="w-1/2"> + <h2 className="font-bold text-4xl mb-3">GLORY HIMATIF</h2> + <p>Welcome to Himpunan Mahasiswa Teknik Informatika</p> + <p className="mb-6">Universitas Islam Nusantara</p> + <button className="bg-blue-900 py-1 px-3 text-center text-white font-semibold rounded">Masuk</button> + </div> + <div className="w-1/2 flex justify-end"> + <img src="/Logo.png" className="w-[400px]" alt="Himatif" /> + </div> + </section> + ) +} \ No newline at end of file diff --git a/src/apps/home/modules/homepage.tsx b/src/apps/home/modules/homepage.tsx deleted file mode 100644 index 449ac3c..0000000 --- a/src/apps/home/modules/homepage.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import {Navbar} from "@/components/organisms/navbar/navbar"; - -export const Homepage = () => { - return ( - <Navbar/> - ) -} \ No newline at end of file diff --git a/src/apps/home/modules/index.ts b/src/apps/home/modules/index.ts index 4d44a6a..0406610 100644 --- a/src/apps/home/modules/index.ts +++ b/src/apps/home/modules/index.ts @@ -1 +1,2 @@ -export * from "./homepage" \ No newline at end of file + +export * from "./hero" \ No newline at end of file diff --git a/src/apps/main.tsx b/src/apps/main.tsx index af0a45b..9d230ee 100644 --- a/src/apps/main.tsx +++ b/src/apps/main.tsx @@ -1,11 +1,11 @@ import { createBrowserRouter, } from "react-router-dom"; -import { Homepage } from "./home/modules/homepage"; +import { LandingPage } from "./home/default"; export const router = createBrowserRouter([ { path: "/", - element: <Homepage/>, + element: <LandingPage/>, }, ]); \ No newline at end of file From d3391e72572187b57e585d340c42dc8e20a4bd21 Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Mon, 13 May 2024 13:41:10 +0700 Subject: [PATCH 2/7] fix: hero section --- src/apps/home/default.tsx | 3 ++- src/apps/home/modules/hero.tsx | 34 +++++++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/apps/home/default.tsx b/src/apps/home/default.tsx index cf7f0e2..42b23f6 100644 --- a/src/apps/home/default.tsx +++ b/src/apps/home/default.tsx @@ -1,7 +1,8 @@ import { Navbar } from "@/components"; import { Hero } from "./modules"; +import { FC, ReactElement } from "react"; -export const LandingPage = () => { +export const LandingPage: FC = (): ReactElement => { return ( <> <Navbar /> diff --git a/src/apps/home/modules/hero.tsx b/src/apps/home/modules/hero.tsx index 3d4898e..28c0fae 100644 --- a/src/apps/home/modules/hero.tsx +++ b/src/apps/home/modules/hero.tsx @@ -1,15 +1,19 @@ -export const Hero = () => { - return ( - <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16"> - <div className="w-1/2"> - <h2 className="font-bold text-4xl mb-3">GLORY HIMATIF</h2> - <p>Welcome to Himpunan Mahasiswa Teknik Informatika</p> - <p className="mb-6">Universitas Islam Nusantara</p> - <button className="bg-blue-900 py-1 px-3 text-center text-white font-semibold rounded">Masuk</button> - </div> - <div className="w-1/2 flex justify-end"> - <img src="/Logo.png" className="w-[400px]" alt="Himatif" /> - </div> - </section> - ) -} \ No newline at end of file +import { FC, ReactElement } from "react"; + +export const Hero: FC = (): ReactElement => { + return ( + <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16"> + <div className="w-1/2"> + <h2 className="font-bold text-4xl mb-3">GLORY HIMATIF</h2> + <p>Welcome to Himpunan Mahasiswa Teknik Informatika</p> + <p className="mb-6">Universitas Islam Nusantara</p> + <button className="bg-blue-900 py-1 px-3 text-center text-white font-semibold rounded"> + Masuk + </button> + </div> + <div className="w-1/2 flex justify-end"> + <img src="/Logo.png" className="w-[400px]" alt="Himatif" /> + </div> + </section> + ); +}; From 0377f97d202ccc93a6115210815491d5e108df7f Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Fri, 17 May 2024 22:17:40 +0700 Subject: [PATCH 3/7] fix hero section --- bun.lockb | Bin 204356 -> 204356 bytes src/apps/home/default.tsx | 12 ++++++++++++ src/apps/home/modules/about.tsx | 9 +++++++++ src/apps/home/modules/hero.tsx | 19 +++++++++++++++++++ src/apps/home/modules/homepage.tsx | 12 ------------ src/apps/home/modules/index.ts | 2 +- src/apps/main.tsx | 10 ++++++---- src/components/atoms/button/button.test.tsx | 10 ---------- src/components/atoms/button/button.tsx | 18 ------------------ src/components/atoms/button/index.ts | 1 - src/components/atoms/button/types.ts | 6 ------ src/components/organisms/navbar/navbar.tsx | 8 +++++--- src/pages/index.ts | 1 + 13 files changed, 53 insertions(+), 55 deletions(-) create mode 100644 src/apps/home/modules/about.tsx create mode 100644 src/apps/home/modules/hero.tsx delete mode 100644 src/apps/home/modules/homepage.tsx delete mode 100644 src/components/atoms/button/button.test.tsx delete mode 100644 src/components/atoms/button/button.tsx delete mode 100644 src/components/atoms/button/index.ts delete mode 100644 src/components/atoms/button/types.ts create mode 100644 src/pages/index.ts diff --git a/bun.lockb b/bun.lockb index b47d170343e0dec94455e6b4628bf7ca9e37b68d..226c4a15e3f20ef0a5450b85c92f1f1aef43afc3 100755 GIT binary patch delta 32 ncmX@Ihvo`x32Elm899E@>BCVB>X2JPaKOxwjJnRQtKtqTZR delta 32 jcmX@Ihvo`x32Elm89983%l&@L{?v|U`1S(g<6mxl)1 diff --git a/src/apps/home/default.tsx b/src/apps/home/default.tsx index e69de29..b6fc3bc 100644 --- a/src/apps/home/default.tsx +++ b/src/apps/home/default.tsx @@ -0,0 +1,12 @@ +import { Navbar } from "@/components"; +import { FC, ReactElement } from "react"; +import { Hero } from "./modules"; + +export const LandingPage: FC = (): ReactElement => { + return ( + <> + <Navbar/> + <Hero/> + </> + ) +} \ No newline at end of file diff --git a/src/apps/home/modules/about.tsx b/src/apps/home/modules/about.tsx new file mode 100644 index 0000000..d92e70c --- /dev/null +++ b/src/apps/home/modules/about.tsx @@ -0,0 +1,9 @@ +import { FC, ReactElement } from "react"; + +export const About: FC = (): ReactElement => { + return ( + <section> + <div></div> + </section> + ); +}; diff --git a/src/apps/home/modules/hero.tsx b/src/apps/home/modules/hero.tsx new file mode 100644 index 0000000..50655f4 --- /dev/null +++ b/src/apps/home/modules/hero.tsx @@ -0,0 +1,19 @@ +import { FC, ReactElement } from "react"; + +export const Hero: FC = (): ReactElement => { + return ( + <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16 bg-gray-200"> + <div className="w-1/2"> + <h2 className="font-bold text-4xl mb-3">GLORY HIMATIF</h2> + <p>Welcome to Himpunan Mahasiswa Teknik Informatika</p> + <p className="mb-6">Universitas Islam Nusantara</p> + <button className="bg-blue-900 py-1 px-3 text-center text-white font-semibold rounded"> + Masuk + </button> + </div> + <div className="w-1/2 flex justify-end"> + <img src="/Logo.png" className="w-[400px]" alt="Himatif" /> + </div> + </section> + ); +}; diff --git a/src/apps/home/modules/homepage.tsx b/src/apps/home/modules/homepage.tsx deleted file mode 100644 index 3405475..0000000 --- a/src/apps/home/modules/homepage.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Button } from "@/components"; -import { Navbar } from "@/components/organisms/navbar/navbar"; -import { FC, Fragment, ReactElement } from "react"; - -export const Homepage: FC = (): ReactElement => { - return ( - <Fragment> - <Navbar /> - <Button>Button</Button> - </Fragment> - ); -}; diff --git a/src/apps/home/modules/index.ts b/src/apps/home/modules/index.ts index cbd4172..5e2d3ca 100644 --- a/src/apps/home/modules/index.ts +++ b/src/apps/home/modules/index.ts @@ -1 +1 @@ -export * from "./homepage"; +export * from "./hero"; diff --git a/src/apps/main.tsx b/src/apps/main.tsx index 6d9299e..5e5c531 100644 --- a/src/apps/main.tsx +++ b/src/apps/main.tsx @@ -1,9 +1,11 @@ -import { createBrowserRouter } from "react-router-dom"; -import { Homepage } from "./home/modules/homepage"; +import { + createBrowserRouter, +} from "react-router-dom"; +import { LandingPage } from "./home/default"; export const router = createBrowserRouter([ { path: "/", - element: <Homepage />, + element: <LandingPage/>, }, -]); +]); \ No newline at end of file diff --git a/src/components/atoms/button/button.test.tsx b/src/components/atoms/button/button.test.tsx deleted file mode 100644 index 757976d..0000000 --- a/src/components/atoms/button/button.test.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { render, screen } from "@testing-library/react"; -import { Button } from "./button"; - -describe("Button Testing", () => { - test("Should have render properly", () => { - render(<Button>Button</Button>); - expect(screen.getByTestId("button")).toBeDefined(); - }); -}); diff --git a/src/components/atoms/button/button.tsx b/src/components/atoms/button/button.tsx deleted file mode 100644 index 180ddde..0000000 --- a/src/components/atoms/button/button.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { FC, ReactElement } from "react"; -import { TButtonProps } from "./types"; -import { cn } from "@/utils"; - -export const Button: FC<TButtonProps> = ({ className, ...props }): ReactElement => { - return ( - <button - data-testid="button" - className={cn( - "w-full bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded", - className, - )} - {...props} - > - {props.children} - </button> - ); -}; diff --git a/src/components/atoms/button/index.ts b/src/components/atoms/button/index.ts deleted file mode 100644 index 98d55ac..0000000 --- a/src/components/atoms/button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./button"; diff --git a/src/components/atoms/button/types.ts b/src/components/atoms/button/types.ts deleted file mode 100644 index 8206816..0000000 --- a/src/components/atoms/button/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ButtonHTMLAttributes, DetailedHTMLProps } from "react"; - -export type TButtonProps = DetailedHTMLProps< - ButtonHTMLAttributes<HTMLButtonElement>, - HTMLButtonElement ->; diff --git a/src/components/organisms/navbar/navbar.tsx b/src/components/organisms/navbar/navbar.tsx index 3118b5a..0e76b19 100644 --- a/src/components/organisms/navbar/navbar.tsx +++ b/src/components/organisms/navbar/navbar.tsx @@ -6,7 +6,7 @@ export const Navbar: FC = (): ReactElement => { const [navMenu, setNavMenu] = useState(false); return ( - <header className="flex md:px-6 relative bg-white w-full h-20"> + <header className="flex md:px-6 relative bg-gray-200 w-full h-20"> <section className="flex w-full px-2 justify-between items-center"> <figure className="flex items-center gap-x-2 font-bold text-black text-3xl"> <figcaption>HIMATIF UNINUS</figcaption> @@ -26,14 +26,16 @@ export const Navbar: FC = (): ReactElement => { </ul> </nav> </section> - {navMenu && ( - <div className="h-32 py-2 w-full bg-gray-400 mt-20 absolute"> + {navMenu ? ( + <div className="h-32 py-2 w-full bg-gray-200 mt-20 absolute"> <ul className="flex flex-col gap-y-3 items-center justify-center text-white text-xl"> <Link to={"/"}>Home</Link> <Link to={"/"}>News</Link> <Link to={"/"}>Articles</Link> </ul> </div> + ) : ( + <></> )} </header> ); diff --git a/src/pages/index.ts b/src/pages/index.ts new file mode 100644 index 0000000..8cec2e9 --- /dev/null +++ b/src/pages/index.ts @@ -0,0 +1 @@ +export {}; \ No newline at end of file From f196e6ef445fef100071050cb197d9179f48904d Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Fri, 17 May 2024 22:31:20 +0700 Subject: [PATCH 4/7] fix hero section --- src/components/atoms/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/atoms/index.ts b/src/components/atoms/index.ts index 98d55ac..cb0ff5c 100644 --- a/src/components/atoms/index.ts +++ b/src/components/atoms/index.ts @@ -1 +1 @@ -export * from "./button"; +export {}; From 1a24b7065d917f937f51c7ef115451b76f9cc7dd Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Fri, 17 May 2024 22:57:38 +0700 Subject: [PATCH 5/7] fix hero section --- src/apps/home/default.tsx | 14 -------------- src/apps/home/modules/hero.tsx | 19 +++++++++++++++++++ src/apps/main.tsx | 19 ++----------------- 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/src/apps/home/default.tsx b/src/apps/home/default.tsx index c7d6285..42b23f6 100644 --- a/src/apps/home/default.tsx +++ b/src/apps/home/default.tsx @@ -1,17 +1,4 @@ import { Navbar } from "@/components"; -<<<<<<< HEAD -import { FC, ReactElement } from "react"; -import { Hero } from "./modules"; - -export const LandingPage: FC = (): ReactElement => { - return ( - <> - <Navbar/> - <Hero/> - </> - ) -} -======= import { Hero } from "./modules"; import { FC, ReactElement } from "react"; @@ -23,4 +10,3 @@ export const LandingPage: FC = (): ReactElement => { </> ); }; ->>>>>>> upstream/feat/modules-herosection diff --git a/src/apps/home/modules/hero.tsx b/src/apps/home/modules/hero.tsx index e69de29..28c0fae 100644 --- a/src/apps/home/modules/hero.tsx +++ b/src/apps/home/modules/hero.tsx @@ -0,0 +1,19 @@ +import { FC, ReactElement } from "react"; + +export const Hero: FC = (): ReactElement => { + return ( + <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16"> + <div className="w-1/2"> + <h2 className="font-bold text-4xl mb-3">GLORY HIMATIF</h2> + <p>Welcome to Himpunan Mahasiswa Teknik Informatika</p> + <p className="mb-6">Universitas Islam Nusantara</p> + <button className="bg-blue-900 py-1 px-3 text-center text-white font-semibold rounded"> + Masuk + </button> + </div> + <div className="w-1/2 flex justify-end"> + <img src="/Logo.png" className="w-[400px]" alt="Himatif" /> + </div> + </section> + ); +}; diff --git a/src/apps/main.tsx b/src/apps/main.tsx index 86f1ff3..36c1a6e 100644 --- a/src/apps/main.tsx +++ b/src/apps/main.tsx @@ -1,24 +1,9 @@ -import { -<<<<<<< HEAD - createBrowserRouter, -} from "react-router-dom"; +import { createBrowserRouter } from "react-router-dom"; import { LandingPage } from "./home/default"; export const router = createBrowserRouter([ { path: "/", - element: <LandingPage/>, + element: <LandingPage />, }, ]); -======= - createBrowserRouter, - } from "react-router-dom"; -import { LandingPage } from "./home/default"; - -export const router = createBrowserRouter([ - { - path: "/", - element: <LandingPage/>, - }, - ]); ->>>>>>> upstream/feat/modules-herosection From 16efd94ea2f13b22aa4cb8e603c15e5ab3615a06 Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Fri, 17 May 2024 23:10:19 +0700 Subject: [PATCH 6/7] fix hero section --- src/apps/home/modules/hero.tsx | 2 +- src/apps/home/modules/index.ts | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/apps/home/modules/hero.tsx b/src/apps/home/modules/hero.tsx index 28c0fae..50655f4 100644 --- a/src/apps/home/modules/hero.tsx +++ b/src/apps/home/modules/hero.tsx @@ -2,7 +2,7 @@ import { FC, ReactElement } from "react"; export const Hero: FC = (): ReactElement => { return ( - <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16"> + <section className="flex w-full min-h-2 items-center justify-center gap-x-56 px-16 bg-gray-200"> <div className="w-1/2"> <h2 className="font-bold text-4xl mb-3">GLORY HIMATIF</h2> <p>Welcome to Himpunan Mahasiswa Teknik Informatika</p> diff --git a/src/apps/home/modules/index.ts b/src/apps/home/modules/index.ts index e292ce6..5e2d3ca 100644 --- a/src/apps/home/modules/index.ts +++ b/src/apps/home/modules/index.ts @@ -1,6 +1 @@ -<<<<<<< HEAD export * from "./hero"; -======= - -export * from "./hero" ->>>>>>> upstream/feat/modules-herosection From 2724951b730454adfd9fdd5fae4d4da6bd4eda48 Mon Sep 17 00:00:00 2001 From: Azrilpramudia <azrilpramudia01@gmail.com> Date: Fri, 17 May 2024 23:32:27 +0700 Subject: [PATCH 7/7] fix hero section --- src/pages/index.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/pages/index.ts diff --git a/src/pages/index.ts b/src/pages/index.ts deleted file mode 100644 index 8cec2e9..0000000 --- a/src/pages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; \ No newline at end of file