Skip to content

Commit

Permalink
JavaScript Animations (Finished)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuXn-WebDev committed Apr 27, 2023
1 parent dc12c96 commit 8d4b676
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Finished/1. JS Animation/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const sidebar = document.querySelector(".sidebar");
const btn = document.querySelector("button");

btn.addEventListener("click", () => {
sidebar.classList.toggle("hide");
});
25 changes: 25 additions & 0 deletions Finished/1. JS Animation/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<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" />
<title>JS Animation</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<section class="sidebar">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
</ul>
</section>

<div class="center">
<button>Click</button>
</div>

<script src="app.js"></script>
</body>
</html>
54 changes: 54 additions & 0 deletions Finished/1. JS Animation/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}

body {
background: #1b1b1b;
}

section.sidebar {
height: 100vh;
width: 20%;
/* background: rgb(33, 33, 33); */
background: #292929;
position: fixed;
display: flex;
justify-content: center;
align-items: center;
transition: 1s ease;
}

.hide {
transform: translateX(-230px);
}

ul li {
list-style: none;
margin-bottom: 10px;
}

ul li a {
text-decoration: none;
font-size: 1.2rem;
font-family: sans-serif;
color: #fff;
}

.center {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.center button {
padding: 10px 20px;
font-size: 1rem;
border: none;
/* box-shadow: 1px 1px 1px 2px rgb(186, 186, 186); */
background: #ffa31a;
color: #fff;
cursor: pointer;
}
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions Starter/8. Creatives Project/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<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" />
<title>Creatives Project</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js"></script>
<script src="app.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions Starter/8. Creatives Project/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Kumar+One+Outline&display=swap");

* {
padding: 0;
margin: 0;
box-sizing: border-box;
}

0 comments on commit 8d4b676

Please sign in to comment.