Add files via upload
This commit is contained in:
parent
9a7df99d19
commit
62949e3814
6
100_projects/34-animated-sidebar-menu/app.js
Normal file
6
100_projects/34-animated-sidebar-menu/app.js
Normal file
@ -0,0 +1,6 @@
|
||||
const toggle = document.getElementById('toggle');
|
||||
const nav = document.getElementById('nav');
|
||||
|
||||
toggle.addEventListener('click', () => {
|
||||
nav.classList.toggle('active');
|
||||
});
|
6
100_projects/34-animated-sidebar-menu/css/all.min.css
vendored
Normal file
6
100_projects/34-animated-sidebar-menu/css/all.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
84
100_projects/34-animated-sidebar-menu/css/style.css
Normal file
84
100_projects/34-animated-sidebar-menu/css/style.css
Normal file
@ -0,0 +1,84 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Roboto:700&display=swap');
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
/* background-image: url('../img/photo.avif'); */
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
video{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
nav {
|
||||
background-color: #FFEFD5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 30px 0 50px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100vh;
|
||||
transform: translateX(-100%);
|
||||
transition: transform .5s ease;
|
||||
border-radius: 5px;
|
||||
}
|
||||
nav.active {
|
||||
transform: translateX(0);
|
||||
}
|
||||
nav ul {
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
nav ul li {
|
||||
margin: 14px 0;
|
||||
text-align: right;
|
||||
}
|
||||
nav a {
|
||||
color: #111;
|
||||
font-size: 24px;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
transition: .3s;
|
||||
}
|
||||
nav a:hover {
|
||||
color: #fff;
|
||||
background: #111;
|
||||
}
|
||||
.toggle {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
padding: 10px 15px 10px 22px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 8px;
|
||||
transform: translateX(100%);
|
||||
background: #FFEFD5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.toggle:focus {
|
||||
outline: none;
|
||||
}
|
||||
.toggle .fa-bars {
|
||||
display: block;
|
||||
}
|
||||
.toggle .fa-times {
|
||||
display: none;
|
||||
}
|
||||
nav.active .toggle .fa-bars {
|
||||
display: none;
|
||||
}
|
||||
nav.active .toggle .fa-times {
|
||||
display: block;
|
||||
}
|
28
100_projects/34-animated-sidebar-menu/index.html
Normal file
28
100_projects/34-animated-sidebar-menu/index.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/all.min.css">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<video src="pexels.mp4" type="video/mp4" autoplay muted></video>
|
||||
<nav id="nav">
|
||||
<button class="toggle" id="toggle">
|
||||
<i class="fas fa-bars"></i>
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
<ul>
|
||||
<li><a href="#">Home</a></li>
|
||||
<li><a href="#">About</a></li>
|
||||
<li><a href="#">Blog</a></li>
|
||||
<li><a href="#">Shop</a></li>
|
||||
<li><a href="#">Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
BIN
100_projects/34-animated-sidebar-menu/pexels.mp4
Normal file
BIN
100_projects/34-animated-sidebar-menu/pexels.mp4
Normal file
Binary file not shown.
BIN
100_projects/34-animated-sidebar-menu/webfonts/fa-brands-400.ttf
Normal file
BIN
100_projects/34-animated-sidebar-menu/webfonts/fa-brands-400.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
100_projects/34-animated-sidebar-menu/webfonts/fa-solid-900.ttf
Normal file
BIN
100_projects/34-animated-sidebar-menu/webfonts/fa-solid-900.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user