Add functionality to nav select
This commit is contained in:
parent
6ebad3b068
commit
a7122a1e34
@ -60,6 +60,16 @@ const nextEntryLink = nextEntry ?
|
|||||||
<span></span>
|
<span></span>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const selectElements = document.querySelectorAll(".selectField");
|
||||||
|
|
||||||
|
selectElements.forEach((el) => {
|
||||||
|
el.addEventListener("change", (event) => {
|
||||||
|
window.location.pathname = (event.target as HTMLSelectElement)?.value;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
nav {
|
nav {
|
||||||
display: grid;
|
display: grid;
|
||||||
@ -128,6 +138,7 @@ a:hover {
|
|||||||
|
|
||||||
.leftSelectSpace {
|
.leftSelectSpace {
|
||||||
grid-area: 1/2;
|
grid-area: 1/2;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftSelectSpaceSync {
|
.leftSelectSpaceSync {
|
||||||
|
Loading…
Reference in New Issue
Block a user