tennpipes-su 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.rdoc +70 -0
  4. data/Rakefile +22 -0
  5. data/lib/tennpipes-su.rb +35 -0
  6. data/lib/tennpipes-su/access_control.rb +191 -0
  7. data/lib/tennpipes-su/bootstrap-less/alerts.less +67 -0
  8. data/lib/tennpipes-su/bootstrap-less/badges.less +55 -0
  9. data/lib/tennpipes-su/bootstrap-less/bootstrap.less +49 -0
  10. data/lib/tennpipes-su/bootstrap-less/breadcrumbs.less +26 -0
  11. data/lib/tennpipes-su/bootstrap-less/button-groups.less +226 -0
  12. data/lib/tennpipes-su/bootstrap-less/buttons.less +155 -0
  13. data/lib/tennpipes-su/bootstrap-less/carousel.less +232 -0
  14. data/lib/tennpipes-su/bootstrap-less/close.less +33 -0
  15. data/lib/tennpipes-su/bootstrap-less/code.less +63 -0
  16. data/lib/tennpipes-su/bootstrap-less/component-animations.less +29 -0
  17. data/lib/tennpipes-su/bootstrap-less/dropdowns.less +213 -0
  18. data/lib/tennpipes-su/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
  19. data/lib/tennpipes-su/bootstrap-less/font-awesome/core.less +12 -0
  20. data/lib/tennpipes-su/bootstrap-less/font-awesome/fixed-width.less +6 -0
  21. data/lib/tennpipes-su/bootstrap-less/font-awesome/font-awesome.less +17 -0
  22. data/lib/tennpipes-su/bootstrap-less/font-awesome/icons.less +412 -0
  23. data/lib/tennpipes-su/bootstrap-less/font-awesome/larger.less +13 -0
  24. data/lib/tennpipes-su/bootstrap-less/font-awesome/list.less +19 -0
  25. data/lib/tennpipes-su/bootstrap-less/font-awesome/mixins.less +20 -0
  26. data/lib/tennpipes-su/bootstrap-less/font-awesome/path.less +14 -0
  27. data/lib/tennpipes-su/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
  28. data/lib/tennpipes-su/bootstrap-less/font-awesome/spinning.less +30 -0
  29. data/lib/tennpipes-su/bootstrap-less/font-awesome/stacked.less +20 -0
  30. data/lib/tennpipes-su/bootstrap-less/font-awesome/variables.less +381 -0
  31. data/lib/tennpipes-su/bootstrap-less/forms.less +419 -0
  32. data/lib/tennpipes-su/bootstrap-less/glyphicons.less +233 -0
  33. data/lib/tennpipes-su/bootstrap-less/grid.less +100 -0
  34. data/lib/tennpipes-su/bootstrap-less/input-groups.less +157 -0
  35. data/lib/tennpipes-su/bootstrap-less/jumbotron.less +44 -0
  36. data/lib/tennpipes-su/bootstrap-less/labels.less +64 -0
  37. data/lib/tennpipes-su/bootstrap-less/list-group.less +110 -0
  38. data/lib/tennpipes-su/bootstrap-less/media.less +56 -0
  39. data/lib/tennpipes-su/bootstrap-less/mixins.less +926 -0
  40. data/lib/tennpipes-su/bootstrap-less/modals.less +138 -0
  41. data/lib/tennpipes-su/bootstrap-less/navbar.less +616 -0
  42. data/lib/tennpipes-su/bootstrap-less/navs.less +242 -0
  43. data/lib/tennpipes-su/bootstrap-less/normalize.less +423 -0
  44. data/lib/tennpipes-su/bootstrap-less/pager.less +55 -0
  45. data/lib/tennpipes-su/bootstrap-less/pagination.less +88 -0
  46. data/lib/tennpipes-su/bootstrap-less/panels.less +230 -0
  47. data/lib/tennpipes-su/bootstrap-less/popovers.less +133 -0
  48. data/lib/tennpipes-su/bootstrap-less/print.less +101 -0
  49. data/lib/tennpipes-su/bootstrap-less/progress-bars.less +80 -0
  50. data/lib/tennpipes-su/bootstrap-less/responsive-utilities.less +93 -0
  51. data/lib/tennpipes-su/bootstrap-less/scaffolding.less +134 -0
  52. data/lib/tennpipes-su/bootstrap-less/tables.less +233 -0
  53. data/lib/tennpipes-su/bootstrap-less/tennpipes-su.less +18 -0
  54. data/lib/tennpipes-su/bootstrap-less/theme.less +247 -0
  55. data/lib/tennpipes-su/bootstrap-less/thumbnails.less +36 -0
  56. data/lib/tennpipes-su/bootstrap-less/tooltip.less +95 -0
  57. data/lib/tennpipes-su/bootstrap-less/type.less +296 -0
  58. data/lib/tennpipes-su/bootstrap-less/utilities.less +56 -0
  59. data/lib/tennpipes-su/bootstrap-less/variables.less +827 -0
  60. data/lib/tennpipes-su/bootstrap-less/wells.less +29 -0
  61. data/lib/tennpipes-su/generators/actions.rb +78 -0
  62. data/lib/tennpipes-su/generators/admin_app.rb +169 -0
  63. data/lib/tennpipes-su/generators/admin_page.rb +68 -0
  64. data/lib/tennpipes-su/generators/orm.rb +172 -0
  65. data/lib/tennpipes-su/generators/templates/account/activerecord.rb.tt +41 -0
  66. data/lib/tennpipes-su/generators/templates/account/couchrest.rb.tt +67 -0
  67. data/lib/tennpipes-su/generators/templates/account/datamapper.rb.tt +56 -0
  68. data/lib/tennpipes-su/generators/templates/account/dynamoid.rb.tt +55 -0
  69. data/lib/tennpipes-su/generators/templates/account/minirecord.rb.tt +44 -0
  70. data/lib/tennpipes-su/generators/templates/account/mongoid.rb.tt +54 -0
  71. data/lib/tennpipes-su/generators/templates/account/mongomapper.rb.tt +47 -0
  72. data/lib/tennpipes-su/generators/templates/account/ohm.rb.tt +70 -0
  73. data/lib/tennpipes-su/generators/templates/account/seeds.rb.tt +29 -0
  74. data/lib/tennpipes-su/generators/templates/account/sequel.rb.tt +53 -0
  75. data/lib/tennpipes-su/generators/templates/app.rb.tt +42 -0
  76. data/lib/tennpipes-su/generators/templates/app/controllers/base.rb.tt +5 -0
  77. data/lib/tennpipes-su/generators/templates/app/controllers/sessions.rb.tt +29 -0
  78. data/lib/tennpipes-su/generators/templates/assets/images/favicon.ico +0 -0
  79. data/lib/tennpipes-su/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  80. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  81. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.svg +414 -0
  82. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  83. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  84. data/lib/tennpipes-su/generators/templates/assets/images/logo.png +0 -0
  85. data/lib/tennpipes-su/generators/templates/assets/javascripts/application.js +118 -0
  86. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/affix.js +137 -0
  87. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/alert.js +88 -0
  88. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -0
  89. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/button.js +107 -0
  90. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/carousel.js +205 -0
  91. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/collapse.js +170 -0
  92. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/dropdown.js +147 -0
  93. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
  94. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/popover.js +110 -0
  95. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/scrollspy.js +153 -0
  96. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tab.js +125 -0
  97. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tooltip.js +399 -0
  98. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/transition.js +48 -0
  99. data/lib/tennpipes-su/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
  100. data/lib/tennpipes-su/generators/templates/assets/stylesheets/application.css +353 -0
  101. data/lib/tennpipes-su/generators/templates/assets/stylesheets/bootstrap.css +4 -0
  102. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
  103. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
  104. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
  105. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
  106. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
  107. data/lib/tennpipes-su/generators/templates/erb/app/base/index.erb.tt +15 -0
  108. data/lib/tennpipes-su/generators/templates/erb/app/errors/403.erb.tt +3 -0
  109. data/lib/tennpipes-su/generators/templates/erb/app/errors/404.erb.tt +3 -0
  110. data/lib/tennpipes-su/generators/templates/erb/app/errors/500.erb.tt +3 -0
  111. data/lib/tennpipes-su/generators/templates/erb/app/layouts/application.erb.tt +64 -0
  112. data/lib/tennpipes-su/generators/templates/erb/app/layouts/error.erb.tt +23 -0
  113. data/lib/tennpipes-su/generators/templates/erb/app/sessions/new.erb.tt +44 -0
  114. data/lib/tennpipes-su/generators/templates/erb/page/_form.erb.tt +18 -0
  115. data/lib/tennpipes-su/generators/templates/erb/page/edit.erb.tt +10 -0
  116. data/lib/tennpipes-su/generators/templates/erb/page/index.erb.tt +81 -0
  117. data/lib/tennpipes-su/generators/templates/erb/page/new.erb.tt +9 -0
  118. data/lib/tennpipes-su/generators/templates/haml/app/base/index.haml.tt +12 -0
  119. data/lib/tennpipes-su/generators/templates/haml/app/errors/403.haml.tt +3 -0
  120. data/lib/tennpipes-su/generators/templates/haml/app/errors/404.haml.tt +3 -0
  121. data/lib/tennpipes-su/generators/templates/haml/app/errors/500.haml.tt +3 -0
  122. data/lib/tennpipes-su/generators/templates/haml/app/layouts/application.haml.tt +49 -0
  123. data/lib/tennpipes-su/generators/templates/haml/app/layouts/error.haml.tt +18 -0
  124. data/lib/tennpipes-su/generators/templates/haml/app/sessions/new.haml.tt +38 -0
  125. data/lib/tennpipes-su/generators/templates/haml/page/_form.haml.tt +16 -0
  126. data/lib/tennpipes-su/generators/templates/haml/page/edit.haml.tt +8 -0
  127. data/lib/tennpipes-su/generators/templates/haml/page/index.haml.tt +58 -0
  128. data/lib/tennpipes-su/generators/templates/haml/page/new.haml.tt +7 -0
  129. data/lib/tennpipes-su/generators/templates/page/controller.rb.tt +92 -0
  130. data/lib/tennpipes-su/generators/templates/slim/app/base/index.slim.tt +12 -0
  131. data/lib/tennpipes-su/generators/templates/slim/app/errors/403.slim.tt +3 -0
  132. data/lib/tennpipes-su/generators/templates/slim/app/errors/404.slim.tt +3 -0
  133. data/lib/tennpipes-su/generators/templates/slim/app/errors/500.slim.tt +3 -0
  134. data/lib/tennpipes-su/generators/templates/slim/app/layouts/application.slim.tt +48 -0
  135. data/lib/tennpipes-su/generators/templates/slim/app/layouts/error.slim.tt +19 -0
  136. data/lib/tennpipes-su/generators/templates/slim/app/sessions/new.slim.tt +37 -0
  137. data/lib/tennpipes-su/generators/templates/slim/page/_form.slim.tt +16 -0
  138. data/lib/tennpipes-su/generators/templates/slim/page/edit.slim.tt +8 -0
  139. data/lib/tennpipes-su/generators/templates/slim/page/index.slim.tt +56 -0
  140. data/lib/tennpipes-su/generators/templates/slim/page/new.slim.tt +7 -0
  141. data/lib/tennpipes-su/helpers/authentication_helpers.rb +108 -0
  142. data/lib/tennpipes-su/helpers/view_helpers.rb +87 -0
  143. data/lib/tennpipes-su/locale/admin/cs.yml +56 -0
  144. data/lib/tennpipes-su/locale/admin/da.yml +56 -0
  145. data/lib/tennpipes-su/locale/admin/de.yml +56 -0
  146. data/lib/tennpipes-su/locale/admin/en.yml +56 -0
  147. data/lib/tennpipes-su/locale/admin/es.yml +56 -0
  148. data/lib/tennpipes-su/locale/admin/fr.yml +56 -0
  149. data/lib/tennpipes-su/locale/admin/hu.yml +56 -0
  150. data/lib/tennpipes-su/locale/admin/it.yml +56 -0
  151. data/lib/tennpipes-su/locale/admin/ja.yml +57 -0
  152. data/lib/tennpipes-su/locale/admin/lv.yml +56 -0
  153. data/lib/tennpipes-su/locale/admin/nl.yml +56 -0
  154. data/lib/tennpipes-su/locale/admin/no.yml +56 -0
  155. data/lib/tennpipes-su/locale/admin/pl.yml +56 -0
  156. data/lib/tennpipes-su/locale/admin/pt_br.yml +56 -0
  157. data/lib/tennpipes-su/locale/admin/ro.yml +56 -0
  158. data/lib/tennpipes-su/locale/admin/ru.yml +57 -0
  159. data/lib/tennpipes-su/locale/admin/sv.yml +56 -0
  160. data/lib/tennpipes-su/locale/admin/tr.yml +56 -0
  161. data/lib/tennpipes-su/locale/admin/uk.yml +56 -0
  162. data/lib/tennpipes-su/locale/admin/zh_cn.yml +56 -0
  163. data/lib/tennpipes-su/locale/admin/zh_tw.yml +56 -0
  164. data/lib/tennpipes-su/locale/orm/cs.yml +12 -0
  165. data/lib/tennpipes-su/locale/orm/da.yml +12 -0
  166. data/lib/tennpipes-su/locale/orm/de.yml +12 -0
  167. data/lib/tennpipes-su/locale/orm/en.yml +12 -0
  168. data/lib/tennpipes-su/locale/orm/es.yml +12 -0
  169. data/lib/tennpipes-su/locale/orm/fr.yml +12 -0
  170. data/lib/tennpipes-su/locale/orm/hu.yml +12 -0
  171. data/lib/tennpipes-su/locale/orm/it.yml +12 -0
  172. data/lib/tennpipes-su/locale/orm/ja.yml +12 -0
  173. data/lib/tennpipes-su/locale/orm/lv.yml +12 -0
  174. data/lib/tennpipes-su/locale/orm/nl.yml +12 -0
  175. data/lib/tennpipes-su/locale/orm/no.yml +12 -0
  176. data/lib/tennpipes-su/locale/orm/pl.yml +38 -0
  177. data/lib/tennpipes-su/locale/orm/pt_br.yml +12 -0
  178. data/lib/tennpipes-su/locale/orm/ro.yml +12 -0
  179. data/lib/tennpipes-su/locale/orm/ru.yml +12 -0
  180. data/lib/tennpipes-su/locale/orm/sv.yml +12 -0
  181. data/lib/tennpipes-su/locale/orm/tr.yml +12 -0
  182. data/lib/tennpipes-su/locale/orm/uk.yml +12 -0
  183. data/lib/tennpipes-su/locale/orm/zh_cn.yml +12 -0
  184. data/lib/tennpipes-su/locale/orm/zh_tw.yml +12 -0
  185. data/test/fixtures/sequel.rb +72 -0
  186. data/test/generators/test_account_model_generator.rb +108 -0
  187. data/test/generators/test_admin_app_generator.rb +218 -0
  188. data/test/generators/test_admin_page_generator.rb +140 -0
  189. data/test/helper.rb +47 -0
  190. data/test/test_admin_application.rb +271 -0
  191. data/test/test_locale.rb +25 -0
  192. metadata +298 -0
@@ -0,0 +1,138 @@
1
+ //
2
+ // Modals
3
+ // --------------------------------------------------
4
+
5
+ // .modal-open - body class for killing the scroll
6
+ // .modal - container to scroll within
7
+ // .modal-dialog - positioning shell for the actual modal
8
+ // .modal-content - actual modal w/ bg and corners and shit
9
+
10
+ // Kill the scroll on the body
11
+ .modal-open {
12
+ overflow: hidden;
13
+ }
14
+
15
+ // Container that the modal scrolls within
16
+ .modal {
17
+ display: none;
18
+ overflow: auto;
19
+ overflow-y: scroll;
20
+ position: fixed;
21
+ top: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ left: 0;
25
+ z-index: @zindex-modal;
26
+ -webkit-overflow-scrolling: touch;
27
+
28
+ // Prevent Chrome on Windows from adding a focus outline. For details, see
29
+ // https://github.com/twbs/bootstrap/pull/10951.
30
+ outline: 0;
31
+
32
+ // When fading in the modal, animate it to slide down
33
+ &.fade .modal-dialog {
34
+ .translate(0, -25%);
35
+ .transition-transform(~"0.3s ease-out");
36
+ }
37
+ &.in .modal-dialog { .translate(0, 0)}
38
+ }
39
+
40
+ // Shell div to position the modal with bottom padding
41
+ .modal-dialog {
42
+ position: relative;
43
+ width: auto;
44
+ margin: 10px;
45
+ }
46
+
47
+ // Actual modal
48
+ .modal-content {
49
+ position: relative;
50
+ background-color: @modal-content-bg;
51
+ border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
52
+ border: 1px solid @modal-content-border-color;
53
+ border-radius: @border-radius-large;
54
+ .box-shadow(0 3px 9px rgba(0,0,0,.5));
55
+ background-clip: padding-box;
56
+ // Remove focus outline from opened modal
57
+ outline: none;
58
+ }
59
+
60
+ // Modal background
61
+ .modal-backdrop {
62
+ position: fixed;
63
+ top: 0;
64
+ right: 0;
65
+ bottom: 0;
66
+ left: 0;
67
+ z-index: @zindex-modal-background;
68
+ background-color: @modal-backdrop-bg;
69
+ // Fade for backdrop
70
+ &.fade { .opacity(0); }
71
+ &.in { .opacity(@modal-backdrop-opacity); }
72
+ }
73
+
74
+ // Modal header
75
+ // Top section of the modal w/ title and dismiss
76
+ .modal-header {
77
+ padding: @modal-title-padding;
78
+ border-bottom: 1px solid @modal-header-border-color;
79
+ min-height: (@modal-title-padding + @modal-title-line-height);
80
+ }
81
+ // Close icon
82
+ .modal-header .close {
83
+ margin-top: -2px;
84
+ }
85
+
86
+ // Title text within header
87
+ .modal-title {
88
+ margin: 0;
89
+ line-height: @modal-title-line-height;
90
+ }
91
+
92
+ // Modal body
93
+ // Where all modal content resides (sibling of .modal-header and .modal-footer)
94
+ .modal-body {
95
+ position: relative;
96
+ padding: @modal-inner-padding;
97
+ }
98
+
99
+ // Footer (for actions)
100
+ .modal-footer {
101
+ margin-top: 15px;
102
+ padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
103
+ text-align: right; // right align buttons
104
+ border-top: 1px solid @modal-footer-border-color;
105
+ &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
106
+
107
+ // Properly space out buttons
108
+ .btn + .btn {
109
+ margin-left: 5px;
110
+ margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
111
+ }
112
+ // but override that for button groups
113
+ .btn-group .btn + .btn {
114
+ margin-left: -1px;
115
+ }
116
+ // and override it for block buttons as well
117
+ .btn-block + .btn-block {
118
+ margin-left: 0;
119
+ }
120
+ }
121
+
122
+ // Scale up the modal
123
+ @media (min-width: @screen-sm-min) {
124
+
125
+ // Automatically set modal's width for larger viewports
126
+ .modal-dialog {
127
+ width: @modal-md;
128
+ margin: 30px auto;
129
+ }
130
+ .modal-content {
131
+ .box-shadow(0 5px 15px rgba(0,0,0,.5));
132
+ }
133
+
134
+ // Modal sizes
135
+ .modal-sm { width: @modal-sm; }
136
+ .modal-lg { width: @modal-lg; }
137
+
138
+ }
@@ -0,0 +1,616 @@
1
+ //
2
+ // Navbars
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Wrapper and base class
7
+ //
8
+ // Provide a static navbar from which we expand to create full-width, fixed, and
9
+ // other navbar variations.
10
+
11
+ .navbar {
12
+ position: relative;
13
+ min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
14
+ margin-bottom: @navbar-margin-bottom;
15
+ border: 1px solid transparent;
16
+
17
+ // Prevent floats from breaking the navbar
18
+ &:extend(.clearfix all);
19
+
20
+ @media (min-width: @grid-float-breakpoint) {
21
+ border-radius: @navbar-border-radius;
22
+ }
23
+ }
24
+
25
+
26
+ // Navbar heading
27
+ //
28
+ // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
29
+ // styling of responsive aspects.
30
+
31
+ .navbar-header {
32
+ &:extend(.clearfix all);
33
+
34
+ @media (min-width: @grid-float-breakpoint) {
35
+ float: left;
36
+ }
37
+ }
38
+
39
+
40
+ // Navbar collapse (body)
41
+ //
42
+ // Group your navbar content into this for easy collapsing and expanding across
43
+ // various device sizes. By default, this content is collapsed when <768px, but
44
+ // will expand past that for a horizontal display.
45
+ //
46
+ // To start (on mobile devices) the navbar links, forms, and buttons are stacked
47
+ // vertically and include a `max-height` to overflow in case you have too much
48
+ // content for the user's viewport.
49
+
50
+ .navbar-collapse {
51
+ max-height: @navbar-collapse-max-height;
52
+ overflow-x: visible;
53
+ padding-right: @navbar-padding-horizontal;
54
+ padding-left: @navbar-padding-horizontal;
55
+ border-top: 1px solid transparent;
56
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
57
+ &:extend(.clearfix all);
58
+ -webkit-overflow-scrolling: touch;
59
+
60
+ &.in {
61
+ overflow-y: auto;
62
+ }
63
+
64
+ @media (min-width: @grid-float-breakpoint) {
65
+ width: auto;
66
+ border-top: 0;
67
+ box-shadow: none;
68
+
69
+ &.collapse {
70
+ display: block !important;
71
+ height: auto !important;
72
+ padding-bottom: 0; // Override default setting
73
+ overflow: visible !important;
74
+ }
75
+
76
+ &.in {
77
+ overflow-y: visible;
78
+ }
79
+
80
+ // Undo the collapse side padding for navbars with containers to ensure
81
+ // alignment of right-aligned contents.
82
+ .navbar-fixed-top &,
83
+ .navbar-static-top &,
84
+ .navbar-fixed-bottom & {
85
+ padding-left: 0;
86
+ padding-right: 0;
87
+ }
88
+ }
89
+ }
90
+
91
+
92
+ // Both navbar header and collapse
93
+ //
94
+ // When a container is present, change the behavior of the header and collapse.
95
+
96
+ .container,
97
+ .container-fluid {
98
+ > .navbar-header,
99
+ > .navbar-collapse {
100
+ margin-right: -@navbar-padding-horizontal;
101
+ margin-left: -@navbar-padding-horizontal;
102
+
103
+ @media (min-width: @grid-float-breakpoint) {
104
+ margin-right: 0;
105
+ margin-left: 0;
106
+ }
107
+ }
108
+ }
109
+
110
+
111
+ //
112
+ // Navbar alignment options
113
+ //
114
+ // Display the navbar across the entirety of the page or fixed it to the top or
115
+ // bottom of the page.
116
+
117
+ // Static top (unfixed, but 100% wide) navbar
118
+ .navbar-static-top {
119
+ z-index: @zindex-navbar;
120
+ border-width: 0 0 1px;
121
+
122
+ @media (min-width: @grid-float-breakpoint) {
123
+ border-radius: 0;
124
+ }
125
+ }
126
+
127
+ // Fix the top/bottom navbars when screen real estate supports it
128
+ .navbar-fixed-top,
129
+ .navbar-fixed-bottom {
130
+ position: fixed;
131
+ right: 0;
132
+ left: 0;
133
+ z-index: @zindex-navbar-fixed;
134
+
135
+ // Undo the rounded corners
136
+ @media (min-width: @grid-float-breakpoint) {
137
+ border-radius: 0;
138
+ }
139
+ }
140
+ .navbar-fixed-top {
141
+ top: 0;
142
+ border-width: 0 0 1px;
143
+ }
144
+ .navbar-fixed-bottom {
145
+ bottom: 0;
146
+ margin-bottom: 0; // override .navbar defaults
147
+ border-width: 1px 0 0;
148
+ }
149
+
150
+
151
+ // Brand/project name
152
+
153
+ .navbar-brand {
154
+ float: left;
155
+ padding: @navbar-padding-vertical @navbar-padding-horizontal;
156
+ font-size: @font-size-large;
157
+ line-height: @line-height-computed;
158
+ height: @line-height-computed;
159
+
160
+ &:hover,
161
+ &:focus {
162
+ text-decoration: none;
163
+ }
164
+
165
+ @media (min-width: @grid-float-breakpoint) {
166
+ .navbar > .container &,
167
+ .navbar > .container-fluid & {
168
+ margin-left: -@navbar-padding-horizontal;
169
+ }
170
+ }
171
+ }
172
+
173
+
174
+ // Navbar toggle
175
+ //
176
+ // Custom button for toggling the `.navbar-collapse`, powered by the collapse
177
+ // JavaScript plugin.
178
+
179
+ .navbar-toggle {
180
+ position: relative;
181
+ float: right;
182
+ margin-right: @navbar-padding-horizontal;
183
+ padding: 9px 10px;
184
+ .navbar-vertical-align(34px);
185
+ background-color: transparent;
186
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
187
+ border: 1px solid transparent;
188
+ border-radius: @border-radius-base;
189
+
190
+ // We remove the `outline` here, but later compensate by attaching `:hover`
191
+ // styles to `:focus`.
192
+ &:focus {
193
+ outline: none;
194
+ }
195
+
196
+ // Bars
197
+ .icon-bar {
198
+ display: block;
199
+ width: 22px;
200
+ height: 2px;
201
+ border-radius: 1px;
202
+ }
203
+ .icon-bar + .icon-bar {
204
+ margin-top: 4px;
205
+ }
206
+
207
+ @media (min-width: @grid-float-breakpoint) {
208
+ display: none;
209
+ }
210
+ }
211
+
212
+
213
+ // Navbar nav links
214
+ //
215
+ // Builds on top of the `.nav` components with its own modifier class to make
216
+ // the nav the full height of the horizontal nav (above 768px).
217
+
218
+ .navbar-nav {
219
+ margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
220
+
221
+ > li > a {
222
+ padding-top: 10px;
223
+ padding-bottom: 10px;
224
+ line-height: @line-height-computed;
225
+ }
226
+
227
+ @media (max-width: @grid-float-breakpoint-max) {
228
+ // Dropdowns get custom display when collapsed
229
+ .open .dropdown-menu {
230
+ position: static;
231
+ float: none;
232
+ width: auto;
233
+ margin-top: 0;
234
+ background-color: transparent;
235
+ border: 0;
236
+ box-shadow: none;
237
+ > li > a,
238
+ .dropdown-header {
239
+ padding: 5px 15px 5px 25px;
240
+ }
241
+ > li > a {
242
+ line-height: @line-height-computed;
243
+ &:hover,
244
+ &:focus {
245
+ background-image: none;
246
+ }
247
+ }
248
+ }
249
+ }
250
+
251
+ // Uncollapse the nav
252
+ @media (min-width: @grid-float-breakpoint) {
253
+ float: left;
254
+ margin: 0;
255
+
256
+ > li {
257
+ float: left;
258
+ > a {
259
+ padding-top: @navbar-padding-vertical;
260
+ padding-bottom: @navbar-padding-vertical;
261
+ }
262
+ }
263
+
264
+ &.navbar-right:last-child {
265
+ margin-right: -@navbar-padding-horizontal;
266
+ }
267
+ }
268
+ }
269
+
270
+
271
+ // Component alignment
272
+ //
273
+ // Repurpose the pull utilities as their own navbar utilities to avoid specificity
274
+ // issues with parents and chaining. Only do this when the navbar is uncollapsed
275
+ // though so that navbar contents properly stack and align in mobile.
276
+
277
+ @media (min-width: @grid-float-breakpoint) {
278
+ .navbar-left { .pull-left(); }
279
+ .navbar-right { .pull-right(); }
280
+ }
281
+
282
+
283
+ // Navbar form
284
+ //
285
+ // Extension of the `.form-inline` with some extra flavor for optimum display in
286
+ // our navbars.
287
+
288
+ .navbar-form {
289
+ margin-left: -@navbar-padding-horizontal;
290
+ margin-right: -@navbar-padding-horizontal;
291
+ padding: 10px @navbar-padding-horizontal;
292
+ border-top: 1px solid transparent;
293
+ border-bottom: 1px solid transparent;
294
+ @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
295
+ .box-shadow(@shadow);
296
+
297
+ // Mixin behavior for optimum display
298
+ .form-inline();
299
+
300
+ .form-group {
301
+ @media (max-width: @grid-float-breakpoint-max) {
302
+ margin-bottom: 5px;
303
+ }
304
+ }
305
+
306
+ // Vertically center in expanded, horizontal navbar
307
+ .navbar-vertical-align(@input-height-base);
308
+
309
+ // Undo 100% width for pull classes
310
+ @media (min-width: @grid-float-breakpoint) {
311
+ width: auto;
312
+ border: 0;
313
+ margin-left: 0;
314
+ margin-right: 0;
315
+ padding-top: 0;
316
+ padding-bottom: 0;
317
+ .box-shadow(none);
318
+
319
+ // Outdent the form if last child to line up with content down the page
320
+ &.navbar-right:last-child {
321
+ margin-right: -@navbar-padding-horizontal;
322
+ }
323
+ }
324
+ }
325
+
326
+
327
+ // Dropdown menus
328
+
329
+ // Menu position and menu carets
330
+ .navbar-nav > li > .dropdown-menu {
331
+ margin-top: 0;
332
+ .border-top-radius(0);
333
+ }
334
+ // Menu position and menu caret support for dropups via extra dropup class
335
+ .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
336
+ .border-bottom-radius(0);
337
+ }
338
+
339
+
340
+ // Buttons in navbars
341
+ //
342
+ // Vertically center a button within a navbar (when *not* in a form).
343
+
344
+ .navbar-btn {
345
+ .navbar-vertical-align(@input-height-base);
346
+
347
+ &.btn-sm {
348
+ .navbar-vertical-align(@input-height-small);
349
+ }
350
+ &.btn-xs {
351
+ .navbar-vertical-align(22);
352
+ }
353
+ }
354
+
355
+
356
+ // Text in navbars
357
+ //
358
+ // Add a class to make any element properly align itself vertically within the navbars.
359
+
360
+ .navbar-text {
361
+ .navbar-vertical-align(@line-height-computed);
362
+
363
+ @media (min-width: @grid-float-breakpoint) {
364
+ float: left;
365
+ margin-left: @navbar-padding-horizontal;
366
+ margin-right: @navbar-padding-horizontal;
367
+
368
+ // Outdent the form if last child to line up with content down the page
369
+ &.navbar-right:last-child {
370
+ margin-right: 0;
371
+ }
372
+ }
373
+ }
374
+
375
+ // Alternate navbars
376
+ // --------------------------------------------------
377
+
378
+ // Default navbar
379
+ .navbar-default {
380
+ background-color: @navbar-default-bg;
381
+ border-color: @navbar-default-border;
382
+
383
+ .navbar-brand {
384
+ color: @navbar-default-brand-color;
385
+ &:hover,
386
+ &:focus {
387
+ color: @navbar-default-brand-hover-color;
388
+ background-color: @navbar-default-brand-hover-bg;
389
+ }
390
+ }
391
+
392
+ .navbar-text {
393
+ color: @navbar-default-color;
394
+ }
395
+
396
+ .navbar-nav {
397
+ > li > a {
398
+ color: @navbar-default-link-color;
399
+
400
+ &:hover,
401
+ &:focus {
402
+ color: @navbar-default-link-hover-color;
403
+ background-color: @navbar-default-link-hover-bg;
404
+ }
405
+ }
406
+ > .active > a {
407
+ &,
408
+ &:hover,
409
+ &:focus {
410
+ color: @navbar-default-link-active-color;
411
+ background-color: @navbar-default-link-active-bg;
412
+ }
413
+ }
414
+ > .disabled > a {
415
+ &,
416
+ &:hover,
417
+ &:focus {
418
+ color: @navbar-default-link-disabled-color;
419
+ background-color: @navbar-default-link-disabled-bg;
420
+ }
421
+ }
422
+ }
423
+
424
+ .navbar-toggle {
425
+ border-color: @navbar-default-toggle-border-color;
426
+ &:hover,
427
+ &:focus {
428
+ background-color: @navbar-default-toggle-hover-bg;
429
+ }
430
+ .icon-bar {
431
+ background-color: @navbar-default-toggle-icon-bar-bg;
432
+ }
433
+ }
434
+
435
+ .navbar-collapse,
436
+ .navbar-form {
437
+ border-color: @navbar-default-border;
438
+ }
439
+
440
+ // Dropdown menu items
441
+ .navbar-nav {
442
+ // Remove background color from open dropdown
443
+ > .open > a {
444
+ &,
445
+ &:hover,
446
+ &:focus {
447
+ background-color: @navbar-default-link-active-bg;
448
+ color: @navbar-default-link-active-color;
449
+ }
450
+ }
451
+
452
+ @media (max-width: @grid-float-breakpoint-max) {
453
+ // Dropdowns get custom display when collapsed
454
+ .open .dropdown-menu {
455
+ > li > a {
456
+ color: @navbar-default-link-color;
457
+ &:hover,
458
+ &:focus {
459
+ color: @navbar-default-link-hover-color;
460
+ background-color: @navbar-default-link-hover-bg;
461
+ }
462
+ }
463
+ > .active > a {
464
+ &,
465
+ &:hover,
466
+ &:focus {
467
+ color: @navbar-default-link-active-color;
468
+ background-color: @navbar-default-link-active-bg;
469
+ }
470
+ }
471
+ > .disabled > a {
472
+ &,
473
+ &:hover,
474
+ &:focus {
475
+ color: @navbar-default-link-disabled-color;
476
+ background-color: @navbar-default-link-disabled-bg;
477
+ }
478
+ }
479
+ }
480
+ }
481
+ }
482
+
483
+
484
+ // Links in navbars
485
+ //
486
+ // Add a class to ensure links outside the navbar nav are colored correctly.
487
+
488
+ .navbar-link {
489
+ color: @navbar-default-link-color;
490
+ &:hover {
491
+ color: @navbar-default-link-hover-color;
492
+ }
493
+ }
494
+
495
+ }
496
+
497
+ // Inverse navbar
498
+
499
+ .navbar-inverse {
500
+ background-color: @navbar-inverse-bg;
501
+ border-color: @navbar-inverse-border;
502
+
503
+ .navbar-brand {
504
+ color: @navbar-inverse-brand-color;
505
+ &:hover,
506
+ &:focus {
507
+ color: @navbar-inverse-brand-hover-color;
508
+ background-color: @navbar-inverse-brand-hover-bg;
509
+ }
510
+ }
511
+
512
+ .navbar-text {
513
+ color: @navbar-inverse-color;
514
+ }
515
+
516
+ .navbar-nav {
517
+ > li > a {
518
+ color: @navbar-inverse-link-color;
519
+
520
+ &:hover,
521
+ &:focus {
522
+ color: @navbar-inverse-link-hover-color;
523
+ background-color: @navbar-inverse-link-hover-bg;
524
+ }
525
+ }
526
+ > .active > a {
527
+ &,
528
+ &:hover,
529
+ &:focus {
530
+ color: @navbar-inverse-link-active-color;
531
+ background-color: @navbar-inverse-link-active-bg;
532
+ }
533
+ }
534
+ > .disabled > a {
535
+ &,
536
+ &:hover,
537
+ &:focus {
538
+ color: @navbar-inverse-link-disabled-color;
539
+ background-color: @navbar-inverse-link-disabled-bg;
540
+ }
541
+ }
542
+ }
543
+
544
+ // Darken the responsive nav toggle
545
+ .navbar-toggle {
546
+ border-color: @navbar-inverse-toggle-border-color;
547
+ &:hover,
548
+ &:focus {
549
+ background-color: @navbar-inverse-toggle-hover-bg;
550
+ }
551
+ .icon-bar {
552
+ background-color: @navbar-inverse-toggle-icon-bar-bg;
553
+ }
554
+ }
555
+
556
+ .navbar-collapse,
557
+ .navbar-form {
558
+ border-color: darken(@navbar-inverse-bg, 7%);
559
+ }
560
+
561
+ // Dropdowns
562
+ .navbar-nav {
563
+ > .open > a {
564
+ &,
565
+ &:hover,
566
+ &:focus {
567
+ background-color: @navbar-inverse-link-active-bg;
568
+ color: @navbar-inverse-link-active-color;
569
+ }
570
+ }
571
+
572
+ @media (max-width: @grid-float-breakpoint-max) {
573
+ // Dropdowns get custom display
574
+ .open .dropdown-menu {
575
+ > .dropdown-header {
576
+ border-color: @navbar-inverse-border;
577
+ }
578
+ .divider {
579
+ background-color: @navbar-inverse-border;
580
+ }
581
+ > li > a {
582
+ color: @navbar-inverse-link-color;
583
+ &:hover,
584
+ &:focus {
585
+ color: @navbar-inverse-link-hover-color;
586
+ background-color: @navbar-inverse-link-hover-bg;
587
+ }
588
+ }
589
+ > .active > a {
590
+ &,
591
+ &:hover,
592
+ &:focus {
593
+ color: @navbar-inverse-link-active-color;
594
+ background-color: @navbar-inverse-link-active-bg;
595
+ }
596
+ }
597
+ > .disabled > a {
598
+ &,
599
+ &:hover,
600
+ &:focus {
601
+ color: @navbar-inverse-link-disabled-color;
602
+ background-color: @navbar-inverse-link-disabled-bg;
603
+ }
604
+ }
605
+ }
606
+ }
607
+ }
608
+
609
+ .navbar-link {
610
+ color: @navbar-inverse-link-color;
611
+ &:hover {
612
+ color: @navbar-inverse-link-hover-color;
613
+ }
614
+ }
615
+
616
+ }