Browse Source

styles: welcome page

master
Amit Roy 6 months ago
parent
commit
81e6aa98db
2 changed files with 270 additions and 1 deletions
  1. +250
    -0
      src/app/page.module.scss
  2. +20
    -1
      src/app/page.tsx

+ 250
- 0
src/app/page.module.scss View File

@ -3,4 +3,254 @@
.main {
padding: 0;
min-height: 100vh;
background-color: #ffffff;
.animated_background_wrap {
width: 100%;
height: 100%;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 10px;
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
z-index: 0;
overflow: hidden;
&::before {
content: "";
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
backdrop-filter: blur(40px);
-webkit-backdrop-filter: blur(40px);
border-radius: 10px;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.shape {
position: absolute;
z-index: -2;
}
.shape1 {
height: 400px;
width: 400px;
inset: 0;
opacity: 0.5;
margin: auto;
background: rgb(2, 0, 36);
background: -webkit-gradient(
linear,
left top,
right top,
from(rgba(2, 0, 36, 1)),
color-stop(35%, rgba(9, 9, 121, 1)),
to(rgba(0, 212, 255, 1))
);
background: -o-linear-gradient(
left,
rgba(2, 0, 36, 1) 0%,
rgba(9, 9, 121, 1) 35%,
rgba(0, 212, 255, 1) 100%
);
background: linear-gradient(
90deg,
rgba(2, 0, 36, 1) 0%,
rgba(9, 9, 121, 1) 35%,
rgba(0, 212, 255, 1) 100%
);
}
.shape2 {
height: 400px;
width: 400px;
background: rgb(66, 1, 144);
background: -webkit-gradient(
linear,
left top,
right top,
from(rgba(66, 1, 144, 1)),
color-stop(35%, rgba(61, 9, 121, 1)),
to(rgba(255, 0, 232, 1))
);
background: -o-linear-gradient(
left,
rgba(66, 1, 144, 1) 0%,
rgba(61, 9, 121, 1) 35%,
rgba(255, 0, 232, 1) 100%
);
background: linear-gradient(
90deg,
rgba(66, 1, 144, 1) 0%,
rgba(61, 9, 121, 1) 35%,
rgba(255, 0, 232, 1) 100%
);
-webkit-animation: shape2 10s ease 0s infinite alternate;
animation: shape2 10s ease 0s infinite alternate;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
border-radius: 79% 21% 70% 30% / 30% 30% 70% 70%;
}
.shape3 {
height: 200px;
width: 200px;
background: rgb(250, 255, 54);
background: -webkit-gradient(
linear,
left top,
right top,
from(rgba(250, 255, 54, 1)),
color-stop(35%, rgba(111, 193, 3, 1)),
to(rgba(86, 255, 193, 1))
);
background: -o-linear-gradient(
left,
rgba(250, 255, 54, 1) 0%,
rgba(111, 193, 3, 1) 35%,
rgba(86, 255, 193, 1) 100%
);
background: linear-gradient(
90deg,
rgba(250, 255, 54, 1) 0%,
rgba(111, 193, 3, 1) 35%,
rgba(86, 255, 193, 1) 100%
);
-webkit-animation: shape3 10s ease 0s infinite alternate;
animation: shape3 10s ease 0s infinite alternate;
border-radius: 5% 95% 18% 82% / 82% 86% 14% 18%;
}
@-webkit-keyframes shape1 {
0% {
left: 20px;
top: -20%;
}
50% {
left: 0;
top: 0;
border-radius: 21% 79% 18% 82% / 82% 30% 70% 18%;
}
100% {
left: 20px;
top: -20%;
}
}
@keyframes shape1 {
0% {
left: 20px;
top: -20%;
}
50% {
left: 0;
top: 0;
border-radius: 21% 79% 18% 82% / 82% 30% 70% 18%;
}
100% {
left: 20px;
top: -20%;
}
}
@-webkit-keyframes shape2 {
0% {
left: 0;
top: -20%;
width: 300px;
height: 300px;
}
50% {
left: 200px;
top: 100px;
border-radius: 21% 79% 18% 82% / 82% 30% 70% 18%;
width: 400px;
height: 400px;
}
100% {
left: 0;
top: -20%;
width: 300px;
height: 300px;
}
}
@keyframes shape2 {
0% {
left: 0;
top: -20%;
width: 300px;
height: 300px;
}
50% {
left: 200px;
top: 100px;
border-radius: 21% 79% 18% 82% / 82% 30% 70% 18%;
width: 400px;
height: 400px;
}
100% {
left: 0;
top: -20%;
width: 300px;
height: 300px;
}
}
@keyframes shape3 {
0% {
right: 0;
bottom: -20%;
}
50% {
right: 50px;
bottom: 150px;
border-radius: 21% 79% 18% 82% / 82% 30% 70% 18%;
}
100% {
right: 0;
bottom: -20%;
}
}
@-webkit-keyframes shape3 {
0% {
right: 0;
bottom: -20%;
}
50% {
right: 50px;
bottom: 150px;
border-radius: 21% 79% 18% 82% / 82% 30% 70% 18%;
}
100% {
right: 0;
bottom: -20%;
}
}
}
.box {
position: absolute;
inset: 0;
width: 90%;
max-width: 500px;
height: 50vh;
border-radius: 16px;
background-color: hsla(0, 0%, 100%, 0.226);
backdrop-filter: blur(10px);
margin: auto;
@include displayFlex(row, center, center);
-webkit-box-shadow: inset 0px 0px 12px 0px rgba(255, 255, 255, 0.28);
-moz-box-shadow: inset 0px 0px 12px 0px rgba(255, 255, 255, 0.28);
box-shadow: inset 0px 0px 12px 0px rgba(255, 255, 255, 0.28);
}
}

+ 20
- 1
src/app/page.tsx View File

@ -1,6 +1,25 @@
import Image from "next/image";
import styles from "./page.module.scss";
import { Typography } from "@mui/material";
export default function Home() {
return <main className={styles.main}>Demo page</main>;
return (
<main className={styles.main}>
<div className={styles.animated_background_wrap}>
<div className={`${styles.shape} ${styles.shape1}`}></div>
<div className={`${styles.shape} ${styles.shape2}`}></div>
<div className={`${styles.shape} ${styles.shape3}`}></div>
</div>
<div className={styles.box}>
<Typography
variant="h2"
sx={{ lineHeight: 1 }}
color="var(--primary_light)"
fontWeight={"bold"}
>
WElCOME
</Typography>
</div>
</main>
);
}

Loading…
Cancel
Save