Skip to content

Commit

Permalink
header is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinaHranovska committed Feb 11, 2024
1 parent 72e4bea commit e0a1fd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
13 changes: 0 additions & 13 deletions src/js/pagination.js
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
document.addEventListener("DOMContentLoaded", function() {
const button1 = document.querySelector(".home-button");
const button2 = document.querySelector(".favourites-button");
const currentPage = window.location.pathname;
if (currentPage.includes("index")) {
button1.classList.add("header-button1-act");
console.log(111);
} else if (currentPage.includes("favorites")) {
button2.classList.add("header-button2-act");
}
});


19 changes: 7 additions & 12 deletions src/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section class="header-page on-home">
<div class="container header-thumb">
<nav class="header-nav">
<a href="./src/index.html" class="header-logo">energy.flow</a>
<a href="./index.html" class="header-logo">energy.flow</a>
<div class="burger-menu-open" data-mobile-open>
<svg class="burger-menu" width="32" height="16">
<use href="./img/icons/sprite.svg#icon-burger-menu"></use>
Expand All @@ -11,17 +11,12 @@
<a
class="backdrop-button is-active"
id="header-button1"
type="button"
href="./src/index.html"
href="./index.html"
>
Home
</a>
<a
class="backdrop-button"
id="header-button2"
type="button"
href="./src/favorites.html"
>

<a class="backdrop-button" id="header-button2" href="./favorites.html">
Favorites
</a>
</div>
Expand Down Expand Up @@ -55,7 +50,7 @@
<div class="container">
<div class="backdrop">
<div class="burger">
<a href="./src/index.html" class="burger-logo">energy.flow</a>
<a href="./index.html" class="burger-logo">energy.flow</a>
<div class="burger-closed">
<svg width="20" height="20">
<use href="./img/icons/sprite.svg#icon-modal-close"></use>
Expand All @@ -67,15 +62,15 @@
class="backdrop-button is-active"
id="header-button1"
type="button"
href="./src/index.html"
href="./index.html"
>
Home
</a>
<a
class="backdrop-button"
id="header-button2"
type="button"
href="./src/favorites.html"
href="./favorites.html"
>
Favorites
</a>
Expand Down

0 comments on commit e0a1fd5

Please sign in to comment.