-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69b4f35
commit 18e2b56
Showing
7 changed files
with
76 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 19 additions & 26 deletions
45
.templates/header/switchTheme.js → .templates/scripts/switchTheme.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function tabSwitch(ID, executable) { | ||
|
||
// Constants | ||
const TAB_HTML = document.getElementById(ID); | ||
const PARENT_HTML = TAB_HTML.parentNode; | ||
|
||
// Only highlight the selected tab | ||
for (let i = 0; i < PARENT_HTML.children.length; i++) { | ||
PARENT_HTML.children[i].classList.remove('text-highlight'); | ||
} | ||
TAB_HTML.classList.add('text-highlight'); | ||
|
||
// Execute the function that corresponds to the tab | ||
executable(ID); | ||
} | ||
|
||
|
||
|
||
// Page Startup | ||
function loadLangStartup() { | ||
const LANG = fetchLocalStorage("lang", "EN"); | ||
tabSwitch(LANG, switchLanguage); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters