-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.rb
More file actions
47 lines (39 loc) · 965 Bytes
/
Copy pathinit.rb
File metadata and controls
47 lines (39 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
require 'rubygems'
require 'bundler'
Bundler.setup
require 'sinatra'
require 'sinatra/namespace'
require 'haml'
module Ant
@mods = []
class << self
attr_reader :mods
def register(name)
return nil if @mods.find {|m| m == name}
@mods << name
yield if block_given?
end
end
end
get "/" do
haml :index
end
get "/styles.css" do
content_type "text/css", :charset => "utf-8"
sass :stylesheet
end
Dir["#{File.dirname(__FILE__)}/modules/*_ant.rb"].each {|mod| load mod}
__END__
@@ layout
!!!
%html
%head
%meta{ :content=>"yes", :name=>"apple-mobile-web-app-capable"}
%meta{ :content=>"text/html; charset=iso-8859-1", 'http-equiv'=>"Content-Type"}
%meta{ :content=>"minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no", :name=>"viewport" }
%link{ :rel => "stylesheet", :href => "/styles.css", :type => "text/css" }
%body
#container
%header== Ant
%hr
= yield