Skip to content

Commit

Permalink
Now with more button behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
jxmx committed Sep 5, 2023
1 parent c4ed732 commit 7abd497
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ <h5 class="modal-title" id="commandModalTitleBox"></h5>
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3 sidebar-sticky">
<div class="d-grid gap-2 col-9 mx-auto my-2">
<button id="nav-home-button" class="btn btn-secondary" role="button">
<a id="nav-home-button" class="btn btn-secondary" role="button">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="align-text-bottom" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
Home
</button>
</a>
</div>
<div id="asl-node-navigation"></div>
<hr>
Expand Down
3 changes: 1 addition & 2 deletions web/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ async function customizeUI(){
let newp = customElements.HOME_BUTTON_URL;
if( currp === newp ){
document.getElementById("nav-home-button").setAttribute("onclick","window.location.reload()");
} else {
document.getElementById("nav-home-button").setAttribute("onclick",`window.location.href="${newp}"`);
}
document.getElementById("nav-home-button").href = newp;


}
Expand Down
3 changes: 1 addition & 2 deletions web/js/voter.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ async function customizeUI(){
let newp = customElements.HOME_BUTTON_URL;
if( currp === newp ){
document.getElementById("nav-home-button").setAttribute("onclick","window.location.reload()");
} else {
document.getElementById("nav-home-button").setAttribute("onclick",`window.location.href="${newp}"`);
}
document.getElementById("nav-home-button").href=newp;
}

//
Expand Down

0 comments on commit 7abd497

Please sign in to comment.