diff --git a/main.js b/main.js index 17a200e..99c121d 100644 --- a/main.js +++ b/main.js @@ -15,6 +15,12 @@ document.body.appendChild(header.flex({ justifyContent: 'space-between', alignIt link.style.padding = '.5rem' link.style.borderRadius = '.25rem' link.style.color = (item.path === window.location.pathname) ? '#00C16A' : '#333' + link.onclick = (event) => { + event.preventDefault() + window.history.pushState({}, '', event.target.href) + Array.from(event.target.parentElement.children).forEach(x => x.style.color = '#333') + event.target.style.color = '#00C16A' + } return link })), div.text('sign'),