underoos 1.0.0

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. data/.gitignore +8 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +143 -0
  5. data/LICENSE +26 -0
  6. data/Procfile +1 -0
  7. data/README.md +13 -0
  8. data/Rakefile +12 -0
  9. data/app/assets/javascripts/styleguide.js +132 -0
  10. data/app/assets/javascripts/underoos.js +18 -0
  11. data/app/assets/stylesheets/base/_button-btn-mixin.sass +72 -0
  12. data/app/assets/stylesheets/base/_elements.sass +61 -0
  13. data/app/assets/stylesheets/base/_forms.sass +362 -0
  14. data/app/assets/stylesheets/base/_helpers.sass +54 -0
  15. data/app/assets/stylesheets/base/_normalize.sass +114 -0
  16. data/app/assets/stylesheets/base/_scaffold.sass +51 -0
  17. data/app/assets/stylesheets/base/_tables.sass +99 -0
  18. data/app/assets/stylesheets/base/_transitions.sass +17 -0
  19. data/app/assets/stylesheets/base/_typography.sass +185 -0
  20. data/app/assets/stylesheets/components/_accordions.sass +17 -0
  21. data/app/assets/stylesheets/components/_breadcrumbs.sass +22 -0
  22. data/app/assets/stylesheets/components/_button-groups.sass +46 -0
  23. data/app/assets/stylesheets/components/_carets.sass +24 -0
  24. data/app/assets/stylesheets/components/_carousels.sass +18 -0
  25. data/app/assets/stylesheets/components/_close.sass +25 -0
  26. data/app/assets/stylesheets/components/_decals.sass +27 -0
  27. data/app/assets/stylesheets/components/_dropdowns.sass +85 -0
  28. data/app/assets/stylesheets/components/_media.sass +33 -0
  29. data/app/assets/stylesheets/components/_modals.sass +28 -0
  30. data/app/assets/stylesheets/components/_nav-lists.sass +22 -0
  31. data/app/assets/stylesheets/components/_navbars.sass +105 -0
  32. data/app/assets/stylesheets/components/_notifications.sass +108 -0
  33. data/app/assets/stylesheets/components/_paddles.sass +34 -0
  34. data/app/assets/stylesheets/components/_pagination.sass +41 -0
  35. data/app/assets/stylesheets/components/_pills.sass +64 -0
  36. data/app/assets/stylesheets/components/_popovers.sass +55 -0
  37. data/app/assets/stylesheets/components/_progress-bars.sass +29 -0
  38. data/app/assets/stylesheets/components/_tabs.sass +93 -0
  39. data/app/assets/stylesheets/components/_tooltips.sass +46 -0
  40. data/app/assets/stylesheets/components/_wells.sass +16 -0
  41. data/app/assets/stylesheets/layouts/_containers.sass +15 -0
  42. data/app/assets/stylesheets/layouts/_print.sass +48 -0
  43. data/app/assets/stylesheets/layouts/_queries.sass +121 -0
  44. data/app/assets/stylesheets/layouts/_upgrades.sass +64 -0
  45. data/app/assets/stylesheets/mixins/_arrows.sass +40 -0
  46. data/app/assets/stylesheets/mixins/_clearfixins.sass +15 -0
  47. data/app/assets/stylesheets/mixins/_coloring.sass +6 -0
  48. data/app/assets/stylesheets/mixins/_columns.sass +19 -0
  49. data/app/assets/stylesheets/mixins/_conversions.sass +25 -0
  50. data/app/assets/stylesheets/mixins/_font-size.sass +6 -0
  51. data/app/assets/stylesheets/mixins/_image-tools.sass +13 -0
  52. data/app/assets/stylesheets/mixins/_ir.sass +9 -0
  53. data/app/assets/stylesheets/mixins/_mixins.sass +14 -0
  54. data/app/assets/stylesheets/mixins/_tab-focus.sass +7 -0
  55. data/app/assets/stylesheets/mixins/_timing-equations.sass +29 -0
  56. data/app/assets/stylesheets/mixins/_visibility.sass +43 -0
  57. data/app/assets/stylesheets/polyfills/_box-shadow.sass +7 -0
  58. data/app/assets/stylesheets/polyfills/_box-sizing.sass +8 -0
  59. data/app/assets/stylesheets/polyfills/_functions.sass +22 -0
  60. data/app/assets/stylesheets/polyfills/_inline-block.sass +8 -0
  61. data/app/assets/stylesheets/polyfills/_opacity.sass +6 -0
  62. data/app/assets/stylesheets/polyfills/_polyfills.sass +10 -0
  63. data/app/assets/stylesheets/polyfills/_transition.sass +9 -0
  64. data/app/assets/stylesheets/polyfills/_user-select.sass +8 -0
  65. data/app/assets/stylesheets/styleguide.sass +199 -0
  66. data/app/assets/stylesheets/themes/_default.sass +119 -0
  67. data/app/assets/stylesheets/underoos.sass +52 -0
  68. data/app/controllers/underoos/styleguides_controller.rb +79 -0
  69. data/app/views/shared/_upgrades.html.haml +12 -0
  70. data/app/views/underoos/styleguides/_assets.haml +42 -0
  71. data/app/views/underoos/styleguides/_components.haml +42 -0
  72. data/app/views/underoos/styleguides/_elements.haml +242 -0
  73. data/app/views/underoos/styleguides/_forms.haml +305 -0
  74. data/app/views/underoos/styleguides/_layouts.haml +76 -0
  75. data/app/views/underoos/styleguides/_palettes.haml +18 -0
  76. data/app/views/underoos/styleguides/_resources.haml +27 -0
  77. data/app/views/underoos/styleguides/_tables.haml +124 -0
  78. data/app/views/underoos/styleguides/_typography.haml +284 -0
  79. data/app/views/underoos/styleguides/_utilities.haml +270 -0
  80. data/app/views/underoos/styleguides/components/_accordions.haml +83 -0
  81. data/app/views/underoos/styleguides/components/_breadcrumbs.haml +42 -0
  82. data/app/views/underoos/styleguides/components/_button-groups.haml +162 -0
  83. data/app/views/underoos/styleguides/components/_carets.haml +28 -0
  84. data/app/views/underoos/styleguides/components/_close.haml +20 -0
  85. data/app/views/underoos/styleguides/components/_decals.haml +40 -0
  86. data/app/views/underoos/styleguides/components/_dropdowns.haml +189 -0
  87. data/app/views/underoos/styleguides/components/_media.haml +78 -0
  88. data/app/views/underoos/styleguides/components/_modals.haml +42 -0
  89. data/app/views/underoos/styleguides/components/_nav-lists.haml +52 -0
  90. data/app/views/underoos/styleguides/components/_navbars.haml +144 -0
  91. data/app/views/underoos/styleguides/components/_navs-showcase.haml +27 -0
  92. data/app/views/underoos/styleguides/components/_notifications.haml +169 -0
  93. data/app/views/underoos/styleguides/components/_paddles.haml +68 -0
  94. data/app/views/underoos/styleguides/components/_pagination.haml +64 -0
  95. data/app/views/underoos/styleguides/components/_popovers.haml +33 -0
  96. data/app/views/underoos/styleguides/components/_progress-bars.haml +72 -0
  97. data/app/views/underoos/styleguides/components/_tabs-pills.haml +241 -0
  98. data/app/views/underoos/styleguides/components/_tooltips.haml +37 -0
  99. data/app/views/underoos/styleguides/components/_wells.haml +29 -0
  100. data/app/views/underoos/styleguides/index.html.haml +259 -0
  101. data/app/views/underoos/styleguides/partials/_form-template.haml +171 -0
  102. data/app/views/underoos/styleguides/partials/_table-data.haml +33 -0
  103. data/app/views/underoos/styleguides/partials/_transitions.haml +136 -0
  104. data/config.ru +38 -0
  105. data/config/routes.rb +3 -0
  106. data/features/generator.feature +78 -0
  107. data/features/step_definitions/underoos_steps.rb +3 -0
  108. data/features/support/env.rb +9 -0
  109. data/lib/generators/underoos/assets_generator.rb +33 -0
  110. data/lib/underoos.rb +5 -0
  111. data/lib/underoos/engine.rb +8 -0
  112. data/lib/underoos/version.rb +3 -0
  113. data/public/apple-touch-icon-114x114-precomposed.png +0 -0
  114. data/public/apple-touch-icon-57x57-precomposed.png +0 -0
  115. data/public/apple-touch-icon-72x72-precomposed.png +0 -0
  116. data/public/apple-touch-icon-precomposed.png +0 -0
  117. data/public/apple-touch-icon.png +0 -0
  118. data/public/favicon.ico +0 -0
  119. data/script/javascripts +15 -0
  120. data/underoos.gemspec +29 -0
  121. data/vendor/assets/javascripts/bootstrap-alert.js +94 -0
  122. data/vendor/assets/javascripts/bootstrap-button.js +100 -0
  123. data/vendor/assets/javascripts/bootstrap-collapse.js +138 -0
  124. data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
  125. data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
  126. data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
  127. data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
  128. data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
  129. data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
  130. data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
  131. data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
  132. data/vendor/assets/javascripts/prettify.js +28 -0
  133. metadata +246 -0
@@ -0,0 +1,78 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Media <span>media.sass</span>
4
+
5
+ .sg-subsection
6
+ .sg-half.pull
7
+ %h4 Media grid
8
+ %p Media items within a grid, provide a simple way for showcasing images, video and other media items.
9
+ .sg-half.push
10
+ %h4 Media item
11
+ %p With some additional markup, it's simple to create more complex media containers to showcase more information.
12
+
13
+ .sg-subsection
14
+ .sg-half.pull
15
+ .well
16
+ %nav
17
+ %ul.media-grid
18
+ -(1..4).each do |media|
19
+ %li.sg-half
20
+ %a.media-item(href="#")
21
+ %img(src="http://placehold.it/260x180" alt="alt")
22
+ %pre.prettyprint.html
23
+ = preserve do
24
+ :escaped
25
+ <nav>
26
+ <ul class="media-grid">
27
+ <li class="col-half">
28
+ <a class="media-item" href="#">
29
+ <img alt="alt" src="http://placehold.it/260x180">
30
+ </a>
31
+ </li>
32
+ ...
33
+ </ul>
34
+ </nav>
35
+ %pre.prettyprint.haml.hidden
36
+ = preserve do
37
+ :escaped
38
+ %nav
39
+ %ul.media-grid
40
+ %li.col-half
41
+ %a.media-item(href="#")
42
+ %img(alt="alt" src="http://placehold.it/260x180")
43
+
44
+ .sg-half.push
45
+ .well
46
+ .media-item
47
+ %img(src="http://placehold.it/540x180" alt="alt")
48
+ %section.caption
49
+ %h5 This is a title
50
+ %p=@lorem_sm
51
+ %footer(style="margin-top:1.2em;")
52
+ %button.btn(href="#") Action
53
+ %button.btn(href="#") Cancel
54
+ %pre.prettyprint.html
55
+ = preserve do
56
+ :escaped
57
+ <div class="media-item">
58
+ <img alt="alt" src="http://placehold.it/460x180">
59
+ <section class="caption">
60
+ ...
61
+ </section>
62
+ </div>
63
+ %pre.prettyprint.haml.hidden
64
+ = preserve do
65
+ :escaped
66
+ .media-item
67
+ %img(alt="alt" src="http://placehold.it/260x180")
68
+ %section.caption
69
+ ...
70
+
71
+ .sg-subsection
72
+ .sg-half.pull
73
+ .notification.important.fade.in
74
+ %p <strong>Note!</strong> Define the column span on the list item for grid settings
75
+ .sg-half.push
76
+ .notification.important.fade.in
77
+ %p <strong>Note!</strong> Include a <code>caption</code> class after the media for additional padding
78
+
@@ -0,0 +1,42 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Modals <span>modals.sass</span>
4
+ .sg-onethird.pull
5
+ %p Modals utilize <a href="http://twitter.github.com/bootstrap/javascript.html#modals">Bootstrap's Modal plugin</a>. You can control various options of how modals are shown based on attributes set in the trigger or the modal markup itself.
6
+ %br
7
+ %p We do not include any styles for the contents of a modal. This is better suited for other components or custom layouts within the application.
8
+ .sg-twothird.push
9
+ .well
10
+ %button.btn.primary(data-toggle="modal" href="#modal") Launch Modal
11
+ %pre.prettyprint.html
12
+ = preserve do
13
+ :escaped
14
+ <!-- Modal Trigger Button -->
15
+ <button class="btn important" data-toggle="modal" href="#modal_name"></button>
16
+
17
+ <!-- Modal Wrapper -->
18
+ <div id="modal_name" class="modal fade" data-backdrop="true" data-keyboard="true">
19
+ ...
20
+ <a class="close" data-dismiss="modal">&times;</a>
21
+ </div>
22
+ %pre.prettyprint.haml.hidden
23
+ = preserve do
24
+ :escaped
25
+ <!-- Modal Trigger Button -->
26
+ %button.btn.important(data-toggle="modal" href="#modal_name")
27
+
28
+ <!-- Modal Wrapper -->
29
+ #modal_name.modal.fade(data-backdrop="true" data-keyboard="true")
30
+ ...
31
+ %a.close(data-dismiss="modal") &times;
32
+ #modal.modal.fade(data-backdrop="true" data-keyboard="true")
33
+ .notification
34
+ %header
35
+ %h3.heading Notification within a Modal
36
+ %section
37
+ %p=@lorem
38
+ %footer.footer-right
39
+ %button.btn.important(href="#") Action
40
+ %button.btn.danger(href="#") Cancel
41
+ %a.close(href="#" data-dismiss="modal") &times;
42
+
@@ -0,0 +1,52 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Nav lists <span>nav-lists.sass</span>
4
+ .sg-onethird.pull
5
+ %p Nav lists build off of the same markup as <code>tabs</code> and <code>pills</code>. They are typically used in aside style navigation systems.
6
+ %br
7
+ %p To include a header, just supply the <code>li</code> with the class <code>.nav-header</code>
8
+ .sg-twothird.push
9
+ .well.lite
10
+ %nav
11
+ %ul.nav.nav-list
12
+ %li.nav-header List Header
13
+ %li
14
+ %a(href="#") List One
15
+ %li.active
16
+ %a(href="#") List Two
17
+ %li
18
+ %a(href="#") List Three
19
+ %li.nav-header Another List Header
20
+ %li
21
+ %a(href="#") List Four
22
+ %li
23
+ %a(href="#") List Five
24
+ %pre.prettyprint.html
25
+ = preserve do
26
+ :escaped
27
+ <nav>
28
+ <ul class="nav nav-list">
29
+ <li class="nav-header">List Header</li>
30
+ <li><a href="#">List 1</a></li>
31
+ <li><a href="#" class="active">List 2</a></li>
32
+ <li><a href="#">List 3</a></li>
33
+ <li class="nav-header">Another List Header</li>
34
+ <li><a href="#">List 4</a></li>
35
+ </ul>
36
+ </nav>
37
+ %pre.prettyprint.haml.hidden
38
+ = preserve do
39
+ :escaped
40
+ %nav>
41
+ %ul.nav.nav-list
42
+ %li.nav-header List Header
43
+ %li
44
+ %a(href="#") List 1
45
+ %li.active
46
+ %a(href="#") List 2
47
+ %li
48
+ %a(href="#") List 3
49
+ %li.nav-header Another List Header
50
+ %li
51
+ %a(href="#") List 4
52
+
@@ -0,0 +1,144 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Navbars <span>navbars.sass</span>
4
+ %p(style="width:67%;") Typically used for application or page level navigation systems. Navbars can contain just about any type of navigation component, search forms, button groups and drop downs.
5
+ %br
6
+ %p(style="width:67%;") Navbars support responsive behavior, by adding a button with <code>data-toggle="collapse" data-target="#target_id"</code>. You'll also need to set the corresponding class (<code>.nav-collapse</code>) and the id based on the target (<code>#target_id</code>) on the collapsable container. Make sure to utilize the styles contained within the media queries as well.
7
+ .sg-subsection
8
+ .navbar
9
+ .navbar-inner
10
+ .container
11
+ %a.btn.info.btn-navbar(data-toggle="collapse" data-target="#collapse_example")
12
+ %span.icon-bar
13
+ %span.icon-bar
14
+ %span.icon-bar
15
+ %a.brand(href="#") Brand
16
+ %nav.nav-collapse#collapse_example
17
+ %ul.nav
18
+ %li
19
+ %a(href="#") Link 1
20
+ %li.active
21
+ %a(href="#") Link 2
22
+ %li.plain-text Plain Text
23
+ %li.dropdown
24
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Dropdown<span class="caret"></span>
25
+ %ul.dropdown-menu
26
+ %li
27
+ %a(href="#") Subnav 1
28
+ %li
29
+ %a(href="#") Subnav 2
30
+ %li.divider
31
+ %li
32
+ %a(href="#") Subnav 3
33
+
34
+ %nav.pull-right
35
+ %form.form-search
36
+ %ol
37
+ %li
38
+ %input.search-query(type="search" name="test[searchbar]" placeholder="search")
39
+ %button.btn.primary(type="submit") Go
40
+ %ul.nav
41
+ %li.dropdown
42
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Dropdown<span class="caret"></span>
43
+ %ul.dropdown-menu
44
+ %li
45
+ %a(href="#") Subnav 1
46
+ %li
47
+ %a(href="#") Subnav 2
48
+ %li.divider
49
+ %li
50
+ %a(href="#") Subnav 3
51
+
52
+ .sg-subsection
53
+ %pre.prettyprint.html
54
+ = preserve do
55
+ :escaped
56
+ <!-- Showcases the navbar example above -->
57
+ <div class="navbar">
58
+ <div class="navbar-inner">
59
+ <div class="container">
60
+ <a class="btn info btn-navbar" data-toggle="collapse" data-target="#collapse_example">
61
+ <span class="icon-bar"></span>
62
+ <span class="icon-bar"></span>
63
+ <span class="icon-bar"></span>
64
+ </a>
65
+ <a class="brand" href="#">Brand</a>
66
+ <nav class="nav-collapse" id="collapse_example">
67
+ <ul class="nav">
68
+ <li><a href="#">Link 1</a></li>
69
+ <li class="active"><a href="#">Link 2</a></li>
70
+ <li class="plain-text">Plain Text</li>
71
+ <li class="dropdown">
72
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown<span class="caret"></span></a>
73
+ <ul class="dropdown-menu">
74
+ ...
75
+ </ul>
76
+ </li>
77
+ </ul>
78
+ <section class="pull-right">
79
+ <form class="form-search">
80
+ <ol>
81
+ <li>
82
+ <input class="search-query" name="test[searchbar]" placeholder="search" type="search">
83
+ <button class="btn primary" type="submit">Go</button>
84
+ </li>
85
+ </ol>
86
+ </form>
87
+ <ul class="nav">
88
+ <li class="dropdown">
89
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown<span class="caret"></span></a>
90
+ <ul class="dropdown-menu">
91
+ ...
92
+ </ul>
93
+ </li>
94
+ </ul>
95
+ </section>
96
+ </nav>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ %pre.prettyprint.haml.hidden
101
+ = preserve do
102
+ :escaped
103
+ <!-- Showcases the navbar example above -->
104
+ .navbar
105
+ .navbar-inner
106
+ .container
107
+ %a.btn.info.btn-navbar(data-toggle="collapse" data-target="#collapse_example")
108
+ %span.icon-bar
109
+ %span.icon-bar
110
+ %span.icon-bar
111
+ %a.brand(href="#") Brand
112
+ %nav.nav-collapse#collapse_example
113
+ %ul.nav
114
+ %li
115
+ %a(href="#") Link 1
116
+ %li.active
117
+ %a(href="#") Link 2
118
+ %li.plain-text Plain Text
119
+ %li.dropdown
120
+ %a.dropdown-toggle(data-toggle="dropdown" href="#")
121
+ Dropdown
122
+ %span.caret
123
+ %ul.dropdown-menu
124
+ ...
125
+ %section.pull-right
126
+ %form.form-search
127
+ %ol
128
+ %li
129
+ %input.search-query(name="test[searchbar]" placeholder="search" type="search")
130
+ %button.btn.primary(type="submit") Go
131
+ %ul.nav
132
+ %li.dropdown
133
+ %a.dropdown-toggle(data-toggle="dropdown" href="#")
134
+ Dropdown
135
+ %span.caret
136
+ %ul.dropdown-menu
137
+ ...
138
+ .notification.important.fade.in
139
+ %p <strong>Note!</strong> Add the <code>.fixed</code> class to the <code>.navbar</code> container to fix the navigation system to the top of the page
140
+ .notification.important.fade.in
141
+ %p <strong>Note!</strong> It's a good idea to set a specific height for the navbar, this is not set in the default component
142
+ .notification.important.fade.in
143
+ %p <strong>Note!</strong> For a responsive navbar, make sure to include <a href="http://twitter.github.com/bootstrap/javascript.html#collapse">Bootstrap's Collapse plugin</a> and add the necessary elements to the structure
144
+
@@ -0,0 +1,27 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Navs Showcase <span>navs-example.sass</span>
4
+ %p(style="width:67%;") Clicking on the buttons below will change the class on the <code>ul</code> element to showcase the different navigation systems. The markup structure remains the same.
5
+ %br
6
+ %small Follow along in your inspector!
7
+ .well(style="margin-top:1.25em;")
8
+ %nav
9
+ %ul#navs_showcase.nav.pills
10
+ %li
11
+ %a(href="#" data-classes="nav") Base Nav
12
+ %li
13
+ %a(href="#" data-classes="nav tabs") Tabs
14
+ %li.active
15
+ %a(href="#" data-classes="nav pills") Pills
16
+ %li
17
+ %a(href="#" data-classes="nav breadcrumb") Breadcrumbs
18
+ %li
19
+ %a(href="#" data-classes="nav pagination") Pagination
20
+ %li
21
+ %a(href="#" data-classes="nav tabs stacked") Stacked Tabs
22
+ %li
23
+ %a(href="#" data-classes="nav pills stacked") Stacked Pills
24
+
25
+ .notification.warning.fade.in
26
+ %p <strong>Warning!</strong> All navigation components depend on the <code>.nav</code> class being attached to the list container element
27
+
@@ -0,0 +1,169 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Notifications <span>notifications.sass</span>
4
+
5
+ .sg-subsection
6
+ -# Standard Notifications
7
+ .sg-half.pull
8
+ %h4 Basic notifications
9
+ %p A basic notification is set on a container with the <code>.notification</code> class. It comes in the standard flavors for various types of alerts. Notifications utilize <a href="http://twitter.github.com/bootstrap/javascript.html#alerts">Bootstrap's alert plugin</a> for closing a notification.
10
+ %pre.prettyprint.html
11
+ = preserve do
12
+ :escaped
13
+ <div class="notification important fade in">
14
+ <p><strong>Dude!</strong> Wheres my car?</p>
15
+ <a class="close" data-dismiss="alert">&times;</a>
16
+ </div>
17
+ %pre.prettyprint.haml.hidden
18
+ = preserve do
19
+ :escaped
20
+ .notification.important.fade.in
21
+ %p <strong>Dude!</strong> Wheres my car?
22
+ %a.close(data-dismiss="alert") &times;
23
+
24
+ -# Pop Notifications
25
+ .sg-half.push
26
+ .notification.fade.in
27
+ %p <strong>Default!</strong> This is the default notification.
28
+ %a.close(href="#" data-dismiss="alert") &times;
29
+ .notification.info.notice.fade.in
30
+ %p <strong>Info (or Notice)!</strong> Use this for general information.
31
+ %a.close(href="#" data-dismiss="alert") &times;
32
+ .notification.important.fade.in
33
+ %p <strong>Important!</strong> Something important is said here.
34
+ %a.close(href="#" data-dismiss="alert") &times;
35
+ .notification.success.fade.in
36
+ %p <strong>Success!</strong> Congratulations, you get a trophy.
37
+ %a.close(href="#" data-dismiss="alert") &times;
38
+ .notification.warning.fade.in
39
+ %p <strong>Warning!</strong> Your first and final.
40
+ %a.close(href="#" data-dismiss="alert") &times;
41
+ .notification.danger.error.alert.fade.in
42
+ %p <strong>Danger (or Error, or Alert)!</strong> Something bad did happen.
43
+ %a.close(href="#" data-dismiss="alert") &times;
44
+ .notification.primary.fade.in
45
+ %p <strong>Primary!</strong> The CI button.
46
+ %a.close(href="#" data-dismiss="alert") &times;
47
+
48
+ .sg-subsection
49
+ .sg-half.pull
50
+ %h4 Block notifications
51
+ %p Block notifications are similar to the basic notification, in fact nothing needs to change on the outer container. Just add a <code>header</code>, <code>section</code> and/or <code>footer</code> to the internal markup to provide more information around the notification.
52
+ %pre.prettyprint.html
53
+ = preserve do
54
+ :escaped
55
+ <!-- Success Block -->
56
+ <div class="notification success fade in">
57
+ <header>...</header>
58
+ <section>...</section>
59
+ <footer>... </footer>
60
+ <a class="close" data-dismiss="alert">&times;</a>
61
+ </div>
62
+
63
+ <!-- Danger Block -->
64
+ <div class="notification danger fade in">
65
+ <section>...</section>
66
+ <footer class="footer-right">... </footer>
67
+ <a class="close" data-dismiss="alert">&times;</a>
68
+ </div>
69
+
70
+ <!-- Primary Block -->
71
+ <div class="notification important fade in">
72
+ <header>...</header>
73
+ <p>... </p>
74
+ <a class="close" data-dismiss="alert">&times;</a>
75
+ </div>
76
+ %pre.prettyprint.haml.hidden
77
+ = preserve do
78
+ :escaped
79
+ <!-- Success Block -->
80
+ .notification.success.fade.in
81
+ %header ...
82
+ %section ...
83
+ %footer ...
84
+ %a.close(data-dismiss="alert") &times;
85
+
86
+ <!-- Danger Block -->
87
+ .notification.danger.fade.in
88
+ %section ...
89
+ %footer.footer-right ...
90
+ %a.close(data-dismiss="alert") &times;
91
+
92
+ <!-- Primary Block -->
93
+ .notification.important.fade.in
94
+ %header ...
95
+ %p ...
96
+ %a.close(data-dismiss="alert") &times;
97
+ .sg-half.push
98
+ .notification.success.fade.in
99
+ %header
100
+ %h5.heading Header with an h5
101
+ %section
102
+ %p=@lorem_sm
103
+ %footer
104
+ %button.btn.success(href="#") Action
105
+ %button.btn(href="#") Cancel
106
+ %a.close(href="#" data-dismiss="alert") &times;
107
+ .notification.danger.fade.in
108
+ %section
109
+ %p
110
+ %strong Yikes! This doesn't have a header and the footer is on the right!
111
+ =@lorem_sm
112
+ %footer.footer-right
113
+ %button.btn.danger(href="#") Action
114
+ %button.btn(href="#") Cancel
115
+ %a.close(href="#" data-dismiss="alert") &times;
116
+ .notification.important.fade.in
117
+ %header
118
+ %strong Header with strong tag, no section or footer!
119
+ %p=@lorem_sm
120
+ %a.close(href="#" data-dismiss="alert") &times;
121
+
122
+
123
+ .sg-subsection
124
+ %h4 Flash Notifications
125
+ %p(style="width:67%") Flash notifications enhance the standard <code>.notification</code> component by allowing them to appear fixed above all other elements on the page. Wrap the notifications within a <code>#flash_messages.flash-messages</code> container at the root of the body, sprinkle a little JavaScript and you're ready to go.
126
+ %br
127
+ %p(style="width:67%") Adding different positional classes to the <code>.flash-messages</code> container will allow them to appear in different quadrants of the viewport as seen below:
128
+ .sg-subsection
129
+ %table.box.banded.thead-decorate
130
+ %thead
131
+ %tr
132
+ %th Type
133
+ %th Class
134
+ %th Usage
135
+ %tbody
136
+ %tr
137
+ %td
138
+ %a.flash-example(href="#" data-position="top") Top
139
+ %td <code>.flash-messages.top</code>
140
+ %td Fixed to the top of the browser, spans the entire viewport (<em>the default</em>)
141
+ %tr
142
+ %td
143
+ %a.flash-example(href="#" data-position="bottom") Bottom
144
+ %td <code>.flash-messages.bottom</code>
145
+ %td Fixed to the bottom of the browser, spans the entire viewport
146
+ %tr
147
+ %td
148
+ %a.flash-example(href="#" data-position="top-left") Top left
149
+ %td <code>.flash-messages.top-left</code>
150
+ %td Upper left quadrant of the viewport, with a size of 25%
151
+ %tr
152
+ %td
153
+ %a.flash-example(href="#" data-position="top-right") Top right
154
+ %td <code>.flash-messages.top-right</code>
155
+ %td Upper right quadrant of the viewport, with a size of 25%
156
+ %tr
157
+ %td
158
+ %a.flash-example(href="#" data-position="top-center") Top center
159
+ %td <code>.flash-messages.top-center</code>
160
+ %td Upper center quadrant of the viewport, with a size of 50%
161
+ %tr
162
+ %td
163
+ %a.flash-example(href="#" data-position="middle") Middle
164
+ %td <code>.flash-messages.middle</code>
165
+ %td Dead center baby, with a size of 50%
166
+
167
+ .notification.important.fade.in
168
+ %p <strong>Note!</strong> You don't necessarily need to use notifications within the <code>.flash-messages</code> container, it's left fairly flexible to allow for various interpretations
169
+