diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 11ce6355b..592c122b4 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -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? %> - + <%= stylesheet_link_tag custom_style_users_path, :media => "screen" %> <% end %> <%= javascript_include_tag "application" %> <%= raw Danbooru.config.custom_html_header_content %> diff --git a/app/views/users/custom_style.css.erb b/app/views/users/custom_style.css.erb new file mode 100644 index 000000000..c3609df5c --- /dev/null +++ b/app/views/users/custom_style.css.erb @@ -0,0 +1 @@ +<%= CurrentUser.user.custom_style.html_safe %> \ No newline at end of file diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 906d842f2..9b633272e 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -54,7 +54,7 @@ A list of tags that you use often. They will appear when using the list of Related Tags. - <%= f.input :custom_style, :label => "Custom CSS style", :hint => "Style to apply to the whole site. Cannot include angle brackets, quotes, or ampersands (< > \" ' &)." %> + <%= f.input :custom_style, :label => "Custom CSS style", :hint => "Style to apply to the whole site." %>
diff --git a/config/routes.rb b/config/routes.rb index 96bced6ac..d42eb5f24 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -211,6 +211,7 @@ Danbooru::Application.routes.draw do collection do get :upgrade_information get :search + get :custom_style end member do