You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
902 B
28 lines
902 B
const customTitlebar = require('custom-electron-titlebar');
|
|
const $ = require("./javascripts/jquery.min.js")
|
|
|
|
var titleBar = new customTitlebar.Titlebar({
|
|
backgroundColor: customTitlebar.Color.fromHex('#292929'),
|
|
icon: "icon/icon.png"
|
|
});
|
|
|
|
function init() {
|
|
document.querySelectorAll(".nav-item").forEach(x => {
|
|
x.addEventListener('click', () => {
|
|
if ($("#main-page").prop('src').indexOf(x.id) < 0) {
|
|
$("#main-page").prop('src', `pages/${x.id}.html`);
|
|
document.querySelectorAll(".nav-item").forEach(y => {
|
|
y.classList.remove('active')
|
|
})
|
|
x.classList.add('active')
|
|
};
|
|
});
|
|
});
|
|
document.querySelectorAll(".nav-item")[0].classList.add("active")
|
|
};
|
|
|
|
document.onreadystatechange = function () {
|
|
if (document.readyState == "complete") {
|
|
init();
|
|
}
|
|
}; |