project scaffolding + day 1

This commit is contained in:
strNophix 2022-05-19 21:38:18 +02:00
parent 99bb85eef1
commit cce9fa1606
17 changed files with 1560 additions and 0 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

4
.prettierrc Normal file
View File

@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}

13
index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

26
package.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "daily-design",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"clsx": "^1.1.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "6"
},
"devDependencies": {
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^1.3.0",
"autoprefixer": "^10.4.7",
"postcss": "^8.4.13",
"tailwindcss": "^3.0.24",
"typescript": "^4.6.3",
"vite": "^2.9.9"
}
}

1279
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

6
postcss.config.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

14
src/App.tsx Normal file
View File

@ -0,0 +1,14 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Day1 from "./components/day1";
function App() {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<Day1 />} />
</Routes>
</BrowserRouter>
);
}
export default App;

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

View File

@ -0,0 +1,122 @@
import React from "react";
import clsx from "clsx";
const Input: React.FC<React.HTMLProps<HTMLInputElement>> = (props) => {
return (
<div>
<input
type={props.type}
placeholder={props.placeholder}
className={clsx(
"border border-[#363636] bg-transparent rounded-md p-3 focus:border-[#6b8dd1] w-full focus:outline-none shadow-sm",
props.className
)}
/>
</div>
);
};
const SpanLink: React.FC<React.HTMLProps<HTMLHyperlinkElementUtils>> = (
props
) => {
return (
<a className="text-[#6b8dd1] inline cursor-pointer">{props.children}</a>
);
};
const Day1: React.FC<any> = () => {
return (
<main className="flex min-h-screen text-gray-200">
{/* Left section of sign up page */}
<div className="hidden md:block md:w-80 bg-[#131313] h-screen relative">
<div className="absolute top-4 left-4">
<div className="h-10 w-10 bg-[#454545] rounded-md" />
</div>
<div className="absolute bottom-0 left-0 w-full">
<div className="bg-red-200 w-full h-96 opacity-10" />
</div>
<div className="flex justify-center items-center h-full">
<div className="p-11 text-center font-semibold space-y-2 text-xl">
<p className="text-4xl">67%</p>
<p>time saved in total compared to projects not using Hub.</p>
<p>- fintory.com</p>
</div>
</div>
</div>
{/* Form section of sign up page */}
<div className="flex-1 bg-[#242424] md:border-l md:border-[#363636]">
<div className="mx-auto space-y-14 w-full p-2 md:w-1/2 md:mt-20">
<div className="space-y-2">
<h1 className="text-4xl font-semibold">Set up your Hub account.</h1>
<p>
You have been invited by Fintory on Hub to start collaborating.
</p>
</div>
<div>
<form>
<div className="space-y-8">
<div className="space-y-3">
<Input
type="text"
name="customerName"
placeholder="Full name"
/>
<Input
type="email"
name="customerEmail"
placeholder="Email"
/>
<Input
type="password"
name="customerPassword"
placeholder="Password"
/>
<Input
type="password"
name="customerPasswordRepeat"
placeholder="Confirm Password"
/>
<Input
type="text"
name="customerCompany"
placeholder="Company Name"
/>
<Input type="text" name="customerRole" placeholder="Role" />
</div>
<div className="flex items-center justify-start space-x-3">
<Input
type="checkbox"
name="confirm"
className="form-check-input appearance-none checked:bg-[#6b8dd1] p-[.6rem]"
/>
<p>
I agree with Hub's{" "}
<SpanLink>Terms, Privacy Policy</SpanLink> and{" "}
<SpanLink>E-Sign</SpanLink> content
</p>
</div>
<div>
<button
disabled
className="rounded-md px-5 py-3 bg-[#6b8dd1] disabled:bg-[#344262] disabled:text-[#5b6370]"
>
Continue
</button>
</div>
<hr className="border-t border-[#363636]" />
<div className="pb-8 md:pb-0">
<p>
Already have an account? <SpanLink>Sign in </SpanLink>
</p>
</div>
</div>
</form>
</div>
</div>
</div>
</main>
);
};
export default Day1;

15
src/favicon.svg Normal file
View File

@ -0,0 +1,15 @@
<svg width="410" height="404" viewBox="0 0 410 404" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z" fill="url(#paint0_linear)"/>
<path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z" fill="url(#paint1_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
<stop stop-color="#41D1FF"/>
<stop offset="1" stop-color="#BD34FE"/>
</linearGradient>
<linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFEA83"/>
<stop offset="0.0833333" stop-color="#FFDD35"/>
<stop offset="1" stop-color="#FFA800"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

3
src/index.css Normal file
View File

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

10
src/main.tsx Normal file
View File

@ -0,0 +1,10 @@
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./index.css";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
);

1
src/vite-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="vite/client" />

7
tailwind.config.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
};

21
tsconfig.json Normal file
View File

@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}

8
tsconfig.node.json Normal file
View File

@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}

7
vite.config.ts Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
})