Finished Day 3
This commit is contained in:
65
50Days/day3/index.html
Normal file
65
50Days/day3/index.html
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<!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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
|
||||||
|
integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
|
<link rel="stylesheet" href="style.css" />
|
||||||
|
<title>Day 3: Rotating Navigation</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container show-nav">
|
||||||
|
<div class="circle-container">
|
||||||
|
<div class="circle">
|
||||||
|
<button id="close">
|
||||||
|
<i class="fas fa-times"></i>
|
||||||
|
</button>
|
||||||
|
<button id="open">
|
||||||
|
<i class="fas fa-bars"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<h1>Amazing Article</h1>
|
||||||
|
<small>The Writer</small>
|
||||||
|
<p>
|
||||||
|
Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum odio,
|
||||||
|
maiores nostrum debitis, natus numquam velit minus officia a
|
||||||
|
consequuntur quaerat obcaecati perspiciatis repudiandae suscipit nemo
|
||||||
|
accusamus quam beatae pariatur iste cumque. Quibusdam illo mollitia
|
||||||
|
unde odio eligendi ratione atque amet sunt fugit, laborum harum
|
||||||
|
officiis at placeat dolore. Est optio omnis delectus hic voluptatem
|
||||||
|
quam, cumque iusto laudantium ullam? Fugit, voluptates fugiat
|
||||||
|
perferendis sunt corrupti vitae ab aperiam ipsa voluptatum, maiores
|
||||||
|
maxime? Perferendis commodi architecto eligendi culpa ipsam adipisci
|
||||||
|
magni deleniti placeat voluptatum, facilis deserunt id expedita vero!
|
||||||
|
Repellendus possimus at harum fugiat repellat rem consequatur, placeat
|
||||||
|
dignissimos soluta.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>My Image</h3>
|
||||||
|
<img
|
||||||
|
src="https://images.unsplash.com/photo-1617892459113-0ef697cafa05?w=1350"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><i class="fas fa-home"></i> Home</li>
|
||||||
|
<li><i class="fas fa-user-alt"></i> About</li>
|
||||||
|
<li><i class="fas fa-envelope"></i> Contact</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
11
50Days/day3/script.js
Normal file
11
50Days/day3/script.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
const open = document.getElementById('open');
|
||||||
|
const close = document.getElementById('close');
|
||||||
|
const container = document.querySelector('.container');
|
||||||
|
|
||||||
|
open.addEventListener('click', () => {
|
||||||
|
container.classList.add('show-nav');
|
||||||
|
});
|
||||||
|
|
||||||
|
close.addEventListener('click', () => {
|
||||||
|
container.classList.remove('show-nav');
|
||||||
|
});
|
||||||
134
50Days/day3/style.css
Normal file
134
50Days/day3/style.css
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Lato', sans-serif;
|
||||||
|
background-color: #333;
|
||||||
|
color: #222;
|
||||||
|
overflow-x: hidden;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background-color: #fafafa;
|
||||||
|
transform-origin: top left;
|
||||||
|
transition: transform 0.5s linear;
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.show-nav {
|
||||||
|
transform: rotate(-20deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle-container {
|
||||||
|
position: fixed;
|
||||||
|
top: -75px;
|
||||||
|
left: -75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
background-color: #ff7979;
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: relative;
|
||||||
|
transition: transform 0.5s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.show-nav .circle {
|
||||||
|
transform: rotate(-70deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle button {
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
height: 75px;
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
font-size: 23px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle button:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle button#open {
|
||||||
|
left: 55%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle button#close {
|
||||||
|
top: 55%;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: top left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.show-nav + nav li {
|
||||||
|
transform: translateX(0);
|
||||||
|
transition-delay: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 40px;
|
||||||
|
left: 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav li {
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: #fff;
|
||||||
|
margin: 40px 0;
|
||||||
|
transform: translateX(-100%);
|
||||||
|
transition: transform 0.2s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav li i {
|
||||||
|
font-size: 20px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li + li {
|
||||||
|
margin-left: 15px;
|
||||||
|
transform: translateX(-150%);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li + li + li {
|
||||||
|
margin-left: 30px;
|
||||||
|
transform: translateX(-200%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content h1 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content small {
|
||||||
|
color: #555;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content p {
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user