Skip to content

Commit

Permalink
update the header part
Browse files Browse the repository at this point in the history
  • Loading branch information
sadaf-Daneshgar committed Feb 27, 2024
1 parent db3a5aa commit cc1520b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ const inputName = document.getElementById('user_name');
const inputEmail = document.getElementById('user_email');
const sumbitMessage = document.getElementById('sumbit-action');
const errorMessage = document.getElementById('error');
const header = document.querySelector('header');

function hideHeader() {
header.classList.add('hide-header');
}

function showHeader() {
header.classList.remove('hide-header');
}

mobileOpen.addEventListener('click', () => {
if (mobileShow.style.display === 'block') {
mobileShow.style.display = 'none';
Expand Down Expand Up @@ -85,6 +95,7 @@ const projectsFullDatiel = [

for (let i = 0; i < popupOpen.length; i += 1) {
popupOpen[i].addEventListener('click', () => {
hideHeader();
const popupContainer = document.createElement('div');
popupContainer.innerHTML = `
<div class="cover-container">
Expand Down Expand Up @@ -121,6 +132,7 @@ for (let i = 0; i < popupOpen.length; i += 1) {

popupClose.addEventListener('click', () => {
document.body.removeChild(popupContainer);
showHeader();
});
});
}
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ header {
z-index: 10;
}

.hide-header{
display: none;
}

.logo-class {
font-weight: 700;
padding-top: 10px;
Expand Down

0 comments on commit cc1520b

Please sign in to comment.