diff --git a/client/src/assets/landing-bg.jpg b/client/src/assets/landing-bg.jpg new file mode 100644 index 0000000..fccf093 Binary files /dev/null and b/client/src/assets/landing-bg.jpg differ diff --git a/client/src/components/Footer/index.tsx b/client/src/components/Footer/index.tsx index 205e38d..4179466 100644 --- a/client/src/components/Footer/index.tsx +++ b/client/src/components/Footer/index.tsx @@ -3,7 +3,6 @@ import { Button, Col, Container, Row } from 'react-bootstrap'; import { useNavigate } from 'react-router-dom'; -import { env } from '../../env'; import AuthContext from '../../context/AuthContext'; import './style.css'; @@ -19,7 +18,7 @@ import './style.css'; function Footer(): JSX.Element { const { signOut, user } = useContext(AuthContext); const navigate = useNavigate(); - const build = env.VITE_BUILD; + const build = import.meta.env.VITE_BUILD; const currentYear = new Date().getFullYear(); const goOut = () => { diff --git a/client/src/styles/custom.scss b/client/src/styles/custom.scss index 00f8158..750c2e1 100644 --- a/client/src/styles/custom.scss +++ b/client/src/styles/custom.scss @@ -1,11 +1,16 @@ -//$theme-colors: ( -// 'info': tomato, -// 'danger': teal, -// 'primary': green, -//); +$theme-colors: ( + 'info': tomato, + 'danger': teal, + 'primary': #61cd8d, +); @import '~bootstrap/scss/bootstrap'; -.bg-body-secondary { - background-color: red; +$primary-color: #61cd8d; +$light-bg: #f8f9fa; +$dark-text: #343a40; + +body { + background-color: $light-bg; } + diff --git a/client/src/views/Landing/index.tsx b/client/src/views/Landing/index.tsx index 568cbf0..aa827c8 100644 --- a/client/src/views/Landing/index.tsx +++ b/client/src/views/Landing/index.tsx @@ -1,8 +1,8 @@ import React, { useCallback, useContext, useEffect } from 'react'; import { Button, Container } from 'react-bootstrap'; -import './styles.scss'; import { useNavigate } from 'react-router-dom'; import AuthContext from '../../context/AuthContext'; +import './styles.scss'; /** * Landing page component. @@ -45,10 +45,10 @@ function Landing(): JSX.Element { }, []); return ( - -
-

Welcome to TaskNote App

-

+ +

+

Welcome to TaskNote

+

Your best friend to keep up with notes and tasks!

@@ -71,7 +71,6 @@ function Landing(): JSX.Element {
- ); } diff --git a/client/src/views/Landing/styles.scss b/client/src/views/Landing/styles.scss index c9121e6..392da0f 100644 --- a/client/src/views/Landing/styles.scss +++ b/client/src/views/Landing/styles.scss @@ -1,3 +1,62 @@ -body { - background-color: #ccc; +$primary-color: #61cd8d; +$light-bg: #f8f9fa; +$dark-text: #343a40; + +.landing-page { + position: relative; + text-align: center; + color: $dark-text; + background: url('../../assets/landing-bg.jpg') no-repeat center center; + background-size: cover; // Ensures the image covers the whole background + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.85); // Slight white overlay for text readability + z-index: 1; + } + + div { + position: relative; + z-index: 2; // Ensures the content is above the background and overlay + } + + h1 { + font-size: 2.5rem; + font-weight: 700; + margin-bottom: 1rem; + color: $dark-text; + } + + p { + font-size: 1.25rem; + margin-bottom: 2rem; + color: $dark-text; + } + + .btn-lg { + font-size: 1rem; + padding: 0.75rem 1.5rem; + } + + .btn-primary { + background-color: $primary-color; + border-color: $primary-color; + &:hover { + background-color: darken($primary-color, 10%); + } + } + + .btn-outline-primary { + color: $primary-color; + border-color: $primary-color; + &:hover { + background-color: $primary-color; + color: #fff; + } + } } diff --git a/client/src/views/Login/index.tsx b/client/src/views/Login/index.tsx index 8bbffe6..8428984 100644 --- a/client/src/views/Login/index.tsx +++ b/client/src/views/Login/index.tsx @@ -4,8 +4,9 @@ import React, { import { Alert, Button, Card, Col, Container, Form, Row } from 'react-bootstrap'; -import { useNavigate } from 'react-router-dom'; +import { Link, useNavigate } from 'react-router-dom'; import AuthContext from '../../context/AuthContext'; +import './styles.scss'; /** * Login page component. @@ -45,6 +46,7 @@ function Login(): JSX.Element { const form = event.currentTarget; if (form.checkValidity() === false) { setFormInvalid(true); + setErrorMessage('Please fill in your username and password!'); return; } @@ -65,12 +67,12 @@ function Login(): JSX.Element { useEffect(() => {}, [formInvalid]); return ( - + -

Login

+

Login

{formInvalid ? ( @@ -80,12 +82,12 @@ function Login(): JSX.Element {
- Email address + Email @@ -95,7 +97,7 @@ function Login(): JSX.Element { required type="password" name="password" - placeholder="Password" + placeholder="Type your password here" /> @@ -109,16 +111,16 @@ function Login(): JSX.Element {
- Don't have an account?  - - Register - + Don't have an account yet?  + + Register here +
diff --git a/client/src/views/Login/styles.scss b/client/src/views/Login/styles.scss new file mode 100644 index 0000000..17a682f --- /dev/null +++ b/client/src/views/Login/styles.scss @@ -0,0 +1,62 @@ +$primary-color: #61cd8d; +$light-bg: #f8f9fa; +$dark-text: #343a40; + +.login-page { + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; + background: url('../../assets/landing-bg.jpg') no-repeat center center; + background-size: cover; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.85); // White overlay for readability + z-index: 1; + } + + .card { + position: relative; + z-index: 2; + border: none; + border-radius: 8px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + } + + h2 { + font-size: 1.75rem; + font-weight: 600; + margin-bottom: 1.5rem; + color: $dark-text; + } + + .form-control { + border-radius: 5px; + } + + .btn-primary { + background-color: $primary-color; + border-color: $primary-color; + &:hover { + background-color: darken($primary-color, 10%); + } + } + + .text-center a { + color: $primary-color; + &:hover { + text-decoration: underline; + } + } + + .alert-danger { + background-color: rgba(255, 0, 0, 0.1); + border-color: rgba(255, 0, 0, 0.3); + } +} diff --git a/client/src/views/Register/index.tsx b/client/src/views/Register/index.tsx index fda143d..dfc1dff 100644 --- a/client/src/views/Register/index.tsx +++ b/client/src/views/Register/index.tsx @@ -4,7 +4,7 @@ import React, { import { Alert, Button, Card, Col, Container, Form, Row } from 'react-bootstrap'; -import { useNavigate } from 'react-router-dom'; +import { Link, useNavigate } from 'react-router-dom'; import AuthContext from '../../context/AuthContext'; /** @@ -45,6 +45,7 @@ function Register(): JSX.Element { const form = event.currentTarget; if (form.checkValidity() === false) { setFormInvalid(true); + setErrorMessage('Please fill in your username and password!'); return; } @@ -65,12 +66,12 @@ function Register(): JSX.Element { useEffect(() => {}, [formInvalid]); return ( - + -

Create account

+

Create account

{formInvalid ? ( @@ -80,12 +81,12 @@ function Register(): JSX.Element {
- Email address + Email @@ -95,7 +96,7 @@ function Register(): JSX.Element { required type="password" name="password" - placeholder="Password" + placeholder="Type your password here" /> @@ -104,25 +105,21 @@ function Register(): JSX.Element { type="submit" className="w-100" > - Login + Sign-up and register
Already have an account?  - - Login - -  or  - - Reset - + + Go to Login +