Skip to content

Commit

Permalink
Valentine Day
Browse files Browse the repository at this point in the history
  • Loading branch information
N.Nikitins committed Feb 13, 2024
1 parent 08bdaac commit 162b8cf
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 520 deletions.
3 changes: 0 additions & 3 deletions README.md

This file was deleted.

244 changes: 244 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
body {
background-image: url('../images/heart-bg.jpg');
background-size: cover; /* or contain, depending on how you want the image to be displayed */
background-repeat: no-repeat;
background-position: center center; /* or any other position */
}

.envelope-wrapper {
height: 300px;
}

#envelope {
position: relative;
height: 232px; /* height: 232px; width: 360px; */
width: 360px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
margin-left: auto;
margin-right: auto;
top: 50%;
background-color: #FF6863;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#envelope:hover {
cursor: pointer;
}

.front {
position: absolute;
width: 0;
height: 0;
z-index: 3;
}

.flap {
border-top: 118px solid #FF6863;
border-left: 180px solid transparent;
border-right: 180px solid transparent;
border-bottom: 82px solid transparent;
transform-origin: top;
}

.pocket {
border-left: 180px solid #FF8BA0;
border-right: 180px solid #FF8BA0;
border-bottom: 116px solid #FFA8B5;
border-top: 116px solid transparent;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}

.letter {
position: relative;
background-color: white;
width: 90%;
height: 95%;
top: 5%;
border-radius: 10px;
box-shadow: 0 2px 26px rgba(0, 0, 0, .12);
margin-left: auto;
margin-right: auto;
}

.letter:after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}

.words {
position: absolute;
left: 5%;
width: 80%;
height: 14%;
font-size: 15px;
font-family: "Pangolin", cursive;
font-weight: 400;
font-style: normal;
color: black;
}

.line1 {
top: 15%;
}
.line2 {
top: 36%;
}
.line3 {
top: 60%;
text-align: center;
}
.line4 {
top: 75%;
text-align: center;
}

.open .flap {
transform: rotatex(180deg);
transition: transform 0.4s ease, z-index 0.6s;
z-index: 1;
}

.close .flap {
transform: rotatex(0deg);
transition: transform 0.4s 0.6s ease, z-index 1s;
z-index: 5;
}

.open .letter {
transform: translatey(-120px);
transition: transform 0.4s 0.6s ease, z-index 0.6s;
z-index: 2;
}

.close .letter {
transform: translatey(0deg);
transition: transform 0.4s ease, z-index 1s;
z-index: 1;
}

.hearts {
position: absolute;
top: 90px;
left: 0;
right: 0;
z-index: 2;
}

.heart {
position: absolute;
bottom: 0;
right: 10%;
}

.heart:before, .heart:after {
position: absolute;
content: "";
background: #d00000;
width: 50px;
height: 80px;
left: 50px;
top: 0;
border-radius: 50px 50px 0 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}

.heart:after {
left: 0;
transform: rotate(45deg);
transform-origin: 100% 100%;
}

.close .heart {
opacity: 0;
animation: none;
}

.a1 {
left: 20%;
transform: scale(0.6);
opacity: 1;
animation: slideUp 4s linear 1, sideSway 2s ease-in-out 4 alternate;
animation-fill-mode: forwards;
animation-delay: 0.7s;
}
.a2 {
left: 55%;
transform: scale(1);
opacity: 1;
animation: slideUp 5s linear 1, sideSway 4s ease-in-out 2 alternate;
animation-fill-mode: forwards;
animation-delay: 0.7s;
}
.a3 {
left: 10%;
transform: scale(0.8);
opacity: 1;
animation: slideUp 7s linear 1, sideSway 2s ease-in-out 6 alternate;
animation-fill-mode: forwards;
animation-delay: 0.7s;
}

@keyframes slideUp {
0% {
top: 0;
}
100% {
top: -600px;
}
}

@keyframes sideSway {
0% {
margin-left: 0px;
}
100% {
margin-left: 50px;
}
}

.reset {
text-align: center;
}

.reset button {
font-weight: 800;
font-style: normal;
transition: all 0.1s linear;
background-color: transparent;
border: solid 2px #FF6863;
border-radius: 4px;
color: #FF6863;
display: inline-block;
font-size: 14px;
text-transform: uppercase;
margin: 20px;
margin-top: 100px;
padding: 10px;
line-height: 2em;
text-decoration: none;
min-width: 150px;
outline: none;
}

.reset button:hover {
background-color: #FF6863;
cursor: pointer;
color: white;
}

.valentine {
text-align: center;
font-family: "Pangolin", cursive;
font-weight: 400;
font-style: normal;
color:rgb(20, 20, 20);
font-size: 70px;
margin: 150px;
}
Binary file removed images/cc-bg-1.jpg
Binary file not shown.
Binary file added images/heart-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/my_img.jpg
Binary file not shown.
Loading

0 comments on commit 162b8cf

Please sign in to comment.