mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
Plugin::Instance can register a stylesheets, enable to import it in application.scss dynamically
This commit is contained in:
parent
a14130473a
commit
0c00bf5895
@ -35,4 +35,8 @@
|
||||
|
||||
@import "app.responsive";
|
||||
|
||||
@import "navi_gami"; // change it to be dynamic !!!
|
||||
<% FabManager.plugins.each do |plugin| %>
|
||||
<% plugin.styles.each do |style| %>
|
||||
<%= "@import '#{style}';" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -62,6 +62,10 @@ module Plugin
|
||||
assets << [full_path, opts]
|
||||
end
|
||||
|
||||
def register_css(style)
|
||||
styles << style
|
||||
end
|
||||
|
||||
def after_initialize(&block)
|
||||
initializers << block
|
||||
end
|
||||
|
@ -0,0 +1,3 @@
|
||||
#nav > section > section {
|
||||
background: black;
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
register_asset "stylesheets/navi_gami.scss"
|
||||
register_asset "javascripts/navi_gami.coffee.erb"
|
||||
|
||||
register_css('navi_gami')
|
||||
|
||||
PLUGIN_NAME ||= "navi_gami".freeze
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user