#1817: Move custom style to separate file

This commit is contained in:
Toks
2013-07-19 10:02:08 -04:00
parent 22bd07072a
commit 088fcfd151
4 changed files with 4 additions and 2 deletions

View File

@@ -20,7 +20,7 @@
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
<%= stylesheet_link_tag "application", :media => "screen" %>
<% if CurrentUser.user.custom_style.present? %>
<style><%= CurrentUser.user.custom_style %></style>
<%= stylesheet_link_tag custom_style_users_path, :media => "screen" %>
<% end %>
<%= javascript_include_tag "application" %>
<%= raw Danbooru.config.custom_html_header_content %>

View File

@@ -0,0 +1 @@
<%= CurrentUser.user.custom_style.html_safe %>

View File

@@ -54,7 +54,7 @@
<textarea id="user_favorite_tags" class="text optional" rows="5" name="user[favorite_tags]" cols="40"><%= raw @user.favorite_tags %></textarea>
<span class="hint">A list of tags that you use often. They will appear when using the list of Related Tags.</span>
</div>
<%= f.input :custom_style, :label => "Custom <a href='http://en.wikipedia.org/wiki/Cascading_Style_Sheets'>CSS</a> style", :hint => "Style to apply to the whole site. Cannot include angle brackets, quotes, or ampersands (< > \" ' &)." %>
<%= f.input :custom_style, :label => "Custom <a href='http://en.wikipedia.org/wiki/Cascading_Style_Sheets'>CSS</a> style", :hint => "Style to apply to the whole site." %>
</fieldset>
<fieldset id="change-password-section">

View File

@@ -211,6 +211,7 @@ Danbooru::Application.routes.draw do
collection do
get :upgrade_information
get :search
get :custom_style
end
member do