#1817: Move custom style to separate file
This commit is contained in:
@@ -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 %>
|
||||
|
||||
1
app/views/users/custom_style.css.erb
Normal file
1
app/views/users/custom_style.css.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= CurrentUser.user.custom_style.html_safe %>
|
||||
@@ -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">
|
||||
|
||||
@@ -211,6 +211,7 @@ Danbooru::Application.routes.draw do
|
||||
collection do
|
||||
get :upgrade_information
|
||||
get :search
|
||||
get :custom_style
|
||||
end
|
||||
|
||||
member do
|
||||
|
||||
Reference in New Issue
Block a user