Remove JavaScript in navbar and include logout

Signed-off-by: Tobias Eidelpes <tobias@eidelpes.info>
This commit is contained in:
2020-04-14 11:39:41 +02:00
parent c8bc0ca1cd
commit 6014c64e64
5 changed files with 83 additions and 80 deletions
-2
View File
@@ -8,8 +8,6 @@ require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
require("packs/custom");
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
-14
View File
@@ -1,14 +0,0 @@
/* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */
function toggleMenu() {
var x = document.getElementById("topnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
/* First load all other scripts and then listen for click on menu */
document.addEventListener('turbolinks:load', () => {
document.getElementById("toggleMenu").addEventListener("click", toggleMenu);
});