mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-23 01:46:39 +00:00
Login page done and responsive
This commit is contained in:
parent
ab8da062af
commit
64818b5095
@ -1,9 +1,14 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display&display=swap');
|
||||||
|
|
||||||
.bg-blue-custom {
|
:root {
|
||||||
background-color: #2170b9;
|
--blue: #2170b9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-blue-custom {
|
||||||
|
background-color: var(--blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
.font-inter {
|
.font-inter {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Inter', sans-serif;
|
||||||
}
|
}
|
||||||
@ -12,6 +17,21 @@
|
|||||||
font-family: 'Playfair Display', serif;
|
font-family: 'Playfair Display', serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .text-blue-custom {
|
.text-black-custom {
|
||||||
color: #2170b9;
|
color: #1a1c21;
|
||||||
} */
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #1d6ab1;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|||||||
9
React/src/pages/components/Button.js
Normal file
9
React/src/pages/components/Button.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const Button = () => (
|
||||||
|
<button className="bg-blue-custom border-0 font-inter font-semibold rounded text-xl m-0">
|
||||||
|
Login
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default Button;
|
||||||
18
React/src/pages/components/LoginWindow.js
Normal file
18
React/src/pages/components/LoginWindow.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Button from './Button';
|
||||||
|
|
||||||
|
const LoginWindow = () => {
|
||||||
|
return (
|
||||||
|
<div className="xl:w-1/3 lg:w-5/12 md:w-2/4 sm:w-9/12 w-11/12 flex flex-col justify-center shadow md:px-32 sm:px-28 md:py-40 sm:py-36 px-20 py-16">
|
||||||
|
<h1 className="font-playfair text-black-custom text-6xl mb-12">
|
||||||
|
Traffic Police Service
|
||||||
|
</h1>
|
||||||
|
<p className="text-black-custom font-light text-3xl mb-20">
|
||||||
|
Login to your account to view your dashboard and register a new vehicle.
|
||||||
|
</p>
|
||||||
|
<Button />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LoginWindow;
|
||||||
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
|
|
||||||
const Main = ({ Component }) => {
|
const Main = ({ Component }) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center justify-center h-3/4">
|
<div className="flex flex-col items-center justify-center h-4/5">
|
||||||
<Component />
|
<Component />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { Redirect } from 'react-router-dom';
|
|||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import Navbar from './components/Navbar';
|
import Navbar from './components/Navbar';
|
||||||
import Main from './components/Main';
|
import Main from './components/Main';
|
||||||
import VehicleRegisterForm from './components/VehicleRegisterForm';
|
import LoginWindow from './components/LoginWindow';
|
||||||
|
|
||||||
function Login() {
|
function Login() {
|
||||||
const user = useSelector((state) => state.auth.user);
|
const user = useSelector((state) => state.auth.user);
|
||||||
@ -18,7 +18,7 @@ function Login() {
|
|||||||
) : (
|
) : (
|
||||||
<div className="h-screen">
|
<div className="h-screen">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<Main Component={VehicleRegisterForm} />
|
<Main Component={LoginWindow} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user