Refactor theme handling so that it is unified via a helper method
This commit is contained in:
@@ -2,11 +2,9 @@
|
||||
title: Slack Themes
|
||||
---
|
||||
|
||||
<% data.themes.each do |theme| %>
|
||||
<% theme_slug = theme[:name].parameterize.underscore %>
|
||||
<% digest = Digest::MD5.new.hexdigest(theme[:colors]) %>
|
||||
<label class="radio theme_label theme_<%= theme[:name].parameterize.underscore %>">
|
||||
<img src="/images/theme/<%= theme_slug %>-<%= digest %>.png" class="theme_thumb"><br>
|
||||
<input name="sidebar_theme_rd" type="radio" value="<%= theme[:colors] %>" ng-model="theme" ng-change="setTheme()"> <%= theme[:name] %>
|
||||
<% themes.each do |theme| %>
|
||||
<label class="radio theme_label theme_<%= theme.slug %>">
|
||||
<img src="/images/theme/<%= theme.slug %>-<%= theme.digest %>.png" class="theme_thumb"><br>
|
||||
<input name="sidebar_theme_rd" type="radio" value="<%= theme.colors %>" ng-model="theme" ng-change="setTheme()"> <%= theme.name %>
|
||||
</label>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user