split out navigation into submenus

This commit is contained in:
rebuilt 2022-10-18 20:11:44 -07:00
parent 73320db93d
commit 11ba2ebcc8
9 changed files with 103 additions and 47 deletions

View file

@ -1,9 +1,11 @@
module NavHelper
def link_highlight(path:)
active?(path:) ? 'active' : ''
def link_highlight(paths:)
active?(paths:) ? 'active' : ''
end
def active?(path:)
current_page?(path)
def active?(paths:)
paths.any? do |path|
current_page?(path)
end
end
end