Skip to content

Instantly share code, notes, and snippets.

@lawrencepit
Created August 17, 2008 02:33
Show Gist options
  • Save lawrencepit/5782 to your computer and use it in GitHub Desktop.
Save lawrencepit/5782 to your computer and use it in GitHub Desktop.
/ SPROUTCORE DEFAULT INDEX TEMPLATE
/ This template provide provides a basic wrapper for a SproutCore client.
/ Most of the time, it will be sufficient for your own needs. However, if
/ you need to create your own template, you can do so by copying this file
/ into your client, naming it 'index.rhtml' and then adding the options
/ :index => 'index' to your client declaration in routes.rb.
!!! Strict
%html
%head
%meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-type" }
%title= (@title.to_s || bundle_name.to_s || '').capitalize
%script{ :src => static_url('detect-browser'), :type => "text/javascript" }
= stylesheets_for_client
= yield :page_styles
%body{ :class => "#{@theme || 'sc-theme'} focus" }
= yield :body
#resources{ :style => "display:none; visibility:hidden;" }
= yield :resources
= javascripts_for_client
= yield :page_javascript
= render_page_views
= yield :final
:javascript
if (SC.setupBodyClassNames) SC.setupBodyClassNames();
window.onload = SC.didLoad;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment