Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
thesiyhbrand authored Jan 25, 2024
0 parents commit 33c660f
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
26 changes: 26 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link
href="https://cdn.jsdelivr.net/npm/remixicon@4.1.0/fonts/remixicon.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="main">
<nav>
<h1>DESIGNJOY</h1>
<i class="ri-menu-line"></i>
</nav>
<div class="main-nav">
<i class="ri-close-circle-line"></i>
</div>
</div>

<script src="script.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
document.querySelector(".ri-menu-line").addEventListener("click", function(){
document.querySelector(".main-nav").style.top = "0%";
})

document.querySelector(".ri-close-circle-line").addEventListener("click", function(){
document.querySelector(".main-nav").style.top = "-100%";
})
49 changes: 49 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
html , body{
height: 100%;
width: 100%;
}

#main{
width: 100%;
height: 100vh;
position: relative;
}

nav{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0% 5%;
width: 100%;
height: 10vh;
}

nav h1{
font-family: Product Sans;
}

nav i{
font-size: 1.5vw;
}

.ri-close-circle-line{
color: #fff;
font-size: 3vw;
}

.main-nav{
position: absolute;
display: flex;
align-items: center;
justify-content: center;
top: -100%;
width: 100%;
height: 100vh;
background-color: black;
transition: all cubic-bezier(0.19, 1, 0.22, 1)2s;
}

0 comments on commit 33c660f

Please sign in to comment.