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
@@ -0,0 +1,610 @@
|
|
1
|
+
;(function ($, window, document, undefined) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var noop = function() {};
|
5
|
+
|
6
|
+
var Orbit = function(el, settings) {
|
7
|
+
// Don't reinitialize plugin
|
8
|
+
if (el.hasClass(settings.slides_container_class)) {
|
9
|
+
return this;
|
10
|
+
}
|
11
|
+
|
12
|
+
var self = this,
|
13
|
+
container,
|
14
|
+
slides_container = el,
|
15
|
+
number_container,
|
16
|
+
bullets_container,
|
17
|
+
timer_container,
|
18
|
+
idx = 0,
|
19
|
+
animate,
|
20
|
+
adjust_height_after = false,
|
21
|
+
has_init_active = slides_container.find("." + settings.active_slide_class).length > 0;
|
22
|
+
|
23
|
+
self.cache = {};
|
24
|
+
|
25
|
+
self.slides = function() {
|
26
|
+
return slides_container.children(settings.slide_selector);
|
27
|
+
};
|
28
|
+
|
29
|
+
if (!has_init_active) {self.slides().first().addClass(settings.active_slide_class)};
|
30
|
+
|
31
|
+
self.update_slide_number = function(index) {
|
32
|
+
if (settings.slide_number) {
|
33
|
+
number_container.find('span:first').text(parseInt(index)+1);
|
34
|
+
number_container.find('span:last').text(self.slides().length);
|
35
|
+
}
|
36
|
+
if (settings.bullets) {
|
37
|
+
bullets_container.children().removeClass(settings.bullets_active_class);
|
38
|
+
$(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
|
39
|
+
}
|
40
|
+
};
|
41
|
+
|
42
|
+
self.update_active_link = function(index) {
|
43
|
+
var link = $('[data-orbit-link="'+self.slides().eq(index).attr('data-orbit-slide')+'"]');
|
44
|
+
link.siblings().removeClass(settings.bullets_active_class);
|
45
|
+
link.addClass(settings.bullets_active_class);
|
46
|
+
};
|
47
|
+
|
48
|
+
self.build_markup = function() {
|
49
|
+
slides_container.wrap('<div class="'+settings.container_class+'"></div>');
|
50
|
+
container = slides_container.parent();
|
51
|
+
slides_container.addClass(settings.slides_container_class);
|
52
|
+
slides_container.addClass(settings.animation);
|
53
|
+
|
54
|
+
if (settings.stack_on_small) {
|
55
|
+
container.addClass(settings.stack_on_small_class);
|
56
|
+
}
|
57
|
+
|
58
|
+
if (settings.navigation_arrows) {
|
59
|
+
container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
|
60
|
+
container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
|
61
|
+
}
|
62
|
+
|
63
|
+
if (settings.timer) {
|
64
|
+
timer_container = $('<div>').addClass(settings.timer_container_class);
|
65
|
+
timer_container.append('<span>');
|
66
|
+
if (settings.timer_show_progress_bar) {
|
67
|
+
timer_container.append($('<div>').addClass(settings.timer_progress_class));
|
68
|
+
}
|
69
|
+
timer_container.addClass(settings.timer_paused_class);
|
70
|
+
container.append(timer_container);
|
71
|
+
}
|
72
|
+
|
73
|
+
if (settings.slide_number) {
|
74
|
+
number_container = $('<div>').addClass(settings.slide_number_class);
|
75
|
+
number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
|
76
|
+
container.append(number_container);
|
77
|
+
}
|
78
|
+
|
79
|
+
if (settings.bullets) {
|
80
|
+
bullets_container = $('<ol>').addClass(settings.bullets_container_class);
|
81
|
+
container.append(bullets_container);
|
82
|
+
bullets_container.wrap('<div class="orbit-bullets-container"></div>');
|
83
|
+
self.slides().each(function(idx, el) {
|
84
|
+
var bullet = $('<li>').attr('data-orbit-slide', idx)
|
85
|
+
.on('click', self.link_bullet);
|
86
|
+
bullets_container.append(bullet);
|
87
|
+
});
|
88
|
+
}
|
89
|
+
|
90
|
+
};
|
91
|
+
|
92
|
+
self._prepare_direction = function(next_idx, current_direction) {
|
93
|
+
var dir = 'next';
|
94
|
+
if (next_idx <= idx) { dir = 'prev'; }
|
95
|
+
|
96
|
+
if (settings.animation === 'slide') {
|
97
|
+
setTimeout(function(){
|
98
|
+
slides_container.removeClass("swipe-prev swipe-next");
|
99
|
+
if (dir === 'next') {slides_container.addClass("swipe-next");}
|
100
|
+
else if (dir === 'prev') {slides_container.addClass("swipe-prev");}
|
101
|
+
},0);
|
102
|
+
}
|
103
|
+
|
104
|
+
var slides = self.slides();
|
105
|
+
if (next_idx >= slides.length) {
|
106
|
+
if (!settings.circular) return false;
|
107
|
+
next_idx = 0;
|
108
|
+
} else if (next_idx < 0) {
|
109
|
+
if (!settings.circular) return false;
|
110
|
+
next_idx = slides.length - 1;
|
111
|
+
}
|
112
|
+
var current = $(slides.get(idx))
|
113
|
+
, next = $(slides.get(next_idx));
|
114
|
+
|
115
|
+
return [dir, current, next, next_idx];
|
116
|
+
};
|
117
|
+
|
118
|
+
self._goto = function(next_idx, start_timer) {
|
119
|
+
if (next_idx === null) {return false;}
|
120
|
+
if (self.cache.animating) {return false;}
|
121
|
+
if (next_idx === idx) {return false;}
|
122
|
+
if (typeof self.cache.timer === 'object') {self.cache.timer.restart();}
|
123
|
+
|
124
|
+
var slides = self.slides();
|
125
|
+
self.cache.animating = true;
|
126
|
+
var res = self._prepare_direction(next_idx)
|
127
|
+
, dir = res[0]
|
128
|
+
, current = res[1]
|
129
|
+
, next = res[2]
|
130
|
+
, next_idx = res[3];
|
131
|
+
|
132
|
+
// This means that circular is disabled and we most likely reached the last slide.
|
133
|
+
if (res === false) return false;
|
134
|
+
|
135
|
+
slides_container.trigger('before-slide-change.fndtn.orbit');
|
136
|
+
settings.before_slide_change();
|
137
|
+
idx = next_idx;
|
138
|
+
|
139
|
+
current.css("transitionDuration", settings.animation_speed+"ms");
|
140
|
+
next.css("transitionDuration", settings.animation_speed+"ms");
|
141
|
+
|
142
|
+
var callback = function() {
|
143
|
+
var unlock = function() {
|
144
|
+
if (start_timer === true) {self.cache.timer.restart();}
|
145
|
+
self.update_slide_number(idx);
|
146
|
+
// Remove "animate-in" class as late as possible to avoid "flickering" (especially with variable_height).
|
147
|
+
next.removeClass("animate-in");
|
148
|
+
next.addClass(settings.active_slide_class);
|
149
|
+
self.update_active_link(next_idx);
|
150
|
+
slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
|
151
|
+
settings.after_slide_change(idx, slides.length);
|
152
|
+
setTimeout(function(){
|
153
|
+
self.cache.animating = false;
|
154
|
+
}, 100);
|
155
|
+
|
156
|
+
};
|
157
|
+
if (slides_container.height() != next.height() && settings.variable_height) {
|
158
|
+
slides_container.animate({'min-height': next.height()}, 250, 'linear', unlock);
|
159
|
+
} else {
|
160
|
+
unlock();
|
161
|
+
}
|
162
|
+
};
|
163
|
+
|
164
|
+
if (slides.length === 1) {callback(); return false;}
|
165
|
+
|
166
|
+
var start_animation = function() {
|
167
|
+
if (dir === 'next') {animate.next(current, next, callback);}
|
168
|
+
if (dir === 'prev') {animate.prev(current, next, callback);}
|
169
|
+
};
|
170
|
+
|
171
|
+
if (next.height() > slides_container.height() && settings.variable_height) {
|
172
|
+
slides_container.animate({'min-height': next.height()}, 250, 'linear', start_animation);
|
173
|
+
} else {
|
174
|
+
start_animation();
|
175
|
+
}
|
176
|
+
};
|
177
|
+
|
178
|
+
self.next = function(e) {
|
179
|
+
e.stopImmediatePropagation();
|
180
|
+
e.preventDefault();
|
181
|
+
self._prepare_direction(idx + 1);
|
182
|
+
setTimeout(function(){
|
183
|
+
self._goto(idx + 1);
|
184
|
+
}, 100);
|
185
|
+
};
|
186
|
+
|
187
|
+
self.prev = function(e) {
|
188
|
+
e.stopImmediatePropagation();
|
189
|
+
e.preventDefault();
|
190
|
+
self._prepare_direction(idx - 1);
|
191
|
+
setTimeout(function(){
|
192
|
+
self._goto(idx - 1)
|
193
|
+
}, 100);
|
194
|
+
};
|
195
|
+
|
196
|
+
self.link_custom = function(e) {
|
197
|
+
e.preventDefault();
|
198
|
+
var link = $(this).attr('data-orbit-link');
|
199
|
+
if ((typeof link === 'string') && (link = $.trim(link)) != "") {
|
200
|
+
var slide = container.find('[data-orbit-slide='+link+']');
|
201
|
+
if (slide.index() != -1) {
|
202
|
+
setTimeout(function(){
|
203
|
+
self._goto(slide.index());
|
204
|
+
},100);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
};
|
208
|
+
|
209
|
+
// Click handler for slides and bullets.
|
210
|
+
self.link_bullet = function(e) {
|
211
|
+
var index = $(this).attr('data-orbit-slide');
|
212
|
+
if ((typeof index === 'string') && (index = $.trim(index)) != "") {
|
213
|
+
if(isNaN(parseInt(index)))
|
214
|
+
{
|
215
|
+
var slide = container.find('[data-orbit-slide='+index+']');
|
216
|
+
if (slide.index() != -1) {
|
217
|
+
index = slide.index() + 1;
|
218
|
+
self._prepare_direction(index);
|
219
|
+
setTimeout(function(){
|
220
|
+
self._goto(index);
|
221
|
+
},100);
|
222
|
+
}
|
223
|
+
}
|
224
|
+
else
|
225
|
+
{
|
226
|
+
index = parseInt(index);
|
227
|
+
self._prepare_direction(index);
|
228
|
+
setTimeout(function(){
|
229
|
+
self._goto(index);
|
230
|
+
},100);
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
self.timer_callback = function() {
|
236
|
+
self._goto(idx + 1, true);
|
237
|
+
}
|
238
|
+
|
239
|
+
self.compute_dimensions = function() {
|
240
|
+
var current = $(self.slides().get(idx));
|
241
|
+
var h = current.height();
|
242
|
+
if (!settings.variable_height) {
|
243
|
+
self.slides().each(function(){
|
244
|
+
if ($(this).height() > h) { h = $(this).height(); }
|
245
|
+
});
|
246
|
+
}
|
247
|
+
slides_container.css('minHeight', String(h)+'px');
|
248
|
+
};
|
249
|
+
|
250
|
+
self.create_timer = function() {
|
251
|
+
var t = new Timer(
|
252
|
+
container.find('.'+settings.timer_container_class),
|
253
|
+
settings,
|
254
|
+
self.timer_callback
|
255
|
+
);
|
256
|
+
return t;
|
257
|
+
};
|
258
|
+
|
259
|
+
self.stop_timer = function() {
|
260
|
+
if (typeof self.cache.timer === 'object') self.cache.timer.stop();
|
261
|
+
};
|
262
|
+
|
263
|
+
self.toggle_timer = function() {
|
264
|
+
var t = container.find('.'+settings.timer_container_class);
|
265
|
+
if (t.hasClass(settings.timer_paused_class)) {
|
266
|
+
if (typeof self.cache.timer === 'undefined') {self.cache.timer = self.create_timer();}
|
267
|
+
self.cache.timer.start();
|
268
|
+
}
|
269
|
+
else {
|
270
|
+
if (typeof self.cache.timer === 'object') {self.cache.timer.stop();}
|
271
|
+
}
|
272
|
+
};
|
273
|
+
|
274
|
+
self.init = function() {
|
275
|
+
self.build_markup();
|
276
|
+
if (settings.timer) {
|
277
|
+
self.cache.timer = self.create_timer();
|
278
|
+
Foundation.utils.image_loaded(this.slides().find('img'), self.cache.timer.start);
|
279
|
+
}
|
280
|
+
|
281
|
+
animate = new CSSAnimation(settings, slides_container);
|
282
|
+
|
283
|
+
if (has_init_active) {
|
284
|
+
var $init_target = slides_container.find("." + settings.active_slide_class),
|
285
|
+
animation_speed = settings.animation_speed;
|
286
|
+
settings.animation_speed = 1;
|
287
|
+
$init_target.removeClass('active');
|
288
|
+
self._goto($init_target.index());
|
289
|
+
settings.animation_speed = animation_speed;
|
290
|
+
}
|
291
|
+
|
292
|
+
container.on('click', '.'+settings.next_class, self.next);
|
293
|
+
container.on('click', '.'+settings.prev_class, self.prev);
|
294
|
+
|
295
|
+
if (settings.next_on_click) {
|
296
|
+
container.on('click', '.'+settings.slides_container_class+' [data-orbit-slide]', self.link_bullet);
|
297
|
+
}
|
298
|
+
|
299
|
+
container.on('click', self.toggle_timer);
|
300
|
+
if (settings.swipe) {
|
301
|
+
slides_container.on('touchstart.fndtn.orbit',function(e) {
|
302
|
+
if (self.cache.animating) {return;}
|
303
|
+
if (!e.touches) {e = e.originalEvent;}
|
304
|
+
e.preventDefault();
|
305
|
+
e.stopPropagation();
|
306
|
+
|
307
|
+
self.cache.start_page_x = e.touches[0].pageX;
|
308
|
+
self.cache.start_page_y = e.touches[0].pageY;
|
309
|
+
self.cache.start_time = (new Date()).getTime();
|
310
|
+
self.cache.delta_x = 0;
|
311
|
+
self.cache.is_scrolling = null;
|
312
|
+
self.cache.direction = null;
|
313
|
+
|
314
|
+
self.stop_timer(); // does not appear to prevent callback from occurring
|
315
|
+
})
|
316
|
+
.on('touchmove.fndtn.orbit',function(e) {
|
317
|
+
if (Math.abs(self.cache.delta_x) > 5) {
|
318
|
+
e.preventDefault();
|
319
|
+
e.stopPropagation();
|
320
|
+
}
|
321
|
+
|
322
|
+
if (self.cache.animating) {return;}
|
323
|
+
requestAnimationFrame(function(){
|
324
|
+
if (!e.touches) { e = e.originalEvent; }
|
325
|
+
|
326
|
+
// Ignore pinch/zoom events
|
327
|
+
if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
|
328
|
+
|
329
|
+
self.cache.delta_x = e.touches[0].pageX - self.cache.start_page_x;
|
330
|
+
|
331
|
+
if (self.cache.is_scrolling === null) {
|
332
|
+
self.cache.is_scrolling = !!( self.cache.is_scrolling || Math.abs(self.cache.delta_x) < Math.abs(e.touches[0].pageY - self.cache.start_page_y) );
|
333
|
+
}
|
334
|
+
|
335
|
+
if (self.cache.is_scrolling) {
|
336
|
+
return;
|
337
|
+
}
|
338
|
+
|
339
|
+
var direction = (self.cache.delta_x < 0) ? (idx+1) : (idx-1);
|
340
|
+
if (self.cache.direction !== direction) {
|
341
|
+
var res = self._prepare_direction(direction);
|
342
|
+
self.cache.direction = direction;
|
343
|
+
self.cache.dir = res[0];
|
344
|
+
self.cache.current = res[1];
|
345
|
+
self.cache.next = res[2];
|
346
|
+
}
|
347
|
+
|
348
|
+
if (settings.animation === 'slide') {
|
349
|
+
var offset, next_offset;
|
350
|
+
|
351
|
+
offset = (self.cache.delta_x / container.width()) * 100;
|
352
|
+
if (offset >= 0) {next_offset = -(100 - offset);}
|
353
|
+
else {next_offset = 100 + offset;}
|
354
|
+
|
355
|
+
self.cache.current.css("transform","translate3d("+offset+"%,0,0)");
|
356
|
+
self.cache.next.css("transform","translate3d("+next_offset+"%,0,0)");
|
357
|
+
}
|
358
|
+
});
|
359
|
+
})
|
360
|
+
.on('touchend.fndtn.orbit', function(e) {
|
361
|
+
if (self.cache.animating) {return;}
|
362
|
+
e.preventDefault();
|
363
|
+
e.stopPropagation();
|
364
|
+
setTimeout(function(){
|
365
|
+
self._goto(self.cache.direction);
|
366
|
+
}, 50);
|
367
|
+
});
|
368
|
+
}
|
369
|
+
container.on('mouseenter.fndtn.orbit', function(e) {
|
370
|
+
if (settings.timer && settings.pause_on_hover) {
|
371
|
+
self.stop_timer();
|
372
|
+
}
|
373
|
+
})
|
374
|
+
.on('mouseleave.fndtn.orbit', function(e) {
|
375
|
+
if (settings.timer && settings.resume_on_mouseout) {
|
376
|
+
self.cache.timer.start();
|
377
|
+
}
|
378
|
+
});
|
379
|
+
|
380
|
+
$(document).on('click', '[data-orbit-link]', self.link_custom);
|
381
|
+
$(window).on('load resize', self.compute_dimensions);
|
382
|
+
var children = this.slides().find('img');
|
383
|
+
Foundation.utils.image_loaded(children, self.compute_dimensions);
|
384
|
+
Foundation.utils.image_loaded(children, function() {
|
385
|
+
container.prev('.'+settings.preloader_class).css('display', 'none');
|
386
|
+
self.update_slide_number(idx);
|
387
|
+
self.update_active_link(idx);
|
388
|
+
slides_container.trigger('ready.fndtn.orbit');
|
389
|
+
});
|
390
|
+
};
|
391
|
+
|
392
|
+
self.init();
|
393
|
+
};
|
394
|
+
|
395
|
+
var Timer = function(el, settings, callback) {
|
396
|
+
var self = this,
|
397
|
+
duration = settings.timer_speed,
|
398
|
+
progress = el.find('.'+settings.timer_progress_class),
|
399
|
+
do_progress = progress && progress.css('display') != 'none',
|
400
|
+
start,
|
401
|
+
timeout,
|
402
|
+
left = -1;
|
403
|
+
|
404
|
+
this.update_progress = function(w) {
|
405
|
+
var new_progress = progress.clone();
|
406
|
+
new_progress.attr('style', '');
|
407
|
+
new_progress.css('width', w+'%');
|
408
|
+
progress.replaceWith(new_progress);
|
409
|
+
progress = new_progress;
|
410
|
+
};
|
411
|
+
|
412
|
+
this.restart = function() {
|
413
|
+
clearTimeout(timeout);
|
414
|
+
el.addClass(settings.timer_paused_class);
|
415
|
+
left = -1;
|
416
|
+
if (do_progress) {self.update_progress(0);}
|
417
|
+
self.start();
|
418
|
+
};
|
419
|
+
|
420
|
+
this.start = function() {
|
421
|
+
if (!el.hasClass(settings.timer_paused_class)) {return true;}
|
422
|
+
left = (left === -1) ? duration : left;
|
423
|
+
el.removeClass(settings.timer_paused_class);
|
424
|
+
if (do_progress) {
|
425
|
+
start = new Date().getTime();
|
426
|
+
progress.animate({'width': '100%'}, left, 'linear');
|
427
|
+
}
|
428
|
+
timeout = setTimeout(function() {
|
429
|
+
self.restart();
|
430
|
+
callback();
|
431
|
+
}, left);
|
432
|
+
el.trigger('timer-started.fndtn.orbit')
|
433
|
+
};
|
434
|
+
|
435
|
+
this.stop = function() {
|
436
|
+
if (el.hasClass(settings.timer_paused_class)) {return true;}
|
437
|
+
clearTimeout(timeout);
|
438
|
+
el.addClass(settings.timer_paused_class);
|
439
|
+
if (do_progress) {
|
440
|
+
var end = new Date().getTime();
|
441
|
+
left = left - (end - start);
|
442
|
+
var w = 100 - ((left / duration) * 100);
|
443
|
+
self.update_progress(w);
|
444
|
+
}
|
445
|
+
el.trigger('timer-stopped.fndtn.orbit');
|
446
|
+
};
|
447
|
+
};
|
448
|
+
|
449
|
+
var CSSAnimation = function(settings, container) {
|
450
|
+
var animation_end = "webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";
|
451
|
+
|
452
|
+
this.next = function(current, next, callback) {
|
453
|
+
if (Modernizr.csstransitions) {
|
454
|
+
next.on(animation_end, function(e){
|
455
|
+
next.unbind(animation_end);
|
456
|
+
current.removeClass("active animate-out");
|
457
|
+
container.children().css({
|
458
|
+
"transform":"",
|
459
|
+
"-ms-transform":"",
|
460
|
+
"-webkit-transition-duration":"",
|
461
|
+
"-moz-transition-duration": "",
|
462
|
+
"-o-transition-duration": "",
|
463
|
+
"transition-duration":""
|
464
|
+
});
|
465
|
+
callback();
|
466
|
+
});
|
467
|
+
} else {
|
468
|
+
setTimeout(function(){
|
469
|
+
current.removeClass("active animate-out");
|
470
|
+
container.children().css({
|
471
|
+
"transform":"",
|
472
|
+
"-ms-transform":"",
|
473
|
+
"-webkit-transition-duration":"",
|
474
|
+
"-moz-transition-duration": "",
|
475
|
+
"-o-transition-duration": "",
|
476
|
+
"transition-duration":""
|
477
|
+
});
|
478
|
+
callback();
|
479
|
+
}, settings.animation_speed);
|
480
|
+
}
|
481
|
+
container.children().css({
|
482
|
+
"transform":"",
|
483
|
+
"-ms-transform":"",
|
484
|
+
"-webkit-transition-duration":"",
|
485
|
+
"-moz-transition-duration": "",
|
486
|
+
"-o-transition-duration": "",
|
487
|
+
"transition-duration":""
|
488
|
+
});
|
489
|
+
current.addClass("animate-out");
|
490
|
+
next.addClass("animate-in");
|
491
|
+
};
|
492
|
+
|
493
|
+
this.prev = function(current, prev, callback) {
|
494
|
+
if (Modernizr.csstransitions) {
|
495
|
+
prev.on(animation_end, function(e){
|
496
|
+
prev.unbind(animation_end);
|
497
|
+
current.removeClass("active animate-out");
|
498
|
+
container.children().css({
|
499
|
+
"transform":"",
|
500
|
+
"-ms-transform":"",
|
501
|
+
"-webkit-transition-duration":"",
|
502
|
+
"-moz-transition-duration": "",
|
503
|
+
"-o-transition-duration": "",
|
504
|
+
"transition-duration":""
|
505
|
+
});
|
506
|
+
callback();
|
507
|
+
});
|
508
|
+
} else {
|
509
|
+
setTimeout(function(){
|
510
|
+
current.removeClass("active animate-out");
|
511
|
+
container.children().css({
|
512
|
+
"transform":"",
|
513
|
+
"-ms-transform":"",
|
514
|
+
"-webkit-transition-duration":"",
|
515
|
+
"-moz-transition-duration": "",
|
516
|
+
"-o-transition-duration": "",
|
517
|
+
"transition-duration":""
|
518
|
+
});
|
519
|
+
callback();
|
520
|
+
}, settings.animation_speed);
|
521
|
+
}
|
522
|
+
container.children().css({
|
523
|
+
"transform":"",
|
524
|
+
"-ms-transform":"",
|
525
|
+
"-webkit-transition-duration":"",
|
526
|
+
"-moz-transition-duration": "",
|
527
|
+
"-o-transition-duration": "",
|
528
|
+
"transition-duration":""
|
529
|
+
});
|
530
|
+
current.addClass("animate-out");
|
531
|
+
prev.addClass("animate-in");
|
532
|
+
};
|
533
|
+
};
|
534
|
+
|
535
|
+
|
536
|
+
Foundation.libs = Foundation.libs || {};
|
537
|
+
|
538
|
+
Foundation.libs.orbit = {
|
539
|
+
name: 'orbit',
|
540
|
+
|
541
|
+
version: '5.2.3',
|
542
|
+
|
543
|
+
settings: {
|
544
|
+
animation: 'slide',
|
545
|
+
timer_speed: 10000,
|
546
|
+
pause_on_hover: true,
|
547
|
+
resume_on_mouseout: false,
|
548
|
+
next_on_click: true,
|
549
|
+
animation_speed: 500,
|
550
|
+
stack_on_small: false,
|
551
|
+
navigation_arrows: true,
|
552
|
+
slide_number: true,
|
553
|
+
slide_number_text: 'of',
|
554
|
+
container_class: 'orbit-container',
|
555
|
+
stack_on_small_class: 'orbit-stack-on-small',
|
556
|
+
next_class: 'orbit-next',
|
557
|
+
prev_class: 'orbit-prev',
|
558
|
+
timer_container_class: 'orbit-timer',
|
559
|
+
timer_paused_class: 'paused',
|
560
|
+
timer_progress_class: 'orbit-progress',
|
561
|
+
timer_show_progress_bar: true,
|
562
|
+
slides_container_class: 'orbit-slides-container',
|
563
|
+
preloader_class: 'preloader',
|
564
|
+
slide_selector: '*',
|
565
|
+
bullets_container_class: 'orbit-bullets',
|
566
|
+
bullets_active_class: 'active',
|
567
|
+
slide_number_class: 'orbit-slide-number',
|
568
|
+
caption_class: 'orbit-caption',
|
569
|
+
active_slide_class: 'active',
|
570
|
+
orbit_transition_class: 'orbit-transitioning',
|
571
|
+
bullets: true,
|
572
|
+
circular: true,
|
573
|
+
timer: true,
|
574
|
+
variable_height: false,
|
575
|
+
swipe: true,
|
576
|
+
before_slide_change: noop,
|
577
|
+
after_slide_change: noop
|
578
|
+
},
|
579
|
+
|
580
|
+
init : function (scope, method, options) {
|
581
|
+
var self = this;
|
582
|
+
this.bindings(method, options);
|
583
|
+
},
|
584
|
+
|
585
|
+
events : function (instance) {
|
586
|
+
var self = this;
|
587
|
+
var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
|
588
|
+
this.S(instance).data(self.name + '-instance', orbit_instance);
|
589
|
+
},
|
590
|
+
|
591
|
+
reflow : function () {
|
592
|
+
var self = this;
|
593
|
+
|
594
|
+
if (self.S(self.scope).is('[data-orbit]')) {
|
595
|
+
var $el = self.S(self.scope);
|
596
|
+
var instance = $el.data(self.name + '-instance');
|
597
|
+
instance.compute_dimensions();
|
598
|
+
} else {
|
599
|
+
self.S('[data-orbit]', self.scope).each(function(idx, el) {
|
600
|
+
var $el = self.S(el);
|
601
|
+
var opts = self.data_options($el);
|
602
|
+
var instance = $el.data(self.name + '-instance');
|
603
|
+
instance.compute_dimensions();
|
604
|
+
});
|
605
|
+
}
|
606
|
+
}
|
607
|
+
};
|
608
|
+
|
609
|
+
|
610
|
+
}(jQuery, window, window.document));
|