mirror of
https://github.com/meineerde/holgerjust.de.git
synced 2026-02-21 19:12:05 +00:00
Allow to use procs in navigation links
This commit is contained in:
parent
a8982fb69e
commit
f235838ecb
@ -104,7 +104,8 @@ set :casper, {
|
||||
},
|
||||
navigation: {
|
||||
'Home' => '/',
|
||||
'Impressum' => '/impressum/'
|
||||
'About Me' => ->{ author_path },
|
||||
'Legal' => '/impressum/'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
%span.hidden Close
|
||||
%ul
|
||||
- navigation.try(:each) do |label, href|
|
||||
- href = href.call if href.respond_to?(:call)
|
||||
- css_class = %W(nav-#{label.parameterize})
|
||||
- css_class << "nav-current" if current_page.url == href
|
||||
%li{class: css_class.join(' '), role: :presentation}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user