-
Notifications
You must be signed in to change notification settings - Fork 3
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
23 changed files
with
308 additions
and
223 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
:root { | ||
--foreground-rgb: 0, 0, 0; | ||
--background-start-rgb: 214, 219, 220; | ||
--background-end-rgb: 255, 255, 255; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
:root { | ||
--foreground-rgb: 255, 255, 255; | ||
--background-start-rgb: 0, 0, 0; | ||
--background-end-rgb: 0, 0, 0; | ||
} | ||
} | ||
|
||
body { | ||
color: rgb(var(--foreground-rgb)); | ||
background: linear-gradient( | ||
to bottom, | ||
transparent, | ||
rgb(var(--background-end-rgb)) | ||
) | ||
rgb(var(--background-start-rgb)); | ||
} | ||
|
||
@layer utilities { | ||
.text-balance { | ||
text-wrap: balance; | ||
} | ||
} |
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
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,9 +1,13 @@ | ||
import LoginButton from "@/components/LoginButton"; | ||
import Hero from "@/components/Hero"; | ||
import Party from "@/components/Party"; | ||
import { getServerSession } from "next-auth"; | ||
|
||
export default async function Home() { | ||
const session = await getServerSession(); | ||
|
||
return session ? <Party /> : <LoginButton />; | ||
return ( | ||
<div className="min-h-screen bg-base-200"> | ||
<div>{session ? <Party /> : <Hero />}</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
export default function AdminBadge() { | ||
return ( | ||
<span className="bg-red-100 text-red-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-red-900 dark:text-red-300"> | ||
Admin | ||
</span> | ||
); | ||
return <span className="badge badge-primary mx-2">admin</span>; | ||
} |
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,20 @@ | ||
export default function Alert({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<div role="alert" className="alert alert-error"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
className="stroke-current shrink-0 h-6 w-6" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth="2" | ||
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" | ||
/> | ||
</svg> | ||
<span>{children}</span> | ||
</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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
export default async function Footer() { | ||
return ( | ||
<footer className="fixed bottom-0 left-0 z-20 w-full p-4 bg-white border-t border-gray-200 shadow md:flex md:items-center md:justify-between md:p-6 dark:bg-gray-800 dark:border-gray-600"> | ||
<span className="text-sm text-gray-500 sm:text-center dark:text-gray-400"> | ||
© 2024{" "} | ||
<a | ||
href="https://assassinspartygame.vercel.app/" | ||
className="hover:underline" | ||
> | ||
Assassins™ | ||
</a> | ||
. All Rights Reserved. | ||
</span> | ||
<footer className="footer footer-center p-4 bg-base-300 text-base-content fixed bottom-0"> | ||
<aside> | ||
<p> | ||
© 2024{" "} | ||
<a | ||
href="https://assassinspartygame.vercel.app/" | ||
className="hover:underline" | ||
> | ||
Assassins™ | ||
</a>{" "} | ||
. All Rights Reserved.{" "} | ||
</p> | ||
</aside> | ||
</footer> | ||
); | ||
} |
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,17 @@ | ||
import LoginButton from "./LoginButton"; | ||
|
||
export default function Hero() { | ||
return ( | ||
<div className="hero min-h-screen bg-base-200"> | ||
<div className="hero-content text-center"> | ||
<div> | ||
<h1 className="text-5xl font-bold">Welcome to Assassins!</h1> | ||
<p className="py-6"> | ||
To start playing Assassins live action game, please login. | ||
</p> | ||
<LoginButton className="btn btn-primary" /> | ||
</div> | ||
</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
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
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,31 +1,25 @@ | ||
import LoginButton from "./LoginButton"; | ||
import ThemeController from "./ThemeController"; | ||
|
||
export default function Navbar() { | ||
export default async function Navbar() { | ||
return ( | ||
<nav className="bg-white border-gray-200 dark:bg-gray-900"> | ||
<div className="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4"> | ||
<a href="/" className="flex items-center space-x-3 rtl:space-x-reverse"> | ||
<span className="self-center text-2xl font-semibold whitespace-nowrap dark:text-white"> | ||
Assassins | ||
</span> | ||
<div className="navbar bg-base-100"> | ||
<div className="flex-1"> | ||
<a className="btn btn-ghost text-xl" href="/"> | ||
Assassins | ||
</a> | ||
<div className="hidden w-full md:block md:w-auto" id="navbar-default"> | ||
<ul className="font-medium flex flex-col p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700"> | ||
<li> | ||
<a | ||
href="/leaderboard" | ||
className="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent" | ||
aria-current="page" | ||
> | ||
Leaderboard | ||
</a> | ||
</li> | ||
<li> | ||
<LoginButton /> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
<div className="flex-none"> | ||
<ul className="menu menu-horizontal px-2"> | ||
<li> | ||
<a href="/leaderboard">Leaderboard</a> | ||
</li> | ||
<li> | ||
<LoginButton /> | ||
</li> | ||
</ul> | ||
<ThemeController /> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.