Skip to content

Instantly share code, notes, and snippets.

@teafoot
Forked from burakorkmez/AuthModal.tsx
Created April 2, 2023 00:12
Show Gist options
  • Save teafoot/188f50c2a715ad994c73c4e3bc061460 to your computer and use it in GitHub Desktop.
Save teafoot/188f50c2a715ad994c73c4e3bc061460 to your computer and use it in GitHub Desktop.
Leetcode Clone
<>
<div className='absolute top-0 left-0 w-full h-full flex items-center justify-center bg-black bg-opacity-60'></div>
<div className='w-full sm:w-[450px] absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] flex justify-center items-center'>
<div className='relative w-full h-full mx-auto flex items-center justify-center'>
<div className='bg-white rounded-lg shadow relative w-full bg-gradient-to-b from-brand-orange to-slate-900 mx-6'>
<div className='flex justify-end p-2'>
<button
type='button'
className='bg-transparent rounded-lg text-sm p-1.5 ml-auto inline-flex items-center hover:bg-gray-800 hover:text-white text-white'
>
X
</button>
</div>
</div>
</div>
</div>
</>
<h1
className='text-2xl text-center text-gray-700 dark:text-gray-400 font-medium uppercase mt-10 mb-5'>
&ldquo; QUALITY OVER QUANTITY &rdquo; 👇
</h1>
<div className='relative overflow-x-auto mx-auto px-6 pb-10'>
<table className='text-sm text-left text-gray-500 dark:text-gray-400 sm:w-7/12 w-full max-w-[1200px] mx-auto'>
<thead className='text-xs text-gray-700 uppercase dark:text-gray-400 border-b '>
<tr>
<th scope='col' className='px-1 py-3 w-0 font-medium'>
Status
</th>
<th scope='col' className='px-6 py-3 w-0 font-medium'>
Title
</th>
<th scope='col' className='px-6 py-3 w-0 font-medium'>
Difficulty
</th>
<th scope='col' className='px-6 py-3 w-0 font-medium'>
Category
</th>
<th scope='col' className='px-6 py-3 w-0 font-medium'>
Solution
</th>
</tr>
</thead>
</table>
</div>
export type Problem = {
id: string;
title: string;
difficulty: string;
category: string;
order: number;
videoId?: string;
};
export const problems: Problem[] = [
{
id: "two-sum",
title: "Two Sum",
difficulty: "Easy",
category: "Array",
order: 1,
videoId: "8-k1C6ehKuw",
},
{
id: "reverse-linked-list",
title: "Reverse Linked List",
difficulty: "Hard",
category: "Linked List",
order: 2,
videoId: "",
},
{
id: "jump-game",
title: "Jump Game",
difficulty: "Medium",
category: "Dynamic Programming",
order: 3,
videoId: "",
},
{
id: "valid-parentheses",
title: "Valid Parentheses",
difficulty: "Easy",
category: "Stack",
order: 4,
videoId: "xty7fr-k0TU",
},
{
id: "search-a-2d-matrix",
title: "Search a 2D Matrix",
difficulty: "Medium",
category: "Binary Search",
order: 5,
videoId: "ZfFl4torNg4",
},
{
id: "container-with-most-water",
title: "Container With Most Water",
difficulty: "Medium",
category: "Two Pointers",
order: 6,
videoId: "",
},
{
id: "merge-intervals",
title: "Merge Intervals",
difficulty: "Medium",
category: "intervals",
order: 7,
videoId: "",
},
{
id: "maximum-depth-of-binary-tree",
title: "Maximum Depth of Binary Tree",
difficulty: "Easy",
category: "Tree",
order: 8,
videoId: "4qYTqOiRMoM",
},
{
id: "best-time-to-buy-and-sell-stock",
title: "Best Time to Buy and Sell Stock",
difficulty: "Easy",
category: "Array",
order: 9,
videoId: "",
},
{
id: "subsets",
title: "Subsets",
difficulty: "Medium",
category: "Backtracking",
order: 10,
videoId: "",
},
];
<tfoot className='fixed top-0 left-0 h-screen w-screen flex items-center justify-center ' >
<div className='bg-black z-10 opacity-70 top-0 left-0 w-screen h-screen absolute'></div>
<div className='w-full z-50 h-full px-6 relative max-w-4xl'>
<div className='w-full h-full flex items-center justify-center relative'>
<div className='w-full relative'>
<IoClose fontSize={"35"} className='cursor-pointer absolute -top-16 right-0' />
<YouTube videoId={"xty7fr-k0TU"} loading='lazy' iframeClassName='w-full min-h-[500px]' />
</div>
</div>
</div>
</tfoot>
<form className='space-y-6 px-6 lg:px-8 pb-4 sm:pb-6 xl:pb-8'>
<h3 className='text-xl font-medium text-white'>Reset Password</h3>
<p className='text-sm text-white '>
Forgotten your password? Enter your e-mail address below, and we&apos;ll send you an e-mail allowing you
to reset it.
</p>
<div>
<label htmlFor='email' className='text-sm font-medium block mb-2 text-gray-300'>
Your email
</label>
<input
type='email'
name='email'
id='email'
className='border-2 outline-none sm:text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 bg-gray-600 border-gray-500 placeholder-gray-400 text-white'
placeholder='name@company.com'
/>
</div>
<button
type='submit'
className={`w-full text-white focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
bg-brand-orange hover:bg-brand-orange-s `}
>
Reset Password
</button>
</form>
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}",
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
// Or if using `src` directory:
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
colors: {
"dark-layer-1": "rgb(40,40,40)",
"dark-layer-2": "rgb(26,26,26)",
"dark-label-2": "rgba(239, 241, 246, 0.75)",
"dark-divider-border-2": "rgb(61, 61, 61)",
"dark-fill-2": "hsla(0,0%,100%,.14)",
"dark-fill-3": "hsla(0,0%,100%,.1)",
"dark-gray-6": "rgb(138, 138, 138)",
"dark-gray-7": "rgb(179, 179, 179)",
"gray-8": "rgb(38, 38, 38)",
"dark-gray-8": "rgb(219, 219, 219)",
"brand-orange": "rgb(255 161 22)",
"brand-orange-s": "rgb(193, 122, 15)",
"dark-yellow": "rgb(255 192 30)",
"dark-pink": "rgb(255 55 95)",
olive: "rgb(0, 184, 163)",
"dark-green-s": "rgb(44 187 93)",
"dark-blue-s": "rgb(10 132 255)",
},
},
},
plugins: [],
};
<!-- Topbar -->
<nav className='relative flex h-[50px] w-full shrink-0 items-center px-5 bg-dark-layer-1 text-dark-gray-7'>
<div className={`flex w-full items-center justify-between max-w-[1200px] mx-auto`}>
<Link href='/' className='h-[22px] flex-1'>
<img src='/logo-full.png' alt='Logo' className='h-full' />
</Link>
<div className='flex items-center space-x-4 flex-1 justify-end'>
<div>
<a
href='https://www.buymeacoffee.com/burakorkmezz'
target='_blank'
rel='noreferrer'
className='bg-dark-fill-3 py-1.5 px-3 cursor-pointer rounded text-brand-orange hover:bg-dark-fill-2'
>
Premium
</a>
</div>
<Link href='/auth'>
<button className='bg-dark-fill-3 py-1 px-2 cursor-pointer rounded '>Sign In</button>
</Link>
</div>
</div>
</nav>
<!-- **************************** -->
<!-- User Email Wrapper-->
<div
className='absolute top-10 left-2/4 -translate-x-2/4 mx-auto bg-dark-layer-1 text-brand-orange p-2 rounded shadow-lg z-40 group-hover:scale-100 scale-0
transition-all duration-300 ease-in-out'
>
<p className='text-sm'>{user.email}</p>
</div>
<!-- **************************** -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment