rbootstrap 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/README.md +282 -0
  2. data/Rakefile +14 -0
  3. data/app/helpers/bootstrap_flash_helper.rb +17 -0
  4. data/app/helpers/flash_block_helper.rb +17 -0
  5. data/app/helpers/glyph_helper.rb +12 -0
  6. data/app/helpers/modal_helper.rb +42 -0
  7. data/app/helpers/twitter_breadcrumbs_helper.rb +5 -0
  8. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +14 -0
  9. data/lib/generators/bootstrap/install/install_generator.rb +57 -0
  10. data/lib/generators/bootstrap/install/templates/application.css +7 -0
  11. data/lib/generators/bootstrap/install/templates/application.js +10 -0
  12. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +4 -0
  13. data/lib/generators/bootstrap/install/templates/bootstrap.js +5 -0
  14. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +31 -0
  15. data/lib/generators/bootstrap/layout/layout_generator.rb +23 -0
  16. data/lib/generators/bootstrap/layout/templates/layout.html.erb +108 -0
  17. data/lib/generators/bootstrap/layout/templates/layout.html.haml +68 -0
  18. data/lib/generators/bootstrap/layout/templates/layout.html.slim +68 -0
  19. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  20. data/lib/generators/bootstrap/partial/templates/_login.html.erb +29 -0
  21. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +13 -0
  22. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
  23. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -0
  24. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
  25. data/lib/generators/bootstrap/themed/templates/edit.html.erb +6 -0
  26. data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
  27. data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
  28. data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
  29. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  30. data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
  31. data/lib/generators/bootstrap/themed/templates/new.html.erb +6 -0
  32. data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
  33. data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
  34. data/lib/generators/bootstrap/themed/templates/show.html.erb +23 -0
  35. data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
  36. data/lib/generators/bootstrap/themed/templates/show.html.slim +17 -0
  37. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +14 -0
  38. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +11 -0
  39. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +12 -0
  40. data/lib/generators/bootstrap/themed/themed_generator.rb +110 -0
  41. data/lib/twitter-bootstrap-rails.rb +10 -0
  42. data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
  43. data/lib/twitter/bootstrap/rails/engine.rb +29 -0
  44. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +30 -0
  45. data/lib/twitter/bootstrap/rails/version.rb +7 -0
  46. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  47. data/vendor/assets/fonts/fontawesome-webfont.svg +255 -0
  48. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  49. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  50. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  51. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap.js +13 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +106 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +88 -0
  55. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +94 -0
  56. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +176 -0
  57. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +156 -0
  58. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +148 -0
  59. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +234 -0
  60. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +103 -0
  61. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +151 -0
  62. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +133 -0
  63. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +276 -0
  64. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +60 -0
  65. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +311 -0
  66. data/vendor/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
  67. data/vendor/toolkit/font-awesome-ie7.less +245 -0
  68. data/vendor/toolkit/fontawesome.less +328 -0
  69. data/vendor/toolkit/twitter/bootstrap/accordion.less +34 -0
  70. data/vendor/toolkit/twitter/bootstrap/alerts.less +65 -0
  71. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  72. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
  73. data/vendor/toolkit/twitter/bootstrap/button-groups.less +242 -0
  74. data/vendor/toolkit/twitter/bootstrap/buttons.less +232 -0
  75. data/vendor/toolkit/twitter/bootstrap/carousel.less +131 -0
  76. data/vendor/toolkit/twitter/bootstrap/close.less +31 -0
  77. data/vendor/toolkit/twitter/bootstrap/code.less +59 -0
  78. data/vendor/toolkit/twitter/bootstrap/component-animations.less +22 -0
  79. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +237 -0
  80. data/vendor/toolkit/twitter/bootstrap/forms.less +683 -0
  81. data/vendor/toolkit/twitter/bootstrap/grid.less +21 -0
  82. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +25 -0
  83. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +74 -0
  84. data/vendor/toolkit/twitter/bootstrap/layouts.less +16 -0
  85. data/vendor/toolkit/twitter/bootstrap/media.less +55 -0
  86. data/vendor/toolkit/twitter/bootstrap/mixins.less +686 -0
  87. data/vendor/toolkit/twitter/bootstrap/modals.less +94 -0
  88. data/vendor/toolkit/twitter/bootstrap/navbar.less +472 -0
  89. data/vendor/toolkit/twitter/bootstrap/navs.less +385 -0
  90. data/vendor/toolkit/twitter/bootstrap/pager.less +41 -0
  91. data/vendor/toolkit/twitter/bootstrap/pagination.less +121 -0
  92. data/vendor/toolkit/twitter/bootstrap/popovers.less +117 -0
  93. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +122 -0
  94. data/vendor/toolkit/twitter/bootstrap/reset.less +138 -0
  95. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +28 -0
  96. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +193 -0
  97. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +19 -0
  98. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +185 -0
  99. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +43 -0
  100. data/vendor/toolkit/twitter/bootstrap/responsive.less +48 -0
  101. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +52 -0
  102. data/vendor/toolkit/twitter/bootstrap/sprites.less +193 -0
  103. data/vendor/toolkit/twitter/bootstrap/tables.less +236 -0
  104. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +52 -0
  105. data/vendor/toolkit/twitter/bootstrap/tooltip.less +70 -0
  106. data/vendor/toolkit/twitter/bootstrap/type.less +230 -0
  107. data/vendor/toolkit/twitter/bootstrap/utilities.less +30 -0
  108. data/vendor/toolkit/twitter/bootstrap/variables.less +301 -0
  109. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  110. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  111. metadata +224 -0
@@ -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,5 @@
1
+ jQuery(function() {
2
+ $("a[rel=popover]").popover();
3
+ $(".tooltip").tooltip();
4
+ $("a[rel=tooltip]").tooltip();
5
+ });
@@ -0,0 +1,31 @@
1
+ @import "twitter/bootstrap/bootstrap";
2
+ @import "twitter/bootstrap/responsive";
3
+
4
+ // Set the correct sprite paths
5
+ @iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
6
+ @iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
7
+
8
+ // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
9
+ // Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
10
+ // have the proper paths. So for now we use the absolute path.
11
+ @fontAwesomeEotPath: asset-path("fontawesome-webfont.eot");
12
+ @fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff");
13
+ @fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf");
14
+ @fontAwesomeSvgPath: asset-path("fontawesome-webfont.svg");
15
+
16
+ // Font Awesome
17
+ @import "fontawesome";
18
+
19
+ // Glyphicons
20
+ //@import "twitter/bootstrap/sprites.less";
21
+
22
+ // Your custom LESS stylesheets goes here
23
+ //
24
+ // Since bootstrap was imported above you have access to its mixins which
25
+ // you may use and inherit here
26
+ //
27
+ // If you'd like to override bootstrap's own variables, you can do so here as well
28
+ // See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
29
+ //
30
+ // Example:
31
+ // @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,108 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title><%%= content_for?(:title) ? yield(:title) : "<%= app_name %>" %></title>
8
+ <%%= csrf_meta_tags %>
9
+
10
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
+ <!--[if lt IE 9]>
12
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
13
+ <![endif]-->
14
+
15
+ <%%= stylesheet_link_tag "application", :media => "all" %>
16
+
17
+ <!-- For third-generation iPad with high-resolution Retina display: -->
18
+ <!-- Size should be 144 x 144 pixels -->
19
+ <%%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
20
+
21
+ <!-- For iPhone with high-resolution Retina display: -->
22
+ <!-- Size should be 114 x 114 pixels -->
23
+ <%%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
24
+
25
+ <!-- For first- and second-generation iPad: -->
26
+ <!-- Size should be 72 x 72 pixels -->
27
+ <%%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
28
+
29
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
30
+ <!-- Size should be 57 x 57 pixels -->
31
+ <%%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
32
+
33
+ <!-- For all other devices -->
34
+ <!-- Size should be 32 x 32 pixels -->
35
+ <%%= favicon_link_tag 'images/favicon.ico', :rel => 'shortcut icon' %>
36
+ </head>
37
+ <body>
38
+
39
+ <div class="navbar navbar-<%= layout_type %>-top">
40
+ <div class="navbar-inner">
41
+ <div class="<%= container_class %>">
42
+ <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
43
+ <span class="icon-bar"></span>
44
+ <span class="icon-bar"></span>
45
+ <span class="icon-bar"></span>
46
+ </a>
47
+ <a class="brand" href="#"><%= app_name %></a>
48
+ <div class="<%= container_class %> nav-collapse">
49
+ <ul class="nav">
50
+ <li><%%= link_to "Link1", "/path1" %></li>
51
+ <li><%%= link_to "Link2", "/path2" %></li>
52
+ <li><%%= link_to "Link3", "/path3" %></li>
53
+ </ul>
54
+ </div><!--/.nav-collapse -->
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="<%= container_class %>">
60
+ <%- if layout_type == "fluid" -%>
61
+ <div class="row-fluid">
62
+ <div class="span3">
63
+ <div class="well sidebar-nav">
64
+ <ul class="nav nav-list">
65
+ <li class="nav-header">Sidebar</li>
66
+ <li><%%= link_to "Link1", "/path1" %></li>
67
+ <li><%%= link_to "Link2", "/path2" %></li>
68
+ <li><%%= link_to "Link3", "/path3" %></li>
69
+ </ul>
70
+ </div><!--/.well -->
71
+ </div><!--/span-->
72
+ <div class="span9">
73
+ <%%= bootstrap_flash %>
74
+ <%%= yield %>
75
+ </div>
76
+ </div><!--/row-->
77
+ <%- else -%>
78
+ <div class="row">
79
+ <div class="span9">
80
+ <%%= yield %>
81
+ </div>
82
+ <div class="span3">
83
+ <div class="well sidebar-nav">
84
+ <h3>Sidebar</h3>
85
+ <ul class="nav nav-list">
86
+ <li class="nav-header">Sidebar</li>
87
+ <li><%%= link_to "Link1", "/path1" %></li>
88
+ <li><%%= link_to "Link2", "/path2" %></li>
89
+ <li><%%= link_to "Link3", "/path3" %></li>
90
+ </ul>
91
+ </div><!--/.well -->
92
+ </div><!--/span-->
93
+ </div><!--/row-->
94
+ <%- end -%>
95
+
96
+ <footer>
97
+ <p>&copy; Company 2012</p>
98
+ </footer>
99
+
100
+ </div> <!-- /container -->
101
+
102
+ <!-- Javascripts
103
+ ================================================== -->
104
+ <!-- Placed at the end of the document so the pages load faster -->
105
+ <%%= javascript_include_tag "application" %>
106
+
107
+ </body>
108
+ </html>
@@ -0,0 +1,68 @@
1
+ !!! 5
2
+ %html(lang="en")
3
+ %head
4
+ %meta(charset="utf-8")
5
+ %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
6
+ %meta(name="viewport" content="width=device-width, initial-scale=1.0")
7
+ %title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
8
+ = csrf_meta_tags
9
+ / Le HTML5 shim, for IE6-8 support of HTML elements
10
+ /[if lt IE 9]
11
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
12
+ = stylesheet_link_tag "application", :media => "all"
13
+ %link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
14
+ %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
15
+ %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
16
+ %link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
17
+ %link(href="images/favicon.ico" rel="shortcut icon")
18
+
19
+
20
+ %body
21
+ .navbar.navbar-<%= layout_type %>-top
22
+ .navbar-inner
23
+ .<%= container_class %>
24
+ %a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
25
+ %span.icon-bar
26
+ %span.icon-bar
27
+ %span.icon-bar
28
+ %a.brand(href="#") <%= app_name %>
29
+ .container.nav-collapse
30
+ %ul.nav
31
+ %li= link_to "Link 1", "/path1"
32
+ %li= link_to "Link 2", "/path2"
33
+ %li= link_to "Link 3", "/path3"
34
+
35
+ .<%= container_class %>
36
+ <%- if layout_type == "fluid" -%>
37
+
38
+ .row-fluid
39
+ .span3
40
+ .well.sidebar-nav
41
+ %ul.nav.nav-list
42
+ %li.nav-header Sidebar
43
+ %li= link_to "Link 1", "/path1"
44
+ %li= link_to "Link 2", "/path2"
45
+ %li= link_to "Link 3", "/path3"
46
+ .span9
47
+ = yield
48
+ <% else %>
49
+ .row
50
+ .span9
51
+ = bootstrap_flash
52
+ = yield
53
+ .span3
54
+ .well.sidebar-nav
55
+ %h3 Sidebar
56
+ %ul.nav.nav-list
57
+ %li.nav-header Sidebar
58
+ %li= link_to "Link 1", "/path1"
59
+ %li= link_to "Link 2", "/path2"
60
+ %li= link_to "Link 3", "/path3"
61
+ <% end %>
62
+ %footer
63
+ %p &copy; Company 2012
64
+ /
65
+ Javascripts
66
+ \==================================================
67
+ / Placed at the end of the document so the pages load faster
68
+ = javascript_include_tag "application"
@@ -0,0 +1,68 @@
1
+ doctype html
2
+ html lang="en"
3
+ head
4
+ meta charset="utf-8"
5
+ meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"
6
+ meta name="viewport" content="width=device-width, initial-scale=1.0"
7
+ title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
8
+ = csrf_meta_tags
9
+
10
+ /! Le HTML5 shim, for IE6-8 support of HTML elements
11
+ /[if lt IE 9]
12
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
13
+ = stylesheet_link_tag "application", :media => "all"
14
+ link href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144"
15
+ link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114"
16
+ link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72"
17
+ link href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
18
+ link href="images/favicon.ico" rel="shortcut icon"
19
+
20
+ body
21
+ .navbar.navbar-<%= layout_type %>-top
22
+ .navbar-inner
23
+ .<%= container_class %>
24
+ a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
25
+ span.icon-bar
26
+ span.icon-bar
27
+ span.icon-bar
28
+ a.brand href="#"<%= app_name %>
29
+ .<%=container_class%>.nav-collapse
30
+ ul.nav
31
+ li= link_to "Link 1", "/path1"
32
+ li= link_to "Link 2", "/path2"
33
+ li= link_to "Link 3", "/path3"
34
+
35
+ .<%= container_class %>
36
+ <%- if layout_type == "fluid" -%>
37
+
38
+ .row-fluid
39
+ .span3
40
+ .well.sidebar-nav
41
+ ul.nav.nav-list
42
+ li.nav-header Sidebar
43
+ li= link_to "Link 1", "/path1"
44
+ li= link_to "Link 2", "/path2"
45
+ li= link_to "Link 3", "/path3"
46
+ .span9
47
+ = yield
48
+ <% else %>
49
+ .row
50
+ .span9
51
+ = bootstrap_flash
52
+ = yield
53
+ .span3
54
+ .well.sidebar-nav
55
+ h3 Sidebar
56
+ ul.nav.nav-list
57
+ li.nav-header Sidebar
58
+ li= link_to "Link 1", "/path1"
59
+ li= link_to "Link 2", "/path2"
60
+ li= link_to "Link 3", "/path3"
61
+ <% end %>
62
+ footer
63
+ p &copy; Company 2012
64
+ /!
65
+ Javascripts
66
+ \==================================================
67
+ /! Placed at the end of the document so the pages load faster
68
+ = javascript_include_tag "application"
@@ -0,0 +1,20 @@
1
+ require 'rails/generators'
2
+
3
+ module Bootstrap
4
+ module Generators
5
+ class PartialGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path("../templates", __FILE__)
7
+ desc "This generator generates bootstrap HTML partials"
8
+ argument :component_name, :type => :string, :default => "application",
9
+ :banner => "navbar, navbar-devise, carousel"
10
+
11
+ attr_reader :app_name
12
+
13
+ def generate_partial
14
+ app = ::Rails.application
15
+ ext = app.config.generators.options[:rails][:template_engine] || :erb
16
+ copy_file "_#{component_name}.html.#{ext}", "app/views/shared/_#{component_name}.html.#{ext}"
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,29 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => 'form-horizontal' }) do |f| %>
4
+ <div class="control-group">
5
+ <%= f.label :email, :class => 'control-label' %>
6
+ <div class="controls">
7
+ <%= f.email_field :email %>
8
+ </div>
9
+ </div>
10
+ <div class="control-group">
11
+ <%= f.label :password, :class => 'control-label' %>
12
+ <div class="controls">
13
+ <%= f.password_field :password %>
14
+ </div>
15
+ </div>
16
+
17
+ <% if devise_mapping.rememberable? -%>
18
+ <div class='control-group' >
19
+ <%= f.label :remember_me, :class => 'control-label' %>
20
+ <%= f.check_box :remember_me %>
21
+ </div>
22
+ <% end -%>
23
+
24
+ <div class="form-actions">
25
+ <%= f.submit "Sign in", :class => 'btn' %>
26
+ </div>
27
+ <% end %>
28
+
29
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,13 @@
1
+ <div class="navbar">
2
+ <div class="navbar-inner">
3
+ <div class="container">
4
+ <a class="brand" href="/">Brand</a>
5
+ <p>
6
+ " the mission "
7
+ </p>
8
+ <ul class="nav pull-right">
9
+ <li><%= link_to "Link 1", "" %></li>
10
+ </ul>
11
+ </div>
12
+ </div>
13
+ </div>
@@ -0,0 +1,16 @@
1
+ <%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
2
+ <%- columns.each do |column| -%>
3
+ <div class="control-group">
4
+ <%%= f.label :<%= column.name %>, :class => 'control-label' %>
5
+ <div class="controls">
6
+ <%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>' %>
7
+ </div>
8
+ </div>
9
+ <%- end -%>
10
+
11
+ <div class="form-actions">
12
+ <%%= f.submit nil, :class => 'btn btn-primary' %>
13
+ <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
14
+ <%= controller_routing_path %>_path, :class => 'btn' %>
15
+ </div>
16
+ <%% end %>
@@ -0,0 +1,10 @@
1
+ = form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
2
+ <%- columns.each do |column| -%>
3
+ .control-group
4
+ = f.label :<%= column.name %>, :class => 'control-label'
5
+ .controls
6
+ = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
7
+ <%- end -%>
8
+ .form-actions
9
+ = f.submit nil, :class => 'btn btn-primary'
10
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
@@ -0,0 +1,11 @@
1
+ = form_for @<%= resource_name %>, :html => { :class => "form-horizontal" } do |f|
2
+ <%- columns.each do |column| -%>
3
+ .control-group
4
+ = f.label :<%= column.name %>, :class => 'control-label'
5
+ .controls
6
+ = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
7
+ <%- end -%>
8
+ .form-actions
9
+ = f.submit nil, :class => 'btn btn-primary'
10
+ '
11
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'