diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index 28d2047..60a7a86 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -1,3 +1,16 @@ +function openNav() { + document.getElementById("mySidenav").style.visibility = "visible"; + document.getElementById("mySidenav").style.width = "250px"; + document.getElementById("main").style.marginLeft = "250px"; +} + +function closeNav() { + document.getElementById("mySidenav").style.visibility = "hidden"; + document.getElementById("mySidenav").style.width = "0"; + document.getElementById("main").style.marginLeft = "0"; +} + + window.onload = function() { window.counts = { diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index dc49f92..881741d 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -14,4 +14,4 @@ # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) -Rails.application.config.assets.precompile += %w( custom.js ) +Rails.application.config.assets.precompile += %w[custom.js]