Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

layouts

  • Loading branch information...
commit 0ed4d27f228e6a98fcca2955822eafb9c9f284dd 1 parent 6168d0d
@steveklabnik steveklabnik authored
View
5 resources/shoes_homepage.rb
@@ -2,7 +2,8 @@
class ShoesHomepage < Webmachine::Resource
def to_html
- engine = Haml::Engine.new(File.read("views/index.html.haml"))
- engine.render(Object.new)
+ Haml::Engine.new(File.read("views/layout.html.haml")).render do
+ Haml::Engine.new(File.read("views/index.html.haml")).render
+ end
end
end
View
133 views/index.html.haml
@@ -1,94 +1,39 @@
-!!!
-%html{:lang => "en"}
- %head
- %meta{:charset => "utf-8"}
- %title Shoes! The easiest little GUI toolkit, for Ruby.
- %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
- %meta{:content => "The website for Shoes, a GUI toolkit for Ruby", :name => "description"}
- %meta{:content => "Team Shoes", :name => "author"}
- / Le styles
- %link{:href => "/css/bootstrap.css", :rel => "stylesheet"}
- :css
- body {
- padding-top: 60px;
- padding-bottom: 40px;
- }
- %link{:href => "/css/bootstrap-responsive.css", :rel => "stylesheet"}
- / Le HTML5 shim, for IE6-8 support of HTML5 elements
- /[if lt IE 9]
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- / Le fav and touch icons
- %link{:href => "/ico/favicon.ico", :rel => "shortcut icon"}
- %link{:href => "/ico/apple-touch-icon-114-precomposed.png", :rel => "apple-touch-icon-precomposed", :sizes => "114x114"}
- %link{:href => "/ico/apple-touch-icon-72-precomposed.png", :rel => "apple-touch-icon-precomposed", :sizes => "72x72"}
- %link{:href => "/ico/apple-touch-icon-57-precomposed.png", :rel => "apple-touch-icon-precomposed"}
- %body
- .navbar.navbar-fixed-top
- .navbar-inner
- .container
- %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
- %span.icon-bar
- %span.icon-bar
- %span.icon-bar
- %a.brand{:href => "#"} Shoes
- .nav-collapse
- %ul.nav
- %li.active
- %a{:href => "#"} Home
- %li
- %a{:href => "/about"} About
- %li
- %a{:href => "/manual/Hello.html"} Manual
- %li
- %a{:href => "https://github.com/shoes/shoes"} Code
- %li
- %a{:href => "#"} Blog
- / /.nav-collapse
- .container
- .hero-unit
- %img{:src => "/img/shoes-icon.png", :alt => "shoes logo", :style => "float:left;padding-left:20px;padding-right:20px"}/
- %h1 Shoes!
- %p
- Ever wanted to build a GUI? Annoyed that it's so much effort? Shoes
- makes building for Mac, Windows, and Linux <em>super</em> simple.
- %p
- %a.btn.btn-primary.btn-large{:href => "/about"} Learn more »
- / Example row of columns
- .row
- .span4
- %h2 About
- %p
- Basically, making desktop applications is really annoying. There's
- so many details to take care of, and you'd really rather just be
- building your application. Shoes handles doing all of the
- cross-platform stuff for you, and gives you native widgets on each
- platform.
- %p
- %a.btn{:href => "/about"} Read More »
- .span4
- %h2 Manual
- %p
- If you're already using Shoes, you'll probably need to look things
- up from time to time. There's a manual in Shoes already, but if
- you prefer to look things up on the web, we've also provided a
- manual for you as well.
- %p
- %a.btn{:href => "/manual/Hello.html"} Check it out »
- .span4
- %h2 Blog
- %p
- We're going to write from time to time about what's new in
- Shoes-land. It's not quite ready yet, but we'll be unveilling it
- in the near future. Keep up with the latest developments, see what
- other people are building, and hear about new features as we build
- them!
- %p
- %a.btn{:href => "#"} Coming soon!
- %hr
- %footer
- %p By Team Shoes
- / /container
- /
- Le javascript
- \==================================================
- / Placed at the end of the document so the pages load faster
+.hero-unit
+ %img{:src => "/img/shoes-icon.png", :alt => "shoes logo", :style => "float:left;padding-left:20px;padding-right:20px"}/
+ %h1 Shoes!
+ %p
+ Ever wanted to build a GUI? Annoyed that it's so much effort? Shoes
+ makes building for Mac, Windows, and Linux <em>super</em> simple.
+ %p
+ %a.btn.btn-primary.btn-large{:href => "/about"} Learn more »
+/ Example row of columns
+.row
+ .span4
+ %h2 About
+ %p
+ Basically, making desktop applications is really annoying. There's
+ so many details to take care of, and you'd really rather just be
+ building your application. Shoes handles doing all of the
+ cross-platform stuff for you, and gives you native widgets on each
+ platform.
+ %p
+ %a.btn{:href => "/about"} Read More »
+ .span4
+ %h2 Manual
+ %p
+ If you're already using Shoes, you'll probably need to look things
+ up from time to time. There's a manual in Shoes already, but if
+ you prefer to look things up on the web, we've also provided a
+ manual for you as well.
+ %p
+ %a.btn{:href => "/manual/Hello.html"} Check it out »
+ .span4
+ %h2 Blog
+ %p
+ We're going to write from time to time about what's new in
+ Shoes-land. It's not quite ready yet, but we'll be unveilling it
+ in the near future. Keep up with the latest developments, see what
+ other people are building, and hear about new features as we build
+ them!
+ %p
+ %a.btn{:href => "#"} Coming soon!
View
51 views/layout.html.haml
@@ -0,0 +1,51 @@
+!!!
+%html{:lang => "en"}
+ %head
+ %meta{:charset => "utf-8"}
+ %title Shoes! The easiest little GUI toolkit, for Ruby.
+ %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
+ %meta{:content => "The website for Shoes, a GUI toolkit for Ruby", :name => "description"}
+ %meta{:content => "Team Shoes", :name => "author"}
+ / Le styles
+ %link{:href => "/css/bootstrap.css", :rel => "stylesheet"}
+ :css
+ body {
+ padding-top: 60px;
+ padding-bottom: 40px;
+ }
+ %link{:href => "/css/bootstrap-responsive.css", :rel => "stylesheet"}
+ / Le HTML5 shim, for IE6-8 support of HTML5 elements
+ /[if lt IE 9]
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ / Le fav and touch icons
+ %link{:href => "/ico/favicon.ico", :rel => "shortcut icon"}
+ %link{:href => "/ico/apple-touch-icon-114-precomposed.png", :rel => "apple-touch-icon-precomposed", :sizes => "114x114"}
+ %link{:href => "/ico/apple-touch-icon-72-precomposed.png", :rel => "apple-touch-icon-precomposed", :sizes => "72x72"}
+ %link{:href => "/ico/apple-touch-icon-57-precomposed.png", :rel => "apple-touch-icon-precomposed"}
+ %body
+ .navbar.navbar-fixed-top
+ .navbar-inner
+ .container
+ %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
+ %span.icon-bar
+ %span.icon-bar
+ %span.icon-bar
+ %a.brand{:href => "#"} Shoes
+ .nav-collapse
+ %ul.nav
+ %li.active
+ %a{:href => "#"} Home
+ %li
+ %a{:href => "/about"} About
+ %li
+ %a{:href => "/manual/Hello.html"} Manual
+ %li
+ %a{:href => "https://github.com/shoes/shoes"} Code
+ %li
+ %a{:href => "#"} Blog
+ / /.nav-collapse
+ .container
+ = yield
+ %hr
+ %footer
+ %p By Team Shoes
Please sign in to comment.
Something went wrong with that request. Please try again.