aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/general_controller.rb6
-rw-r--r--app/views/general/custom_css.rhtml1
-rw-r--r--app/views/layouts/default.rhtml3
-rw-r--r--config/routes.rb2
4 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index df46c4ae8..cf28208a0 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -153,5 +153,11 @@ class GeneralController < ApplicationController
render :text => "awake\n"
end
+ def custom_css
+ @locale = self.locale_from_params()
+ render(:layout => false, :content_type => 'text/css')
+ end
+
+
end
diff --git a/app/views/general/custom_css.rhtml b/app/views/general/custom_css.rhtml
new file mode 100644
index 000000000..0def82ed0
--- /dev/null
+++ b/app/views/general/custom_css.rhtml
@@ -0,0 +1 @@
+// this should be overridden in a local "theme" plugin
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 92a0ce11f..be302103a 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -24,10 +24,11 @@
<!--[if LT IE 7]>
<style type="text/css">@import url("/stylesheets/ie6.css");</style>
<![endif]-->
- <%= stylesheet_link_tag 'main-custom', :title => "Main", :rel => "stylesheet" %>
<!--[if LT IE 7]>
<style type="text/css">@import url("/stylesheets/ie6-custom.css");</style>
<![endif]-->
+ <%= stylesheet_link_tag 'main-custom', :title => "Main", :rel => "stylesheet" %>
+ <link href="http://127.0.0.1:3000/custom.css" media="screen" rel="stylesheet" type="text/css">
<% if @feed_autodetect %>
<% for feed in @feed_autodetect %>
diff --git a/config/routes.rb b/config/routes.rb
index d0e102070..7af41ac92 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -17,7 +17,7 @@ ActionController::Routing::Routes.draw do |map|
map.with_options :controller => 'general' do |general|
general.frontpage '/', :action => 'frontpage'
general.blog '/blog', :action => 'blog'
-
+ general.custom_css '/custom.css', :action => 'custom_css'
general.search_redirect '/search', :action => 'search_redirect'
# XXX combined is the search query, and then if sorted a "/newest" at the end.
# Couldn't find a way to do this in routes which also picked up multiple other slashes