-
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
11 changed files
with
578 additions
and
95 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ReactNode } from "react" | ||
|
||
|
||
|
||
interface Props { | ||
children: ReactNode | ||
} | ||
|
||
/** | ||
* This component wraps everything such that we take at least 100vh height | ||
*/ | ||
export const Layout = ({ children }: Props) => ( | ||
// Ensure that you pass only two blocks | ||
// one having content and another having footer | ||
<div className="min-h-screen"> | ||
{children} | ||
</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,13 @@ | ||
import Head from "next/head"; | ||
|
||
|
||
|
||
type PropsType = { title?: string } | ||
|
||
export const MetaHead = ({ title }: PropsType) => ( | ||
<Head> | ||
<title>{`Create Next App ${title? ` - ${title}` : ''}`}</title> | ||
<meta name="description" content="Generated by create next app" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</Head> | ||
) |
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,100 @@ | ||
import { Menu } from "@headlessui/react" | ||
import Link from "next/link" | ||
import { BLOG_URL, DASHBOARD_URL, FEATURES_URL_HASH, NEW_USER_WELCOME_URL } from "../../config/ScreenRoutes" | ||
|
||
|
||
export const Navbar = () => { | ||
return ( | ||
<div className="mb-7 h-12 overflow-hidden mt-2 px-4 mx-auto border-b-black border-b"> | ||
<nav className="flex items-center justify-between"> | ||
<div className="font-bold text-2xl text-left flex-grow">WingMate</div> | ||
<div className="hidden sm:flex justify-between flex-grow items-center"> | ||
<div className="flex justify-between gap-5"> | ||
<Link href={FEATURES_URL_HASH}> | ||
<div className="cursor-pointer hover:underline decoration-dashed">Features</div> | ||
</Link> | ||
<Link href={BLOG_URL}> | ||
<div className="cursor-pointer hover:underline decoration-dashed">Blog</div> | ||
</Link> | ||
|
||
</div> | ||
<div className="flex gap-3 items-center"> | ||
{/* Only for Non Authenticated User */} | ||
<Link href={NEW_USER_WELCOME_URL}> | ||
<div className="btn btn-sm btn-primary">Login</div> | ||
</Link> | ||
|
||
{/* Only for Authenticated User */} | ||
<Link href={DASHBOARD_URL}> | ||
<div className="btn btn-sm btn-primary">Dashboard</div> | ||
</Link> | ||
|
||
</div> | ||
</div> | ||
|
||
<Menu> | ||
{({ open }) => ( | ||
<> | ||
<Menu.Button className='block sm:hidden'>{open ? 'Close' : 'Menu'}</Menu.Button> | ||
<MyDropdown /> | ||
</> | ||
)} | ||
|
||
</Menu> | ||
|
||
</nav> | ||
</div> | ||
) | ||
} | ||
|
||
|
||
function MyDropdown() { | ||
return ( | ||
<> | ||
<Menu.Items className='absolute top-14 left-0 bottom-0 right-0 '> | ||
<Menu.Item as='div' className='cursor-pointer w-full px-5 py-4 border-b border-b-black'> | ||
<Link | ||
href={FEATURES_URL_HASH} | ||
> | ||
<div className=""> | ||
Features | ||
</div> | ||
</Link> | ||
</Menu.Item> | ||
<Menu.Item as='div' className='cursor-pointer w-full px-5 py-4 border-b border-b-black'> | ||
<Link | ||
href={BLOG_URL} | ||
> | ||
<div className=""> | ||
Blog | ||
</div> | ||
</Link> | ||
</Menu.Item> | ||
|
||
{/* Only for Non Authenticated User */} | ||
<Menu.Item as='div' className='cursor-pointer w-full px-5 py-4 border-b border-b-black'> | ||
<Link | ||
href={NEW_USER_WELCOME_URL} | ||
> | ||
<div className=""> | ||
Login | ||
</div> | ||
</Link> | ||
</Menu.Item> | ||
|
||
{/* Only for Authenticated User */} | ||
<Menu.Item as='div' className='cursor-pointer w-full px-5 py-4 border-b border-b-black'> | ||
<Link | ||
href={DASHBOARD_URL} | ||
> | ||
<div className=""> | ||
Dashboard | ||
</div> | ||
</Link> | ||
</Menu.Item> | ||
|
||
</Menu.Items> | ||
</> | ||
|
||
) | ||
} |
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,14 @@ | ||
|
||
|
||
|
||
export const NEW_USER_WELCOME_URL = '/auth/welcome' | ||
|
||
export const DASHBOARD_URL = '/dash' | ||
|
||
|
||
export const BLOG_URL = '#' | ||
|
||
|
||
|
||
export const FEATURES_URL_HASH = '/#features' | ||
|
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,8 +1,14 @@ | ||
import '../styles/globals.css' | ||
import type { AppProps } from 'next/app' | ||
import { MetaHead } from '../components/MetaHead' | ||
|
||
function MyApp({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} /> | ||
return ( | ||
<> | ||
<MetaHead /> | ||
<Component {...pageProps} /> | ||
</> | ||
) | ||
} | ||
|
||
export default MyApp |
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,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
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,26 +1,3 @@ | ||
html, | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, | ||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
html { | ||
color-scheme: dark; | ||
} | ||
body { | ||
color: white; | ||
background: black; | ||
} | ||
} | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [ | ||
"./pages/**/*.{js,ts,jsx,tsx}", | ||
"./components/**/*.{js,ts,jsx,tsx}", | ||
], | ||
theme: { | ||
extend: { | ||
screens: { | ||
xs: "460px", | ||
xss: "300px", | ||
}, | ||
}, | ||
}, | ||
plugins: [require("daisyui")], | ||
daisyui: { | ||
themes: [ | ||
{ | ||
mytheme: { | ||
"primary": "#000", | ||
"primary-content": "#fff", | ||
|
||
"secondary": "#e05759", | ||
"secondary-content": "#fff", | ||
|
||
"accent": "#46b9d6", | ||
"accent-content": "#fff", | ||
|
||
"neutral": "#fff", | ||
"neutral-content": "#fff", | ||
|
||
"base-100": "#F3EFF6", | ||
// "base-100-content": "#fff", | ||
|
||
"info": "#7FBBDC", | ||
"info-content": "#fff", | ||
|
||
"success": "#6EE2D9", | ||
"success-content": "#fff", | ||
|
||
"warning": "#F9BA4E", | ||
"warning-content": "#fff", | ||
|
||
"error": "#EF4B39", | ||
"error-content": "#fff", | ||
}, | ||
}, | ||
// "dracula" | ||
], | ||
|
||
}, | ||
} |
Oops, something went wrong.