Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sgruzdov authored Dec 15, 2020
1 parent 769db25 commit f7140e8
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 0 deletions.
39 changes: 39 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<div class="info">?</div>

<div class="stuzon-modal">
<iframe src="https://builder.stuzon.com/stuzon" frameborder="0"></iframe>
</div>

</body>
</html>


<script>
const stuzon = document.querySelector('.stuzon-modal')
const info = document.querySelector('.info')

info.addEventListener('click', e => {
const target = e.target

if(!target.classList.contains('active')) {
target.classList.add('active')
stuzon.style.animation = '1.3s showModalStuzon ease forwards'
} else {
target.classList.remove('active')
stuzon.style.animation = '1.3s hideModalStuzon ease-in-out forwards'
}
})

</script>
99 changes: 99 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
* {
font-family: 'Open Sans', sans-serif;
box-sizing: border-box;
margin: 0;
padding: 0;
text-decoration: none;
outline: 0;
}


.info {
position: fixed;
bottom: 30px;
right: 30px;
width: 50px;
height: 50px;
border-radius: 50%;
background: #eee;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
font-weight: bold;
font-size: 25px;
transition: .3s background;
z-index: 10000;
}

.info:hover {
background: rgb(204, 204, 204);
}

.stuzon-modal {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
width: 100%;
height: 100vh;
background: #eee;
border-radius: 10px;
bottom: 65px;
right: 65px;
transform: matrix(0, 0, 0, 0, 0, 0);
opacity: 0;
z-index: 9999;
/* will-change: transform; */
}

.stuzon-modal iframe {
width: 100%;
height: 100%;
}

.info.active + .stuzon-modal {
animation: 1.3s showModalStuzon ease forwards;
}


@keyframes showModalStuzon {
0% {
opacity: 0;
bottom: 65px;
right: 65px;
transform: translate(50%, 50%) matrix(0.00001, 0, 0, 0.00001, 0, 0);
}
20% {
opacity: 1;
transform: translate(50%, 50%) matrix(0.05, 0, 0, 0.05, 0, 0);
right: 65px;
}
100% {
opacity: 1;
bottom: 50%;
right: 50%;
transform: translate(50%, 50%) matrix(1, 0, 0, 1, 0, 0);
}
}

@keyframes hideModalStuzon {
0% {
opacity: 1;
bottom: 50%;
right: 50%;
transform: translate(50%, 50%) matrix(1, 0, 0, 1, 0, 0);
}
80% {
opacity: 1;
transform: translate(50%, 50%) matrix(0.05, 0, 0, 0.05, 0, 0);
right: 65px;
}
100% {
opacity: 0;
bottom: 65px;
right: 65px;
transform: translate(50%, 50%) matrix(0.00001, 0, 0, 0.00001, 0, 0);
}
}

0 comments on commit f7140e8

Please sign in to comment.