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,191 @@
|
|
1
|
+
// Foundation by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
@import "global";
|
6
|
+
@import "buttons";
|
7
|
+
@import "dropdown-buttons";
|
8
|
+
|
9
|
+
//
|
10
|
+
// @name _split-buttons.scss
|
11
|
+
// @dependencies _buttons.scss, _global.scss
|
12
|
+
//
|
13
|
+
|
14
|
+
//
|
15
|
+
// @variables
|
16
|
+
//
|
17
|
+
|
18
|
+
$include-html-button-classes: $include-html-classes !default;
|
19
|
+
|
20
|
+
// We use these to control different shared styles for Split Buttons
|
21
|
+
$split-button-function-factor: 10% !default;
|
22
|
+
$split-button-pip-color: #fff !default;
|
23
|
+
$split-button-pip-color-alt: #333 !default;
|
24
|
+
$split-button-active-bg-tint: rgba(0,0,0,0.1) !default;
|
25
|
+
|
26
|
+
// We use these to control tiny split buttons
|
27
|
+
$split-button-padding-tny: $button-pip-tny * 10 !default;
|
28
|
+
$split-button-span-width-tny: $button-pip-tny * 6 !default;
|
29
|
+
$split-button-pip-size-tny: $button-pip-tny !default;
|
30
|
+
$split-button-pip-top-tny: $button-pip-tny * 2 !default;
|
31
|
+
$split-button-pip-default-float-tny: rem-calc(-6) !default;
|
32
|
+
|
33
|
+
// We use these to control small split buttons
|
34
|
+
$split-button-padding-sml: $button-pip-sml * 10 !default;
|
35
|
+
$split-button-span-width-sml: $button-pip-sml * 6 !default;
|
36
|
+
$split-button-pip-size-sml: $button-pip-sml !default;
|
37
|
+
$split-button-pip-top-sml: $button-pip-sml * 1.5 !default;
|
38
|
+
$split-button-pip-default-float-sml: rem-calc(-6) !default;
|
39
|
+
|
40
|
+
// We use these to control medium split buttons
|
41
|
+
$split-button-padding-med: $button-pip-med * 9 !default;
|
42
|
+
$split-button-span-width-med: $button-pip-med * 5.5 !default;
|
43
|
+
$split-button-pip-size-med: $button-pip-med - rem-calc(3) !default;
|
44
|
+
$split-button-pip-top-med: $button-pip-med * 1.5 !default;
|
45
|
+
$split-button-pip-default-float-med: rem-calc(-6) !default;
|
46
|
+
|
47
|
+
// We use these to control large split buttons
|
48
|
+
$split-button-padding-lrg: $button-pip-lrg * 8 !default;
|
49
|
+
$split-button-span-width-lrg: $button-pip-lrg * 5 !default;
|
50
|
+
$split-button-pip-size-lrg: $button-pip-lrg - rem-calc(6) !default;
|
51
|
+
$split-button-pip-top-lrg: $button-pip-lrg + rem-calc(5) !default;
|
52
|
+
$split-button-pip-default-float-lrg: rem-calc(-6) !default;
|
53
|
+
|
54
|
+
|
55
|
+
//
|
56
|
+
// @mixins
|
57
|
+
//
|
58
|
+
|
59
|
+
// We use this mixin to create split buttons that build upon the button mixins
|
60
|
+
//
|
61
|
+
// $padding - Type of padding to apply. Default: medium. Options: tiny, small, medium, large.
|
62
|
+
// $pip-color - Color of the triangle. Default: $split-button-pip-color.
|
63
|
+
// $span-border - Border color of button divider. Default: $primary-color.
|
64
|
+
// $base-style - Apply base style to split button. Default: true.
|
65
|
+
@mixin split-button(
|
66
|
+
$padding:medium,
|
67
|
+
$pip-color:$split-button-pip-color,
|
68
|
+
$span-border:$primary-color,
|
69
|
+
$base-style:true) {
|
70
|
+
|
71
|
+
// With this, we can control whether or not the base styles come through.
|
72
|
+
@if $base-style {
|
73
|
+
position: relative;
|
74
|
+
|
75
|
+
// Styling for the split arrow clickable area
|
76
|
+
span {
|
77
|
+
display: block;
|
78
|
+
height: 100%;
|
79
|
+
position: absolute;
|
80
|
+
#{$opposite-direction}: 0;
|
81
|
+
top: 0;
|
82
|
+
border-#{$default-float}: solid 1px;
|
83
|
+
|
84
|
+
// Building the triangle pip indicator
|
85
|
+
&:after {
|
86
|
+
position: absolute;
|
87
|
+
content: "";
|
88
|
+
width: 0;
|
89
|
+
height: 0;
|
90
|
+
display: block;
|
91
|
+
border-style: inset;
|
92
|
+
top: 50%;
|
93
|
+
|
94
|
+
#{$default-float}: 50%;
|
95
|
+
}
|
96
|
+
|
97
|
+
&:active { background-color: $split-button-active-bg-tint; }
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
// Control the border color for the span area of the split button
|
102
|
+
@if $span-border {
|
103
|
+
span {
|
104
|
+
border-#{$default-float}-color: rgba(255,255,255,0.5);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
// Style of the button and clickable area for tiny sizes
|
109
|
+
@if $padding == tiny {
|
110
|
+
padding-#{$opposite-direction}: $split-button-padding-tny;
|
111
|
+
|
112
|
+
span { width: $split-button-span-width-tny;
|
113
|
+
&:after {
|
114
|
+
border-top-style: solid;
|
115
|
+
border-width: $split-button-pip-size-tny;
|
116
|
+
top: 48%;
|
117
|
+
margin-#{$default-float}: $split-button-pip-default-float-tny;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
// Style of the button and clickable area for small sizes
|
123
|
+
@else if $padding == small {
|
124
|
+
padding-#{$opposite-direction}: $split-button-padding-sml;
|
125
|
+
|
126
|
+
span { width: $split-button-span-width-sml;
|
127
|
+
&:after {
|
128
|
+
border-top-style: solid;
|
129
|
+
border-width: $split-button-pip-size-sml;
|
130
|
+
top: 48%;
|
131
|
+
margin-#{$default-float}: $split-button-pip-default-float-sml;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
// Style of the button and clickable area for default (medium) sizes
|
137
|
+
@else if $padding == medium {
|
138
|
+
padding-#{$opposite-direction}: $split-button-padding-med;
|
139
|
+
|
140
|
+
span { width: $split-button-span-width-med;
|
141
|
+
&:after {
|
142
|
+
border-top-style: solid;
|
143
|
+
border-width: $split-button-pip-size-med;
|
144
|
+
top: 48%;
|
145
|
+
margin-#{$default-float}: $split-button-pip-default-float-med;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
// Style of the button and clickable area for large sizes
|
151
|
+
@else if $padding == large {
|
152
|
+
padding-#{$opposite-direction}: $split-button-padding-lrg;
|
153
|
+
|
154
|
+
span { width: $split-button-span-width-lrg;
|
155
|
+
&:after {
|
156
|
+
border-top-style: solid;
|
157
|
+
border-width: $split-button-pip-size-lrg;
|
158
|
+
top: 48%;
|
159
|
+
margin-#{$default-float}: $split-button-pip-default-float-lrg;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
// Control the color of the triangle pip
|
165
|
+
@if $pip-color {
|
166
|
+
span:after { border-color: $pip-color transparent transparent transparent; }
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
@include exports("split-button") {
|
171
|
+
@if $include-html-button-classes {
|
172
|
+
|
173
|
+
.split.button { @include split-button;
|
174
|
+
|
175
|
+
&.secondary { @include split-button(false, $split-button-pip-color, $secondary-color, false); }
|
176
|
+
&.alert { @include split-button(false, false, $alert-color, false); }
|
177
|
+
&.success { @include split-button(false, false, $success-color, false); }
|
178
|
+
|
179
|
+
&.tiny { @include split-button(tiny, false, false, false); }
|
180
|
+
&.small { @include split-button(small, false, false, false); }
|
181
|
+
&.large { @include split-button(large, false, false, false); }
|
182
|
+
&.expand { padding-left: 2rem; }
|
183
|
+
|
184
|
+
&.secondary { @include split-button(false, $split-button-pip-color-alt, false, false); }
|
185
|
+
|
186
|
+
&.radius span { @include side-radius($opposite-direction, $global-radius); }
|
187
|
+
&.round span { @include side-radius($opposite-direction, 1000px); }
|
188
|
+
}
|
189
|
+
|
190
|
+
}
|
191
|
+
}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
// Foundation by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
@import "global";
|
6
|
+
|
7
|
+
//
|
8
|
+
// @name _sub-nav.scss
|
9
|
+
// @dependencies _global.scss
|
10
|
+
//
|
11
|
+
|
12
|
+
//
|
13
|
+
// @variables
|
14
|
+
//
|
15
|
+
|
16
|
+
$include-html-nav-classes: $include-html-classes !default;
|
17
|
+
|
18
|
+
// We use these to control margin and padding
|
19
|
+
$sub-nav-list-margin: rem-calc(-4 0 18) !default;
|
20
|
+
$sub-nav-list-padding-top: rem-calc(4) !default;
|
21
|
+
|
22
|
+
// We use this to control the definition
|
23
|
+
$sub-nav-font-family: $body-font-family !default;
|
24
|
+
$sub-nav-font-size: rem-calc(14) !default;
|
25
|
+
$sub-nav-font-color: #999 !default;
|
26
|
+
$sub-nav-font-weight: $font-weight-normal !default;
|
27
|
+
$sub-nav-text-decoration: none !default;
|
28
|
+
$sub-nav-padding: rem-calc(3 16) !default;
|
29
|
+
$sub-nav-border-radius: 3px !default;
|
30
|
+
$sub-nav-font-color-hover: scale-color($sub-nav-font-color, $lightness: -25%) !default;
|
31
|
+
|
32
|
+
|
33
|
+
// We use these to control the active item styles
|
34
|
+
|
35
|
+
$sub-nav-active-font-weight: $font-weight-normal !default;
|
36
|
+
$sub-nav-active-bg: $primary-color !default;
|
37
|
+
$sub-nav-active-bg-hover: scale-color($sub-nav-active-bg, $lightness: -14%) !default;
|
38
|
+
$sub-nav-active-color: #fff !default;
|
39
|
+
$sub-nav-active-padding: $sub-nav-padding !default;
|
40
|
+
$sub-nav-active-cursor: default !default;
|
41
|
+
|
42
|
+
$sub-nav-item-divider: "" !default;
|
43
|
+
$sub-nav-item-divider-margin: rem-calc(12) !default;
|
44
|
+
|
45
|
+
//
|
46
|
+
// @mixins
|
47
|
+
//
|
48
|
+
|
49
|
+
|
50
|
+
// Create a sub-nav item
|
51
|
+
//
|
52
|
+
// $font-color - Font color. Default: $sub-nav-font-color.
|
53
|
+
// $font-size - Font size. Default: $sub-nav-font-size.
|
54
|
+
// $active-bg - Background of active nav item. Default: $sub-nav-active-bg.
|
55
|
+
// $active-bg-hover - Background of active nav item, when hovered. Default: $sub-nav-active-bg-hover.
|
56
|
+
@mixin sub-nav(
|
57
|
+
$font-color: $sub-nav-font-color,
|
58
|
+
$font-size: $sub-nav-font-size,
|
59
|
+
$active-bg: $sub-nav-active-bg,
|
60
|
+
$active-bg-hover: $sub-nav-active-bg-hover) {
|
61
|
+
display: block;
|
62
|
+
width: auto;
|
63
|
+
overflow: hidden;
|
64
|
+
margin: $sub-nav-list-margin;
|
65
|
+
padding-top: $sub-nav-list-padding-top;
|
66
|
+
margin-#{$opposite-direction}: 0;
|
67
|
+
margin-#{$default-float}: rem-calc(-12);
|
68
|
+
|
69
|
+
dt {
|
70
|
+
text-transform: uppercase;
|
71
|
+
}
|
72
|
+
|
73
|
+
dt,
|
74
|
+
dd,
|
75
|
+
li {
|
76
|
+
float: $default-float;
|
77
|
+
display: inline;
|
78
|
+
margin-#{$default-float}: rem-calc(16);
|
79
|
+
margin-bottom: rem-calc(10);
|
80
|
+
font-family: $sub-nav-font-family;
|
81
|
+
font-weight: $sub-nav-font-weight;
|
82
|
+
font-size: $font-size;
|
83
|
+
color: $font-color;
|
84
|
+
|
85
|
+
a {
|
86
|
+
text-decoration: $sub-nav-text-decoration;
|
87
|
+
color: $sub-nav-font-color;
|
88
|
+
padding: $sub-nav-padding;
|
89
|
+
&:hover {
|
90
|
+
color: $sub-nav-font-color-hover;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
&.active a {
|
95
|
+
@include radius($sub-nav-border-radius);
|
96
|
+
font-weight: $sub-nav-active-font-weight;
|
97
|
+
background: $active-bg;
|
98
|
+
padding: $sub-nav-active-padding;
|
99
|
+
cursor: $sub-nav-active-cursor;
|
100
|
+
color: $sub-nav-active-color;
|
101
|
+
&:hover {
|
102
|
+
background: $active-bg-hover;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
@if $sub-nav-item-divider != "" {
|
106
|
+
margin-#{$default-float}: 0;
|
107
|
+
|
108
|
+
&:before {
|
109
|
+
content: "#{$sub-nav-item-divider}";
|
110
|
+
margin: 0 $sub-nav-item-divider-margin;
|
111
|
+
}
|
112
|
+
|
113
|
+
&:first-child:before {
|
114
|
+
content: "";
|
115
|
+
margin: 0;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
@include exports("sub-nav") {
|
122
|
+
@if $include-html-nav-classes {
|
123
|
+
.sub-nav { @include sub-nav; }
|
124
|
+
}
|
125
|
+
}
|
@@ -0,0 +1,294 @@
|
|
1
|
+
// Foundation by ZURB
|
2
|
+
// foundation.zurb.com
|
3
|
+
// Licensed under MIT Open Source
|
4
|
+
|
5
|
+
@import "global";
|
6
|
+
|
7
|
+
//
|
8
|
+
// @name
|
9
|
+
// @dependencies _global.scss
|
10
|
+
//
|
11
|
+
|
12
|
+
//
|
13
|
+
// @variables
|
14
|
+
//
|
15
|
+
|
16
|
+
// NOTE: Switches have been deprecated in Foundation 5 and will be removed in the future.
|
17
|
+
|
18
|
+
$include-html-form-classes: $include-html-classes !default;
|
19
|
+
|
20
|
+
// Controlling border styles and background colors for the switch container
|
21
|
+
$switch-border-color: scale-color(#fff, $lightness: -20%) !default;
|
22
|
+
$switch-border-style: solid !default;
|
23
|
+
$switch-border-width: 1px !default;
|
24
|
+
$switch-bg: #fff !default;
|
25
|
+
|
26
|
+
// We use these to control the switch heights for our default classes
|
27
|
+
$switch-height-tny: 22px !default;
|
28
|
+
$switch-height-sml: 28px !default;
|
29
|
+
$switch-height-med: 36px !default;
|
30
|
+
$switch-height-lrg: 44px !default;
|
31
|
+
$switch-bottom-margin: rem-calc(20) !default;
|
32
|
+
|
33
|
+
// We use these to control default font sizes for our classes.
|
34
|
+
$switch-font-size-tny: 11px !default;
|
35
|
+
$switch-font-size-sml: 12px !default;
|
36
|
+
$switch-font-size-med: 14px !default;
|
37
|
+
$switch-font-size-lrg: 17px !default;
|
38
|
+
$switch-label-side-padding: 6px !default;
|
39
|
+
|
40
|
+
// We use these to style the switch-paddle
|
41
|
+
$switch-paddle-bg: #fff !default;
|
42
|
+
$switch-paddle-fade-to-color: scale-color($switch-paddle-bg, $lightness: -10%) !default;
|
43
|
+
$switch-paddle-border-color: scale-color($switch-paddle-bg, $lightness: -35%) !default;
|
44
|
+
$switch-paddle-border-width: 1px !default;
|
45
|
+
$switch-paddle-border-style: solid !default;
|
46
|
+
$switch-paddle-transition-speed: .1s !default;
|
47
|
+
$switch-paddle-transition-ease: ease-out !default;
|
48
|
+
$switch-positive-color: scale-color($success-color, $lightness: 94%) !default;
|
49
|
+
$switch-negative-color: #f5f5f5 !default;
|
50
|
+
|
51
|
+
// Outline Style for tabbing through switches
|
52
|
+
$switch-label-outline: 1px dotted #888 !default;
|
53
|
+
|
54
|
+
|
55
|
+
//
|
56
|
+
// @mixins
|
57
|
+
//
|
58
|
+
|
59
|
+
// We use this mixin to create the base styles for our switch element.
|
60
|
+
//
|
61
|
+
// $transition-speed - Time in ms for switch to toggle. Default: $switch-paddle-transition-speed.
|
62
|
+
// $transition-ease - Easing function to use for animation (i.e. ease-out). Default: $switch-paddle-transition-ease.
|
63
|
+
@mixin switch-base(
|
64
|
+
$transition-speed:$switch-paddle-transition-speed,
|
65
|
+
$transition-ease:$switch-paddle-transition-ease) {
|
66
|
+
|
67
|
+
// Default position and structure for switch container.
|
68
|
+
position: relative;
|
69
|
+
padding: 0;
|
70
|
+
display: block;
|
71
|
+
overflow: hidden;
|
72
|
+
border-style: $switch-border-style;
|
73
|
+
border-width: $switch-border-width;
|
74
|
+
margin-bottom: $switch-bottom-margin;
|
75
|
+
|
76
|
+
// Default label styles for type and transition
|
77
|
+
label {
|
78
|
+
position: relative;
|
79
|
+
#{$default-float}: 0;
|
80
|
+
z-index: 2;
|
81
|
+
float: $default-float;
|
82
|
+
width: 50%;
|
83
|
+
height: 100%;
|
84
|
+
margin: 0;
|
85
|
+
font-weight: $font-weight-bold;
|
86
|
+
text-align: $default-float;
|
87
|
+
|
88
|
+
// Transition for the switch label to follow paddle
|
89
|
+
@include single-transition(all, $transition-speed, $transition-ease);
|
90
|
+
}
|
91
|
+
|
92
|
+
// So that we don't need to recreate the form with any JS, we use the
|
93
|
+
// existing radio button, but we cleverly position and hide it.
|
94
|
+
input {
|
95
|
+
position: absolute;
|
96
|
+
z-index: 3;
|
97
|
+
opacity: 0;
|
98
|
+
width: 100%;
|
99
|
+
height: 100%;
|
100
|
+
-moz-appearance: none;
|
101
|
+
|
102
|
+
// Hover and focus styles for the paddle
|
103
|
+
&:hover,
|
104
|
+
&:focus {
|
105
|
+
cursor: $cursor-pointer-value;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
// The toggle area for radio switches. We call is a paddle.
|
110
|
+
span:last-child {
|
111
|
+
position: absolute;
|
112
|
+
top: -1px;
|
113
|
+
#{$default-float}: -1px;
|
114
|
+
z-index: 1;
|
115
|
+
display: block;
|
116
|
+
padding: 0;
|
117
|
+
border-width: $switch-paddle-border-width;
|
118
|
+
border-style: $switch-paddle-border-style;
|
119
|
+
|
120
|
+
// Transition for the switch paddle
|
121
|
+
@include single-transition(all, $transition-speed, $transition-ease);
|
122
|
+
}
|
123
|
+
|
124
|
+
// When a label isn't :checked, we hide it as it slides away.
|
125
|
+
input:not(:checked) + label { opacity: 0; }
|
126
|
+
|
127
|
+
// Controlling the position of the labels as they are toggled.
|
128
|
+
input:checked { display: none !important; }
|
129
|
+
input { #{$default-float}: 0; display: block !important; }
|
130
|
+
|
131
|
+
// Left Label alignment and position changes, including fixes for while inside a custom form
|
132
|
+
input:first-of-type + label,
|
133
|
+
input:first-of-type + span + label { #{$default-float}: -50%; }
|
134
|
+
input:first-of-type:checked + label,
|
135
|
+
input:first-of-type:checked + span + label { #{$default-float}: 0%; }
|
136
|
+
|
137
|
+
// Right Label alignment and position changes, including fixes for while inside a custom form
|
138
|
+
input:last-of-type + label,
|
139
|
+
input:last-of-type + span + label {#{$opposite-direction}: -50%; #{$default-float}: auto; text-align: $opposite-direction; }
|
140
|
+
input:last-of-type:checked + label,
|
141
|
+
input:last-of-type:checked + span + label { #{$opposite-direction}: 0%; #{$default-float}: auto; }
|
142
|
+
|
143
|
+
// Hiding custom form spans since we auto-create them
|
144
|
+
span.custom { display: none !important; }
|
145
|
+
|
146
|
+
form.custom & .hidden-field {
|
147
|
+
margin-left: auto;
|
148
|
+
position: absolute;
|
149
|
+
visibility: visible;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
// We use this mixin to create the size styles for switches.
|
154
|
+
//
|
155
|
+
// $height - Height (in px) of the switch. Default: $switch-height-med.
|
156
|
+
// $font-size - Font size of text in switch. Default: $switch-font-size-med.
|
157
|
+
// $line-height - Line height of switch. Default: 2.3rem.
|
158
|
+
@mixin switch-size(
|
159
|
+
$height: $switch-height-med,
|
160
|
+
$font-size: $switch-font-size-med,
|
161
|
+
$line-height: 2.3rem) {
|
162
|
+
|
163
|
+
height: rem-calc($height);
|
164
|
+
|
165
|
+
label {
|
166
|
+
padding: rem-calc(0, $switch-label-side-padding);
|
167
|
+
line-height: $line-height;
|
168
|
+
font-size: rem-calc($font-size);
|
169
|
+
}
|
170
|
+
|
171
|
+
input {
|
172
|
+
// Move the paddle to the right position
|
173
|
+
&:first-of-type:checked ~ span:last-child {
|
174
|
+
#{$default-float}: 100%;
|
175
|
+
margin-#{$default-float}: rem-calc(-$height + 1px);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
span:last-child {
|
180
|
+
width: rem-calc($height);
|
181
|
+
height: rem-calc($height);
|
182
|
+
}
|
183
|
+
|
184
|
+
}
|
185
|
+
|
186
|
+
// We use this mixin to add color and other fanciness to the switches.
|
187
|
+
//
|
188
|
+
// $paddle-bg - Background of switch paddle. Default: $switch-paddle-bg.
|
189
|
+
// $positive-color - Background color of positive side of switch. Default: $switch-positive-color.
|
190
|
+
// $negative-color - Background color of negative side of switch. Default: $switch-negative-color.
|
191
|
+
// $radius - Radius to apply to switch. Default: false.
|
192
|
+
// $base-style - Apply base styles? Default: true.
|
193
|
+
@mixin switch-style(
|
194
|
+
$paddle-bg:$switch-paddle-bg,
|
195
|
+
$positive-color:$switch-positive-color,
|
196
|
+
$negative-color:$switch-negative-color,
|
197
|
+
$radius:false,
|
198
|
+
$base-style:true) {
|
199
|
+
|
200
|
+
@if $base-style {
|
201
|
+
background: $switch-bg;
|
202
|
+
border-color: $switch-border-color;
|
203
|
+
|
204
|
+
span:last-child {
|
205
|
+
border-color: scale-color($paddle-bg, $lightness: -30%);
|
206
|
+
background: $paddle-bg;
|
207
|
+
background: linear-gradient(to bottom, $paddle-bg 0%, scale-color($paddle-bg, $lightness: -5%) 100%);
|
208
|
+
|
209
|
+
// Building the alternating colored sides of the switch
|
210
|
+
box-shadow: 2px 0 10px 0 rgba(0,0,0,0.07),
|
211
|
+
1000px 0 0 980px $positive-color,
|
212
|
+
-2px 0 10px 0 rgba(0,0,0,0.07),
|
213
|
+
-1000px 0 0 1000px $negative-color;
|
214
|
+
}
|
215
|
+
|
216
|
+
&:hover,
|
217
|
+
&:focus {
|
218
|
+
span:last-child {
|
219
|
+
background: $paddle-bg;
|
220
|
+
background: linear-gradient(to bottom, $paddle-bg 0%, scale-color($paddle-bg, $lightness: -10%) 100%);
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
224
|
+
&:active { background: transparent; }
|
225
|
+
}
|
226
|
+
|
227
|
+
// Setting up the radius for switches
|
228
|
+
@if $radius == true {
|
229
|
+
@include radius(4px);
|
230
|
+
span:last-child { @include radius(3px); }
|
231
|
+
}
|
232
|
+
@else if $radius {
|
233
|
+
@include radius($radius);
|
234
|
+
span:last-child { @include radius($radius - 1px); }
|
235
|
+
}
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
// We use this to quickly create switches with a single mixin
|
240
|
+
//
|
241
|
+
// $transition-speed - Time in ms for switch to toggle. Default: $switch-paddle-transition-speed.
|
242
|
+
// $transition-ease - Easing function to use for animation (i.e. ease-out). Default: $switch-paddle-transition-ease.
|
243
|
+
// $height - Height (in px) of the switch. Default: $switch-height-med.
|
244
|
+
// $font-size - Font size of text in switch. Default: $switch-font-size-med.
|
245
|
+
// $line-height - Line height of switch. Default: 2.3rem.
|
246
|
+
// $paddle-bg - Background of switch paddle. Default: $switch-paddle-bg.
|
247
|
+
// $positive-color - Background color of positive side of switch. Default: $switch-positive-color.
|
248
|
+
// $negative-color - Background color of negative side of switch. Default: $switch-negative-color.
|
249
|
+
// $radius - Radius to apply to switch. Default: false.
|
250
|
+
// $base-style - Apply base styles? Default: true.
|
251
|
+
@mixin switch(
|
252
|
+
$transition-speed: $switch-paddle-transition-speed,
|
253
|
+
$transition-ease: $switch-paddle-transition-ease,
|
254
|
+
$height: $switch-height-med,
|
255
|
+
$font-size: $switch-font-size-med,
|
256
|
+
$line-height: 2.3rem,
|
257
|
+
$paddle-bg: $switch-paddle-bg,
|
258
|
+
$positive-color: $switch-positive-color,
|
259
|
+
$negative-color: $switch-negative-color,
|
260
|
+
$radius:false,
|
261
|
+
$base-style:true) {
|
262
|
+
@include switch-base($transition-speed, $transition-ease);
|
263
|
+
@include switch-size($height, $font-size, $line-height);
|
264
|
+
@include switch-style($paddle-bg, $positive-color, $negative-color, $radius, $base-style);
|
265
|
+
}
|
266
|
+
|
267
|
+
@include exports("switch") {
|
268
|
+
@if $include-html-form-classes {
|
269
|
+
div.switch {
|
270
|
+
@include switch;
|
271
|
+
|
272
|
+
// Large radio switches
|
273
|
+
&.large { @include switch-size($switch-height-lrg, $switch-font-size-lrg); }
|
274
|
+
|
275
|
+
// Small radio switches
|
276
|
+
&.small { @include switch-size($switch-height-sml, $switch-font-size-sml, 2.1rem); }
|
277
|
+
|
278
|
+
// Tiny radio switches
|
279
|
+
&.tiny { @include switch-size($switch-height-tny, $switch-font-size-tny, 1.9rem); }
|
280
|
+
|
281
|
+
// Add a radius to the switch
|
282
|
+
&.radius { @include radius(4px);
|
283
|
+
span:last-child{ @include radius(3px); }
|
284
|
+
}
|
285
|
+
|
286
|
+
// Make the switch completely round, like a pill
|
287
|
+
&.round { @include radius(1000px);
|
288
|
+
span:last-child { @include radius(999px); }
|
289
|
+
label { padding: rem-calc(0 $switch-label-side-padding + 3); }
|
290
|
+
}
|
291
|
+
|
292
|
+
}
|
293
|
+
}
|
294
|
+
}
|