This commit is contained in:
Boof 2023-04-14 11:34:49 +02:00 committed by GitHub
parent af03432846
commit 34e6ae9656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 2 deletions

View File

@ -14,6 +14,7 @@
<link rel="stylesheet" href="../data/style/offline-language-english.css">
<script src="https://hexahigh.github.io/cdn/js/min/offline.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<meta name="CurrentPage" content="about">
</head>
<body>

View File

@ -5,6 +5,7 @@ function delay(milliseconds){
});
}
const CurrentPage = document.querySelector('meta[name="CurrentPage"]').content
function scrollTop() {
const scrollBtn = document.querySelector('.scrollTop');
@ -19,10 +20,18 @@ const navMenuImg = document.querySelector('#nav-menu-img');
function navShow() {
if (navMobileContentClose.classList.contains('nav-mobile-content')) {
navMobileContentClose.classList.remove('nav-mobile-content');
navMenuImg.src = '/data/images/menu.svg';
if(CurrentPage == projects, about, news) {
navMenuImg.src = '../data/images/menu.svg';
} else {
navMenuImg.src = '/data/images/menu.svg';
}
} else {
navMobileContentClose.classList.toggle('nav-mobile-content');
navMenuImg.src = '/data/images/close.svg';
if(CurrentPage == projects, about, news) {
navMenuImg.src = '../data/images/close.svg';
} else {
navMenuImg.src = '/data/images/close.svg';
}
}
}

View File

@ -36,6 +36,7 @@
<script src="../index-allpage.js" defer></script>
<script src="https://hexahigh.github.io/cdn/js/min/offline.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<meta name="CurrentPage" content="news">
</head>
<body>

View File

@ -14,6 +14,7 @@
<link rel="stylesheet" href="../data/style/offline-language-english.css">
<script src="https://hexahigh.github.io/cdn/js/min/offline.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<meta name="CurrentPage" content="projects">
</head>
<body>