Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed font of navbar #177

Merged
merged 11 commits into from
Oct 31, 2022
130 changes: 130 additions & 0 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,136 @@
font-size: 4rem;
}

.navbar {
display: flex;
position: relative;
justify-content: space-between;
align-items: center;
background-color: #333;
color: white;
}

.brand-title {
font-size: 1.5rem;
margin: 3rem;
}

.navbar-links {
height: 100%;
}

.navbar-links ul {
display: flex;
margin: 0;
padding: 0;
}

.navbar-links li {
list-style: none;
}

.navbar-links li a {
display: block;
text-decoration: none;
color: white;
padding: 1rem;
}

.navbar-links li:hover {
background-color: #555;
}

.toggle-button {
position: absolute;
top: .75rem;
right: 1rem;
display: none;
flex-direction: column;
justify-content: space-between;
width: 30px;
height: 21px;
}

.toggle-button .bar {
height: 3px;
width: 100%;
background-color: white;
border-radius: 10px;
}

@media (max-width: 800px) {
.navbar {
flex-direction: column;
align-items: flex-start;
}

.toggle-button {
display: flex;
}

.navbar-links {
display: none;
width: 100%;
}

.navbar-links ul {
width: 100%;
flex-direction: column;
}

.navbar-links ul li {
text-align: center;
}

.navbar-links ul li a {
padding: .5rem 1rem;
}

.navbar-links.active {
display: flex;
}
}

.side-links {
position: absolute;
bottom: 15px;
right: 15px;
}

.side-link {
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
margin-bottom: 10px;
color: white;
width: 180px;
padding: 10px 0;
border-radius: 10px;
}

.side-link-youtube {
background-color: red;
}

.side-link-twitter {
background-color: #1DA1F2;
}

.side-link-github {
background-color: #6e5494;
}

.side-link-text {
margin-left: 10px;
font-size: 18px;
}

.side-link-icon {
color: white;
font-size: 30px;
}

.paragraph {
background-color: rgba(0, 0, 0, 0.5);
-webkit-backdrop-filter: blur(50px);
Expand Down
5 changes: 5 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
const toggleButton = document.getElementsByClassName('toggle-button')[0]
const navbarLinks = document.getElementsByClassName('navbar-links')[0]

toggleButton.addEventListener('click', () => {
navbarLinks.classList.toggle('active')
})
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@
href="assets/img/CALCULATOR.png"
alt="CALCULATOR"
/>
<nav class="navbar">
<div class="brand-title">CALCULATOR | YOSHITHA</div>
<a href="#" class="toggle-button">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</a>
<div class="navbar-links">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>

<!-- Title -->

Expand Down