Skip to content

Commit

Permalink
feat: Added logo and background image to Signup page
Browse files Browse the repository at this point in the history
  • Loading branch information
rafawessling committed Feb 19, 2024
1 parent aadddb1 commit caff63f
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 150 deletions.
11 changes: 10 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
webpack(config) {
config.module.rules.push({
test: /\.(png|jpe?g|gif|mp4|webm|ogg|mp3|wav|flac|aac|woff|woff2|eot|ttf|otf|svg)$/i,
type: 'asset/resource'
});

return config;
}
};

export default nextConfig;
29 changes: 21 additions & 8 deletions src/app/(pages)/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import Input from '@/app/components/Input/Input';
import Button from '@/app/components/Button/Button';
import Input from '@/app/components/Input/Input';
import Link from 'next/link';
import Background from '../../../assets/background.svg';
import Logo from '../../../assets/logo.svg';

export default function SignUp() {
return (
<main className="flex justify-center items-center justify-center h-screen w-screen">
<section className="flex flex-col items-center justify-between w-5/12 border">
<h3 className="text-3xl text-indigo-500 font-semibold mt-10 mb-10">
<main
className="flex flex-col justify-center items-center h-screen w-screen bg-cover bg-center bg-no-repeat"
style={{ backgroundImage: `url(${Background})` }}
>
<img
className="self-start w-44 ml-16 mb-2.5"
src={Logo}
alt="Logo with the outline of a hexagon with a white line inside and a dark blue line outside, accompanied by the word Dindin"
/>
<section className="flex flex-col items-center justify-between w-4/12 h-fit border bg-white">
<h3 className="text-28 text-primary-lilac font-semibold mt-10 mb-8">
Cadastre-se
</h3>
<form className="flex flex-col items-center w-10/12 gap-7">
Expand Down Expand Up @@ -36,12 +47,14 @@ export default function SignUp() {
<Button
title="Cadastrar"
type="submit"
className="w-full mt-3 mb-3 "
className="w-full mt-3 mb-2"
/>
</form>
<h4 className="text-sm text-indigo-500 font-medium mb-10">
Já tem cadastro? Clique aqui!
</h4>
<Link href="/" className="mb-10">
<span className="text-sm text-primary-lilac font-bold font-secondary">
Já tem cadastro? Clique aqui!
</span>
</Link>
</section>
</main>
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from '@/types/Signup';
export default function Button({ title, type, className }: Button) {
return (
<button
className={` flex justify-center p-3 rounded-md font-primary font-bold text-sm bg-indigo-500 text-white ${className}`}
className={`flex justify-center p-3 rounded-md font-primary font-bold text-sm bg-primary-lilac text-white ${className}`}
type={type}
>
{title}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Input } from '@/types/Signup';

export default function Input({ name, type, placeholder, required }: Input) {
return (
<div className="flex flex-col gap-2 w-full font-primary font-normal text-lg text-gray-800">
<div className="flex flex-col gap-1.5 w-full font-primary font-normal text-lg text-gray-484848">
<label htmlFor={name}>{placeholder}</label>
<input
id={name}
name={name}
type={type}
className="h-16 px-2 bg-white border border-gray-500 rounded-md"
className="h-16 px-2 bg-white border border-gray-555 rounded-md"
required={required}
/>
</div>
Expand Down
Empty file.
112 changes: 1 addition & 111 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,113 +1,3 @@
import Image from "next/image";

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">src/app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{" "}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore starter templates for Next.js.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
);
return <>Main</>;
}
Empty file removed src/app/pages/dashboard/page.tsx
Empty file.
9 changes: 9 additions & 0 deletions src/assets/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 37 additions & 22 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
import type { Config } from "tailwindcss";
import type { Config } from 'tailwindcss';

const config: Config = {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},

screens: {
sm: '320px',
md: '481px',
lg: '769px',
xl: '1025px',
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}'
],
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))'
},
fontFamily: {
primary: ['Rubik', 'sans-serif'],
secondary: ['Lato', 'sans-serif']
},
fontSize: {
28: '28px'
},
colors: {
primary: {
lilac: '#7978D9'
},
gray: {
484848: '#484848',
555: '#555'
}
}
},

screens: {
sm: '320px',
md: '481px',
lg: '769px',
xl: '1025px'
}
},
},
plugins: [],
plugins: []
};
export default config;
24 changes: 19 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,9 +22,19 @@
}
],
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"src/**/*"
],
"exclude": [
"node_modules"
]
}

0 comments on commit caff63f

Please sign in to comment.