Move nav script to js file

This commit is contained in:
Calum Lind 2024-07-08 21:50:48 +01:00
parent 8ec4806392
commit db24bdc530
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
2 changed files with 10 additions and 13 deletions

View File

@ -0,0 +1,8 @@
const navList = document.getElementById("deluge-nav-lists");
function show_nav_menu() {
navList.classList.add("menus-show");
}
function hide_nav_menu() {
navList.classList.remove("menus-show");
}

View File

@ -9,14 +9,14 @@
</div>
<div class="deluge-navbar">
<div class="icon-bar" onclick="show()">
<div class="icon-bar" onclick="menus-show()">
<i></i>
<i></i>
<i></i>
</div>
<ul id="deluge-nav-lists">
<li class="close"><span onclick="hide()">×</span></li>
<li class="close"><span onclick="menus-hide()">×</span></li>
<li>
<a href="/download">Download</a>
</li>
@ -32,14 +32,3 @@
</ul>
</div>
</div>
<script>
const navList = document.getElementById("deluge-nav-lists");
function show() {
navList.classList.add("menus-show");
}
function hide() {
navList.classList.remove("menus-show");
}
</script>