Permalink
Browse files

First attempt at legend image

  • Loading branch information...
1 parent 5265806 commit 3c0a05340d104bde37220165cee95a61e70c4748 @bmizerany committed Jan 21, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/sinatra/base.rb
  2. BIN lib/sinatra/images/legend.gif
View
@@ -734,8 +734,8 @@ def metadef(message, &block)
end
configure :development do
- get '/__sinatra__/:image.png' do
- filename = File.dirname(__FILE__) + "/images/#{params[:image]}.png"
+ get '/__sinatra__/:image.:ext' do
+ filename = File.dirname(__FILE__) + "/images/#{params[:image]}.#{params[:ext]}"
content_type :png
send_file filename
end
@@ -747,7 +747,8 @@ def metadef(message, &block)
<head>
<style type="text/css">
body { text-align:center;font-family:helvetica,arial;font-size:22px;
- color:#888;margin:20px}
+ color:#888;margin:20px;background-image:url(/__sinatra__/legend.gif);
+ background-repeat:no-repeat;background-position:center top;}
#c {margin:0 auto;width:500px;text-align:left}
</style>
</head>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3c0a053

Please sign in to comment.