underoos 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. data/Gemfile +5 -0
  2. data/Gemfile.lock +21 -7
  3. data/README.md +85 -10
  4. data/Rakefile +36 -1
  5. data/app/assets/javascripts/docs.js +6 -0
  6. data/app/assets/javascripts/styleguide.coffee +162 -0
  7. data/app/assets/javascripts/underoos.js +0 -1
  8. data/app/assets/stylesheets/base/_base.sass +14 -0
  9. data/app/assets/stylesheets/base/_buttons.sass +68 -0
  10. data/app/assets/stylesheets/base/_forms.sass +313 -24
  11. data/app/assets/stylesheets/base/_helpers.sass +27 -13
  12. data/app/assets/stylesheets/base/_normalize.sass +17 -9
  13. data/app/assets/stylesheets/base/_scaffold.sass +85 -0
  14. data/app/assets/stylesheets/base/_tables.sass +77 -0
  15. data/app/assets/stylesheets/base/_transitions.sass +10 -2
  16. data/app/assets/stylesheets/base/_typography.sass +183 -21
  17. data/app/assets/stylesheets/components/_accordions.sass +38 -0
  18. data/app/assets/stylesheets/components/_breadcrumbs.sass +19 -5
  19. data/app/assets/stylesheets/components/_button-groups.sass +43 -0
  20. data/app/assets/stylesheets/components/_carets.sass +13 -2
  21. data/app/assets/stylesheets/components/_carousels.sass +32 -0
  22. data/app/assets/stylesheets/components/_close.sass +15 -2
  23. data/app/assets/stylesheets/components/_components.sass +28 -0
  24. data/app/assets/stylesheets/components/_decals.sass +14 -0
  25. data/app/assets/stylesheets/components/_dropdowns.sass +88 -4
  26. data/app/assets/stylesheets/components/_media.sass +36 -0
  27. data/app/assets/stylesheets/components/_modals.sass +29 -0
  28. data/app/assets/stylesheets/components/_nav-lists.sass +20 -0
  29. data/app/assets/stylesheets/components/_navbars.sass +64 -3
  30. data/app/assets/stylesheets/components/_notifications.sass +112 -16
  31. data/app/assets/stylesheets/components/_paddles.sass +26 -0
  32. data/app/assets/stylesheets/components/_pagination.sass +23 -3
  33. data/app/assets/stylesheets/components/_pills.sass +80 -0
  34. data/app/assets/stylesheets/components/_popovers.sass +28 -0
  35. data/app/assets/stylesheets/components/_progress-bars.sass +33 -1
  36. data/app/assets/stylesheets/components/_tabs.sass +79 -0
  37. data/app/assets/stylesheets/components/_tooltips.sass +26 -0
  38. data/app/assets/stylesheets/components/_wells.sass +9 -0
  39. data/app/assets/stylesheets/layouts/_containers.sass +12 -0
  40. data/app/assets/stylesheets/layouts/_layouts.sass +5 -0
  41. data/app/assets/stylesheets/layouts/_print.sass +5 -1
  42. data/app/assets/stylesheets/layouts/_queries.sass +18 -15
  43. data/app/assets/stylesheets/layouts/_upgrades.sass +51 -40
  44. data/app/assets/stylesheets/mixins/_arrows.sass +13 -1
  45. data/app/assets/stylesheets/mixins/_clearfixins.sass +18 -4
  46. data/app/assets/stylesheets/mixins/_coloring.sass +10 -1
  47. data/app/assets/stylesheets/mixins/_columns.sass +16 -3
  48. data/app/assets/stylesheets/mixins/_conversions.sass +18 -6
  49. data/app/assets/stylesheets/mixins/_font-size.sass +16 -1
  50. data/app/assets/stylesheets/mixins/_image-tools.sass +12 -1
  51. data/app/assets/stylesheets/mixins/_inline-block.sass +21 -0
  52. data/app/assets/stylesheets/mixins/_ir.sass +14 -1
  53. data/app/assets/stylesheets/mixins/_mixins.sass +6 -0
  54. data/app/assets/stylesheets/mixins/_responsive.sass +16 -0
  55. data/app/assets/stylesheets/mixins/_sticky-footer.sass +52 -0
  56. data/app/assets/stylesheets/mixins/_tab-focus.sass +8 -1
  57. data/app/assets/stylesheets/mixins/_timing-equations.sass +34 -1
  58. data/app/assets/stylesheets/mixins/_visibility.sass +18 -5
  59. data/app/assets/stylesheets/polyfills/_box-shadow.sass +10 -0
  60. data/app/assets/stylesheets/polyfills/_box-sizing.sass +10 -1
  61. data/app/assets/stylesheets/polyfills/_functions.sass +14 -1
  62. data/app/assets/stylesheets/polyfills/_opacity.sass +10 -1
  63. data/app/assets/stylesheets/polyfills/_polyfills.sass +9 -2
  64. data/app/assets/stylesheets/polyfills/_transition.sass +10 -0
  65. data/app/assets/stylesheets/polyfills/_user-select.sass +10 -0
  66. data/app/assets/stylesheets/settings/_config.sass +26 -0
  67. data/app/assets/stylesheets/settings/_settings.sass +7 -0
  68. data/app/assets/stylesheets/settings/_theme.sass +189 -0
  69. data/app/assets/stylesheets/{styleguide.sass → underoos-docs.sass} +20 -116
  70. data/app/assets/stylesheets/underoos.sass +5 -16
  71. data/config.ru +1 -3
  72. data/features/generator.feature +13 -4
  73. data/lib/generators/underoos/assets_generator.rb +4 -2
  74. data/lib/underoos/version.rb +1 -1
  75. data/public/images.html +157 -0
  76. data/public/index.html +149 -0
  77. data/public/sherpa.css +306 -0
  78. data/public/styles.html +5374 -0
  79. data/script/javascripts +0 -1
  80. data/sherpa/config.yml +96 -0
  81. data/sherpa/layouts/images.mustache +17 -0
  82. data/sherpa/layouts/layout.mustache +77 -0
  83. data/sherpa/layouts/overview.mustache +19 -0
  84. data/sherpa/layouts/raw.mustache +25 -0
  85. data/sherpa/layouts/section.mustache +67 -0
  86. data/underoos.gemspec +0 -2
  87. data/vendor/assets/javascripts/bootstrap-alert.js +28 -32
  88. data/vendor/assets/javascripts/bootstrap-button.js +29 -33
  89. data/vendor/assets/javascripts/bootstrap-collapse.js +45 -26
  90. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  91. data/vendor/assets/javascripts/bootstrap-modal.js +25 -17
  92. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  93. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  94. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  95. data/vendor/assets/javascripts/bootstrap-transition.js +30 -20
  96. data/vendor/assets/javascripts/bootstrap-typeahead.js +24 -10
  97. data/vendor/assets/javascripts/sherpa.coffee +78 -0
  98. metadata +34 -75
  99. data/app/assets/javascripts/styleguide.js +0 -132
  100. data/app/assets/stylesheets/base/_elements.sass +0 -61
  101. data/app/assets/stylesheets/polyfills/_inline-block.sass +0 -8
  102. data/app/assets/stylesheets/themes/_default.sass +0 -119
  103. data/app/controllers/underoos/styleguides_controller.rb +0 -79
  104. data/app/views/shared/_upgrades.html.haml +0 -12
  105. data/app/views/underoos/styleguides/_assets.haml +0 -42
  106. data/app/views/underoos/styleguides/_components.haml +0 -42
  107. data/app/views/underoos/styleguides/_elements.haml +0 -242
  108. data/app/views/underoos/styleguides/_forms.haml +0 -305
  109. data/app/views/underoos/styleguides/_layouts.haml +0 -76
  110. data/app/views/underoos/styleguides/_palettes.haml +0 -18
  111. data/app/views/underoos/styleguides/_resources.haml +0 -27
  112. data/app/views/underoos/styleguides/_tables.haml +0 -124
  113. data/app/views/underoos/styleguides/_typography.haml +0 -284
  114. data/app/views/underoos/styleguides/_utilities.haml +0 -270
  115. data/app/views/underoos/styleguides/components/_accordions.haml +0 -83
  116. data/app/views/underoos/styleguides/components/_breadcrumbs.haml +0 -42
  117. data/app/views/underoos/styleguides/components/_button-groups.haml +0 -162
  118. data/app/views/underoos/styleguides/components/_carets.haml +0 -28
  119. data/app/views/underoos/styleguides/components/_close.haml +0 -20
  120. data/app/views/underoos/styleguides/components/_decals.haml +0 -40
  121. data/app/views/underoos/styleguides/components/_dropdowns.haml +0 -189
  122. data/app/views/underoos/styleguides/components/_media.haml +0 -78
  123. data/app/views/underoos/styleguides/components/_modals.haml +0 -42
  124. data/app/views/underoos/styleguides/components/_nav-lists.haml +0 -52
  125. data/app/views/underoos/styleguides/components/_navbars.haml +0 -144
  126. data/app/views/underoos/styleguides/components/_navs-showcase.haml +0 -27
  127. data/app/views/underoos/styleguides/components/_notifications.haml +0 -169
  128. data/app/views/underoos/styleguides/components/_paddles.haml +0 -68
  129. data/app/views/underoos/styleguides/components/_pagination.haml +0 -64
  130. data/app/views/underoos/styleguides/components/_popovers.haml +0 -33
  131. data/app/views/underoos/styleguides/components/_progress-bars.haml +0 -72
  132. data/app/views/underoos/styleguides/components/_tabs-pills.haml +0 -241
  133. data/app/views/underoos/styleguides/components/_tooltips.haml +0 -37
  134. data/app/views/underoos/styleguides/components/_wells.haml +0 -29
  135. data/app/views/underoos/styleguides/index.html.haml +0 -259
  136. data/app/views/underoos/styleguides/partials/_form-template.haml +0 -171
  137. data/app/views/underoos/styleguides/partials/_table-data.haml +0 -33
  138. data/app/views/underoos/styleguides/partials/_transitions.haml +0 -136
  139. data/config/routes.rb +0 -3
  140. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -125
data/Gemfile CHANGED
@@ -3,3 +3,8 @@ source :rubygems
3
3
  gemspec
4
4
 
5
5
  gem 'thin'
6
+ gem 'jquery-rails'
7
+ gem 'coffee-rails'
8
+
9
+ gem 'sherpa', git: 'git://github.com/modeset/sherpa.git'
10
+ # gem 'sherpa', path: '~/Sites/sherpa'
@@ -1,8 +1,15 @@
1
+ GIT
2
+ remote: git://github.com/modeset/sherpa.git
3
+ revision: 6428d27b2eecbd2809c8e5793a8c867cee38a9da
4
+ specs:
5
+ sherpa (0.1.0)
6
+ mustache (~> 0.99.4)
7
+ redcarpet (~> 2.1.1)
8
+
1
9
  PATH
2
10
  remote: .
3
11
  specs:
4
12
  underoos (1.0.0)
5
- haml-rails
6
13
  rails (>= 3.1.0)
7
14
  sass-rails
8
15
 
@@ -45,6 +52,13 @@ GEM
45
52
  builder (3.0.0)
46
53
  childprocess (0.3.1)
47
54
  ffi (~> 1.0.6)
55
+ coffee-rails (3.2.2)
56
+ coffee-script (>= 2.2.0)
57
+ railties (~> 3.2.0)
58
+ coffee-script (2.2.0)
59
+ coffee-script-source
60
+ execjs
61
+ coffee-script-source (1.3.3)
48
62
  cucumber (1.1.9)
49
63
  builder (>= 2.1.2)
50
64
  diff-lcs (>= 1.1.2)
@@ -55,15 +69,11 @@ GEM
55
69
  diff-lcs (1.1.3)
56
70
  erubis (2.7.0)
57
71
  eventmachine (0.12.10)
72
+ execjs (1.4.0)
73
+ multi_json (~> 1.0)
58
74
  ffi (1.0.11)
59
75
  gherkin (2.9.0)
60
76
  json (>= 1.4.6)
61
- haml (3.1.4)
62
- haml-rails (0.3.4)
63
- actionpack (~> 3.0)
64
- activesupport (~> 3.0)
65
- haml (~> 3.0)
66
- railties (~> 3.0)
67
77
  hike (1.2.1)
68
78
  i18n (0.6.0)
69
79
  journey (1.0.3)
@@ -77,6 +87,7 @@ GEM
77
87
  treetop (~> 1.4.8)
78
88
  mime-types (1.17.2)
79
89
  multi_json (1.1.0)
90
+ mustache (0.99.4)
80
91
  polyglot (0.3.3)
81
92
  rack (1.4.1)
82
93
  rack-cache (1.2)
@@ -103,6 +114,7 @@ GEM
103
114
  rake (0.9.2.2)
104
115
  rdoc (3.12)
105
116
  json (~> 1.4)
117
+ redcarpet (2.1.1)
106
118
  rspec (2.8.0)
107
119
  rspec-core (~> 2.8.0)
108
120
  rspec-expectations (~> 2.8.0)
@@ -137,7 +149,9 @@ PLATFORMS
137
149
 
138
150
  DEPENDENCIES
139
151
  aruba
152
+ coffee-rails
140
153
  cucumber
141
154
  jquery-rails
155
+ sherpa!
142
156
  thin
143
157
  underoos!
data/README.md CHANGED
@@ -1,13 +1,88 @@
1
- # underoos are fun to wear
1
+ ## underoos
2
2
 
3
- Stop back soon! We are just getting this bad boy going, it's in total turmoil at the moment.
3
+ Base styles, component and layout structures for a projects foundation.
4
4
 
5
- ![underoos](http://oofblamargh.typepad.com/.a/6a0120a6b84d21970b01543408e128970c-800wi "title")
5
+ 1. Crafted in [Sass](http://sass-lang.com/) - the actual `.sass` version
6
+ - Tuned for responsiveness with `ems` and `percentages` instead of pixel measurements
7
+ - Structured, consistent markup allowing a common language between front and back end development teams
8
+ - Minimal styles for quick prototypes, and allowing development teams to move forward while still in design phase
9
+ - Built to work with [Compass](http://compass-style.org/) or [Bourbon](http://thoughtbot.com/bourbon/) out of the box (though not a requirement by any means)
10
+
11
+ Underoos is meant as the starting point for an application. All of the `.sass` files are meant to be tweaked to the design, the important part is maintaining the structure of the markup as close as possible. This allows back end developers, front end developers and design teams to work simultaneously across an application. Underoos is the fancy stuff under the pants.
12
+
13
+ For more details around Underoos and how it works, take a look at the [interactive docs](http://underoos.modeset.com/docs/style.html).
14
+
15
+ Underoos is still under continuous development. It's stable, but is subject to some changes.
16
+
17
+ ### Browser support
18
+
19
+ - Modern browsers (Chrome, Safari, Firefox, Internet Explorer 9+)
20
+ - Mobile/Tablet browsers (The Webkits)
21
+ - Internet Explorer 8
22
+ - Internet Explorer 7 (This needs to be enabled)
23
+
24
+ ### Requirements
25
+
26
+ - Sass 3.1+ (files can easily be converted to `scss` by using the `sass-convert` tool)
27
+
28
+ ### Installation
29
+
30
+ Within a Rails environment:
31
+
32
+ Include underoos in your Gemfile
33
+
34
+ gem 'underoos'
35
+
36
+ Then run the generator
37
+
38
+ rails g underoos:assets
39
+
40
+ Currently in other environments, it's a manual operation, but it's on our short list to automate this.
41
+
42
+ 1. Clone or download the repository
43
+ - Copy over the `.sass` files from within `underoos/app/assets/stylesheets/`
44
+ - Copy over the `javascripts` files from within `underoos/app/assets/javascripts/`
45
+ - Copy over the `javascripts` files from within `underoos/vendor/assets/javascripts/`
46
+ - Optionally copy over the `./script/javascripts` for pulling down the latest vendor javascripts
47
+
48
+ We know this sort of sucks ATM, but we'll get something better in place, promise.
49
+
50
+
51
+ ### What's with all the comments?
52
+
53
+ Underoos utilizes [sherpa](https://github.com/modeset/sherpa) for documentation generation. This means the comments actually generate a [living styleguide](http://underoos.modeset.com/docs/style.html). As long as the structure doesn't change, the styleguide will be updated as you change style configurations. This allows documentation to be portable across applications. If you're like us, you hate documenting, so creating an automated task is a bonus all around. We will most likely move the inline documentation to external files in the very near future. Stay tuned.
54
+
55
+ See the [sherpa](https://github.com/modeset/sherpa) project for more details.
56
+
57
+ ### Inspirations
58
+
59
+ Underoos is heavily inspired by the fabulous [Twitter Bootstrap](http://twitter.github.com/bootstrap/) library. In fact, we are using most of the JavaScript files contained within Bootstrap. We literally built underoos and it's documentation on the backs of giants. Let us give credit where credit is due. There are some key differences between underoos and bootstrap, so don't think of it as a pure clone.
60
+
61
+ If you don't mind dealing with the [less library](http://lesscss.org/), you should be using Twitter's Bootstrap.
62
+
63
+ ### Road Map
64
+
65
+ Feature updates are currently being run through a [Pivotal Tracker project](https://www.pivotaltracker.com/projects/485221).
66
+
67
+
68
+ ### Contributing
69
+
70
+ We are happy to take pull requests and bug fixes, but please follow these simple rules.
71
+
72
+ 1. Needs to pass in all supported browsers (ie7 doesn't necessarily need to be perfect!)
73
+ - Documentation needs to reflect changes or additions
74
+
75
+ Feel free to check in with us before working on anything just to make sure we haven't started down the path already.
76
+
77
+ To work with the repository, clone and run the following:
78
+
79
+ bundle
80
+ rake sherpa:html
81
+
82
+ Anytime you alter documentation, you'll need to run `rake sherpa:html` to regenerate it. If you are only tweaking styles, there is no need to rerun this command, just hit refresh.
83
+
84
+
85
+ ### Licensing
86
+
87
+ Underoos is [MIT licensed](https://raw.github.com/modeset/underoos/master/LICENSE), so do what you want with these files. We built them for us, but hopefully this makes somebody's life easier too. If you use underoos in a project, like us on Facebook... just kidding, don't do that, that is just lame. Seriously though, let us know how it goes.
6
88
 
7
- <!--
8
- -# This is so dirty and not in that good way.
9
- :ruby
10
- def partial(file)
11
- return haml_concat(Haml::Engine.new(IO.read("app/views/styleguide/_#{file}.haml")).render)
12
- end
13
- -->
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- begin
3
+ begin
4
4
  require 'cucumber'
5
5
  require 'cucumber/rake/task'
6
6
 
@@ -10,3 +10,38 @@ begin
10
10
  rescue LoadError
11
11
  puts 'Could not load Cucumber'
12
12
  end
13
+
14
+ namespace :sherpa do
15
+
16
+ desc 'Inspect the output generated by the sherpa parser as json'
17
+ task :probe do
18
+ `bundle exec sherpa -i ./sherpa/config.yml -d`
19
+ end
20
+
21
+ desc 'Generate html documentation from a config.yml file'
22
+ task :html do
23
+ `bundle exec sherpa -i ./sherpa/config.yml --html`
24
+ end
25
+
26
+ desc 'Generate a single markdown file of all sherpa raw blocks'
27
+ task :markdown do
28
+ `bundle exec sherpa -i ./sherpa/config.yml --markdown`
29
+ end
30
+
31
+ desc 'Generate a markdown file for each section of the sherpa raw blocks'
32
+ task :markdown_sections do
33
+ `bundle exec sherpa -i ./sherpa/config.yml --markdown-sections`
34
+ end
35
+
36
+ desc 'Generate a json file from the output of the sherpa parser'
37
+ task :json do
38
+ `bundle exec sherpa -i ./sherpa/config.yml --json`
39
+ end
40
+
41
+ desc 'Generates all output types supported by sherpa'
42
+ task :outputs do
43
+ `bundle exec sherpa -i ./sherpa/config.yml --html --markdown --markdown-sections --json`
44
+ end
45
+
46
+ end
47
+
@@ -0,0 +1,6 @@
1
+
2
+ /* VENDOR ASSETS */
3
+ //= require prettify
4
+ //= require sherpa
5
+ //= require styleguide
6
+
@@ -0,0 +1,162 @@
1
+
2
+ # Demos various aspects of the styleguide in a very dirty way.
3
+ class Styleguide
4
+ constructor: ->
5
+ @initialize()
6
+
7
+ initialize: ->
8
+ @addListeners()
9
+ @prettyCodeBlocks()
10
+ @demoTips()
11
+ @demoTypeahead()
12
+
13
+ addListeners: ->
14
+ $('#underoos_nav_demo').on 'click', @demoNav
15
+ $('#underoos_buttons_demo').on 'click', @demoButtons
16
+ $('.btn[data-complete-text]').on 'click', @demoSending
17
+ $('#underoos_table_demo a').on 'click', @demoTable
18
+ $('#underoos_form_demo_type a').on 'click', @demoForm
19
+ $('#underoos_upgrade_demo').on 'click', @demoUpgrades
20
+ $('.upgrade-close').on 'click', @closeUpgrades
21
+ $('.progress').on 'click', @demoProgressBars
22
+
23
+ # Turn code blocks into pretty colors
24
+ prettyCodeBlocks: ->
25
+ $('.sherpa-description > pre').addClass('prettyprint')
26
+ window.prettyPrint()
27
+
28
+ # Demos structures built off the base `.nav` class
29
+ demoNav: (e) =>
30
+ e.preventDefault()
31
+ target = $(e.target)
32
+ classes = target.data('classes')
33
+ nav = target.parents('.nav').first()
34
+ li = target.parent('li')
35
+ nav.removeClass().addClass(classes)
36
+ nav.find('li').removeClass('active')
37
+ li.addClass('active')
38
+
39
+ # Demos various states on `.btn` elements within a table
40
+ demoButtons: (e) =>
41
+ e.preventDefault()
42
+ target = $(e.target)
43
+ classes = target.data('class')
44
+ buttons = target.parents('.sherpa-section').first().find('#base-buttons > table button')
45
+ if classes is "normal"
46
+ buttons.removeClass('active error disabled small large')
47
+ else
48
+ buttons.removeClass('active error disabled small large')
49
+ buttons.addClass(classes)
50
+
51
+ # Demos a stateful button
52
+ demoSending: (e) =>
53
+ e.preventDefault()
54
+ target = $(e.target)
55
+ target.button('loading')
56
+ setTimeout((->
57
+ target.button('complete')
58
+ ), 3000)
59
+
60
+ # Demos additive classes around table styles
61
+ demoTable: (e) =>
62
+ e.preventDefault()
63
+ target = $(e.target)
64
+ style = target.data('table')
65
+ table = target.parents('.sherpa-showcase').first().find('table')
66
+ table.toggleClass(style)
67
+
68
+ # Demos structures, states and well coloring related to forms
69
+ demoForm: (e) =>
70
+ e.preventDefault()
71
+ target = $(e.target)
72
+ form = target.parents('.sherpa-showcase').first().find('form')
73
+ style = target.data('form-type')
74
+
75
+ # Structures
76
+ if style is 'form-vertical'
77
+ form.removeClass('form-horizontal')
78
+ else if style is 'form-horizontal'
79
+ form.addClass('form-horizontal')
80
+
81
+ # Wells
82
+ else if style is 'regular'
83
+ @resetFormWells(form)
84
+ form.addClass('well')
85
+ else if style is 'empty'
86
+ @resetFormWells(form)
87
+ else if style is 'dark' or style is 'lite' or style is 'primary'
88
+ @resetFormWells(form)
89
+ form.addClass("well #{style}")
90
+
91
+ # States
92
+ else if style is 'normal'
93
+ @resetFormStates(form)
94
+ else if style is 'disabled'
95
+ @resetFormStates(form)
96
+ @setFormStates(form, style)
97
+ form.find('input').attr('disabled', 'disabled')
98
+ form.find('select').attr('disabled', 'disabled')
99
+ form.find('textarea').attr('disabled', 'disabled')
100
+ else if style is 'error' or style is 'success' or style is 'warning'
101
+ @resetFormStates(form)
102
+ @setFormStates(form, style)
103
+
104
+ # Resets form wells
105
+ resetFormWells: (form) ->
106
+ form.removeClass('well dark lite primary')
107
+
108
+ # Sets a state (error, warning, success, disabled) for form elements
109
+ setFormStates: (form, state) ->
110
+ form.find('li').addClass(state)
111
+ form.find('.uneditable').addClass(state)
112
+
113
+ # Resets form states back to normal
114
+ resetFormStates: (form) ->
115
+ form.find('li').removeClass('disabled error warning success')
116
+ form.find('.uneditable').removeClass('disabled error warning success')
117
+ form.find('input').removeAttr('disabled')
118
+ form.find('select').removeAttr('disabled')
119
+ form.find('textarea').removeAttr('disabled')
120
+
121
+ # Demos the typeahead plugin from an array
122
+ demoTypeahead: ->
123
+ superfriends = [
124
+ 'Aquaman' ,'Batman' ,'Catwomen' ,'Daredevil' ,'Elektra' ,'Fantastic Four'
125
+ ,'Green Lantern' ,'Hulk' ,'Iron Man' ,'Jericho' ,'Karate Kid' ,'Lobo'
126
+ ,'Mr. Terrific' ,'Nightwing' ,'Obsidian' ,'Plastic Man' ,'Quicksilver'
127
+ ,'Robin' ,'Superman' ,'Teenage Mutant Ninja Turtles' ,'Ultraman'
128
+ ,'Vigilante' ,'Wolverine' ,'X-Men' ,'Yellow Jacket' ,'Zattana'
129
+ ]
130
+ $('#underoos_typeahead').typeahead({source:superfriends , items:10})
131
+
132
+ # Instantiates tooltips and popovers on the page
133
+ demoTips: ->
134
+ $("a[rel=tooltip]").tooltip()
135
+ $("a[rel=popover]").popover()
136
+
137
+ # Demos the animation on progress bars
138
+ demoProgressBars: ->
139
+ target = $(@)
140
+ bar = target.find('> .bar')
141
+ pb_width = target.width()
142
+ if bar.width() is pb_width
143
+ bar.css(width: '0%')
144
+ else
145
+ bar.css(width:'100%')
146
+
147
+ # Demos the upgrade message
148
+ demoUpgrades: (e) =>
149
+ e.preventDefault()
150
+ $('html').addClass('no-js lt-ie8')
151
+ window.scrollTo(0,0)
152
+
153
+ # Hop back down to upgrades after closing the window
154
+ closeUpgrades: (e) =>
155
+ e.preventDefault()
156
+ $('html').removeClass('no-js lt-ie8')
157
+ div = $('#layouts-upgrades')
158
+ window.scroll(0,div.offset().top)
159
+
160
+ # Get this party started
161
+ new Styleguide()
162
+
@@ -5,7 +5,6 @@
5
5
  //= require bootstrap-alert
6
6
  //= require bootstrap-modal
7
7
  //= require bootstrap-dropdown
8
- //= require bootstrap-scrollspy
9
8
  //= require bootstrap-tab
10
9
  //= require bootstrap-tooltip
11
10
  //= require bootstrap-popover
@@ -0,0 +1,14 @@
1
+
2
+ //~ # Base
3
+ // Sets up normalization and base styles for native elements and core classes.
4
+
5
+ @import normalize
6
+ @import scaffold
7
+ @import helpers
8
+ @import transitions
9
+ @import typography
10
+ @import button-btn-mixin
11
+ @import buttons
12
+ @import tables
13
+ @import forms
14
+
@@ -0,0 +1,68 @@
1
+
2
+ //~
3
+ // Button | Class | Description
4
+ // ------------------------------------------------ | ----------------- | ---------------------------
5
+ // <button class="btn">Default</button> | `.btn` | The default button is typically used in forms
6
+ // <button class="btn info">Info</button> | `.btn.info` | The info button is an alternate to the default button
7
+ // <button class="btn important">Important</button> | `.btn.important` | The important button is used to showcase a primary action
8
+ // <button class="btn success">Success</button> | `.btn.success` | The success button indicates a successful or positive action
9
+ // <button class="btn warning">Warning</button> | `.btn.warning` | The warning button indicates caution should be taken with this action
10
+ // <button class="btn danger">Danger</button> | `.btn.danger` | The danger button indicates a dangerous or potentially negative action
11
+ // <button class="btn primary">Primary</button> | `.btn.primary` | The primary button is based off of the CI settings within the application
12
+ //
13
+ // The `.btn` button is built from a mixin (`base/_button-btn-mixin.sass`)
14
+ //
15
+ // All buttons come in a variety of states and sizes, toggle the buttons below for examples.
16
+ //
17
+ // Usage:
18
+ // <!-- Testing purposes only -->
19
+ // <nav class="button-group" data-toggle="buttons-radio" id="underoos_buttons_demo">
20
+ // <a class="btn active" href="#" data-class="normal">Normal</a>
21
+ // <a class="btn" href="#" data-class="active">Active</a>
22
+ // <a class="btn" href="#" data-class="error">Error</a>
23
+ // <a class="btn" href="#" data-class="disabled">Disabled</a>
24
+ // <a class="btn" href="#" data-class="small">Small</a>
25
+ // <a class="btn" href="#" data-class="large">Large</a>
26
+ // </nav>
27
+
28
+ //~
29
+ // #### Button elements
30
+ // The `.btn` class can be applied to `<a>`, `<button>` and `<input>` elements.
31
+ // Usage:
32
+ // <a class="btn" href="#">Link</a>
33
+ // <button class="btn" type="submit">Button</button>
34
+ // <input class="btn" type="button" value="Input">
35
+ // <input class="btn" type="submit" value="Submit">
36
+
37
+ //~
38
+ // #### Behaviors
39
+ // Utilizing [Bootstrap's Button plugin](http://twitter.github.com/bootstrap/javascript.html#buttons),
40
+ // you can control a button's states by utilizing the `data-toggle` attribute.
41
+ //
42
+ // State | Usage
43
+ // ------------------------------------------------------------------------------------------ | --------------------------------------
44
+ // <button class="btn" data-toggle="button">Toggle</button> | Toggles active state on a single button
45
+ // <button class="btn" data-complete-text="Sent" data-loading-text="sending...">Send</button> | Disables a button as information is being sent, resets on callback
46
+ //
47
+ // Notes:
48
+ // - **Pro Tip!** See the [button groups](#components-button-groups) component for uses with `data-toggle="buttons-radio|checkbox"`
49
+
50
+ .btn
51
+ +btn-button($standard, $grey6)
52
+ &.info
53
+ +btn-override($info, $white)
54
+ &.important
55
+ +btn-override($important, $white)
56
+ &.success
57
+ +btn-override($success, $white)
58
+ &.warning
59
+ +btn-override($warning, $white)
60
+ &.danger
61
+ +btn-override($danger, $white)
62
+ &.primary
63
+ +btn-override($primary, $white)
64
+
65
+ // Fix standard links to closer resemble `button` elements
66
+ a.btn
67
+ font-weight: bold
68
+