locomotivecms_wagon 1.4.0 → 1.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +6 -2
- data/README.md +7 -1
- data/bin/wagon +3 -0
- data/generators/blank/Gemfile.tt +1 -3
- data/generators/blank/config/site.yml.tt +3 -3
- data/generators/bootstrap/config/site.yml.tt +3 -3
- data/generators/bootstrap3/Gemfile.tt +1 -3
- data/generators/bootstrap3/app/views/pages/index.liquid +21 -63
- data/generators/bootstrap3/app/views/pages/index.liquid.haml +15 -57
- data/generators/bootstrap3/config/deploy.yml +15 -15
- data/generators/bootstrap3/config/site.yml.tt +2 -2
- data/generators/bootstrap3/icon.png +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.svg +201 -200
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/generators/{bootstrap2/app/content_types → bootstrap3/public/images}/.empty_directory +0 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/affix.js +137 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/alert.js +88 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/button.js +107 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/carousel.js +205 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/collapse.js +170 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/dropdown.js +147 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/modal.js +243 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/popover.js +110 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/scrollspy.js +153 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/tab.js +125 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/tooltip.js +399 -0
- data/generators/bootstrap3/public/javascripts/bootstrap/transition.js +48 -0
- data/generators/bootstrap3/public/javascripts/bootstrap.min.js +12 -6
- data/generators/bootstrap3/public/stylesheets/application.css +1 -0
- data/generators/bootstrap3/public/stylesheets/application.css.scss +8 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_alerts.scss +67 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_badges.scss +55 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_button-groups.scss +226 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_buttons.scss +159 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_carousel.scss +232 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_close.scss +35 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_code.scss +63 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_component-animations.scss +29 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_forms.scss +436 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_glyphicons.scss +233 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_grid.scss +84 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_input-groups.scss +162 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_jumbotron.scss +44 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_labels.scss +64 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_list-group.scss +110 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_media.scss +56 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_mixins.scss +947 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_modals.scss +139 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_navbar.scss +620 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_navs.scss +242 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_normalize.scss +423 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_pager.scss +55 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_pagination.scss +88 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_panels.scss +241 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_popovers.scss +133 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_print.scss +101 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_progress-bars.scss +80 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_responsive-utilities.scss +74 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_scaffolding.scss +134 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_tables.scss +233 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_theme.scss +247 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_tooltip.scss +95 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_type.scss +284 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_utilities.scss +56 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_variables.scss +833 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/_wells.scss +29 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap/bootstrap.css.scss +49 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap.css +2035 -3056
- data/generators/bootstrap3/public/stylesheets/bootstrap.css.scss +49 -0
- data/generators/cloned/Gemfile.tt +1 -3
- data/generators/content_type/app/content_types/%slug%.yml.tt +57 -0
- data/generators/content_type/data/{%name%.yml.tt → %slug%.yml.tt} +2 -2
- data/generators/{bootstrap2 → foundation5}/Gemfile.tt +1 -3
- data/generators/{bootstrap2/data → foundation5/app/content_types}/.empty_directory +0 -0
- data/generators/{foundation → foundation5}/app/views/pages/404.liquid +1 -4
- data/generators/{foundation → foundation5}/app/views/pages/404.liquid.haml +1 -1
- data/generators/foundation5/app/views/pages/index.liquid +196 -0
- data/generators/foundation5/app/views/pages/index.liquid.haml +157 -0
- data/generators/foundation5/config/deploy.yml +15 -0
- data/generators/{bootstrap2 → foundation5}/config/site.yml.tt +3 -4
- data/generators/{bootstrap2 → foundation5}/config/translations.yml +0 -0
- data/generators/{bootstrap2 → foundation5}/config.ru +0 -0
- data/generators/{bootstrap2/public/samples → foundation5/data}/.empty_directory +0 -0
- data/generators/foundation5/favicon.ico +0 -0
- data/generators/foundation5/icon.png +0 -0
- data/generators/{foundation/app/content_types → foundation5/public/fonts}/.empty_directory +0 -0
- data/generators/{foundation/data → foundation5/public/images}/.empty_directory +0 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.abide.js +299 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.accordion.js +59 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.alert.js +43 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.clearing.js +534 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.dropdown.js +311 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.equalizer.js +74 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.interchange.js +331 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.joyride.js +843 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.js +611 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.magellan.js +178 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.offcanvas.js +108 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.orbit.js +610 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.reveal.js +437 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.slider.js +199 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.tab.js +167 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.tooltip.js +298 -0
- data/generators/foundation5/public/javascripts/foundation/foundation.topbar.js +425 -0
- data/generators/foundation5/public/javascripts/foundation.js +4161 -0
- data/generators/foundation5/public/javascripts/foundation.min.js +10 -0
- data/generators/{foundation → foundation5}/public/javascripts/vendor/custom.modernizr.js +0 -0
- data/generators/foundation5/public/javascripts/vendor/custom.modernizr.min.js +1 -0
- data/generators/foundation5/public/javascripts/vendor/fastclick.js +9 -0
- data/generators/foundation5/public/javascripts/vendor/fastclick.min.js +11 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.js +645 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.min.js +1 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.cookie.js +8 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.cookie.min.js +8 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.js +26 -0
- data/generators/foundation5/public/javascripts/vendor/jquery.min.js +27 -0
- data/generators/foundation5/public/javascripts/vendor/modernizr.js +8 -0
- data/generators/foundation5/public/javascripts/vendor/modernizr.min.js +1 -0
- data/generators/foundation5/public/javascripts/vendor/placeholder.js +2 -0
- data/generators/foundation5/public/javascripts/vendor/placeholder.min.js +1 -0
- data/generators/{foundation/public/fonts → foundation5/public/samples}/.empty_directory +0 -0
- data/generators/foundation5/public/stylesheets/application.css +2 -0
- data/generators/foundation5/public/stylesheets/application.css.scss +3 -0
- data/generators/foundation5/public/stylesheets/foundation/_functions.scss +101 -0
- data/generators/foundation5/public/stylesheets/foundation/_settings.scss +1296 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_accordion.scss +53 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_alert-boxes.scss +126 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_block-grid.scss +132 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_breadcrumbs.scss +127 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_button-groups.scss +108 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_buttons.scss +222 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_clearing.scss +247 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_dropdown-buttons.scss +129 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_dropdown.scss +248 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_flex-video.scss +51 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_forms.scss +498 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_global.scss +434 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_grid.scss +260 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_inline-lists.scss +57 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_joyride.scss +220 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_keystrokes.scss +61 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_labels.scss +104 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_magellan.scss +34 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_offcanvas.scss +356 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_orbit.scss +423 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_pagination.scss +150 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_panels.scss +90 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_pricing-tables.scss +150 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_progress-bars.scss +79 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_range-slider.scss +148 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_reveal-new.scss +0 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_reveal.scss +216 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_side-nav.scss +115 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_split-buttons.scss +191 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_sub-nav.scss +125 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_switch.scss +294 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_tables.scss +129 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_tabs.scss +109 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_thumbs.scss +68 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_tooltips.scss +140 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_top-bar.scss +659 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_type.scss +513 -0
- data/generators/foundation5/public/stylesheets/foundation/components/_visibility.scss +408 -0
- data/generators/foundation5/public/stylesheets/foundation.css +5398 -0
- data/generators/foundation5/public/stylesheets/foundation.css.scss +45 -0
- data/generators/foundation5/public/stylesheets/normalize.css +425 -0
- data/generators/foundation5/public/stylesheets/normalize.css.scss +425 -0
- data/generators/{foundation → line_case}/Gemfile.tt +1 -3
- data/generators/line_case/app/content_types/categories.yml +56 -0
- data/generators/line_case/app/content_types/emails.yml +35 -0
- data/generators/line_case/app/content_types/projects.yml +58 -0
- data/generators/{bootstrap2 → line_case}/app/views/pages/404.liquid.haml +3 -2
- data/generators/line_case/app/views/pages/email-registered.liquid.haml +13 -0
- data/generators/line_case/app/views/pages/index.liquid.haml +110 -0
- data/generators/line_case/app/views/pages/projects/content_type_template.liquid.haml +32 -0
- data/generators/line_case/app/views/snippets/newsletter_form.liquid.haml +14 -0
- data/generators/line_case/app/views/snippets/projects.liquid.haml +17 -0
- data/generators/line_case/app/views/snippets/social_links.liquid.haml +19 -0
- data/generators/line_case/config/deploy.yml +15 -0
- data/generators/{foundation → line_case}/config/site.yml.tt +3 -3
- data/generators/{foundation → line_case}/config/translations.yml +0 -0
- data/generators/{foundation → line_case}/config.ru +0 -0
- data/generators/line_case/data/categories.yml +8 -0
- data/generators/line_case/data/emails.yml +2 -0
- data/generators/line_case/data/projects.yml +39 -0
- data/generators/line_case/icon.png +0 -0
- data/generators/line_case/public/images/banner-header.png +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.abide.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.alerts.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.clearing.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.cookie.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.dropdown.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.forms.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.interchange.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.joyride.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.magellan.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.orbit.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.placeholder.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.reveal.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.section.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.tooltips.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation/foundation.topbar.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/foundation.min.js +0 -0
- data/generators/line_case/public/javascripts/vendor/custom.modernizr.js +4 -0
- data/generators/{foundation → line_case}/public/javascripts/vendor/jquery.js +0 -0
- data/generators/{foundation → line_case}/public/javascripts/vendor/zepto.js +0 -0
- data/generators/line_case/public/samples/projects/sample.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample2.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample3.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample4.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample5.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample6.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample7.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample8.jpeg +0 -0
- data/generators/line_case/public/stylesheets/_variables.css.sass +20 -0
- data/generators/line_case/public/stylesheets/foundation/_variables.scss +1290 -0
- data/generators/line_case/public/stylesheets/foundation/components/_alert-boxes.scss +107 -0
- data/generators/line_case/public/stylesheets/foundation/components/_block-grid.scss +71 -0
- data/generators/line_case/public/stylesheets/foundation/components/_breadcrumbs.scss +124 -0
- data/generators/line_case/public/stylesheets/foundation/components/_button-groups.scss +89 -0
- data/generators/line_case/public/stylesheets/foundation/components/_buttons.scss +230 -0
- data/generators/line_case/public/stylesheets/foundation/components/_clearing.scss +227 -0
- data/generators/line_case/public/stylesheets/foundation/components/_custom-forms.scss +278 -0
- data/generators/line_case/public/stylesheets/foundation/components/_dropdown-buttons.scss +115 -0
- data/generators/line_case/public/stylesheets/foundation/components/_dropdown.scss +151 -0
- data/generators/line_case/public/stylesheets/foundation/components/_flex-video.scss +46 -0
- data/generators/line_case/public/stylesheets/foundation/components/_forms.scss +411 -0
- data/generators/line_case/public/stylesheets/foundation/components/_global.scss +366 -0
- data/generators/line_case/public/stylesheets/foundation/components/_grid-5.scss +214 -0
- data/generators/line_case/public/stylesheets/foundation/components/_grid.scss +188 -0
- data/generators/line_case/public/stylesheets/foundation/components/_inline-lists.scss +53 -0
- data/generators/line_case/public/stylesheets/foundation/components/_joyride.scss +217 -0
- data/generators/line_case/public/stylesheets/foundation/components/_keystrokes.scss +57 -0
- data/generators/line_case/public/stylesheets/foundation/components/_labels.scss +85 -0
- data/generators/line_case/public/stylesheets/foundation/components/_magellan.scss +23 -0
- data/generators/line_case/public/stylesheets/foundation/components/_orbit.scss +340 -0
- data/generators/line_case/public/stylesheets/foundation/components/_pagination.scss +140 -0
- data/generators/line_case/public/stylesheets/foundation/components/_panels.scss +83 -0
- data/generators/line_case/public/stylesheets/foundation/components/_pricing-tables.scss +131 -0
- data/generators/line_case/public/stylesheets/foundation/components/_progress-bars.scss +71 -0
- data/generators/line_case/public/stylesheets/foundation/components/_reveal.scss +136 -0
- data/generators/line_case/public/stylesheets/foundation/components/_section.scss +391 -0
- data/generators/line_case/public/stylesheets/foundation/components/_side-nav.scss +69 -0
- data/generators/line_case/public/stylesheets/foundation/components/_split-buttons.scss +167 -0
- data/generators/line_case/public/stylesheets/foundation/components/_sub-nav.scss +84 -0
- data/generators/line_case/public/stylesheets/foundation/components/_switch.scss +266 -0
- data/generators/line_case/public/stylesheets/foundation/components/_tables.scss +84 -0
- data/generators/line_case/public/stylesheets/foundation/components/_thumbs.scss +53 -0
- data/generators/line_case/public/stylesheets/foundation/components/_tooltips.scss +117 -0
- data/generators/line_case/public/stylesheets/foundation/components/_top-bar.scss +576 -0
- data/generators/line_case/public/stylesheets/foundation/components/_type.scss +435 -0
- data/generators/line_case/public/stylesheets/foundation/components/_visibility.scss +322 -0
- data/generators/line_case/public/stylesheets/foundation.css.scss +43 -0
- data/generators/{foundation → line_case}/public/stylesheets/foundation.min.css +0 -0
- data/generators/{foundation/public/stylesheets/normalize.css → line_case/public/stylesheets/normalize.css.scss} +5 -5
- data/generators/line_case/public/stylesheets/pages.css.sass +163 -0
- data/generators/page/template.liquid.haml.tt +8 -5
- data/generators/page/template.liquid.tt +6 -2
- data/lib/locomotive/wagon/cli.rb +139 -43
- data/lib/locomotive/wagon/generators/content_type.rb +26 -10
- data/lib/locomotive/wagon/generators/page.rb +41 -25
- data/lib/locomotive/wagon/generators/site/base.rb +53 -0
- data/lib/locomotive/wagon/generators/site/blank.rb +9 -2
- data/lib/locomotive/wagon/generators/site/bootstrap2.rb +8 -2
- data/lib/locomotive/wagon/generators/site/bootstrap3.rb +20 -2
- data/lib/locomotive/wagon/generators/site/cloned.rb +4 -0
- data/lib/locomotive/wagon/generators/site/{foundation.rb → foundation4.rb} +10 -4
- data/lib/locomotive/wagon/generators/site/foundation5.rb +48 -0
- data/lib/locomotive/wagon/generators/site/line_case.rb +20 -0
- data/lib/locomotive/wagon/generators/site/unzip.rb +10 -2
- data/lib/locomotive/wagon/generators/site.rb +48 -2
- data/lib/locomotive/wagon/generators/snippet.rb +2 -1
- data/lib/locomotive/wagon/liquid/drops/content_types.rb +9 -3
- data/lib/locomotive/wagon/liquid/drops/page.rb +9 -1
- data/lib/locomotive/wagon/liquid/scopeable.rb +1 -1
- data/lib/locomotive/wagon/liquid/tags/fetch_page.rb +41 -0
- data/lib/locomotive/wagon/liquid/tags/model_form.rb +67 -0
- data/lib/locomotive/wagon/liquid/tags/path_helper.rb +2 -2
- data/lib/locomotive/wagon/liquid/tags/with_scope.rb +1 -1
- data/lib/locomotive/wagon/listen.rb +18 -10
- data/lib/locomotive/wagon/logger.rb +4 -0
- data/lib/locomotive/wagon/misc/core_ext.rb +8 -0
- data/lib/locomotive/wagon/misc/deployment_connection.rb +120 -0
- data/lib/locomotive/wagon/misc/hosting_api.rb +115 -0
- data/lib/locomotive/wagon/misc/httparty.rb +2 -0
- data/lib/locomotive/wagon/misc/livereload.rb +43 -0
- data/lib/locomotive/wagon/misc/mounter.rb +1 -1
- data/lib/locomotive/wagon/misc/tcp_port.rb +42 -0
- data/lib/locomotive/wagon/misc/thor.rb +15 -0
- data/lib/locomotive/wagon/server/entry_submission.rb +69 -38
- data/lib/locomotive/wagon/server/middleware.rb +4 -2
- data/lib/locomotive/wagon/server/page.rb +2 -2
- data/lib/locomotive/wagon/server.rb +11 -7
- data/lib/locomotive/wagon/version.rb +1 -1
- data/lib/locomotive/wagon.rb +141 -30
- data/locomotivecms_wagon.gemspec +7 -6
- data/spec/fixtures/default/app/content_types/bands.yml +3 -1
- data/spec/fixtures/default/app/views/pages/all.liquid.haml +3 -0
- data/spec/fixtures/default/app/views/pages/events.liquid.haml +21 -0
- data/spec/fixtures/default/app/views/pages/filtered.liquid.haml +11 -1
- data/spec/fixtures/default/app/views/pages/index.liquid.haml +1 -1
- data/spec/fixtures/default/data/bands.yml +3 -0
- data/spec/integration/server/basic_spec.rb +1 -0
- data/spec/integration/server/contact_form_spec.rb +1 -1
- data/spec/integration/server/liquid_spec.rb +8 -1
- data/spec/integration/server/new_contact_form_spec.rb +67 -0
- data/spec/integration/server/with_scope_spec.rb +10 -0
- data/spec/spec_helper.rb +3 -0
- metadata +339 -144
- data/generators/bootstrap2/app/views/pages/404.liquid +0 -13
- data/generators/bootstrap2/app/views/pages/index.liquid +0 -98
- data/generators/bootstrap2/app/views/pages/index.liquid.haml +0 -80
- data/generators/bootstrap2/app/views/snippets/footer.liquid +0 -3
- data/generators/bootstrap2/app/views/snippets/footer.liquid.haml +0 -2
- data/generators/bootstrap2/config/deploy.yml +0 -15
- data/generators/bootstrap2/public/fonts/FontAwesome.otf +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.eot +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.svg +0 -399
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.ttf +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.woff +0 -0
- data/generators/bootstrap2/public/javascripts/bootstrap.js +0 -2280
- data/generators/bootstrap2/public/javascripts/bootstrap.min.js +0 -6
- data/generators/bootstrap2/public/stylesheets/application.css.scss +0 -39
- data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.css +0 -1109
- data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.min.css +0 -9
- data/generators/bootstrap2/public/stylesheets/bootstrap.css +0 -5568
- data/generators/bootstrap2/public/stylesheets/bootstrap.min.css +0 -9
- data/generators/bootstrap2/public/stylesheets/fonts/awesome.css.scss +0 -3
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.css +0 -1203
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.min.css +0 -384
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.css +0 -1470
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.min.css +0 -403
- data/generators/bootstrap3/public/javascripts/bootstrap.js +0 -1999
- data/generators/bootstrap3/public/stylesheets/bootstrap-theme.css +0 -384
- data/generators/bootstrap3/public/stylesheets/bootstrap-theme.min.css +0 -1
- data/generators/bootstrap3/public/stylesheets/bootstrap.min.css +0 -9
- data/generators/content_type/app/content_types/%name%.yml.tt +0 -58
- data/generators/foundation/app/views/pages/index.liquid +0 -150
- data/generators/foundation/app/views/pages/index.liquid.haml +0 -125
- data/generators/foundation/app/views/snippets/footer.liquid +0 -16
- data/generators/foundation/app/views/snippets/footer.liquid.haml +0 -22
- data/generators/foundation/config/deploy.yml +0 -15
- data/generators/foundation/public/samples/.empty_directory +0 -1
- data/generators/foundation/public/stylesheets/foundation.css +0 -4727
Binary file
|
Binary file
|
File without changes
|
@@ -0,0 +1,137 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: affix.js v3.1.1
|
3
|
+
* http://getbootstrap.com/javascript/#affix
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// AFFIX CLASS DEFINITION
|
14
|
+
// ======================
|
15
|
+
|
16
|
+
var Affix = function (element, options) {
|
17
|
+
this.options = $.extend({}, Affix.DEFAULTS, options)
|
18
|
+
this.$window = $(window)
|
19
|
+
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
20
|
+
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
21
|
+
|
22
|
+
this.$element = $(element)
|
23
|
+
this.affixed =
|
24
|
+
this.unpin =
|
25
|
+
this.pinnedOffset = null
|
26
|
+
|
27
|
+
this.checkPosition()
|
28
|
+
}
|
29
|
+
|
30
|
+
Affix.RESET = 'affix affix-top affix-bottom'
|
31
|
+
|
32
|
+
Affix.DEFAULTS = {
|
33
|
+
offset: 0
|
34
|
+
}
|
35
|
+
|
36
|
+
Affix.prototype.getPinnedOffset = function () {
|
37
|
+
if (this.pinnedOffset) return this.pinnedOffset
|
38
|
+
this.$element.removeClass(Affix.RESET).addClass('affix')
|
39
|
+
var scrollTop = this.$window.scrollTop()
|
40
|
+
var position = this.$element.offset()
|
41
|
+
return (this.pinnedOffset = position.top - scrollTop)
|
42
|
+
}
|
43
|
+
|
44
|
+
Affix.prototype.checkPositionWithEventLoop = function () {
|
45
|
+
setTimeout($.proxy(this.checkPosition, this), 1)
|
46
|
+
}
|
47
|
+
|
48
|
+
Affix.prototype.checkPosition = function () {
|
49
|
+
if (!this.$element.is(':visible')) return
|
50
|
+
|
51
|
+
var scrollHeight = $(document).height()
|
52
|
+
var scrollTop = this.$window.scrollTop()
|
53
|
+
var position = this.$element.offset()
|
54
|
+
var offset = this.options.offset
|
55
|
+
var offsetTop = offset.top
|
56
|
+
var offsetBottom = offset.bottom
|
57
|
+
|
58
|
+
if (this.affixed == 'top') position.top += scrollTop
|
59
|
+
|
60
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
61
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
62
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
63
|
+
|
64
|
+
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
|
65
|
+
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
|
66
|
+
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
|
67
|
+
|
68
|
+
if (this.affixed === affix) return
|
69
|
+
if (this.unpin) this.$element.css('top', '')
|
70
|
+
|
71
|
+
var affixType = 'affix' + (affix ? '-' + affix : '')
|
72
|
+
var e = $.Event(affixType + '.bs.affix')
|
73
|
+
|
74
|
+
this.$element.trigger(e)
|
75
|
+
|
76
|
+
if (e.isDefaultPrevented()) return
|
77
|
+
|
78
|
+
this.affixed = affix
|
79
|
+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
80
|
+
|
81
|
+
this.$element
|
82
|
+
.removeClass(Affix.RESET)
|
83
|
+
.addClass(affixType)
|
84
|
+
.trigger($.Event(affixType.replace('affix', 'affixed')))
|
85
|
+
|
86
|
+
if (affix == 'bottom') {
|
87
|
+
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
// AFFIX PLUGIN DEFINITION
|
93
|
+
// =======================
|
94
|
+
|
95
|
+
var old = $.fn.affix
|
96
|
+
|
97
|
+
$.fn.affix = function (option) {
|
98
|
+
return this.each(function () {
|
99
|
+
var $this = $(this)
|
100
|
+
var data = $this.data('bs.affix')
|
101
|
+
var options = typeof option == 'object' && option
|
102
|
+
|
103
|
+
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
|
104
|
+
if (typeof option == 'string') data[option]()
|
105
|
+
})
|
106
|
+
}
|
107
|
+
|
108
|
+
$.fn.affix.Constructor = Affix
|
109
|
+
|
110
|
+
|
111
|
+
// AFFIX NO CONFLICT
|
112
|
+
// =================
|
113
|
+
|
114
|
+
$.fn.affix.noConflict = function () {
|
115
|
+
$.fn.affix = old
|
116
|
+
return this
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
// AFFIX DATA-API
|
121
|
+
// ==============
|
122
|
+
|
123
|
+
$(window).on('load', function () {
|
124
|
+
$('[data-spy="affix"]').each(function () {
|
125
|
+
var $spy = $(this)
|
126
|
+
var data = $spy.data()
|
127
|
+
|
128
|
+
data.offset = data.offset || {}
|
129
|
+
|
130
|
+
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
131
|
+
if (data.offsetTop) data.offset.top = data.offsetTop
|
132
|
+
|
133
|
+
$spy.affix(data)
|
134
|
+
})
|
135
|
+
})
|
136
|
+
|
137
|
+
}(jQuery);
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: alert.js v3.1.1
|
3
|
+
* http://getbootstrap.com/javascript/#alerts
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// ALERT CLASS DEFINITION
|
14
|
+
// ======================
|
15
|
+
|
16
|
+
var dismiss = '[data-dismiss="alert"]'
|
17
|
+
var Alert = function (el) {
|
18
|
+
$(el).on('click', dismiss, this.close)
|
19
|
+
}
|
20
|
+
|
21
|
+
Alert.prototype.close = function (e) {
|
22
|
+
var $this = $(this)
|
23
|
+
var selector = $this.attr('data-target')
|
24
|
+
|
25
|
+
if (!selector) {
|
26
|
+
selector = $this.attr('href')
|
27
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
28
|
+
}
|
29
|
+
|
30
|
+
var $parent = $(selector)
|
31
|
+
|
32
|
+
if (e) e.preventDefault()
|
33
|
+
|
34
|
+
if (!$parent.length) {
|
35
|
+
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
36
|
+
}
|
37
|
+
|
38
|
+
$parent.trigger(e = $.Event('close.bs.alert'))
|
39
|
+
|
40
|
+
if (e.isDefaultPrevented()) return
|
41
|
+
|
42
|
+
$parent.removeClass('in')
|
43
|
+
|
44
|
+
function removeElement() {
|
45
|
+
$parent.trigger('closed.bs.alert').remove()
|
46
|
+
}
|
47
|
+
|
48
|
+
$.support.transition && $parent.hasClass('fade') ?
|
49
|
+
$parent
|
50
|
+
.one($.support.transition.end, removeElement)
|
51
|
+
.emulateTransitionEnd(150) :
|
52
|
+
removeElement()
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
// ALERT PLUGIN DEFINITION
|
57
|
+
// =======================
|
58
|
+
|
59
|
+
var old = $.fn.alert
|
60
|
+
|
61
|
+
$.fn.alert = function (option) {
|
62
|
+
return this.each(function () {
|
63
|
+
var $this = $(this)
|
64
|
+
var data = $this.data('bs.alert')
|
65
|
+
|
66
|
+
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
67
|
+
if (typeof option == 'string') data[option].call($this)
|
68
|
+
})
|
69
|
+
}
|
70
|
+
|
71
|
+
$.fn.alert.Constructor = Alert
|
72
|
+
|
73
|
+
|
74
|
+
// ALERT NO CONFLICT
|
75
|
+
// =================
|
76
|
+
|
77
|
+
$.fn.alert.noConflict = function () {
|
78
|
+
$.fn.alert = old
|
79
|
+
return this
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
// ALERT DATA-API
|
84
|
+
// ==============
|
85
|
+
|
86
|
+
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
87
|
+
|
88
|
+
}(jQuery);
|
@@ -0,0 +1,107 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: button.js v3.1.1
|
3
|
+
* http://getbootstrap.com/javascript/#buttons
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// BUTTON PUBLIC CLASS DEFINITION
|
14
|
+
// ==============================
|
15
|
+
|
16
|
+
var Button = function (element, options) {
|
17
|
+
this.$element = $(element)
|
18
|
+
this.options = $.extend({}, Button.DEFAULTS, options)
|
19
|
+
this.isLoading = false
|
20
|
+
}
|
21
|
+
|
22
|
+
Button.DEFAULTS = {
|
23
|
+
loadingText: 'loading...'
|
24
|
+
}
|
25
|
+
|
26
|
+
Button.prototype.setState = function (state) {
|
27
|
+
var d = 'disabled'
|
28
|
+
var $el = this.$element
|
29
|
+
var val = $el.is('input') ? 'val' : 'html'
|
30
|
+
var data = $el.data()
|
31
|
+
|
32
|
+
state = state + 'Text'
|
33
|
+
|
34
|
+
if (!data.resetText) $el.data('resetText', $el[val]())
|
35
|
+
|
36
|
+
$el[val](data[state] || this.options[state])
|
37
|
+
|
38
|
+
// push to event loop to allow forms to submit
|
39
|
+
setTimeout($.proxy(function () {
|
40
|
+
if (state == 'loadingText') {
|
41
|
+
this.isLoading = true
|
42
|
+
$el.addClass(d).attr(d, d)
|
43
|
+
} else if (this.isLoading) {
|
44
|
+
this.isLoading = false
|
45
|
+
$el.removeClass(d).removeAttr(d)
|
46
|
+
}
|
47
|
+
}, this), 0)
|
48
|
+
}
|
49
|
+
|
50
|
+
Button.prototype.toggle = function () {
|
51
|
+
var changed = true
|
52
|
+
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
53
|
+
|
54
|
+
if ($parent.length) {
|
55
|
+
var $input = this.$element.find('input')
|
56
|
+
if ($input.prop('type') == 'radio') {
|
57
|
+
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
58
|
+
else $parent.find('.active').removeClass('active')
|
59
|
+
}
|
60
|
+
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
61
|
+
}
|
62
|
+
|
63
|
+
if (changed) this.$element.toggleClass('active')
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
// BUTTON PLUGIN DEFINITION
|
68
|
+
// ========================
|
69
|
+
|
70
|
+
var old = $.fn.button
|
71
|
+
|
72
|
+
$.fn.button = function (option) {
|
73
|
+
return this.each(function () {
|
74
|
+
var $this = $(this)
|
75
|
+
var data = $this.data('bs.button')
|
76
|
+
var options = typeof option == 'object' && option
|
77
|
+
|
78
|
+
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
79
|
+
|
80
|
+
if (option == 'toggle') data.toggle()
|
81
|
+
else if (option) data.setState(option)
|
82
|
+
})
|
83
|
+
}
|
84
|
+
|
85
|
+
$.fn.button.Constructor = Button
|
86
|
+
|
87
|
+
|
88
|
+
// BUTTON NO CONFLICT
|
89
|
+
// ==================
|
90
|
+
|
91
|
+
$.fn.button.noConflict = function () {
|
92
|
+
$.fn.button = old
|
93
|
+
return this
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
// BUTTON DATA-API
|
98
|
+
// ===============
|
99
|
+
|
100
|
+
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
|
101
|
+
var $btn = $(e.target)
|
102
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
103
|
+
$btn.button('toggle')
|
104
|
+
e.preventDefault()
|
105
|
+
})
|
106
|
+
|
107
|
+
}(jQuery);
|
@@ -0,0 +1,205 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: carousel.js v3.1.1
|
3
|
+
* http://getbootstrap.com/javascript/#carousel
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// CAROUSEL CLASS DEFINITION
|
14
|
+
// =========================
|
15
|
+
|
16
|
+
var Carousel = function (element, options) {
|
17
|
+
this.$element = $(element)
|
18
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
19
|
+
this.options = options
|
20
|
+
this.paused =
|
21
|
+
this.sliding =
|
22
|
+
this.interval =
|
23
|
+
this.$active =
|
24
|
+
this.$items = null
|
25
|
+
|
26
|
+
this.options.pause == 'hover' && this.$element
|
27
|
+
.on('mouseenter', $.proxy(this.pause, this))
|
28
|
+
.on('mouseleave', $.proxy(this.cycle, this))
|
29
|
+
}
|
30
|
+
|
31
|
+
Carousel.DEFAULTS = {
|
32
|
+
interval: 5000,
|
33
|
+
pause: 'hover',
|
34
|
+
wrap: true
|
35
|
+
}
|
36
|
+
|
37
|
+
Carousel.prototype.cycle = function (e) {
|
38
|
+
e || (this.paused = false)
|
39
|
+
|
40
|
+
this.interval && clearInterval(this.interval)
|
41
|
+
|
42
|
+
this.options.interval
|
43
|
+
&& !this.paused
|
44
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
45
|
+
|
46
|
+
return this
|
47
|
+
}
|
48
|
+
|
49
|
+
Carousel.prototype.getActiveIndex = function () {
|
50
|
+
this.$active = this.$element.find('.item.active')
|
51
|
+
this.$items = this.$active.parent().children()
|
52
|
+
|
53
|
+
return this.$items.index(this.$active)
|
54
|
+
}
|
55
|
+
|
56
|
+
Carousel.prototype.to = function (pos) {
|
57
|
+
var that = this
|
58
|
+
var activeIndex = this.getActiveIndex()
|
59
|
+
|
60
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
61
|
+
|
62
|
+
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
|
63
|
+
if (activeIndex == pos) return this.pause().cycle()
|
64
|
+
|
65
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
66
|
+
}
|
67
|
+
|
68
|
+
Carousel.prototype.pause = function (e) {
|
69
|
+
e || (this.paused = true)
|
70
|
+
|
71
|
+
if (this.$element.find('.next, .prev').length && $.support.transition) {
|
72
|
+
this.$element.trigger($.support.transition.end)
|
73
|
+
this.cycle(true)
|
74
|
+
}
|
75
|
+
|
76
|
+
this.interval = clearInterval(this.interval)
|
77
|
+
|
78
|
+
return this
|
79
|
+
}
|
80
|
+
|
81
|
+
Carousel.prototype.next = function () {
|
82
|
+
if (this.sliding) return
|
83
|
+
return this.slide('next')
|
84
|
+
}
|
85
|
+
|
86
|
+
Carousel.prototype.prev = function () {
|
87
|
+
if (this.sliding) return
|
88
|
+
return this.slide('prev')
|
89
|
+
}
|
90
|
+
|
91
|
+
Carousel.prototype.slide = function (type, next) {
|
92
|
+
var $active = this.$element.find('.item.active')
|
93
|
+
var $next = next || $active[type]()
|
94
|
+
var isCycling = this.interval
|
95
|
+
var direction = type == 'next' ? 'left' : 'right'
|
96
|
+
var fallback = type == 'next' ? 'first' : 'last'
|
97
|
+
var that = this
|
98
|
+
|
99
|
+
if (!$next.length) {
|
100
|
+
if (!this.options.wrap) return
|
101
|
+
$next = this.$element.find('.item')[fallback]()
|
102
|
+
}
|
103
|
+
|
104
|
+
if ($next.hasClass('active')) return this.sliding = false
|
105
|
+
|
106
|
+
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
|
107
|
+
this.$element.trigger(e)
|
108
|
+
if (e.isDefaultPrevented()) return
|
109
|
+
|
110
|
+
this.sliding = true
|
111
|
+
|
112
|
+
isCycling && this.pause()
|
113
|
+
|
114
|
+
if (this.$indicators.length) {
|
115
|
+
this.$indicators.find('.active').removeClass('active')
|
116
|
+
this.$element.one('slid.bs.carousel', function () {
|
117
|
+
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
118
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
119
|
+
})
|
120
|
+
}
|
121
|
+
|
122
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
123
|
+
$next.addClass(type)
|
124
|
+
$next[0].offsetWidth // force reflow
|
125
|
+
$active.addClass(direction)
|
126
|
+
$next.addClass(direction)
|
127
|
+
$active
|
128
|
+
.one($.support.transition.end, function () {
|
129
|
+
$next.removeClass([type, direction].join(' ')).addClass('active')
|
130
|
+
$active.removeClass(['active', direction].join(' '))
|
131
|
+
that.sliding = false
|
132
|
+
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
|
133
|
+
})
|
134
|
+
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
|
135
|
+
} else {
|
136
|
+
$active.removeClass('active')
|
137
|
+
$next.addClass('active')
|
138
|
+
this.sliding = false
|
139
|
+
this.$element.trigger('slid.bs.carousel')
|
140
|
+
}
|
141
|
+
|
142
|
+
isCycling && this.cycle()
|
143
|
+
|
144
|
+
return this
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
// CAROUSEL PLUGIN DEFINITION
|
149
|
+
// ==========================
|
150
|
+
|
151
|
+
var old = $.fn.carousel
|
152
|
+
|
153
|
+
$.fn.carousel = function (option) {
|
154
|
+
return this.each(function () {
|
155
|
+
var $this = $(this)
|
156
|
+
var data = $this.data('bs.carousel')
|
157
|
+
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
158
|
+
var action = typeof option == 'string' ? option : options.slide
|
159
|
+
|
160
|
+
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
|
161
|
+
if (typeof option == 'number') data.to(option)
|
162
|
+
else if (action) data[action]()
|
163
|
+
else if (options.interval) data.pause().cycle()
|
164
|
+
})
|
165
|
+
}
|
166
|
+
|
167
|
+
$.fn.carousel.Constructor = Carousel
|
168
|
+
|
169
|
+
|
170
|
+
// CAROUSEL NO CONFLICT
|
171
|
+
// ====================
|
172
|
+
|
173
|
+
$.fn.carousel.noConflict = function () {
|
174
|
+
$.fn.carousel = old
|
175
|
+
return this
|
176
|
+
}
|
177
|
+
|
178
|
+
|
179
|
+
// CAROUSEL DATA-API
|
180
|
+
// =================
|
181
|
+
|
182
|
+
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
183
|
+
var $this = $(this), href
|
184
|
+
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
185
|
+
var options = $.extend({}, $target.data(), $this.data())
|
186
|
+
var slideIndex = $this.attr('data-slide-to')
|
187
|
+
if (slideIndex) options.interval = false
|
188
|
+
|
189
|
+
$target.carousel(options)
|
190
|
+
|
191
|
+
if (slideIndex = $this.attr('data-slide-to')) {
|
192
|
+
$target.data('bs.carousel').to(slideIndex)
|
193
|
+
}
|
194
|
+
|
195
|
+
e.preventDefault()
|
196
|
+
})
|
197
|
+
|
198
|
+
$(window).on('load', function () {
|
199
|
+
$('[data-ride="carousel"]').each(function () {
|
200
|
+
var $carousel = $(this)
|
201
|
+
$carousel.carousel($carousel.data())
|
202
|
+
})
|
203
|
+
})
|
204
|
+
|
205
|
+
}(jQuery);
|