Merge pull request #5 from Nez27/feat/add-popup-modal

Add modal popup for register page.
This commit is contained in:
Loi Phan
2023-08-24 11:36:39 +07:00
committed by GitHub
7 changed files with 114 additions and 5 deletions
+9 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@@ -8,6 +8,14 @@
</head>
<body>
<!-- <div class="loader"></div> -->
<div class="overlay"></div>
<div class="modal-box">
<div class="checkmark"></div>
<h2 class="modal-box__title">Register success!</h2>
<p class="modal-box__message">Please login to continue.</p>
<button class="modal-box__redirect-btn">OK!</button>
</div>
<div class="background">
<div class="wrapper">
<img class="logo-web" src="../assets/images/logo.svg" alt="Logo web" />
@@ -10,6 +10,7 @@
// Components
@import './components/loader';
@import './components/popup-form';
// Layouts
@import './layouts/header';
@@ -1 +1,27 @@
// TODO
@mixin flex-layout(
$justify: null,
$align: null,
$direction: null,
$gap: null,
$wrap: null
) {
@if $justify != null {
justify-content: $justify;
}
@if $align != null {
align-items: $align;
}
@if $direction != null {
flex-direction: $direction;
}
@if $gap != null {
gap: $gap;
}
@if $wrap != null {
flex-wrap: $wrap;
}
}
@@ -3,7 +3,7 @@ $primary-font: 'Roboto';
// Color
$light-primary-color: #00bc2a;
$primary-color: #2db84c;
$dark-primary-color: #009421;
$dark-primary-color: #00710f;
$primary-text-color: #000;
$secondary-text-color: #0000008a;
$secondary-light-text-color: #00000042;
@@ -5,3 +5,11 @@
%rounded {
border-radius: 10px;
}
%d-flex {
display: flex;
}
%d-absolute {
position: absolute;
}
@@ -0,0 +1,52 @@
.overlay {
@extend %d-absolute;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
z-index: 2;
opacity: 0;
pointer-events: none;
}
.modal-box {
@extend %d-flex;
@extend %d-absolute;
@include flex-layout($direction: column, $align: center, $gap: 30px);
left: 50%;
top: 50%;
transform: translate(-50%, -50%) scale(1);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
z-index: 2;
padding: 40px 50px;
border-radius: 10px;
background-color: $white;
opacity: 0;
pointer-events: none;
transition: all 0.3s ease;
&__title {
font-size: $fs-2x-lg;
}
&__message {
font-size: $fs-lg;
text-align: center;
}
&__redirect-btn {
color: $white;
font-size: $fs-md;
background-color: $light-primary-color;
border: none;
border-radius: 10px;
padding: 15px 30px;
cursor: pointer;
}
}
.active {
opacity: 1;
pointer-events: auto;
}
@@ -1,12 +1,12 @@
.background {
height: 100vh;
background: linear-gradient(#00710f 314px, #ebebeb -100%);
background: linear-gradient($dark-primary-color 314px, #ebebeb -100%);
}
.wrapper {
@extend %margin-inline-auto;
@extend %d-absolute;
position: absolute;
top: 0;
left: 0;
right: 0;
@@ -17,6 +17,20 @@
padding-top: 54px;
}
.checkmark {
display: inline-block;
&:after {
content: '';
display: block;
width: 11px;
height: 22px;
border: solid $primary-color;
border-width: 0 10px 10px 0;
transform: rotate(45deg);
}
}
.form {
@extend %margin-inline-auto;