bootstrap_it 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +5 -0
- data/Gemfile +9 -0
- data/README.md +582 -0
- data/Rakefile +6 -0
- data/bootstrap_it.gemspec +33 -0
- data/config.ru +7 -0
- data/lib/bootstrap_it.rb +9 -0
- data/lib/bootstrap_it/assets.rb +67 -0
- data/lib/bootstrap_it/config.rb +50 -0
- data/lib/bootstrap_it/engine.rb +25 -0
- data/lib/bootstrap_it/locales/en.yml +4 -0
- data/lib/bootstrap_it/locales/ru.yml +4 -0
- data/lib/bootstrap_it/version.rb +6 -0
- data/lib/bootstrap_it/view_helpers.rb +55 -0
- data/lib/bootstrap_it/view_helpers/breadcrumb.rb +19 -0
- data/lib/bootstrap_it/view_helpers/button.rb +116 -0
- data/lib/bootstrap_it/view_helpers/button_group.rb +32 -0
- data/lib/bootstrap_it/view_helpers/button_toolbar.rb +21 -0
- data/lib/bootstrap_it/view_helpers/dropdown_menu.rb +30 -0
- data/lib/bootstrap_it/view_helpers/form.rb +127 -0
- data/lib/bootstrap_it/view_helpers/grid.rb +75 -0
- data/lib/bootstrap_it/view_helpers/icon.rb +24 -0
- data/lib/bootstrap_it/view_helpers/list.rb +47 -0
- data/lib/bootstrap_it/view_helpers/misc.rb +144 -0
- data/lib/bootstrap_it/view_helpers/mixin.rb +279 -0
- data/lib/bootstrap_it/view_helpers/nav.rb +96 -0
- data/lib/bootstrap_it/view_helpers/pagination.rb +34 -0
- data/lib/bootstrap_it/view_helpers/table.rb +72 -0
- data/lib/bootstrap_it/view_helpers/text.rb +46 -0
- data/spec/assets/assets_spec.rb +51 -0
- data/spec/internal/app/assets/javascript/application.js +7 -0
- data/spec/internal/app/assets/javascript/user.js +1 -0
- data/spec/internal/app/assets/javascript/userfont.eot +0 -0
- data/spec/internal/app/assets/stylesheets/application.css +6 -0
- data/spec/internal/app/assets/stylesheets/user.css +1 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/schema.rb +3 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/lib/config_spec.rb +10 -0
- data/spec/lib/view_helpers_spec.rb +12 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/support/example_groups/assets_example_group.rb +84 -0
- data/spec/support/example_groups/view_helpers_example_group.rb +124 -0
- data/spec/view_helpers/breadcrumb_spec.rb +12 -0
- data/spec/view_helpers/button_group_spec.rb +40 -0
- data/spec/view_helpers/button_spec.rb +169 -0
- data/spec/view_helpers/button_toolbar_spec.rb +14 -0
- data/spec/view_helpers/dropdown_menu_spec.rb +41 -0
- data/spec/view_helpers/form_spec.rb +27 -0
- data/spec/view_helpers/grid_spec.rb +47 -0
- data/spec/view_helpers/icon_spec.rb +6 -0
- data/spec/view_helpers/list_spec.rb +50 -0
- data/spec/view_helpers/misc_spec.rb +117 -0
- data/spec/view_helpers/mixin_spec.rb +177 -0
- data/spec/view_helpers/nav_spec.rb +63 -0
- data/spec/view_helpers/pagination_spec.rb +36 -0
- data/spec/view_helpers/table_spec.rb +59 -0
- data/spec/view_helpers/text_spec.rb +13 -0
- data/spec/views/examples_spec.rb +250 -0
- data/upstream/bootstrap-3.0.3-dist.zip +0 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.eot +0 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.svg +229 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.woff +0 -0
- data/upstream/bootstrap/3.0.3/javascript/bootstrap.js +2006 -0
- data/upstream/bootstrap/3.0.3/javascript/bootstrap.min.js +7 -0
- data/upstream/bootstrap/3.0.3/src/.editorconfig +11 -0
- data/upstream/bootstrap/3.0.3/src/.gitattributes +8 -0
- data/upstream/bootstrap/3.0.3/src/.gitignore +42 -0
- data/upstream/bootstrap/3.0.3/src/.travis.yml +10 -0
- data/upstream/bootstrap/3.0.3/src/CNAME +1 -0
- data/upstream/bootstrap/3.0.3/src/CONTRIBUTING.md +79 -0
- data/upstream/bootstrap/3.0.3/src/DOCS-LICENSE +319 -0
- data/upstream/bootstrap/3.0.3/src/Gruntfile.js +337 -0
- data/upstream/bootstrap/3.0.3/src/LICENSE +176 -0
- data/upstream/bootstrap/3.0.3/src/LICENSE-MIT +21 -0
- data/upstream/bootstrap/3.0.3/src/README.md +166 -0
- data/upstream/bootstrap/3.0.3/src/_config.yml +25 -0
- data/upstream/bootstrap/3.0.3/src/_includes/ads.html +1 -0
- data/upstream/bootstrap/3.0.3/src/_includes/footer.html +48 -0
- data/upstream/bootstrap/3.0.3/src/_includes/header.html +42 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-about.html +12 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-components.html +137 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-css.html +99 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-customize.html +40 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-getting-started.html +48 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-javascript.html +88 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-main.html +37 -0
- data/upstream/bootstrap/3.0.3/src/_includes/old-bs-docs.html +8 -0
- data/upstream/bootstrap/3.0.3/src/_includes/social-buttons.html +16 -0
- data/upstream/bootstrap/3.0.3/src/_layouts/default.html +79 -0
- data/upstream/bootstrap/3.0.3/src/_layouts/home.html +47 -0
- data/upstream/bootstrap/3.0.3/src/about.html +94 -0
- data/upstream/bootstrap/3.0.3/src/bower.json +30 -0
- data/upstream/bootstrap/3.0.3/src/components.html +3714 -0
- data/upstream/bootstrap/3.0.3/src/composer.json +25 -0
- data/upstream/bootstrap/3.0.3/src/css.html +2673 -0
- data/upstream/bootstrap/3.0.3/src/customize.html +1715 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap-theme.css +397 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap-theme.min.css +7 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap.css +7118 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap.min.css +7 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/upstream/bootstrap/3.0.3/src/dist/js/bootstrap.js +2006 -0
- data/upstream/bootstrap/3.0.3/src/dist/js/bootstrap.min.js +7 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/css/docs.css +1196 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/css/pygments-manni.css +66 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/ico/favicon.png +0 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/application.js +103 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/customizer.js +332 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/filesaver.js +399 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/holder.js +500 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/ie8-responsive-file-warning.js +12 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/jszip.js +1474 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/less.js +9 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/raw-files.js +3 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/uglify.js +14 -0
- data/upstream/bootstrap/3.0.3/src/examples/carousel/carousel.css +148 -0
- data/upstream/bootstrap/3.0.3/src/examples/carousel/index.html +206 -0
- data/upstream/bootstrap/3.0.3/src/examples/grid/grid.css +28 -0
- data/upstream/bootstrap/3.0.3/src/examples/grid/index.html +148 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron-narrow/index.html +82 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron-narrow/jumbotron-narrow.css +79 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron/index.html +99 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron/jumbotron.css +5 -0
- data/upstream/bootstrap/3.0.3/src/examples/justified-nav/index.html +84 -0
- data/upstream/bootstrap/3.0.3/src/examples/justified-nav/justified-nav.css +88 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-fixed-top/index.html +91 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-fixed-top/navbar-fixed-top.css +4 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-static-top/index.html +92 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-static-top/navbar-static-top.css +7 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar/index.html +88 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar/navbar.css +8 -0
- data/upstream/bootstrap/3.0.3/src/examples/non-responsive/index.html +101 -0
- data/upstream/bootstrap/3.0.3/src/examples/non-responsive/non-responsive.css +120 -0
- data/upstream/bootstrap/3.0.3/src/examples/offcanvas/index.html +130 -0
- data/upstream/bootstrap/3.0.3/src/examples/offcanvas/offcanvas.css +51 -0
- data/upstream/bootstrap/3.0.3/src/examples/offcanvas/offcanvas.js +5 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/carousel.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/grid.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/jumbotron-narrow.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/jumbotron.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/justified-nav.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/navbar-fixed.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/navbar-static.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/navbar.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/non-responsive.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/offcanvas.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/sign-in.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/starter-template.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/sticky-footer-navbar.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/sticky-footer.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/theme.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/signin/index.html +50 -0
- data/upstream/bootstrap/3.0.3/src/examples/signin/signin.css +40 -0
- data/upstream/bootstrap/3.0.3/src/examples/starter-template/index.html +68 -0
- data/upstream/bootstrap/3.0.3/src/examples/starter-template/starter-template.css +7 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer-navbar/index.html +91 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer-navbar/sticky-footer-navbar.css +45 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer/index.html +55 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer/sticky-footer.css +38 -0
- data/upstream/bootstrap/3.0.3/src/examples/theme/index.html +384 -0
- data/upstream/bootstrap/3.0.3/src/examples/theme/theme.css +14 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.eot +0 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.svg +229 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.woff +0 -0
- data/upstream/bootstrap/3.0.3/src/getting-started.html +1057 -0
- data/upstream/bootstrap/3.0.3/src/index.html +16 -0
- data/upstream/bootstrap/3.0.3/src/javascript.html +1995 -0
- data/upstream/bootstrap/3.0.3/src/js/.jshintrc +14 -0
- data/upstream/bootstrap/3.0.3/src/js/affix.js +126 -0
- data/upstream/bootstrap/3.0.3/src/js/alert.js +98 -0
- data/upstream/bootstrap/3.0.3/src/js/button.js +115 -0
- data/upstream/bootstrap/3.0.3/src/js/carousel.js +217 -0
- data/upstream/bootstrap/3.0.3/src/js/collapse.js +179 -0
- data/upstream/bootstrap/3.0.3/src/js/dropdown.js +154 -0
- data/upstream/bootstrap/3.0.3/src/js/modal.js +246 -0
- data/upstream/bootstrap/3.0.3/src/js/popover.js +117 -0
- data/upstream/bootstrap/3.0.3/src/js/scrollspy.js +158 -0
- data/upstream/bootstrap/3.0.3/src/js/tab.js +135 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/index.html +52 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/affix.js +25 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/alert.js +62 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/button.js +122 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/carousel.js +87 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/collapse.js +164 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/dropdown.js +219 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/modal.js +196 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/phantom.js +69 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/popover.js +133 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/scrollspy.js +37 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/tab.js +86 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/tooltip.js +437 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/transition.js +13 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/vendor/jquery.js +6 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/vendor/qunit.css +232 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/vendor/qunit.js +1510 -0
- data/upstream/bootstrap/3.0.3/src/js/tooltip.js +386 -0
- data/upstream/bootstrap/3.0.3/src/js/transition.js +56 -0
- data/upstream/bootstrap/3.0.3/src/less/alerts.less +67 -0
- data/upstream/bootstrap/3.0.3/src/less/badges.less +51 -0
- data/upstream/bootstrap/3.0.3/src/less/bootstrap.less +49 -0
- data/upstream/bootstrap/3.0.3/src/less/breadcrumbs.less +23 -0
- data/upstream/bootstrap/3.0.3/src/less/button-groups.less +227 -0
- data/upstream/bootstrap/3.0.3/src/less/buttons.less +155 -0
- data/upstream/bootstrap/3.0.3/src/less/carousel.less +232 -0
- data/upstream/bootstrap/3.0.3/src/less/close.less +33 -0
- data/upstream/bootstrap/3.0.3/src/less/code.less +53 -0
- data/upstream/bootstrap/3.0.3/src/less/component-animations.less +29 -0
- data/upstream/bootstrap/3.0.3/src/less/dropdowns.less +187 -0
- data/upstream/bootstrap/3.0.3/src/less/forms.less +375 -0
- data/upstream/bootstrap/3.0.3/src/less/glyphicons.less +237 -0
- data/upstream/bootstrap/3.0.3/src/less/grid.less +79 -0
- data/upstream/bootstrap/3.0.3/src/less/input-groups.less +136 -0
- data/upstream/bootstrap/3.0.3/src/less/jumbotron.less +46 -0
- data/upstream/bootstrap/3.0.3/src/less/labels.less +64 -0
- data/upstream/bootstrap/3.0.3/src/less/list-group.less +88 -0
- data/upstream/bootstrap/3.0.3/src/less/media.less +56 -0
- data/upstream/bootstrap/3.0.3/src/less/mixins.less +845 -0
- data/upstream/bootstrap/3.0.3/src/less/modals.less +129 -0
- data/upstream/bootstrap/3.0.3/src/less/navbar.less +612 -0
- data/upstream/bootstrap/3.0.3/src/less/navs.less +242 -0
- data/upstream/bootstrap/3.0.3/src/less/normalize.less +406 -0
- data/upstream/bootstrap/3.0.3/src/less/pager.less +55 -0
- data/upstream/bootstrap/3.0.3/src/less/pagination.less +85 -0
- data/upstream/bootstrap/3.0.3/src/less/panels.less +182 -0
- data/upstream/bootstrap/3.0.3/src/less/popovers.less +133 -0
- data/upstream/bootstrap/3.0.3/src/less/print.less +105 -0
- data/upstream/bootstrap/3.0.3/src/less/progress-bars.less +80 -0
- data/upstream/bootstrap/3.0.3/src/less/responsive-utilities.less +209 -0
- data/upstream/bootstrap/3.0.3/src/less/scaffolding.less +119 -0
- data/upstream/bootstrap/3.0.3/src/less/tables.less +231 -0
- data/upstream/bootstrap/3.0.3/src/less/theme.less +247 -0
- data/upstream/bootstrap/3.0.3/src/less/thumbnails.less +36 -0
- data/upstream/bootstrap/3.0.3/src/less/tooltip.less +95 -0
- data/upstream/bootstrap/3.0.3/src/less/type.less +281 -0
- data/upstream/bootstrap/3.0.3/src/less/utilities.less +56 -0
- data/upstream/bootstrap/3.0.3/src/less/variables.less +642 -0
- data/upstream/bootstrap/3.0.3/src/less/wells.less +29 -0
- data/upstream/bootstrap/3.0.3/src/package.json +51 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap-theme.css +397 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap-theme.min.css +7 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap.css +7118 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap.min.css +7 -0
- data/upstream/font-awesome-4.0.3.zip +0 -0
- data/upstream/font-awesome/4.0.3/fonts/FontAwesome.otf +0 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.eot +0 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.svg +414 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.ttf +0 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.woff +0 -0
- data/upstream/font-awesome/4.0.3/stylesheets/font-awesome.css +1338 -0
- data/upstream/font-awesome/4.0.3/stylesheets/font-awesome.min.css +4 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/bordered-pulled.less +16 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/core.less +12 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/fixed-width.less +6 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/font-awesome.less +17 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/icons.less +412 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/larger.less +13 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/list.less +19 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/mixins.less +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/path.less +14 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/rotated-flipped.less +9 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/spinning.less +30 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/stacked.less +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/variables.less +381 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_bordered-pulled.scss +16 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_core.scss +12 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_fixed-width.scss +6 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_icons.scss +412 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_larger.scss +13 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_list.scss +19 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_mixins.scss +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_path.scss +14 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_rotated-flipped.scss +9 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_spinning.scss +30 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_stacked.scss +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_variables.scss +381 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/font-awesome.scss +17 -0
- metadata +505 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Button Toolbar
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class ButtonToolbar < WrapIt::Container
|
10
|
+
html_class 'btn-toolbar'
|
11
|
+
|
12
|
+
child :button_group, 'BootstrapIt::ViewHelpers::ButtonGroup'
|
13
|
+
alias_method :group, :button_group
|
14
|
+
|
15
|
+
after_initialize { @options[:role] = 'toolbar' }
|
16
|
+
end
|
17
|
+
|
18
|
+
WrapIt.register :button_toolbar, 'BootstrapIt::ViewHelpers::ButtonToolbar'
|
19
|
+
WrapIt.register :toolbar, 'BootstrapIt::ViewHelpers::ButtonToolbar'
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Dropdown Menu
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class DropdownMenu < WrapIt::Container
|
10
|
+
default_tag 'ul'
|
11
|
+
html_class 'dropdown-menu'
|
12
|
+
|
13
|
+
child :divider, ListItem,
|
14
|
+
[tag: 'li', class: 'divider', role: 'presentation']
|
15
|
+
child :header, ListItem,
|
16
|
+
[tag: 'li', class: 'dropdown-header', role: 'presentation']
|
17
|
+
child :link_item, ListLinkItem,
|
18
|
+
[li_role: 'presentation', role: 'menuitem', tabindex: '-1']
|
19
|
+
|
20
|
+
after_initialize do
|
21
|
+
@options['role'] = 'menu'
|
22
|
+
if @options.delete(:align).to_s.downcase == 'right'
|
23
|
+
add_html_class('pull-right')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
WrapIt.register :dropdown_menu, 'BootstrapIt::ViewHelpers::DropdownMenu'
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Input
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class Input < WrapIt::Base
|
10
|
+
include WrapIt::TextContainer
|
11
|
+
TYPES = %w(text password datetime datetime-local date month time
|
12
|
+
week number email url search tel color hidden)
|
13
|
+
html_class 'form-control'
|
14
|
+
|
15
|
+
after_initialize do
|
16
|
+
@tag = 'input'
|
17
|
+
@options.key?(:type) &&
|
18
|
+
TYPES.include?(@options[:type].to_s.downcase) ||
|
19
|
+
@options[:type] = 'text'
|
20
|
+
@saved_args = @arguments.clone
|
21
|
+
end
|
22
|
+
|
23
|
+
before_render do
|
24
|
+
@options.key?(:value) || @options[:value] = @content
|
25
|
+
@content = empty_html
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# FormLabel
|
31
|
+
#
|
32
|
+
# @author [alexiss]
|
33
|
+
#
|
34
|
+
class FormLabel < WrapIt::Base
|
35
|
+
include WrapIt::TextContainer
|
36
|
+
include SizableColumn
|
37
|
+
include PlacableColumn
|
38
|
+
default_tag 'label'
|
39
|
+
html_class 'form-label'
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# FormGroup
|
44
|
+
#
|
45
|
+
# @author [alexiss]
|
46
|
+
#
|
47
|
+
class FormGroup < WrapIt::Container
|
48
|
+
html_class 'form-group'
|
49
|
+
|
50
|
+
child :input, 'BootstrapIt::ViewHelpers::Input' do |input|
|
51
|
+
input_args = input.instance_variable_get(:@saved_args)
|
52
|
+
@control_size = input_args.extract!(
|
53
|
+
Symbol, and: [SizableColumn::COLUMN_SIZE_REGEXP]
|
54
|
+
)
|
55
|
+
@control_place = input_args.extract!(
|
56
|
+
Symbol, and: [PlacableColumn::COLUMN_PLACE_REGEXP]
|
57
|
+
)
|
58
|
+
@control_size.empty? && @control_size = @form.control_size
|
59
|
+
|
60
|
+
label_args = input.options.delete(:label)
|
61
|
+
unless label_args.nil?
|
62
|
+
label_args.is_a?(Array) || label_args = [label_args]
|
63
|
+
@label = FormLabel.new(@template, *label_args)
|
64
|
+
if @form.kind == :horizontal && !@label.column_size_defined?
|
65
|
+
@label.column_size = @form.label_size
|
66
|
+
end
|
67
|
+
unless input.options[:id].nil?
|
68
|
+
@label.options[:label_for] = input.options[:id]
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
after_initialize do
|
74
|
+
@form = @options.delete :form
|
75
|
+
# @form.is_a? Form || fail(
|
76
|
+
# ArgumentError,
|
77
|
+
# 'Required option `form` for `form_group` is not specified'
|
78
|
+
# )
|
79
|
+
end
|
80
|
+
|
81
|
+
after_capture do
|
82
|
+
if @form.kind == :horizontal
|
83
|
+
input_wrapper = Base.new(@template)
|
84
|
+
input_wrapper.extend SizableColumn
|
85
|
+
input_wrapper.extend PlacableColumn
|
86
|
+
input_wrapper.column_size = @control_size
|
87
|
+
input_wrapper.column_place = @control_place
|
88
|
+
@content = capture { input_wrapper.render(@content) }
|
89
|
+
end
|
90
|
+
@label.nil? || @content = capture { @label.render } + @content
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
#
|
95
|
+
# Form
|
96
|
+
#
|
97
|
+
# @author [alexiss]
|
98
|
+
#
|
99
|
+
class Form < WrapIt::Container
|
100
|
+
DEFAULT_LABEL_SIZE = %i(xs2 sm2 md2 lg2)
|
101
|
+
DEFAULT_CONTROL_SIZE = %i(xs10 sm10 md10 lg10)
|
102
|
+
|
103
|
+
html_class_prefix 'form-'
|
104
|
+
|
105
|
+
enum :kind, %i[inline horizontal], html_class: true
|
106
|
+
|
107
|
+
attr_reader :label_size
|
108
|
+
attr_reader :control_size
|
109
|
+
|
110
|
+
def input(*args, &block)
|
111
|
+
group = BootstrapIt::ViewHelpers::FormGroup.new(@template, form: self)
|
112
|
+
group.input(*args, &block)
|
113
|
+
end
|
114
|
+
|
115
|
+
after_initialize do
|
116
|
+
@options[:role] = 'form'
|
117
|
+
@tag = 'form'
|
118
|
+
if kind == :horizontal
|
119
|
+
@label_size = options.delete(:label_size) || DEFAULT_LABEL_SIZE
|
120
|
+
@control_size = options.delete(:control_size) || DEFAULT_CONTROL_SIZE
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
WrapIt.register :form, 'BootstrapIt::ViewHelpers::Form'
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Grid
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class Grid < WrapIt::Container
|
10
|
+
html_class 'container'
|
11
|
+
child :row, 'BootstrapIt::ViewHelpers::GridRow'
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# GridRow
|
16
|
+
#
|
17
|
+
# @author [alexiss]
|
18
|
+
#
|
19
|
+
class GridRow < WrapIt::Container
|
20
|
+
#
|
21
|
+
# Clearfix
|
22
|
+
#
|
23
|
+
# @author [alexiss]
|
24
|
+
#
|
25
|
+
class Clearfix < WrapIt::Base
|
26
|
+
TYPES = %w(visible-xs visible-sm visible-md visible-lg
|
27
|
+
hidden-xs hidden-sm hidden-md hidden-lg)
|
28
|
+
REGEXP = /\A
|
29
|
+
(?:visible|hidden)
|
30
|
+
[-_]?
|
31
|
+
(?:(?:extra[-_]?small)|xs|small|sm|medium|md|large|lg)
|
32
|
+
\z/xi
|
33
|
+
html_class 'clearfix'
|
34
|
+
after_initialize do
|
35
|
+
type = @arguments.extract_first!(Symbol, String, and: [REGEXP]) ||
|
36
|
+
'visible-md'
|
37
|
+
type ||= @options[:type]
|
38
|
+
@options.delete(:type)
|
39
|
+
type = type.to_s.downcase
|
40
|
+
.gsub(/_/, '-')
|
41
|
+
.gsub(/extra-?small/, 'xs')
|
42
|
+
.gsub(/small/, 'sm')
|
43
|
+
.gsub(/medium/, 'md')
|
44
|
+
.gsub(/large/, 'lg')
|
45
|
+
TYPES.include?(type) || type = 'visible-md'
|
46
|
+
add_html_class type
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
html_class 'row'
|
51
|
+
child :cell, 'BootstrapIt::ViewHelpers::GridCell'
|
52
|
+
child :clear, 'BootstrapIt::ViewHelpers::GridRow::Clearfix'
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# GridCell
|
57
|
+
#
|
58
|
+
# @author [alexiss]
|
59
|
+
#
|
60
|
+
class GridCell < WrapIt::Container
|
61
|
+
include SizableColumn
|
62
|
+
include PlacableColumn
|
63
|
+
include WrapIt::TextContainer
|
64
|
+
|
65
|
+
default_tag 'div'
|
66
|
+
child :row, 'BootstrapIt::ViewHelpers::GridRow'
|
67
|
+
|
68
|
+
before_capture do
|
69
|
+
column_size_defined? || add_html_class('col-md-3')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
WrapIt.register :grid, 'BootstrapIt::ViewHelpers::Grid'
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Icon
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class Icon < WrapIt::Base
|
10
|
+
omit_content
|
11
|
+
|
12
|
+
after_initialize do
|
13
|
+
@tag = 'i'
|
14
|
+
@icon = @arguments.extract_first!(Symbol, String)
|
15
|
+
@icon.nil? && @icon = 'asterisk'
|
16
|
+
@icon = @icon.to_s
|
17
|
+
prefix = BootstrapIt.config.font_awesome ? 'fa' : 'glyphicon'
|
18
|
+
add_html_class [prefix, "#{prefix}-#{@icon}"]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
WrapIt.register :icon, 'BootstrapIt::ViewHelpers::Icon'
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# ListItem
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class ListItem < WrapIt::Base
|
10
|
+
default_tag 'li'
|
11
|
+
|
12
|
+
include Activable
|
13
|
+
include Disableable
|
14
|
+
include WrapIt::TextContainer
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
#
|
19
|
+
# ListLinkItem
|
20
|
+
#
|
21
|
+
# @author [alexiss]
|
22
|
+
#
|
23
|
+
class ListLinkItem < WrapIt::Link
|
24
|
+
REGEXP = /\Ali_/
|
25
|
+
after_initialize do
|
26
|
+
li_options = @options[:li] || @options[:li_options] || {}
|
27
|
+
@options.delete(:li)
|
28
|
+
@options.delete(:li_options)
|
29
|
+
@options.keys.select { |o| REGEXP =~ o }.each do |k|
|
30
|
+
li_options[k[3..-1].to_sym] = @options.delete(k)
|
31
|
+
end
|
32
|
+
@options.key?(:active) &&
|
33
|
+
li_options[:active] = @options.delete(:active)
|
34
|
+
@options.key?(:disabled) &&
|
35
|
+
li_options[:disabled] = @options.delete(:disabled)
|
36
|
+
@options.key?(:disable) &&
|
37
|
+
li_options[:disabled] = @options.delete(:disable)
|
38
|
+
li_args = @arguments.extract!(
|
39
|
+
Symbol,
|
40
|
+
and: [:active, :disabled, :disable, REGEXP]
|
41
|
+
).map { |a| REGEXP =~ a ? a.to_s[3..-1].to_sym : a }
|
42
|
+
li_args << li_options
|
43
|
+
wrap ListItem, *li_args
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Jumbotron
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class Jumbotron < WrapIt::Base
|
10
|
+
html_class 'jumbotron'
|
11
|
+
switch :full_width
|
12
|
+
|
13
|
+
after_capture do
|
14
|
+
full_width? && @content = content_tag(
|
15
|
+
'div', @content, class: 'container'
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# PageHeader
|
22
|
+
#
|
23
|
+
# @author [alexiss]
|
24
|
+
#
|
25
|
+
class PageHeader < WrapIt::Base
|
26
|
+
html_class 'page-header'
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# Alert
|
31
|
+
#
|
32
|
+
# @author [alexiss]
|
33
|
+
#
|
34
|
+
class Alert < WrapIt::Container
|
35
|
+
include WrapIt::TextContainer
|
36
|
+
|
37
|
+
default_tag 'div'
|
38
|
+
html_class 'alert'
|
39
|
+
html_class_prefix 'alert-'
|
40
|
+
enum :appearence, %i(success info warning danger),
|
41
|
+
default: :success, html_class: true
|
42
|
+
switch :dismissable, html_class: true
|
43
|
+
child :link, 'WrapIt::Link', [class: 'alert-link']
|
44
|
+
|
45
|
+
before_render do
|
46
|
+
if dismissable?
|
47
|
+
@content = content_tag(
|
48
|
+
'button',
|
49
|
+
html_safe('×'),
|
50
|
+
type: 'button',
|
51
|
+
class: 'close',
|
52
|
+
data: {dismiss: 'alert'},
|
53
|
+
'aria-hidden' => true
|
54
|
+
) + @content
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# ProgressBar
|
61
|
+
#
|
62
|
+
# @author [alexiss]
|
63
|
+
#
|
64
|
+
class ProgressBar < WrapIt::Base
|
65
|
+
include WrapIt::TextContainer
|
66
|
+
|
67
|
+
default_tag 'div'
|
68
|
+
html_class 'progress-bar'
|
69
|
+
html_class_prefix 'progress-bar-'
|
70
|
+
|
71
|
+
enum :appearence, %i[success info warning danger],
|
72
|
+
html_class: true
|
73
|
+
|
74
|
+
after_initialize do
|
75
|
+
@completed = @arguments.extract_first!(Numeric)
|
76
|
+
if @options[:completed].is_a?(Numeric)
|
77
|
+
@completed = @options.delete(:completed)
|
78
|
+
end
|
79
|
+
@completed ||= 0
|
80
|
+
@completed = @completed.round
|
81
|
+
@options[:role] = 'progressbar'
|
82
|
+
@options['aria-valuenow'.to_sym] = @completed
|
83
|
+
@options['aria-valuemin'.to_sym] = 0
|
84
|
+
@options['aria-valuemax'.to_sym] = 100
|
85
|
+
@options[:style] = "width: #{@completed}%"
|
86
|
+
end
|
87
|
+
|
88
|
+
before_render do
|
89
|
+
text =
|
90
|
+
if @content.empty?
|
91
|
+
I18n.translate(
|
92
|
+
'bootstrap_it.progress_bar.text', completed: @completed
|
93
|
+
)
|
94
|
+
else
|
95
|
+
@content
|
96
|
+
end
|
97
|
+
@content = content_tag('span', text, class: 'sr-only')
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
#
|
102
|
+
# Progress
|
103
|
+
#
|
104
|
+
# @author [alexiss]
|
105
|
+
#
|
106
|
+
class Progress < WrapIt::Container
|
107
|
+
include Activable
|
108
|
+
|
109
|
+
html_class 'progress'
|
110
|
+
html_class_prefix 'progress-'
|
111
|
+
|
112
|
+
child :bar, 'BootstrapIt::ViewHelpers::ProgressBar'
|
113
|
+
|
114
|
+
switch :striped, html_class: true
|
115
|
+
|
116
|
+
after_initialize do
|
117
|
+
@first_bar_args = @arguments.clone
|
118
|
+
# TODO: PORTABILITY: replace deep_dup (Rails)
|
119
|
+
opts = @options.deep_dup
|
120
|
+
opts[:class].select! { |o| o != 'progress' && o != 'progress-striped' }
|
121
|
+
@first_bar_args.push(opts)
|
122
|
+
end
|
123
|
+
|
124
|
+
after_capture do
|
125
|
+
@content = capture do
|
126
|
+
ProgressBar.new(@template, *@first_bar_args).render
|
127
|
+
end + @content
|
128
|
+
end
|
129
|
+
|
130
|
+
# after_capture do
|
131
|
+
# @content = capture do
|
132
|
+
# @bars.reduce(empty_html) { |a, e| a += e.render }
|
133
|
+
# end + @content
|
134
|
+
# end
|
135
|
+
end
|
136
|
+
|
137
|
+
WrapIt.register :jumbotron, 'BootstrapIt::ViewHelpers::Jumbotron'
|
138
|
+
WrapIt.register :jumbo, 'BootstrapIt::ViewHelpers::Jumbotron'
|
139
|
+
WrapIt.register :page_header, 'BootstrapIt::ViewHelpers::PageHeader'
|
140
|
+
WrapIt.register :alert_box, 'BootstrapIt::ViewHelpers::Alert'
|
141
|
+
WrapIt.register :progress_bar, 'BootstrapIt::ViewHelpers::Progress'
|
142
|
+
WrapIt.register :progress, 'BootstrapIt::ViewHelpers::Progress'
|
143
|
+
end
|
144
|
+
end
|