Add a user template for rendering project pages

This commit is contained in:
R. Tyler Croy 2012-04-12 20:31:35 -07:00
parent 62ff4aa9e7
commit ccc2b5f803
2 changed files with 17 additions and 1 deletions

View File

@ -9,7 +9,7 @@ module Despair
end
get '/:name' do |name|
haml :project, :locals => {:project => name}
haml :user, :locals => {:user => name}
end
end
end

16
views/user.haml Normal file
View File

@ -0,0 +1,16 @@
%html
%head
%title
#{user} of Despair
%script{:type => 'text/javascript'}
window.despair_username = "#{user}";
%body
- if Resin.development?
%div{:style => 'float: right;'}
%button{:onclick => 'smalltalk.Browser._open(); return false;'}
Run Amber IDE
%h2
#{user} of Despair
= embed_amber(:on_ready => "smalltalk.DespairApp._current()._bootstrap_('#{user}');")