devbootsrap 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  3. data/app/assets/fonts/fontawesome-webfont.svg +414 -0
  4. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  6. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  7. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  8. data/app/assets/javascripts/twitter/bootstrap.js +13 -0
  9. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +117 -0
  10. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +99 -0
  11. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +105 -0
  12. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +207 -0
  13. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +167 -0
  14. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +169 -0
  15. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +247 -0
  16. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +114 -0
  17. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +162 -0
  18. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +144 -0
  19. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +361 -0
  20. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +60 -0
  21. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +335 -0
  22. data/app/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
  23. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +892 -0
  24. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +1338 -0
  25. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +146 -0
  26. data/app/helpers/badge_label_helper.rb +16 -0
  27. data/app/helpers/bootstrap_flash_helper.rb +24 -0
  28. data/app/helpers/flash_block_helper.rb +17 -0
  29. data/app/helpers/glyph_helper.rb +17 -0
  30. data/app/helpers/modal_helper.rb +55 -0
  31. data/app/helpers/navbar_helper.rb +202 -0
  32. data/app/helpers/twitter_breadcrumbs_helper.rb +10 -0
  33. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +14 -0
  34. data/lib/devbootsrap.rb +17 -0
  35. data/lib/devbootsrap/version.rb +1 -1
  36. data/lib/generators/bootstrap/install/install_generator.rb +85 -0
  37. data/lib/generators/bootstrap/install/templates/application.css +7 -0
  38. data/lib/generators/bootstrap/install/templates/application.js +10 -0
  39. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +3 -0
  40. data/lib/generators/bootstrap/install/templates/bootstrap.js +4 -0
  41. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +7 -0
  42. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +30 -0
  43. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +23 -0
  44. data/lib/generators/bootstrap/layout/layout_generator.rb +23 -0
  45. data/lib/generators/bootstrap/layout/templates/layout.html.erb +106 -0
  46. data/lib/generators/bootstrap/layout/templates/layout.html.haml +65 -0
  47. data/lib/generators/bootstrap/layout/templates/layout.html.slim +67 -0
  48. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  49. data/lib/generators/bootstrap/partial/templates/_login.html.erb +29 -0
  50. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
  51. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -0
  52. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
  53. data/lib/generators/bootstrap/themed/templates/edit.html.erb +5 -0
  54. data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
  55. data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
  56. data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
  57. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  58. data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
  59. data/lib/generators/bootstrap/themed/templates/new.html.erb +5 -0
  60. data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
  61. data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
  62. data/lib/generators/bootstrap/themed/templates/show.html.erb +23 -0
  63. data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
  64. data/lib/generators/bootstrap/themed/templates/show.html.slim +17 -0
  65. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +14 -0
  66. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +11 -0
  67. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +12 -0
  68. data/lib/generators/bootstrap/themed/themed_generator.rb +148 -0
  69. data/lib/twitter-bootstrap-rails.rb +10 -0
  70. data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
  71. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +58 -0
  72. data/lib/twitter/bootstrap/rails/engine.rb +35 -0
  73. data/lib/twitter/bootstrap/rails/version.rb +7 -0
  74. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +889 -0
  75. data/vendor/static-source/bootstrap.less +2 -0
  76. data/vendor/static-source/fontawesome.less +8 -0
  77. data/vendor/static-source/sprites.less +6 -0
  78. data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
  79. data/vendor/toolkit/fontawesome/core.less +12 -0
  80. data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
  81. data/vendor/toolkit/fontawesome/font-awesome.less +17 -0
  82. data/vendor/toolkit/fontawesome/icons.less +412 -0
  83. data/vendor/toolkit/fontawesome/larger.less +13 -0
  84. data/vendor/toolkit/fontawesome/list.less +19 -0
  85. data/vendor/toolkit/fontawesome/mixins.less +20 -0
  86. data/vendor/toolkit/fontawesome/path.less +14 -0
  87. data/vendor/toolkit/fontawesome/rotated-flipped.less +9 -0
  88. data/vendor/toolkit/fontawesome/spinning.less +30 -0
  89. data/vendor/toolkit/fontawesome/stacked.less +20 -0
  90. data/vendor/toolkit/fontawesome/variables.less +381 -0
  91. data/vendor/toolkit/twitter/bootstrap/accordion.less +34 -0
  92. data/vendor/toolkit/twitter/bootstrap/alerts.less +79 -0
  93. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +62 -0
  94. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
  95. data/vendor/toolkit/twitter/bootstrap/button-groups.less +229 -0
  96. data/vendor/toolkit/twitter/bootstrap/buttons.less +228 -0
  97. data/vendor/toolkit/twitter/bootstrap/carousel.less +158 -0
  98. data/vendor/toolkit/twitter/bootstrap/close.less +32 -0
  99. data/vendor/toolkit/twitter/bootstrap/code.less +61 -0
  100. data/vendor/toolkit/twitter/bootstrap/component-animations.less +22 -0
  101. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +248 -0
  102. data/vendor/toolkit/twitter/bootstrap/forms.less +690 -0
  103. data/vendor/toolkit/twitter/bootstrap/grid.less +21 -0
  104. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +25 -0
  105. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +84 -0
  106. data/vendor/toolkit/twitter/bootstrap/layouts.less +16 -0
  107. data/vendor/toolkit/twitter/bootstrap/media.less +55 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins.less +702 -0
  109. data/vendor/toolkit/twitter/bootstrap/modals.less +95 -0
  110. data/vendor/toolkit/twitter/bootstrap/navbar.less +497 -0
  111. data/vendor/toolkit/twitter/bootstrap/navs.less +409 -0
  112. data/vendor/toolkit/twitter/bootstrap/pager.less +43 -0
  113. data/vendor/toolkit/twitter/bootstrap/pagination.less +123 -0
  114. data/vendor/toolkit/twitter/bootstrap/popovers.less +133 -0
  115. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +122 -0
  116. data/vendor/toolkit/twitter/bootstrap/reset.less +216 -0
  117. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +28 -0
  118. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +193 -0
  119. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +19 -0
  120. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +189 -0
  121. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +59 -0
  122. data/vendor/toolkit/twitter/bootstrap/responsive.less +48 -0
  123. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +53 -0
  124. data/vendor/toolkit/twitter/bootstrap/sprites.less +197 -0
  125. data/vendor/toolkit/twitter/bootstrap/tables.less +244 -0
  126. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +53 -0
  127. data/vendor/toolkit/twitter/bootstrap/tooltip.less +70 -0
  128. data/vendor/toolkit/twitter/bootstrap/type.less +247 -0
  129. data/vendor/toolkit/twitter/bootstrap/utilities.less +30 -0
  130. data/vendor/toolkit/twitter/bootstrap/variables.less +301 -0
  131. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  132. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  133. metadata +130 -1
@@ -0,0 +1,10 @@
1
+ module TwitterBreadcrumbsHelper
2
+ def render_breadcrumbs(divider = '/', &block)
3
+ content = render :partial => 'twitter-bootstrap/breadcrumbs', :layout => false, :locals => { :divider => divider }
4
+ if block_given?
5
+ capture(content, &block)
6
+ else
7
+ content
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,14 @@
1
+ <% if @breadcrumbs.present? %>
2
+ <ul class="breadcrumb">
3
+ <% separator = divider.html_safe %>
4
+ <% @breadcrumbs[0..-2].each do |crumb| %>
5
+ <li>
6
+ <%= link_to crumb[:name], crumb[:url], crumb[:options] %>
7
+ <span class="divider"><%= separator %></span>
8
+ </li>
9
+ <% end %>
10
+ <li class="active">
11
+ <%= @breadcrumbs.last[:name] %>
12
+ </li>
13
+ </ul>
14
+ <% end %>
data/lib/devbootsrap.rb CHANGED
@@ -497,3 +497,20 @@ require 'devise/models'
497
497
  require 'devise/modules'
498
498
  require 'devise/rails'
499
499
 
500
+
501
+
502
+
503
+ ##### Bootstrap code
504
+
505
+
506
+ module Twitter
507
+ module Bootstrap
508
+ module Rails
509
+ require 'twitter/bootstrap/rails/engine' if defined?(Rails)
510
+ end
511
+ end
512
+ end
513
+
514
+ #require 'less-rails'
515
+ require 'twitter/bootstrap/rails/bootstrap' if defined?(Rails)
516
+
@@ -1,3 +1,3 @@
1
1
  module Devbootsrap
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,85 @@
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 Bootstrap to Asset Pipeline"
9
+ argument :stylesheets_type, :type => :string, :default => 'less', :banner => '*less or static'
10
+ class_option :'no-coffeescript', :type => :boolean, :default => false, :desc => 'Skips coffeescript replacement into app generators'
11
+
12
+ def add_assets
13
+
14
+ js_manifest = 'app/assets/javascripts/application.js'
15
+
16
+ if File.exist?(js_manifest)
17
+ insert_into_file js_manifest, "//= require twitter/bootstrap\n", :after => "jquery_ujs\n"
18
+ else
19
+ copy_file "application.js", js_manifest
20
+ end
21
+
22
+ css_manifest = 'app/assets/stylesheets/application.css'
23
+
24
+ if File.exist?(css_manifest)
25
+ # Add our own require:
26
+ content = File.read(css_manifest)
27
+ if content.match(/require_tree\s+\.\s*$/)
28
+ # Good enough - that'll include our bootstrap_and_overrides.css.less
29
+ else
30
+ style_require_block = " *= require bootstrap_and_overrides\n"
31
+ insert_into_file css_manifest, style_require_block, :after => "require_self\n"
32
+ end
33
+ else
34
+ copy_file "application.css", "app/assets/stylesheets/application.css"
35
+ end
36
+
37
+ end
38
+
39
+ def add_bootstrap
40
+ if use_coffeescript?
41
+ copy_file "bootstrap.coffee", "app/assets/javascripts/bootstrap.js.coffee"
42
+ else
43
+ copy_file "bootstrap.js", "app/assets/javascripts/bootstrap.js"
44
+ end
45
+ if use_less?
46
+ copy_file "bootstrap_and_overrides.less", "app/assets/stylesheets/bootstrap_and_overrides.css.less"
47
+ else
48
+ copy_file "bootstrap_and_overrides.css", "app/assets/stylesheets/bootstrap_and_overrides.css"
49
+ end
50
+ end
51
+
52
+ def add_locale
53
+ if File.exist?("config/locales/en.bootstrap.yml")
54
+ localez = File.read("config/locales/en.bootstrap.yml")
55
+ insert_into_file "config/locales/en.bootstrap.yml", localez, :after => "en\n"
56
+ else
57
+ copy_file "en.bootstrap.yml", "config/locales/en.bootstrap.yml"
58
+ end
59
+ end
60
+
61
+ def cleanup_legacy
62
+ # Remove old requires (if any) that included twitter/bootstrap directly:
63
+ gsub_file("app/assets/stylesheets/application.css", %r|\s*\*=\s*twitter/bootstrap\s*\n|, "")
64
+ gsub_file("app/assets/stylesheets/application.css", %r|\s*\*=\s*twitter/bootstrap_responsive\s*\n|, "")
65
+ if File.exist?('app/assets/stylesheets/bootstrap_override.css.less')
66
+ puts <<-EOM
67
+ Warning:
68
+ app/assets/stylesheets/bootstrap_override.css.less exists
69
+ It should be removed, as it has been superceded by app/assets/stylesheets/bootstrap_and_overrides.css.less
70
+ EOM
71
+ end
72
+ end
73
+
74
+ private
75
+ def use_less?
76
+ (defined?(Less) && (stylesheets_type!='static') ) || (stylesheets_type=='less')
77
+ end
78
+
79
+ def use_coffeescript?
80
+ return false if options[:'no-coffeescript']
81
+ ::Rails.configuration.app_generators.rails[:javascript_engine] == :coffee
82
+ end
83
+ end
84
+ end
85
+ 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,3 @@
1
+ jQuery ->
2
+ $("a[rel~=popover], .has-popover").popover()
3
+ $("a[rel~=tooltip], .has-tooltip").tooltip()
@@ -0,0 +1,4 @@
1
+ jQuery(function() {
2
+ $("a[rel~=popover], .has-popover").popover();
3
+ $("a[rel~=tooltip], .has-tooltip").tooltip();
4
+ });
@@ -0,0 +1,7 @@
1
+ /*
2
+ =require twitter-bootstrap-static/bootstrap
3
+
4
+ Use Font Awesome icons (default)
5
+ To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
6
+ =require twitter-bootstrap-static/fontawesome
7
+ */
@@ -0,0 +1,30 @@
1
+ @import "twitter/bootstrap/bootstrap";
2
+ @import "twitter/bootstrap/responsive";
3
+
4
+ // Set the correct sprite paths
5
+ @iconSpritePath: image-url("twitter/bootstrap/glyphicons-halflings.png");
6
+ @iconWhiteSpritePath: image-url("twitter/bootstrap/glyphicons-halflings-white.png");
7
+
8
+ // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
9
+ @fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
10
+ @fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
11
+ @fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
12
+ @fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
13
+ @fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");
14
+
15
+ // Font Awesome
16
+ @import "fontawesome/font-awesome";
17
+
18
+ // Glyphicons
19
+ //@import "twitter/bootstrap/sprites.less";
20
+
21
+ // Your custom LESS stylesheets goes here
22
+ //
23
+ // Since bootstrap was imported above you have access to its mixins which
24
+ // you may use and inherit here
25
+ //
26
+ // If you'd like to override bootstrap's own variables, you can do so here as well
27
+ // See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
28
+ //
29
+ // Example:
30
+ // @linkColor: #ff0000;
@@ -0,0 +1,23 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ breadcrumbs:
6
+ application:
7
+ root: "Index"
8
+ pages:
9
+ pages: "Pages"
10
+ helpers:
11
+ actions: "Actions"
12
+ links:
13
+ back: "Back"
14
+ cancel: "Cancel"
15
+ confirm: "Are you sure?"
16
+ destroy: "Delete"
17
+ new: "New"
18
+ edit: "Edit"
19
+ titles:
20
+ edit: "Edit %{model}"
21
+ save: "Save %{model}"
22
+ new: "New %{model}"
23
+ delete: "Delete %{model}"
@@ -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,106 @@
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 '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 '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 '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 '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 'favicon.ico', :rel => 'shortcut icon' %>
36
+
37
+ <%%= javascript_include_tag "application" %>
38
+ </head>
39
+ <body>
40
+
41
+ <div class="navbar navbar-<%= layout_type %>-top">
42
+ <div class="navbar-inner">
43
+ <div class="<%= container_class %>">
44
+ <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
45
+ <span class="icon-bar"></span>
46
+ <span class="icon-bar"></span>
47
+ <span class="icon-bar"></span>
48
+ </a>
49
+ <a class="brand" href="#"><%= app_name %></a>
50
+ <div class="<%= container_class %> nav-collapse">
51
+ <ul class="nav">
52
+ <li><%%= link_to "Link1", "/path1" %></li>
53
+ <li><%%= link_to "Link2", "/path2" %></li>
54
+ <li><%%= link_to "Link3", "/path3" %></li>
55
+ </ul>
56
+ </div><!--/.nav-collapse -->
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="<%= container_class %>">
62
+ <%- if layout_type == "fluid" -%>
63
+ <div class="row-fluid">
64
+ <div class="span3">
65
+ <div class="well sidebar-nav">
66
+ <ul class="nav nav-list">
67
+ <li class="nav-header">Sidebar</li>
68
+ <li><%%= link_to "Link1", "/path1" %></li>
69
+ <li><%%= link_to "Link2", "/path2" %></li>
70
+ <li><%%= link_to "Link3", "/path3" %></li>
71
+ </ul>
72
+ </div><!--/.well -->
73
+ </div><!--/span-->
74
+ <div class="span9">
75
+ <%%= bootstrap_flash %>
76
+ <%%= yield %>
77
+ </div>
78
+ </div><!--/row-->
79
+ <%- else -%>
80
+ <div class="row">
81
+ <div class="span9">
82
+ <%%= bootstrap_flash %>
83
+ <%%= yield %>
84
+ </div>
85
+ <div class="span3">
86
+ <div class="well sidebar-nav">
87
+ <h3>Sidebar</h3>
88
+ <ul class="nav nav-list">
89
+ <li class="nav-header">Sidebar</li>
90
+ <li><%%= link_to "Link1", "/path1" %></li>
91
+ <li><%%= link_to "Link2", "/path2" %></li>
92
+ <li><%%= link_to "Link3", "/path3" %></li>
93
+ </ul>
94
+ </div><!--/.well -->
95
+ </div><!--/span-->
96
+ </div><!--/row-->
97
+ <%- end -%>
98
+
99
+ <footer>
100
+ <p>&copy; Company <%= Date.today.year %></p>
101
+ </footer>
102
+
103
+ </div> <!-- /container -->
104
+
105
+ </body>
106
+ </html>
@@ -0,0 +1,65 @@
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
+ = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
14
+ = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
15
+ = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
16
+ = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
17
+ = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
18
+ = javascript_include_tag "application"
19
+
20
+
21
+ %body
22
+ .navbar.navbar-<%= layout_type %>-top
23
+ .navbar-inner
24
+ .<%= container_class %>
25
+ %a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
26
+ %span.icon-bar
27
+ %span.icon-bar
28
+ %span.icon-bar
29
+ %a.brand(href="#") <%= app_name %>
30
+ .container.nav-collapse
31
+ %ul.nav
32
+ %li= link_to "Link 1", "/path1"
33
+ %li= link_to "Link 2", "/path2"
34
+ %li= link_to "Link 3", "/path3"
35
+
36
+ .<%= container_class %>
37
+ <%- if layout_type == "fluid" -%>
38
+
39
+ .row-fluid
40
+ .span3
41
+ .well.sidebar-nav
42
+ %ul.nav.nav-list
43
+ %li.nav-header Sidebar
44
+ %li= link_to "Link 1", "/path1"
45
+ %li= link_to "Link 2", "/path2"
46
+ %li= link_to "Link 3", "/path3"
47
+ .span9
48
+ = bootstrap_flash
49
+ = yield
50
+ <% else %>
51
+ .row
52
+ .span9
53
+ = bootstrap_flash
54
+ = yield
55
+ .span3
56
+ .well.sidebar-nav
57
+ %h3 Sidebar
58
+ %ul.nav.nav-list
59
+ %li.nav-header Sidebar
60
+ %li= link_to "Link 1", "/path1"
61
+ %li= link_to "Link 2", "/path2"
62
+ %li= link_to "Link 3", "/path3"
63
+ <% end %>
64
+ %footer
65
+ %p &copy; Company <%= Date.today.year %>
@@ -0,0 +1,67 @@
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
+ = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
15
+ = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
16
+ = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
17
+ = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
18
+ = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
19
+ = javascript_include_tag "application"
20
+
21
+
22
+
23
+ body
24
+ .navbar.navbar-<%= layout_type %>-top
25
+ .navbar-inner
26
+ .<%= container_class %>
27
+ a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
28
+ span.icon-bar
29
+ span.icon-bar
30
+ span.icon-bar
31
+ a.brand href="#"<%= app_name %>
32
+ .<%=container_class%>.nav-collapse
33
+ ul.nav
34
+ li= link_to "Link 1", "/path1"
35
+ li= link_to "Link 2", "/path2"
36
+ li= link_to "Link 3", "/path3"
37
+
38
+ .<%= container_class %>
39
+ <%- if layout_type == "fluid" -%>
40
+
41
+ .row-fluid
42
+ .span3
43
+ .well.sidebar-nav
44
+ ul.nav.nav-list
45
+ li.nav-header Sidebar
46
+ li= link_to "Link 1", "/path1"
47
+ li= link_to "Link 2", "/path2"
48
+ li= link_to "Link 3", "/path3"
49
+ .span9
50
+ = bootstrap_flash
51
+ = yield
52
+ <% else %>
53
+ .row
54
+ .span9
55
+ = bootstrap_flash
56
+ = yield
57
+ .span3
58
+ .well.sidebar-nav
59
+ h3 Sidebar
60
+ ul.nav.nav-list
61
+ li.nav-header Sidebar
62
+ li= link_to "Link 1", "/path1"
63
+ li= link_to "Link 2", "/path2"
64
+ li= link_to "Link 3", "/path3"
65
+ <% end %>
66
+ footer
67
+ p &copy; Company <%= Date.today.year %>