allow the main app to add custom code in the locomotive layout
This commit is contained in:
parent
51a0862d89
commit
a5e9e52996
@ -5,7 +5,7 @@ module Locomotive
|
||||
|
||||
def build_item(name, attributes)
|
||||
item = super
|
||||
enhanced_class = "#{'on' if name.to_s == sections(:sub)} #{item[:class]}"
|
||||
enhanced_class = "#{'on' if name.to_s == sections(:sub).to_s} #{item[:class]}"
|
||||
item.merge(:class => enhanced_class)
|
||||
end
|
||||
|
||||
|
@ -29,4 +29,6 @@
|
||||
|
||||
});
|
||||
|
||||
= yield :head
|
||||
= yield :head
|
||||
|
||||
= render 'locomotive/shared/main_app_head'
|
1
app/views/locomotive/shared/_main_app_head.html.haml
Normal file
1
app/views/locomotive/shared/_main_app_head.html.haml
Normal file
@ -0,0 +1 @@
|
||||
- # this partial can be overridden in the main app in order to include extra css or js
|
Loading…
Reference in New Issue
Block a user