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
-14
View File
@@ -1,18 +1,4 @@
module ApplicationHelper
# Contains the complete navbar
def nav_bar
content_tag(:div, class: 'topnav', id: 'topnav') do
yield
end
end
# Defines individual links in the navbar. To be used inside nav_bar
def nav_link(text, path)
# Sets active class on the link corresponding to the page being viewed
options = current_page?(path) ? { class: 'active' } : {}
link_to text, path, options
end
# Used to render svg image files
def show_svg(path)
File.open("app/assets/images/#{path}", 'rb') do |file|