twitter-bootstrap-rails-ajax 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/README.md +221 -0
  2. data/Rakefile +14 -0
  3. data/lib/generators/bootstrap/install/install_generator.rb +53 -0
  4. data/lib/generators/bootstrap/install/templates/application.css +7 -0
  5. data/lib/generators/bootstrap/install/templates/application.js +10 -0
  6. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +4 -0
  7. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +29 -0
  8. data/lib/generators/bootstrap/layout/layout_generator.rb +23 -0
  9. data/lib/generators/bootstrap/layout/templates/layout.html.erb +97 -0
  10. data/lib/generators/bootstrap/layout/templates/layout.html.haml +70 -0
  11. data/lib/generators/bootstrap/layout/templates/layout.html.slim +70 -0
  12. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
  13. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -0
  14. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
  15. data/lib/generators/bootstrap/themed/templates/edit.html.erb +4 -0
  16. data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
  17. data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
  18. data/lib/generators/bootstrap/themed/templates/index.html.erb +38 -0
  19. data/lib/generators/bootstrap/themed/templates/index.html.haml +24 -0
  20. data/lib/generators/bootstrap/themed/templates/index.html.slim +26 -0
  21. data/lib/generators/bootstrap/themed/templates/new.html.erb +4 -0
  22. data/lib/generators/bootstrap/themed/templates/new.html.haml +3 -0
  23. data/lib/generators/bootstrap/themed/templates/new.html.slim +3 -0
  24. data/lib/generators/bootstrap/themed/templates/show.html.erb +21 -0
  25. data/lib/generators/bootstrap/themed/templates/show.html.haml +14 -0
  26. data/lib/generators/bootstrap/themed/templates/show.html.slim +16 -0
  27. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +14 -0
  28. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +11 -0
  29. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +12 -0
  30. data/lib/generators/bootstrap/themed/themed_generator.rb +99 -0
  31. data/lib/twitter-bootstrap-rails.rb +10 -0
  32. data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
  33. data/lib/twitter/bootstrap/rails/engine.rb +24 -0
  34. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +30 -0
  35. data/lib/twitter/bootstrap/rails/version.rb +7 -0
  36. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  37. data/vendor/assets/fonts/fontawesome-webfont.svg +175 -0
  38. data/vendor/assets/fonts/fontawesome-webfont.svgz +0 -0
  39. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  40. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  41. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  42. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  43. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  44. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +94 -0
  45. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +100 -0
  46. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +161 -0
  47. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +138 -0
  48. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +92 -0
  49. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +210 -0
  50. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +95 -0
  51. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +125 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +130 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +270 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +51 -0
  55. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +324 -0
  56. data/vendor/toolkit/fontawesome.less +267 -0
  57. data/vendor/toolkit/twitter/bootstrap/accordion.less +28 -0
  58. data/vendor/toolkit/twitter/bootstrap/alerts.less +58 -0
  59. data/vendor/toolkit/twitter/bootstrap/badges.less +36 -0
  60. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  61. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
  62. data/vendor/toolkit/twitter/bootstrap/button-groups.less +172 -0
  63. data/vendor/toolkit/twitter/bootstrap/buttons.less +187 -0
  64. data/vendor/toolkit/twitter/bootstrap/carousel.less +121 -0
  65. data/vendor/toolkit/twitter/bootstrap/close.less +18 -0
  66. data/vendor/toolkit/twitter/bootstrap/code.less +57 -0
  67. data/vendor/toolkit/twitter/bootstrap/component-animations.less +20 -0
  68. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +148 -0
  69. data/vendor/toolkit/twitter/bootstrap/forms.less +555 -0
  70. data/vendor/toolkit/twitter/bootstrap/grid.less +5 -0
  71. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +22 -0
  72. data/vendor/toolkit/twitter/bootstrap/labels.less +38 -0
  73. data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
  74. data/vendor/toolkit/twitter/bootstrap/mixins.less +614 -0
  75. data/vendor/toolkit/twitter/bootstrap/modals.less +90 -0
  76. data/vendor/toolkit/twitter/bootstrap/navbar.less +341 -0
  77. data/vendor/toolkit/twitter/bootstrap/navs.less +363 -0
  78. data/vendor/toolkit/twitter/bootstrap/pager.less +36 -0
  79. data/vendor/toolkit/twitter/bootstrap/pagination.less +56 -0
  80. data/vendor/toolkit/twitter/bootstrap/popovers.less +49 -0
  81. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +109 -0
  82. data/vendor/toolkit/twitter/bootstrap/reset.less +126 -0
  83. data/vendor/toolkit/twitter/bootstrap/responsive.less +371 -0
  84. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +29 -0
  85. data/vendor/toolkit/twitter/bootstrap/sprites.less +158 -0
  86. data/vendor/toolkit/twitter/bootstrap/tables.less +159 -0
  87. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +35 -0
  88. data/vendor/toolkit/twitter/bootstrap/tooltip.less +35 -0
  89. data/vendor/toolkit/twitter/bootstrap/type.less +234 -0
  90. data/vendor/toolkit/twitter/bootstrap/utilities.less +23 -0
  91. data/vendor/toolkit/twitter/bootstrap/variables.less +201 -0
  92. data/vendor/toolkit/twitter/bootstrap/wells.less +27 -0
  93. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  94. metadata +138 -0
@@ -0,0 +1,221 @@
1
+ # Twitter Bootstrap for Rails 3.1 Asset Pipeline
2
+ Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
3
+
4
+ twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
5
+
6
+ [![Build Status](https://secure.travis-ci.org/seyhunak/twitter-bootstrap-rails.png)](http://travis-ci.org/seyhunak/twitter-bootstrap-rails)
7
+ [![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.png)](https://gemnasium.com/seyhunak/twitter-bootstrap-rails)
8
+
9
+
10
+ ## Screencasts
11
+ #### Installing twitter-bootstrap-rails, generators, usage and more
12
+ Screencasts provided by Railscasts (Ryan Bates)
13
+
14
+ [Twitter Bootstrap Basics](http://railscasts.com/episodes/328-twitter-bootstrap-basics "Twitter Bootstrap Basics")
15
+ in this episode you will learn how to include Twitter Bootstrap into Rails application with the twitter-bootstrap-rails gem.
16
+
17
+ [More on Twitter Bootstrap](http://railscasts.com/episodes/329-more-on-twitter-bootstrap "More on Twitter Bootstrap")
18
+ in this episode continues on the Twitter Bootstrap project showing how to display flash messages, add form validations with SimpleForm, customize layout with variables, and switch to using Sass.
19
+ (Note: This episode is pro episode)
20
+
21
+
22
+ ## Installing Gem
23
+
24
+ Include Bootstrap in Gemfile;
25
+
26
+ gem "twitter-bootstrap-rails"
27
+
28
+ or you can install from latest build;
29
+
30
+ gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
31
+
32
+ You can run bundle from command line
33
+
34
+ bundle install
35
+
36
+
37
+ ## Installing to App (using Generators)
38
+
39
+ You can run following generators to get started with Twitter Bootstrap quickly.
40
+
41
+
42
+ Install (requires directives to Asset pipeline.)
43
+
44
+
45
+ Usage:
46
+
47
+
48
+ rails g bootstrap:install
49
+
50
+
51
+ Layout (generates Twitter Bootstrap compatible layout) - (Haml and Slim supported)
52
+
53
+
54
+ Usage:
55
+
56
+
57
+ rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
58
+
59
+
60
+ Example:
61
+
62
+
63
+ rails g bootstrap:layout application fixed
64
+
65
+
66
+ Themed (generates Twitter Bootstrap compatible scaffold views.) - (Haml and Slim supported)
67
+
68
+
69
+ Usage:
70
+
71
+
72
+ rails g bootstrap:themed [RESOURCE_NAME]
73
+
74
+
75
+ Example:
76
+
77
+
78
+ rails g scaffold post title:string description:text
79
+ rake db:migrate
80
+ rails g bootstrap:themed Posts
81
+
82
+
83
+
84
+ ## Using with Less
85
+
86
+ Bootstrap was built with Preboot, an open-source pack of mixins and variables to be used in conjunction with Less, a CSS preprocessor for faster and easier web development.
87
+
88
+ ## Using stylesheets with Less
89
+
90
+ You have to require Bootstrap LESS (bootstrap_and_overrides.css.less) in your application.css
91
+
92
+ /*
93
+ *= require bootstrap_and_overrides
94
+ */
95
+
96
+ /* Your stylesheets goes here... */
97
+
98
+
99
+ If you'd like to alter Bootstrap's own variables, or define your LESS
100
+ styles inheriting Bootstrap's mixins, you can do so inside bootstrap_and_overrides.css.less:
101
+
102
+ @linkColor: #ff0000;
103
+
104
+
105
+
106
+ ## Using Javascripts
107
+
108
+ You have to require Bootstrap JS (bootstrap.js) in your application.js
109
+
110
+ //= require twitter/bootstrap
111
+
112
+ $(document).ready(function(){
113
+ /* Your javascripts goes here... */
114
+ });
115
+
116
+
117
+ ## Using Coffeescript (optionally)
118
+
119
+ Using Twitter Bootstrap with the CoffeeScript is easy.
120
+ twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you
121
+ to /app/assets/javascripts/ folder.
122
+
123
+ jQuery ->
124
+ $("a[rel=popover]").popover()
125
+ $(".tooltip").tooltip()
126
+ $("a[rel=tooltip]").tooltip()
127
+
128
+
129
+ ## Using Static CSS, JS (w/o Less)
130
+
131
+ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest static CSS, JS files.
132
+
133
+ You can install from latest build (from branch);
134
+
135
+ gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"
136
+
137
+
138
+ ## Changelog
139
+ <ul>
140
+ <li>Version 0.0.5 deprecated</li>
141
+ <li>Asset files updated to latest and removed version numbers</li>
142
+ <li>Implemented Less::Rails Railtie to use with LESS</li>
143
+ <li>Fixed railtie to only initialize Less when installed</li>
144
+ <li>New branch for the static version of Bootstrap (w/o Less) - check static branch</li>
145
+ <li>Added path to support heroku deploy</li>
146
+ <li>Rake precompile issue fixed</li>
147
+ <li>Updated asset files to 1.4.0</li>
148
+ <li>Updated dependency less-rails (now requires 2.1.0)</li>
149
+ <li>Added generators</li>
150
+ <li>Fixed generators</li>
151
+ <li>Fixed class name conflicts from (bootstrap.js.coffee)</li>
152
+ <li>Fixed jquery-rails gem version dependency</li>
153
+ <li>Updated asset files</li>
154
+ <li>Added new generators (install, layout and themed)</li>
155
+ <li>Compability to Rails 3.2</li>
156
+ <li>Transitioning to 2.0</li>
157
+ <li>Released gem v.2.0rc0</li>
158
+ <li>Added Haml and Slim support</li>
159
+ <li>Added Responsive layout support</li>
160
+ <li>Fixes and release 2.0.0</li>
161
+ <li>Updated to v2.0.1, versioned v2.0.1.0</li>
162
+ <li>Released gem v.2.0.3</li>
163
+ <li>Released gem v.2.0.4</li>
164
+ <li>Released gem v.2.0.5</li>
165
+ <li>Added SimpleForm support</li>
166
+ <li>Added FontAwesome support</li>
167
+ <li>Released gem v.2.0.6</li>
168
+ </ul>
169
+
170
+
171
+ ## Contributors & Patches & Forks
172
+ <ul>
173
+ <li>Daniel Morris</li>
174
+ <li>Bradly Feeley</li>
175
+ <li>Guilherme Moreira</li>
176
+ <li>Alex Behar</li>
177
+ <li>Brandon Keene</li>
178
+ <li>Anthony Corcutt</li>
179
+ <li>Colin Warren</li>
180
+ <li>Giovanni Cappellotto</li>
181
+ <li>Masakuni Kato</li>
182
+ <li>Gudleik Rasch</li>
183
+ <li>Thomas Volkmar Worm</li>
184
+ <li>Thiago Almeida</li>
185
+ <li>Sébastien Grosjean</li>
186
+ <li>Nick DeSteffen</li>
187
+ </ul>
188
+
189
+
190
+ ## Future
191
+ <ul>
192
+ <li>Writing tests (not implemented yet)</li>
193
+ <li>Markup Helpers (alert, tabs, pagination, breadcrumbs etc.)</li>
194
+ </ul>
195
+
196
+
197
+ ## Credits
198
+ Seyhun Akyürek - seyhunak [at] gmail com
199
+
200
+ [Add Me On Twitter](http://twitter.com/seyhunak "Add Me On Twitter")
201
+
202
+ [Add Me On Linkedin](http://tr.linkedin.com/in/seyhunak "Add Me On Linkedin")
203
+
204
+ [Add Me On Facebook](https://www.facebook.com/seyhunak "Add Me On Facebook")
205
+
206
+ [Add Me On Google+](http://plus.ly/seyhunak "Add Me On Google+")
207
+
208
+ [Visit My Blog](http://www.seyhunakyurek.com/ "Visit My Blog")
209
+
210
+
211
+ ## Thanks
212
+ Twitter Bootstrap and all twitter-bootstrap-rails contributors
213
+ http://twitter.github.com/bootstrap
214
+
215
+
216
+ ## License
217
+ Copyright (c) 2011 Seyhun Akyürek
218
+
219
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
220
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
221
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env rake
2
+ require 'bundler'
3
+ Bundler::GemHelper.install_tasks
4
+
5
+ desc "Bundle the gem"
6
+ task :bundle do
7
+ sh('bundle install')
8
+ sh 'gem build *.gemspec'
9
+ sh 'gem install *.gem'
10
+ sh 'rm *.gem'
11
+ end
12
+
13
+ task(:default).clear
14
+ task :default => :bundle
@@ -0,0 +1,53 @@
1
+ require 'rails/generators'
2
+
3
+ module Bootstrap
4
+ module Generators
5
+ class InstallGenerator < ::Rails::Generators::Base
6
+
7
+ source_root File.expand_path("../templates", __FILE__)
8
+ desc "This generator installs Twitter Bootstrap to Asset Pipeline"
9
+
10
+ def add_assets
11
+
12
+ if File.exist?('app/assets/javascripts/application.js')
13
+ insert_into_file "app/assets/javascripts/application.js", "//= require twitter/bootstrap\n", :after => "jquery_ujs\n"
14
+ else
15
+ copy_file "application.js", "app/assets/javascripts/application.js"
16
+ end
17
+
18
+ if File.exist?('app/assets/stylesheets/application.css')
19
+ # Add our own require:
20
+ content = File.read("app/assets/stylesheets/application.css")
21
+ if content.match(/require_tree\s+\./)
22
+ # Good enough - that'll include our bootstrap_and_overrides.css.less
23
+ else
24
+ style_require_block = " *= require bootstrap_and_overrides\n"
25
+ insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n"
26
+ end
27
+ else
28
+ copy_file "application.css", "app/assets/stylesheets/application.css"
29
+ end
30
+
31
+ end
32
+
33
+ def add_bootstrap
34
+ copy_file "bootstrap.coffee", "app/assets/javascripts/bootstrap.js.coffee"
35
+ copy_file "bootstrap_and_overrides.less", "app/assets/stylesheets/bootstrap_and_overrides.css.less"
36
+ end
37
+
38
+ def cleanup_legacy
39
+ # Remove old requires (if any) that included twitter/bootstrap directly:
40
+ gsub_file("app/assets/stylesheets/application.css", %r|\s*\*=\s*twitter/bootstrap\s*\n|, "")
41
+ gsub_file("app/assets/stylesheets/application.css", %r|\s*\*=\s*twitter/bootstrap_responsive\s*\n|, "")
42
+ if File.exist?('app/assets/stylesheets/bootstrap_override.css.less')
43
+ puts <<-EOM
44
+ Warning:
45
+ app/assets/stylesheets/bootstrap_override.css.less exists
46
+ It should be removed, as it has been superceded by app/assets/stylesheets/bootstrap_and_overrides.css.less
47
+ EOM
48
+ end
49
+ end
50
+
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,10 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require twitter/bootstrap
10
+ //= require_tree .
@@ -0,0 +1,4 @@
1
+ jQuery ->
2
+ $("a[rel=popover]").popover()
3
+ $(".tooltip").tooltip()
4
+ $("a[rel=tooltip]").tooltip()
@@ -0,0 +1,29 @@
1
+ @import "twitter/bootstrap/bootstrap";
2
+ body { padding-top: 60px; }
3
+
4
+ @import "twitter/bootstrap/responsive";
5
+
6
+ // Set the correct sprite paths
7
+ @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
8
+ @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
9
+
10
+ // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
11
+ @fontAwesomeEotPath: asset-path('fontawesome-webfont.eot');
12
+ @fontAwesomeWoffPath: asset-path('fontawesome-webfont.woff');
13
+ @fontAwesomeTtfPath: asset-path('fontawesome-webfont.ttf');
14
+ @fontAwesomeSvgzPath: asset-path('fontawesome-webfont.svgz');
15
+ @fontAwesomeSvgPath: asset-path('fontawesome-webfont.svg');
16
+
17
+ // Font Awesome
18
+ @import "fontawesome";
19
+
20
+ // Your custom LESS stylesheets goes here
21
+ //
22
+ // Since bootstrap was imported above you have access to its mixins which
23
+ // you may use and inherit here
24
+ //
25
+ // If you'd like to override bootstrap's own variables, you can do so here as well
26
+ // See http://twitter.github.com/bootstrap/less.html for their names and documentation
27
+ //
28
+ // Example:
29
+ // @linkColor: #ff0000;
@@ -0,0 +1,23 @@
1
+ require 'rails/generators'
2
+
3
+ module Bootstrap
4
+ module Generators
5
+ class LayoutGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path("../templates", __FILE__)
7
+ desc "This generator generates layout file with navigation."
8
+ argument :layout_name, :type => :string, :default => "application"
9
+ argument :layout_type, :type => :string, :default => "fixed",
10
+ :banner => "*fixed or fluid"
11
+
12
+ attr_reader :app_name, :container_class
13
+
14
+ def generate_layout
15
+ app = ::Rails.application
16
+ @app_name = app.class.to_s.split("::").first
17
+ @container_class = layout_type == "fluid" ? "container-fluid" : "container"
18
+ ext = app.config.generators.options[:rails][:template_engine] || :erb
19
+ template "layout.html.#{ext}", "app/views/layouts/#{layout_name}.html.#{ext}"
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,97 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title><%%= content_for?(:title) ? yield(:title) : "<%= app_name %>" %></title>
7
+ <%%= csrf_meta_tags %>
8
+
9
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
10
+ <!--[if lt IE 9]>
11
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
12
+ <![endif]-->
13
+
14
+ <%%= stylesheet_link_tag "application", :media => "all" %>
15
+
16
+ <link href="images/favicon.ico" rel="shortcut icon">
17
+ <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
18
+ <link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
19
+ <link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
20
+ </head>
21
+ <body>
22
+
23
+ <div class="navbar navbar-fixed-top">
24
+ <div class="navbar-inner">
25
+ <%- if layout_type == "fluid" -%>
26
+ <div class="container-fluid">
27
+ <%- else -%>
28
+ <div class="container">
29
+ <%- end -%>
30
+ <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
31
+ <span class="icon-bar"></span>
32
+ <span class="icon-bar"></span>
33
+ <span class="icon-bar"></span>
34
+ </a>
35
+ <a class="brand" href="#"><%= app_name %></a>
36
+ <div class="<%= container_class %> nav-collapse">
37
+ <ul class="nav">
38
+ <li><%%= link_to "Link1", "/path1" %></li>
39
+ <li><%%= link_to "Link2", "/path2" %></li>
40
+ <li><%%= link_to "Link3", "/path3" %></li>
41
+ </ul>
42
+ </div><!--/.nav-collapse -->
43
+ </div>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="<%= container_class %>">
48
+ <%- if layout_type == "fluid" -%>
49
+ <div class="row-fluid">
50
+ <div class="span3">
51
+ <div class="well sidebar-nav">
52
+ <ul class="nav nav-list">
53
+ <li class="nav-header">Sidebar</li>
54
+ <li><%%= link_to "Link1", "/path1" %></li>
55
+ <li><%%= link_to "Link2", "/path2" %></li>
56
+ <li><%%= link_to "Link3", "/path3" %></li>
57
+ </ul>
58
+ </div><!--/.well -->
59
+ </div><!--/span-->
60
+ <div class="span9">
61
+ <%%= yield %>
62
+ </div>
63
+ </div><!--/row-->
64
+ <%- else -%>
65
+ <div class="content">
66
+ <div class="row">
67
+ <div class="span9">
68
+ <%%= yield %>
69
+ </div>
70
+ <div class="span3">
71
+ <div class="well sidebar-nav">
72
+ <h3>Sidebar</h3>
73
+ <ul class="nav nav-list">
74
+ <li class="nav-header">Sidebar</li>
75
+ <li><%%= link_to "Link1", "/path1" %></li>
76
+ <li><%%= link_to "Link2", "/path2" %></li>
77
+ <li><%%= link_to "Link3", "/path3" %></li>
78
+ </ul>
79
+ </div><!--/.well -->
80
+ </div><!--/span-->
81
+ </div><!--/row-->
82
+ </div><!--/content-->
83
+ <%- end -%>
84
+
85
+ <footer>
86
+ <p>&copy; Company 2012</p>
87
+ </footer>
88
+
89
+ </div> <!-- /container -->
90
+
91
+ <!-- Javascripts
92
+ ================================================== -->
93
+ <!-- Placed at the end of the document so the pages load faster -->
94
+ <%%= javascript_include_tag "application" %>
95
+
96
+ </body>
97
+ </html>