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.
21 lines
720 B
21 lines
720 B
const customTitlebar = require('custom-electron-titlebar');
|
|
|
|
new customTitlebar.Titlebar({
|
|
backgroundColor: customTitlebar.Color.fromHex('#212121'),
|
|
unfocusEffect: true,
|
|
overflow: "auto",
|
|
menu: null,
|
|
titleHorizontalAlignment: 'left'
|
|
});
|
|
|
|
document.querySelectorAll(".nav-item").forEach(x => {
|
|
x.addEventListener('click', e => {
|
|
if (document.getElementById("main-page").getAttribute('src').indexOf(x.id) < 0) {
|
|
document.getElementById("main-page").setAttribute('src', "pages/" + x.id + ".html")
|
|
document.querySelectorAll(".nav-item").forEach(y => {
|
|
y.classList.remove('active')
|
|
})
|
|
x.classList.add('active')
|
|
}
|
|
})
|
|
}) |