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,279 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# SizableColumn
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
module SizableColumn
|
10
|
+
extend ActiveSupport::Concern
|
11
|
+
|
12
|
+
COLUMN_SIZE_REGEXP = /\A
|
13
|
+
(?:col[-_]?)?
|
14
|
+
(?<size>(?:
|
15
|
+
xs
|
16
|
+
|(?:extra[-_]?small))
|
17
|
+
|(?:sm|small)
|
18
|
+
|(?:md|medium)
|
19
|
+
|(?:lg|large)
|
20
|
+
)
|
21
|
+
[-_]?
|
22
|
+
(?<num>\d{1,2}
|
23
|
+
)\z/x
|
24
|
+
|
25
|
+
included do
|
26
|
+
after_initialize do
|
27
|
+
@arguments.extract!(
|
28
|
+
Symbol, and: [COLUMN_SIZE_REGEXP]
|
29
|
+
).each { |arg| add_column_size(arg) }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def column_size=(value)
|
34
|
+
if value.is_a?(Array)
|
35
|
+
value.each { |v| add_column_size(v) }
|
36
|
+
else
|
37
|
+
add_column_size(value)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def column_size_defined?
|
42
|
+
html_class?(/^col-(xs|sm|md|lg)-\d{1,2}/)
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def add_column_size(value)
|
48
|
+
m = COLUMN_SIZE_REGEXP.match(value.to_s)
|
49
|
+
size = ViewHelpers::COLUMN_SIZES[m[:size][0]]
|
50
|
+
unless html_class?(/^col-#{size}-\d{1,2}/)
|
51
|
+
add_html_class("col-#{size}-#{m[:num]}")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# PlacableColumn
|
58
|
+
#
|
59
|
+
# @author [alexiss]
|
60
|
+
#
|
61
|
+
module PlacableColumn
|
62
|
+
extend ActiveSupport::Concern
|
63
|
+
|
64
|
+
COLUMN_PLACE_REGEXP = /\A
|
65
|
+
(?:col[-_]?)?
|
66
|
+
(?<size>(?:
|
67
|
+
xs
|
68
|
+
|(?:extra[-_]?small))
|
69
|
+
|(?:sm|small)
|
70
|
+
|(?:md|medium)
|
71
|
+
|(?:lg|large)
|
72
|
+
)
|
73
|
+
[-_]?
|
74
|
+
(?<act>offset|push|pull)
|
75
|
+
[-_]?
|
76
|
+
(?<num>\d{1,2})
|
77
|
+
\z/x
|
78
|
+
|
79
|
+
included do
|
80
|
+
after_initialize do
|
81
|
+
@arguments.extract!(
|
82
|
+
Symbol, {and: [COLUMN_PLACE_REGEXP]}
|
83
|
+
).each { |arg| add_column_place(arg) }
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def column_place=(value)
|
88
|
+
if value.is_a?(Array)
|
89
|
+
value.each { |v| add_column_place(v) }
|
90
|
+
else
|
91
|
+
add_column_place(value)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def column_offset_defined?
|
96
|
+
html_class?(/^col-(xs|sm|md|lg)-offset-\d{1,2}/)
|
97
|
+
end
|
98
|
+
|
99
|
+
def column_push_defined?
|
100
|
+
html_class?(/^col-(xs|sm|md|lg)-push-\d{1,2}/)
|
101
|
+
end
|
102
|
+
|
103
|
+
def column_pull_defined?
|
104
|
+
html_class?(/^col-(xs|sm|md|lg)-pull-\d{1,2}/)
|
105
|
+
end
|
106
|
+
|
107
|
+
def column_place_defined?
|
108
|
+
column_offset_defined? || column_push_defined? || column_pull_defined?
|
109
|
+
end
|
110
|
+
|
111
|
+
private
|
112
|
+
|
113
|
+
def add_column_place(value)
|
114
|
+
m = COLUMN_PLACE_REGEXP.match(value.to_s)
|
115
|
+
size = ViewHelpers::COLUMN_SIZES[m[:size][0]]
|
116
|
+
unless html_class?(/^col-#{size}-#{m[:act]}-\d{1,2}/)
|
117
|
+
add_html_class("col-#{size}-#{m[:act]}-#{m[:num]}")
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
#
|
123
|
+
# Contextual
|
124
|
+
#
|
125
|
+
# @author [alexiss]
|
126
|
+
#
|
127
|
+
module Contextual
|
128
|
+
extend ActiveSupport::Concern
|
129
|
+
included do
|
130
|
+
enum :state, %i[active success warning danger], html_class_prefix: ''
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
#
|
135
|
+
# Activable
|
136
|
+
#
|
137
|
+
# @author [alexiss]
|
138
|
+
#
|
139
|
+
module Activable
|
140
|
+
extend ActiveSupport::Concern
|
141
|
+
included do
|
142
|
+
switch :active, html_class: 'active'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
#
|
147
|
+
# Disablable
|
148
|
+
#
|
149
|
+
# @author [alexiss]
|
150
|
+
#
|
151
|
+
module Disableable
|
152
|
+
extend ActiveSupport::Concern
|
153
|
+
included do
|
154
|
+
switch :disabled, aliases: [:disable] do |value|
|
155
|
+
if value
|
156
|
+
if @tag == 'button'
|
157
|
+
@options[:disabled] = 'disabled'
|
158
|
+
else
|
159
|
+
add_html_class('disabled')
|
160
|
+
end
|
161
|
+
else
|
162
|
+
if @tag == 'button'
|
163
|
+
@options.delete(:disabled)
|
164
|
+
else
|
165
|
+
remove_html_class('disabled')
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
#
|
173
|
+
# Sizable
|
174
|
+
#
|
175
|
+
# @author [alexiss]
|
176
|
+
#
|
177
|
+
module Sizable
|
178
|
+
extend ActiveSupport::Concern
|
179
|
+
included do
|
180
|
+
after_initialize do
|
181
|
+
prefix = html_class_prefix
|
182
|
+
re = prefix.empty? ? '' : "(#{prefix.gsub(/[-_]/, '[_-]')})?"
|
183
|
+
skip = html_class?(/^#{html_class_prefix}(xs|sm|lg)$/)
|
184
|
+
unless skip || @arguments.extract!(
|
185
|
+
Symbol, and: [/^#{re}(sm|small)$/]
|
186
|
+
).empty?
|
187
|
+
add_html_class("#{html_class_prefix}sm")
|
188
|
+
skip = true
|
189
|
+
end
|
190
|
+
unless skip || @arguments.extract!(
|
191
|
+
Symbol, and: [/^#{re}(lg|large)$/]
|
192
|
+
).empty?
|
193
|
+
add_html_class("#{html_class_prefix}lg")
|
194
|
+
skip = true
|
195
|
+
end
|
196
|
+
unless skip || @arguments.extract!(
|
197
|
+
Symbol, and: [/^#{re}((xs)|(extra[-_]?small))$/]
|
198
|
+
).empty?
|
199
|
+
add_html_class("#{html_class_prefix}xs")
|
200
|
+
skip = true
|
201
|
+
end
|
202
|
+
if @options.key?(:size)
|
203
|
+
size = @options.delete(:size)
|
204
|
+
unless skip
|
205
|
+
case size
|
206
|
+
when /^#{re}(sm|small)$/
|
207
|
+
add_html_class("#{html_class_prefix}sm")
|
208
|
+
when /^#{re}(lg|large)$/
|
209
|
+
add_html_class("#{html_class_prefix}lg")
|
210
|
+
when /^#{re}((xs)|(extra[-_]?small))$/
|
211
|
+
add_html_class("#{html_class_prefix}xs")
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
# Justifable
|
221
|
+
#
|
222
|
+
# @author [alexiss]
|
223
|
+
#
|
224
|
+
module Justifable
|
225
|
+
extend ActiveSupport::Concern
|
226
|
+
included do
|
227
|
+
switch :justified, aliases: [:justify], html_class: true
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
#
|
232
|
+
# DropdownMenuWrapper
|
233
|
+
#
|
234
|
+
# @author [alexiss]
|
235
|
+
#
|
236
|
+
module DropdownMenuWrapper
|
237
|
+
extend ActiveSupport::Concern
|
238
|
+
|
239
|
+
included do |base|
|
240
|
+
# puts "--- #{base.name}"
|
241
|
+
base <= WrapIt::Container || fail(
|
242
|
+
TypeError, 'Can be included only into WrapIt::Container subclasses'
|
243
|
+
)
|
244
|
+
# delegate :divider, :header, :link_item, to: :dropdown_menu
|
245
|
+
child :dropdown_menu, 'BootstrapIt::ViewHelpers::DropdownMenu'
|
246
|
+
after_initialize do
|
247
|
+
@dropdown_items = []
|
248
|
+
end
|
249
|
+
after_render do
|
250
|
+
unless @dropdown_items.empty?
|
251
|
+
@content += capture do
|
252
|
+
items = @dropdown_items
|
253
|
+
dropdown_menu do |menu|
|
254
|
+
items.each { |item| menu.send(item[0], *item[1], &item[2]) }
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
def header(*args, &block)
|
262
|
+
@dropdown_items << [:header, args, block]
|
263
|
+
end
|
264
|
+
|
265
|
+
def divider(*args, &block)
|
266
|
+
@dropdown_items << [:divider, args, block]
|
267
|
+
end
|
268
|
+
|
269
|
+
def link_item(*args, &block)
|
270
|
+
@dropdown_items << [:link_item, args, block]
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
protected
|
275
|
+
|
276
|
+
COLUMN_SIZES = {'x' => 'xs', 'e' => 'xs', 's' => 'sm',
|
277
|
+
'm' => 'md', 'l' => 'lg'}
|
278
|
+
end
|
279
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# DropdownNavItem
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class DropdownNavItem < WrapIt::Container
|
10
|
+
include WrapIt::TextContainer
|
11
|
+
include Activable
|
12
|
+
include Disableable
|
13
|
+
include DropdownMenuWrapper
|
14
|
+
|
15
|
+
default_tag 'li'
|
16
|
+
html_class 'dropdown'
|
17
|
+
|
18
|
+
after_capture do
|
19
|
+
# TODO: TextContainer should include body into content, but content
|
20
|
+
# empty at this point
|
21
|
+
@content += @body.html_safe unless @body.nil?
|
22
|
+
body = @content + html_safe(' ') +
|
23
|
+
content_tag('span', '', class: 'caret')
|
24
|
+
# TODO: Replace 'link_to'
|
25
|
+
@content = @template.link_to(
|
26
|
+
body, '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'}
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Nav
|
33
|
+
#
|
34
|
+
# @author [alexiss]
|
35
|
+
#
|
36
|
+
class Nav < WrapIt::Container
|
37
|
+
include Justifable
|
38
|
+
|
39
|
+
html_class 'nav'
|
40
|
+
default_tag 'ul'
|
41
|
+
|
42
|
+
child :link_item, ListLinkItem
|
43
|
+
child :dropdown, DropdownNavItem
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# NavPills
|
48
|
+
#
|
49
|
+
# @author [alexiss]
|
50
|
+
#
|
51
|
+
class NavPills < Nav
|
52
|
+
default_tag 'ul'
|
53
|
+
switch :stacked, html_class: 'nav-stacked'
|
54
|
+
html_class 'nav-pills'
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# NavTabs
|
59
|
+
#
|
60
|
+
# @author [alexiss]
|
61
|
+
#
|
62
|
+
class NavTabs < Nav
|
63
|
+
default_tag 'ul'
|
64
|
+
html_class 'nav-tabs'
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# NavBar
|
69
|
+
#
|
70
|
+
# @author [alexiss]
|
71
|
+
#
|
72
|
+
class NavBar < WrapIt::Container
|
73
|
+
default_tag 'nav'
|
74
|
+
html_class 'navbar'
|
75
|
+
html_class_prefix 'navbar-'
|
76
|
+
|
77
|
+
enum :position, %i[fixed-top fixed-bottom static-top], html_class: true
|
78
|
+
enum :type, %i[default inverse], default: :default, html_class: true
|
79
|
+
|
80
|
+
after_initialize do
|
81
|
+
@options[:role] = 'navigation'
|
82
|
+
end
|
83
|
+
|
84
|
+
child :button, 'BootstrapIt::ViewHelpers::Button', [class: 'navbar-btn']
|
85
|
+
child :text, 'BootstrapIt::ViewHelpers::Text', [class: 'navbar-text']
|
86
|
+
alias_method :p, :text
|
87
|
+
child :span, 'BootstrapIt::ViewHelpers::Text', [class: 'navbar-text']
|
88
|
+
end
|
89
|
+
|
90
|
+
WrapIt.register :nav_pills, 'BootstrapIt::ViewHelpers::NavPills'
|
91
|
+
WrapIt.register :pills, 'BootstrapIt::ViewHelpers::NavPills'
|
92
|
+
WrapIt.register :nav_tabs, 'BootstrapIt::ViewHelpers::NavTabs'
|
93
|
+
WrapIt.register :tabs, 'BootstrapIt::ViewHelpers::NavTabs'
|
94
|
+
WrapIt.register :navbar, 'BootstrapIt::ViewHelpers::NavBar'
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Pagination
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class Pagination < WrapIt::Container
|
10
|
+
include Sizable
|
11
|
+
|
12
|
+
default_tag 'ul'
|
13
|
+
html_class 'pagination'
|
14
|
+
|
15
|
+
child :link_item, ListLinkItem
|
16
|
+
end
|
17
|
+
|
18
|
+
#
|
19
|
+
# Pager
|
20
|
+
#
|
21
|
+
# @author [alexiss]
|
22
|
+
#
|
23
|
+
class Pager < WrapIt::Container
|
24
|
+
default_tag 'ul'
|
25
|
+
html_class 'pager'
|
26
|
+
child :link_item, ListLinkItem
|
27
|
+
child :previous, ListLinkItem, [li_class: 'previous']
|
28
|
+
child :next, ListLinkItem, [li_class: 'next']
|
29
|
+
end
|
30
|
+
|
31
|
+
WrapIt.register :pagination, 'BootstrapIt::ViewHelpers::Pagination'
|
32
|
+
WrapIt.register :pager, 'BootstrapIt::ViewHelpers::Pager'
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module BootstrapIt
|
2
|
+
#
|
3
|
+
module ViewHelpers
|
4
|
+
#
|
5
|
+
# Table
|
6
|
+
#
|
7
|
+
# @author [alexiss]
|
8
|
+
#
|
9
|
+
class Table < WrapIt::Container
|
10
|
+
html_class 'table'
|
11
|
+
html_class_prefix 'table-'
|
12
|
+
|
13
|
+
switch :striped, html_class: true
|
14
|
+
switch :bordered, html_class: true
|
15
|
+
switch :hover, html_class: true
|
16
|
+
switch :condensed, html_class: true
|
17
|
+
switch :responsive do |value|
|
18
|
+
value && wrap(class: 'table-responsive')
|
19
|
+
end
|
20
|
+
|
21
|
+
child :row, 'BootstrapIt::ViewHelpers::TableRow'
|
22
|
+
|
23
|
+
after_initialize { @tag = 'table' }
|
24
|
+
|
25
|
+
# TODO: remove it since WrapIt 0.1.5
|
26
|
+
def unwrap
|
27
|
+
@wrapper = nil
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# TableRow
|
33
|
+
#
|
34
|
+
# @author [alexiss]
|
35
|
+
#
|
36
|
+
class TableRow < WrapIt::Container
|
37
|
+
include Contextual
|
38
|
+
|
39
|
+
child :cell, 'BootstrapIt::ViewHelpers::TableCell'
|
40
|
+
alias_method :td, :cell
|
41
|
+
|
42
|
+
child :head, 'BootstrapIt::ViewHelpers::TableCell', [tag: 'th']
|
43
|
+
alias_method :th, :head
|
44
|
+
alias_method :header, :head
|
45
|
+
|
46
|
+
after_initialize { @tag = 'tr' }
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# TableCell
|
51
|
+
#
|
52
|
+
# @author [alexiss]
|
53
|
+
#
|
54
|
+
class TableCell < WrapIt::Base
|
55
|
+
include WrapIt::TextContainer
|
56
|
+
include SizableColumn
|
57
|
+
include Contextual
|
58
|
+
|
59
|
+
after_initialize do
|
60
|
+
header = !@arguments.extract_first!([:header, :head, :th]).nil?
|
61
|
+
header ||= @options[:header] == true || @options[:head] == true ||
|
62
|
+
@options[:th] == true
|
63
|
+
@options.delete(:header)
|
64
|
+
@options.delete(:head)
|
65
|
+
@options.delete(:th)
|
66
|
+
@tag = header || @tag == 'th' ? 'th' : 'td'
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
WrapIt.register :table, 'BootstrapIt::ViewHelpers::Table'
|
71
|
+
end
|
72
|
+
end
|