1
1
import { unstable_noStore as noStore } from "next/cache" ;
2
+ import Image from "next/image" ;
2
3
import Link from "next/link" ;
4
+ import { Footer } from "~/components/footer" ;
5
+ import { buttonVariants } from "~/components/ui/button" ;
3
6
4
7
import { getServerAuthSession } from "~/server/auth" ;
5
8
import { api } from "~/trpc/server" ;
@@ -10,53 +13,54 @@ export default async function Home() {
10
13
const session = await getServerAuthSession ( ) ;
11
14
12
15
return (
13
- < main className = "flex min-h-screen flex-col items-center justify-center bg-gradient-to-b from-[#2e026d] to-[#15162c] text-white" >
14
- < div className = "container flex flex-col items-center justify-center gap-12 px-4 py-16 " >
15
- < h1 className = "text-5xl font-extrabold tracking-tight sm:text-[5rem]" >
16
- Create < span className = "text-[hsl(280,100%,70%)]" > T3</ span > App
17
- </ h1 >
18
- < div className = "grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-8" >
19
- < Link
20
- className = "flex max-w-xs flex-col gap-4 rounded-xl bg-white/10 p-4 hover:bg-white/20"
21
- href = "https://create.t3.gg/en/usage/first-steps"
22
- target = "_blank"
23
- >
24
- < h3 className = "text-2xl font-bold" > First Steps →</ h3 >
25
- < div className = "text-lg" >
26
- Just the basics - Everything you need to know to set up your
27
- database and authentication.
28
- </ div >
29
- </ Link >
30
- < Link
31
- className = "flex max-w-xs flex-col gap-4 rounded-xl bg-white/10 p-4 hover:bg-white/20"
32
- href = "https://create.t3.gg/en/introduction"
33
- target = "_blank"
34
- >
35
- < h3 className = "text-2xl font-bold" > Documentation →</ h3 >
36
- < div className = "text-lg" >
37
- Learn more about Create T3 App, the libraries it uses, and how to
38
- deploy it.
39
- </ div >
40
- </ Link >
16
+ < main className = "flex min-h-screen flex-col items-center justify-center bg-[radial-gradient(ellipse_at_bottom_left,_var(--tw-gradient-stops))] from-zinc-200 via-emerald-200 to-zinc-200 dark:from-zinc-950 dark:via-emerald-950 dark:to-zinc-950" >
17
+ { /* NAVBAR */ }
18
+ < div className = "flex w-full items-center justify-between px-4 py-3" >
19
+ < div className = "flex items-center gap-2" >
20
+ < Image
21
+ src = "/logo.png"
22
+ width = { 32 }
23
+ height = { 32 }
24
+ alt = "Finance Portal Logo"
25
+ />
26
+ < h1 className = "text-xl font-semibold" > Finance Portal</ h1 >
41
27
</ div >
42
- < div className = "flex flex-col items-center gap-2" >
43
- < p className = "text-2xl text-white" >
44
- { hello ? hello . greeting : "Loading tRPC query..." }
45
- </ p >
28
+ < Link href = "/signin" className = { ` ${ buttonVariants ( ) } ` } >
29
+ Sign in
30
+ </ Link >
31
+ </ div >
46
32
47
- < div className = "flex flex-col items-center justify-center gap-4" >
48
- < p className = "text-center text-2xl text-white" >
49
- { session && < span > Logged in as { session . user ?. name } </ span > }
50
- </ p >
33
+ { /* MAIN CONTENT */ }
34
+ < div className = "container flex flex-1 flex-col items-center justify-center gap-12 px-4 py-16" >
35
+ < div className = "flex flex-col items-center" >
36
+ < h1 className = "text-5xl font-bold tracking-tight text-foreground" >
37
+ Welcome to Finance Portal
38
+ </ h1 >
39
+ < p className = "mt-4 max-w-lg text-balance text-center text-lg text-foreground" >
40
+ Manage your student finances in one place. Pay your tuition and view
41
+ any library fines from here.
42
+ </ p >
43
+ < div className = "mt-8 flex gap-4" >
44
+ < Link href = { "/signin" } className = { buttonVariants ( ) } >
45
+ Sign up
46
+ </ Link >
51
47
< Link
52
- href = { session ? "/api/auth/signout" : "/api/auth/signin" }
53
- className = "rounded-full bg-white/10 px-10 py-3 font-semibold no-underline transition hover:bg-white/20"
48
+ href = { "/" }
49
+ className = { buttonVariants ( {
50
+ variant : "outline" ,
51
+ className : "border-emerald-500 bg-transparent" ,
52
+ } ) }
54
53
>
55
- { session ? "Sign out" : "Sign in" }
54
+ Learn more
56
55
</ Link >
57
56
</ div >
58
57
</ div >
59
58
</ div >
59
+
60
+ { /* FOOTER */ }
61
+ < div className = { `mb-4` } >
62
+ < Footer />
63
+ </ div >
60
64
</ main >
61
65
) ;
62
66
}
0 commit comments