#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]) %>
|
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
||||||
<%= stylesheet_link_tag "application", :media => "screen" %>
|
<%= stylesheet_link_tag "application", :media => "screen" %>
|
||||||
<% if CurrentUser.user.custom_style.present? %>
|
<% if CurrentUser.user.custom_style.present? %>
|
||||||
<style><%= CurrentUser.user.custom_style %></style>
|
<%= stylesheet_link_tag custom_style_users_path, :media => "screen" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "application" %>
|
||||||
<%= raw Danbooru.config.custom_html_header_content %>
|
<%= 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>
|
<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>
|
<span class="hint">A list of tags that you use often. They will appear when using the list of Related Tags.</span>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<fieldset id="change-password-section">
|
<fieldset id="change-password-section">
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ Danbooru::Application.routes.draw do
|
|||||||
collection do
|
collection do
|
||||||
get :upgrade_information
|
get :upgrade_information
|
||||||
get :search
|
get :search
|
||||||
|
get :custom_style
|
||||||
end
|
end
|
||||||
|
|
||||||
member do
|
member do
|
||||||
|
|||||||
Reference in New Issue
Block a user