Skip to content

Commit

Permalink
changed the dir structure a bit.
Browse files Browse the repository at this point in the history
more preparations for heroku
index page refined again
  • Loading branch information
danielpietzsch committed Jun 20, 2010
1 parent 33ad2a4 commit dc718ea
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion bin/thimblr
@@ -1,5 +1,4 @@
#!/usr/bin/env ruby
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'thimblr'
begin
Thimblr::Application.run!(*ARGV)
Expand Down
2 changes: 2 additions & 0 deletions config.ru
@@ -0,0 +1,2 @@
require 'thimblr'
run Sinatra::Application
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions public/index.html
Expand Up @@ -112,7 +112,7 @@ <h2>The easiest way to preview your Tumblr themes.</h2>
<div id="content">
<section>
<h3>What is Thimblr?</h3>
<p>Thimblr lets you preview your <a href="http://www.tumblr.com">Tumblr</a> themes right from your favorite editor. It protects your fingers from tedious copying and pasting a Tumblr theme template into their customize tool.</p>
<p>Thimblr lets you preview your <a href="http://www.tumblr.com">Tumblr</a> themes right from your favorite editor. It protects your fingers from tedious copying and pasting of a Tumblr theme template into their customize tool.</p>
</section>
<section>
<h3>How do I use it?</h3>
Expand All @@ -132,11 +132,12 @@ <h3>How does it work?</h3>
</section>
<section>
<h3>Support any editor</h3>
<p>If you want to support your favorite editor, you just need to find a way to send a HTTP POST request to <code>http://thimblr.heroku.com/preview</code> with these parameters:</p>
<p>If you want to support <em>your</em> favorite editor, you just need to find a way to send a HTTP POST request to <code>http://thimblr.heroku.com/preview</code> with these parameters:</p>
<ul>
<li><code>theme_code</code>: the whole template code.</li>
<li><code>username</code> (optional): the Tumblr username to preview themes with custom data.</li>
</ul>
<p>Then display the response body as HTML.</p>
</section>
</div>

Expand All @@ -145,7 +146,7 @@ <h3>Support any editor</h3>
<p>It's based on code by <a href="http://jphastings.tumblr.com">JP Hastings-Spital</a> and <a href="http://markwunsch.com">Mark Wunsch</a>.</p>
<p>Name "Thimblr" by JP Hastings-Spital. Original idea and name "Thimble" by Mark Wunsch.</p>
<p>The current design of this site is <em>very</em> inspired by <a href="http://www.tumblr.com">Tumblr</a>. ;-)</p>
<p>This is Thimblr version 0.1</p>
<p>This is Thimblr version 0.1.</p>
</footer>
</div>

Expand Down
File renamed without changes.
10 changes: 2 additions & 8 deletions lib/thimblr.rb → thimblr.rb
Expand Up @@ -10,11 +10,11 @@
class Thimblr::Application < Sinatra::Base

configure do |s|
set :root, File.join(File.dirname(__FILE__),"..")
set :root, File.dirname(__FILE__)
Dir.chdir root
set :config, File.join(root,'config')

enable :sessions
# enable :sessions
set :bind, '127.0.0.1'


Expand Down Expand Up @@ -60,12 +60,6 @@ class Thimblr::Application < Sinatra::Base
end

end

helpers do
def get_relative(path)
Pathname.new(path).relative_path_from(Pathname.new(File.expand_path(settings.root))).to_s
end
end

get '/' do
redirect 'index.html'
Expand Down
File renamed without changes.

0 comments on commit dc718ea

Please sign in to comment.