This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
178 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import { Hero } from "../_components/hero"; | ||
|
||
export default function HomePage() { | ||
return <div>Hello, World!</div>; | ||
return ( | ||
<> | ||
<Hero /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const Footer = () => { | ||
return <div>Footer</div>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"use client"; | ||
|
||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import { cn } from "@ubus/ui"; | ||
import { Button } from "@ubus/ui/button"; | ||
import { MouseIcon, RightArrowIcon } from "@ubus/ui/icons"; | ||
|
||
export const Hero = ({ className }: { className?: string }) => { | ||
return ( | ||
<section | ||
className={cn( | ||
"container grid min-h-[calc(100dvh-6rem)] px-12 lg:h-full", | ||
className, | ||
)} | ||
> | ||
<div className="relative flex flex-col items-center justify-between lg:flex-row"> | ||
<div className="flex h-full max-w-[660px] flex-col justify-center gap-8 md:h-fit md:justify-start md:gap-6 lg:h-full lg:justify-center lg:gap-8"> | ||
<h1 className="max-w-[180px] text-display-small font-bold sm:text-display-medium md:max-w-full md:text-display-large lg:max-w-fit"> | ||
Track. Notify. Simplify. | ||
</h1> | ||
<h3 className="text-body-large lg:text-headline-small xl:text-headline-medium"> | ||
Welcome to the IUBAT Bus Tracking System. Access live bus locations, | ||
schedules, and important updates all in one place. | ||
</h3> | ||
<Link href={"/Dashboard"}> | ||
<Button variant={"withIcon"}> | ||
Track now | ||
<RightArrowIcon className="h-5 w-5" /> | ||
</Button> | ||
</Link> | ||
</div> | ||
<div className="absolute right-0 top-[20%] sm:top-[22%] md:static"> | ||
<Image | ||
className="w-48 sm:w-52 md:h-full md:w-full lg:min-w-[509px]" | ||
src={"hero-map.svg"} | ||
height={377} | ||
width={509} | ||
alt="map image" | ||
/> | ||
</div> | ||
</div> | ||
<div className="grid place-items-center"> | ||
<div className="flex animate-bounce items-center justify-center gap-5"> | ||
<MouseIcon className={"fill-on-surface"} /> | ||
<span className="text-headline-small">Scroll Down</span> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { env } from "~/env"; | ||
|
||
export function TailwindIndicator() { | ||
if (env.NODE_ENV === "production") return null; | ||
|
||
return ( | ||
<div className="fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-white"> | ||
<div className="block sm:hidden">xs</div> | ||
<div className="hidden sm:block md:hidden">sm</div> | ||
<div className="hidden md:block lg:hidden">md</div> | ||
<div className="hidden lg:block xl:hidden">lg</div> | ||
<div className="hidden xl:block 2xl:hidden">xl</div> | ||
<div className="hidden 2xl:block">2xl</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "@ubus/hooks" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useEffect, useState } from "react"; | ||
import { useTheme } from "next-themes"; | ||
|
||
const useThemeBasedValue = <T>(lightValue: T, darkValue: T): T => { | ||
const { theme, resolvedTheme } = useTheme(); | ||
const [value, setValue] = useState(lightValue); | ||
|
||
useEffect(() => { | ||
if (theme === "dark" || resolvedTheme === "dark") { | ||
setValue(darkValue); | ||
} else { | ||
setValue(lightValue); | ||
} | ||
}, [theme, resolvedTheme, lightValue, darkValue]); | ||
|
||
return value; | ||
}; | ||
|
||
export default useThemeBasedValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters