app/views/page/_include.html.erb in enju_leaf-1.1.0.rc14 vs app/views/page/_include.html.erb in enju_leaf-1.1.0.rc15
- old
+ new
@@ -1,4 +1,44 @@
<%= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'print', media: :print %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tag %>
+
+<style>
+<% @library_group.colors.each do |color| %>
+ .enju_<%= color.property %>{
+ <% case color.property %>
+ <% when 'header_title' %>
+ background-color: #<%= color.code %>;
+ color: white;
+ border: 1px solid #<%= color.code %>;
+ <% when 'table_line0' %>
+ background-color: #<%= color.code %>;
+ <% when 'table_line1' %>
+ background-color: #<%= color.code %>;
+ <% when 'table_border' %>
+ border: 1px solid #<%= color.code %>;
+ <% end %>
+ }
+<% end %>
+</style>
+
+<script>
+ $(function(){
+ <% @library_group.colors.each do |color|
+ case color.property
+ when 'header_title' %>
+ $('.title').addClass('enju_<%= color.property %>');
+ $('div.digg_pagination>span.current').addClass('enju_<%= color.property %>');
+ <% when 'table_line0' %>
+ $('tr.line0').addClass('enju_<%= color.property %>');
+ <% when 'table_line1' %>
+ $('tr.line1').addClass('enju_<%= color.property %>');
+ <% when 'table_border' %>
+ $('tr>th').addClass('enju_<%= color.property %>');
+ $('tr>td').addClass('enju_<%= color.property %>');
+ $('div.digg_pagination>span.current').addClass('enju_<%= color.property %>');
+ $('div.digg_pagination>a').addClass('enju_<%= color.property %>');
+ <% end %>
+ <% end %>
+});
+</script>