summaryrefslogtreecommitdiff
path: root/lib/oxidized/api/web/webapp.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-03-01 19:27:44 +0200
committerSaku Ytti <saku@ytti.fi>2014-03-01 19:27:44 +0200
commit465de586078eb40e6d0ae820d9da8a254c181021 (patch)
tree87bbbe5b7732fb58c0b6b77bc2de67caa0318ff4 /lib/oxidized/api/web/webapp.rb
parent7c2565720c898b0573a5a30db958d8a78577f4a4 (diff)
Switch from CSS to SASS
I probably should figure out how to start rack in the code, so I'd get caching of the SASS (and in future Coffee) files, instead of Sinatra generating them always on the fly
Diffstat (limited to 'lib/oxidized/api/web/webapp.rb')
-rw-r--r--lib/oxidized/api/web/webapp.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/oxidized/api/web/webapp.rb b/lib/oxidized/api/web/webapp.rb
index 4cec200..3d66ba8 100644
--- a/lib/oxidized/api/web/webapp.rb
+++ b/lib/oxidized/api/web/webapp.rb
@@ -1,7 +1,7 @@
require 'sinatra/base'
require 'sinatra/json'
require 'haml'
-require 'pp'
+require 'sass'
module Oxidized
module API
class WebApp < Sinatra::Base
@@ -68,10 +68,11 @@ module Oxidized
out :node
end
- #get '/node/:node' do
- # @data = nodes.show params[:node]
- # out
- #end
+ get '/stylesheets/*.css' do
+ sass params[:splat].first.to_sym
+ end
+
+ private
def out template=:default
if @json or params[:format] == 'json'