locomotivecms_wagon 2.4.1 → 3.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/generators/blank/app/assets/.babelrc +3 -0
- data/generators/blank/app/assets/fonts/.empty_directory +1 -0
- data/generators/blank/app/assets/javascripts/app.js +19 -0
- data/generators/blank/app/assets/javascripts/sections/_manager.js +94 -0
- data/generators/blank/app/assets/javascripts/sections/index.js +5 -0
- data/generators/blank/app/assets/package.json.tt +35 -0
- data/generators/blank/app/assets/postcss.config.js +6 -0
- data/generators/blank/app/assets/stylesheets/app.scss +1 -0
- data/generators/blank/app/assets/webpack.common.js +47 -0
- data/generators/blank/app/assets/webpack.dev.js +7 -0
- data/generators/blank/app/assets/webpack.prod.js +12 -0
- data/generators/blank/app/views/pages/404.liquid +1 -1
- data/generators/blank/app/views/pages/index.liquid +7 -15
- data/generators/blank/app/views/pages/layouts/default.liquid +22 -0
- data/generators/blank/app/views/sections/.empty_directory +1 -0
- data/generators/page/template.liquid.tt +11 -0
- data/generators/section/%type%.js.tt +26 -0
- data/generators/section/template.liquid.tt +183 -0
- data/lib/locomotive/wagon.rb +3 -2
- data/lib/locomotive/wagon/cli.rb +38 -10
- data/lib/locomotive/wagon/commands/clone_command.rb +3 -0
- data/lib/locomotive/wagon/commands/concerns/deploy_file_concern.rb +1 -1
- data/lib/locomotive/wagon/commands/concerns/steam_concern.rb +1 -1
- data/lib/locomotive/wagon/commands/loggers/sync_logger.rb +7 -0
- data/lib/locomotive/wagon/commands/pull_command.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +19 -10
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_base_command.rb +7 -3
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_entries_command.rb +11 -2
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_types_command.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_site_command.rb +24 -5
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb +6 -1
- data/lib/locomotive/wagon/commands/push_command.rb +6 -4
- data/lib/locomotive/wagon/commands/push_sub_commands/push_pages_command.rb +6 -1
- data/lib/locomotive/wagon/commands/push_sub_commands/push_sections_command.rb +23 -0
- data/lib/locomotive/wagon/commands/push_sub_commands/push_site_command.rb +2 -0
- data/lib/locomotive/wagon/commands/serve_command.rb +1 -1
- data/lib/locomotive/wagon/commands/sync_command.rb +1 -1
- data/lib/locomotive/wagon/commands/sync_sub_commands/concerns/base_concern.rb +2 -2
- data/lib/locomotive/wagon/commands/sync_sub_commands/sync_pages_command.rb +48 -37
- data/lib/locomotive/wagon/commands/sync_sub_commands/sync_site_command.rb +15 -12
- data/lib/locomotive/wagon/commands/sync_sub_commands/sync_translations_command.rb +12 -0
- data/lib/locomotive/wagon/decorators/concerns/persist_assets_concern.rb +1 -1
- data/lib/locomotive/wagon/decorators/content_entry_decorator.rb +1 -1
- data/lib/locomotive/wagon/decorators/content_type_decorator.rb +5 -1
- data/lib/locomotive/wagon/decorators/content_type_field_decorator.rb +5 -1
- data/lib/locomotive/wagon/decorators/page_decorator.rb +11 -1
- data/lib/locomotive/wagon/decorators/section_decorator.rb +35 -0
- data/lib/locomotive/wagon/decorators/site_decorator.rb +12 -4
- data/lib/locomotive/wagon/decorators/theme_asset_decorator.rb +2 -2
- data/lib/locomotive/wagon/generators/page.rb +2 -12
- data/lib/locomotive/wagon/generators/section.rb +82 -0
- data/lib/locomotive/wagon/generators/site.rb +0 -3
- data/lib/locomotive/wagon/generators/site/base.rb +11 -28
- data/lib/locomotive/wagon/generators/site/blank.rb +1 -17
- data/lib/locomotive/wagon/generators/site/cloned.rb +1 -4
- data/lib/locomotive/wagon/generators/snippet.rb +3 -11
- data/lib/locomotive/wagon/middlewares/error_page.rb +26 -6
- data/lib/locomotive/wagon/tools/listen.rb +3 -3
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +7 -6
- data/spec/fixtures/cassettes/authenticate.yml +47 -47
- data/spec/fixtures/cassettes/delete.yml +261 -261
- data/spec/fixtures/cassettes/push.yml +4571 -1783
- data/spec/fixtures/cassettes/sync.yml +11483 -0
- data/spec/integration/cli_spec.rb +1 -1
- data/spec/integration/commands/delete_command_spec.rb +1 -2
- data/spec/integration/commands/push_command_spec.rb +4 -4
- data/spec/integration/commands/sync_command_spec.rb +54 -0
- data/spec/integration/generators/page_spec.rb +1 -1
- data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +3 -3
- metadata +55 -306
- data/generators/blank/app/views/pages/404.liquid.haml +0 -11
- data/generators/blank/app/views/pages/index.liquid.haml +0 -16
- data/generators/bootstrap/Gemfile.tt +0 -24
- data/generators/bootstrap/Guardfile +0 -22
- data/generators/bootstrap/app/content_types/.empty_directory +0 -1
- data/generators/bootstrap/app/views/pages/404.liquid +0 -18
- data/generators/bootstrap/app/views/pages/404.liquid.haml +0 -14
- data/generators/bootstrap/app/views/pages/index.liquid +0 -31
- data/generators/bootstrap/app/views/pages/index.liquid.haml +0 -25
- data/generators/bootstrap/app/views/pages/layouts/default.liquid +0 -31
- data/generators/bootstrap/app/views/pages/layouts/default.liquid.haml +0 -30
- data/generators/bootstrap/app/views/pages/layouts/simple.liquid +0 -36
- data/generators/bootstrap/app/views/pages/layouts/simple.liquid.haml +0 -29
- data/generators/bootstrap/app/views/snippets/footer.liquid +0 -5
- data/generators/bootstrap/app/views/snippets/footer.liquid.haml +0 -3
- data/generators/bootstrap/app/views/snippets/nav.liquid +0 -26
- data/generators/bootstrap/app/views/snippets/nav.liquid.haml +0 -19
- data/generators/bootstrap/config/deploy.yml +0 -16
- data/generators/bootstrap/config/metafields_schema.yml +0 -56
- data/generators/bootstrap/config/site.yml.tt +0 -48
- data/generators/bootstrap/config/translations.yml +0 -8
- data/generators/bootstrap/data/.empty_directory +0 -1
- data/generators/bootstrap/icon.png +0 -0
- data/generators/bootstrap/public/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/generators/bootstrap/public/fonts/bootstrap/glyphicons-halflings-regular.svg +0 -288
- data/generators/bootstrap/public/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/generators/bootstrap/public/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/generators/bootstrap/public/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/generators/bootstrap/public/images/favicon.png +0 -0
- data/generators/bootstrap/public/javascripts/application.js +0 -2
- data/generators/bootstrap/public/javascripts/bootstrap.min.js +0 -7
- data/generators/bootstrap/public/javascripts/bootstrap/affix.js +0 -162
- data/generators/bootstrap/public/javascripts/bootstrap/alert.js +0 -94
- data/generators/bootstrap/public/javascripts/bootstrap/button.js +0 -120
- data/generators/bootstrap/public/javascripts/bootstrap/carousel.js +0 -237
- data/generators/bootstrap/public/javascripts/bootstrap/collapse.js +0 -211
- data/generators/bootstrap/public/javascripts/bootstrap/dropdown.js +0 -165
- data/generators/bootstrap/public/javascripts/bootstrap/modal.js +0 -337
- data/generators/bootstrap/public/javascripts/bootstrap/popover.js +0 -108
- data/generators/bootstrap/public/javascripts/bootstrap/scrollspy.js +0 -172
- data/generators/bootstrap/public/javascripts/bootstrap/tab.js +0 -155
- data/generators/bootstrap/public/javascripts/bootstrap/tooltip.js +0 -514
- data/generators/bootstrap/public/javascripts/bootstrap/transition.js +0 -59
- data/generators/bootstrap/public/javascripts/jquery.min.js +0 -5
- data/generators/bootstrap/public/stylesheets/application.css +0 -7
- data/generators/bootstrap/public/stylesheets/application.scss +0 -7
- data/generators/bootstrap/public/stylesheets/bootstrap.css +0 -5
- data/generators/bootstrap/public/stylesheets/bootstrap.scss +0 -63
- data/generators/bootstrap/public/stylesheets/bootstrap/_alerts.scss +0 -73
- data/generators/bootstrap/public/stylesheets/bootstrap/_badges.scss +0 -68
- data/generators/bootstrap/public/stylesheets/bootstrap/_breadcrumbs.scss +0 -28
- data/generators/bootstrap/public/stylesheets/bootstrap/_button-groups.scss +0 -244
- data/generators/bootstrap/public/stylesheets/bootstrap/_buttons.scss +0 -168
- data/generators/bootstrap/public/stylesheets/bootstrap/_carousel.scss +0 -269
- data/generators/bootstrap/public/stylesheets/bootstrap/_close.scss +0 -36
- data/generators/bootstrap/public/stylesheets/bootstrap/_code.scss +0 -69
- data/generators/bootstrap/public/stylesheets/bootstrap/_component-animations.scss +0 -37
- data/generators/bootstrap/public/stylesheets/bootstrap/_dropdowns.scss +0 -216
- data/generators/bootstrap/public/stylesheets/bootstrap/_forms.scss +0 -611
- data/generators/bootstrap/public/stylesheets/bootstrap/_glyphicons.scss +0 -307
- data/generators/bootstrap/public/stylesheets/bootstrap/_grid.scss +0 -84
- data/generators/bootstrap/public/stylesheets/bootstrap/_input-groups.scss +0 -167
- data/generators/bootstrap/public/stylesheets/bootstrap/_jumbotron.scss +0 -52
- data/generators/bootstrap/public/stylesheets/bootstrap/_labels.scss +0 -66
- data/generators/bootstrap/public/stylesheets/bootstrap/_list-group.scss +0 -130
- data/generators/bootstrap/public/stylesheets/bootstrap/_media.scss +0 -66
- data/generators/bootstrap/public/stylesheets/bootstrap/_mixins.scss +0 -40
- data/generators/bootstrap/public/stylesheets/bootstrap/_modals.scss +0 -150
- data/generators/bootstrap/public/stylesheets/bootstrap/_navbar.scss +0 -662
- data/generators/bootstrap/public/stylesheets/bootstrap/_navs.scss +0 -242
- data/generators/bootstrap/public/stylesheets/bootstrap/_normalize.scss +0 -424
- data/generators/bootstrap/public/stylesheets/bootstrap/_pager.scss +0 -54
- data/generators/bootstrap/public/stylesheets/bootstrap/_pagination.scss +0 -89
- data/generators/bootstrap/public/stylesheets/bootstrap/_panels.scss +0 -271
- data/generators/bootstrap/public/stylesheets/bootstrap/_popovers.scss +0 -131
- data/generators/bootstrap/public/stylesheets/bootstrap/_print.scss +0 -101
- data/generators/bootstrap/public/stylesheets/bootstrap/_progress-bars.scss +0 -87
- data/generators/bootstrap/public/stylesheets/bootstrap/_responsive-embed.scss +0 -35
- data/generators/bootstrap/public/stylesheets/bootstrap/_responsive-utilities.scss +0 -179
- data/generators/bootstrap/public/stylesheets/bootstrap/_scaffolding.scss +0 -161
- data/generators/bootstrap/public/stylesheets/bootstrap/_tables.scss +0 -234
- data/generators/bootstrap/public/stylesheets/bootstrap/_theme.scss +0 -291
- data/generators/bootstrap/public/stylesheets/bootstrap/_thumbnails.scss +0 -38
- data/generators/bootstrap/public/stylesheets/bootstrap/_tooltip.scss +0 -101
- data/generators/bootstrap/public/stylesheets/bootstrap/_type.scss +0 -298
- data/generators/bootstrap/public/stylesheets/bootstrap/_utilities.scss +0 -55
- data/generators/bootstrap/public/stylesheets/bootstrap/_variables.scss +0 -872
- data/generators/bootstrap/public/stylesheets/bootstrap/_wells.scss +0 -29
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_alerts.scss +0 -14
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_background-variant.scss +0 -12
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_border-radius.scss +0 -18
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_buttons.scss +0 -68
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_clearfix.scss +0 -22
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_forms.scss +0 -88
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_gradients.scss +0 -58
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -81
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_grid.scss +0 -122
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_image.scss +0 -33
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_labels.scss +0 -12
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_list-group.scss +0 -32
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_opacity.scss +0 -8
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_pagination.scss +0 -24
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_panels.scss +0 -24
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_progress-bar.scss +0 -10
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_reset-text.scss +0 -18
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_resize.scss +0 -6
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -21
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_size.scss +0 -10
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_table-row.scss +0 -28
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -12
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -8
- data/generators/bootstrap/public/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- data/generators/foundation/Gemfile.tt +0 -24
- data/generators/foundation/Guardfile +0 -22
- data/generators/foundation/app/content_types/.gitkeep +0 -0
- data/generators/foundation/app/views/pages/404.liquid +0 -11
- data/generators/foundation/app/views/pages/404.liquid.haml +0 -11
- data/generators/foundation/app/views/pages/index.liquid +0 -172
- data/generators/foundation/app/views/pages/index.liquid.haml +0 -144
- data/generators/foundation/app/views/snippets/.gitkeep +0 -0
- data/generators/foundation/config/deploy.yml +0 -16
- data/generators/foundation/config/metafields_schema.yml +0 -56
- data/generators/foundation/config/site.yml +0 -48
- data/generators/foundation/config/translations.yml +0 -8
- data/generators/foundation/data/.gitkeep +0 -0
- data/generators/foundation/log/.gitkeep +0 -0
- data/generators/foundation/public/images/.gitkeep +0 -0
- data/generators/foundation/public/javascripts/app.js +0 -1
- data/generators/foundation/public/javascripts/vendor/foundation.js +0 -11788
- data/generators/foundation/public/javascripts/vendor/foundation.min.js +0 -5
- data/generators/foundation/public/javascripts/vendor/what-input.js +0 -212
- data/generators/foundation/public/javascripts/vendor/what-input.min.js +0 -1
- data/generators/foundation/public/stylesheets/_settings.scss +0 -869
- data/generators/foundation/public/stylesheets/app.css +0 -0
- data/generators/foundation/public/stylesheets/app.scss +0 -52
- data/generators/foundation/public/stylesheets/foundation.css +0 -5805
- data/generators/foundation/public/stylesheets/foundation6/_global.scss +0 -249
- data/generators/foundation/public/stylesheets/foundation6/components/_accordion-menu.scss +0 -171
- data/generators/foundation/public/stylesheets/foundation6/components/_accordion.scss +0 -155
- data/generators/foundation/public/stylesheets/foundation6/components/_badge.scss +0 -63
- data/generators/foundation/public/stylesheets/foundation6/components/_breadcrumbs.scss +0 -117
- data/generators/foundation/public/stylesheets/foundation6/components/_button-group.scss +0 -253
- data/generators/foundation/public/stylesheets/foundation6/components/_button.scss +0 -385
- data/generators/foundation/public/stylesheets/foundation6/components/_callout.scss +0 -106
- data/generators/foundation/public/stylesheets/foundation6/components/_card.scss +0 -129
- data/generators/foundation/public/stylesheets/foundation6/components/_close-button.scss +0 -102
- data/generators/foundation/public/stylesheets/foundation6/components/_drilldown.scss +0 -142
- data/generators/foundation/public/stylesheets/foundation6/components/_dropdown-menu.scss +0 -274
- data/generators/foundation/public/stylesheets/foundation6/components/_dropdown.scss +0 -79
- data/generators/foundation/public/stylesheets/foundation6/components/_flex-video.scss +0 -1
- data/generators/foundation/public/stylesheets/foundation6/components/_flex.scss +0 -117
- data/generators/foundation/public/stylesheets/foundation6/components/_float.scss +0 -27
- data/generators/foundation/public/stylesheets/foundation6/components/_label.scss +0 -64
- data/generators/foundation/public/stylesheets/foundation6/components/_media-object.scss +0 -114
- data/generators/foundation/public/stylesheets/foundation6/components/_menu-icon.scss +0 -9
- data/generators/foundation/public/stylesheets/foundation6/components/_menu.scss +0 -495
- data/generators/foundation/public/stylesheets/foundation6/components/_off-canvas.scss +0 -505
- data/generators/foundation/public/stylesheets/foundation6/components/_orbit.scss +0 -196
- data/generators/foundation/public/stylesheets/foundation6/components/_pagination.scss +0 -193
- data/generators/foundation/public/stylesheets/foundation6/components/_progress-bar.scss +0 -64
- data/generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss +0 -70
- data/generators/foundation/public/stylesheets/foundation6/components/_reveal.scss +0 -180
- data/generators/foundation/public/stylesheets/foundation6/components/_slider.scss +0 -137
- data/generators/foundation/public/stylesheets/foundation6/components/_sticky.scss +0 -39
- data/generators/foundation/public/stylesheets/foundation6/components/_switch.scss +0 -247
- data/generators/foundation/public/stylesheets/foundation6/components/_table.scss +0 -330
- data/generators/foundation/public/stylesheets/foundation6/components/_tabs.scss +0 -196
- data/generators/foundation/public/stylesheets/foundation6/components/_thumbnail.scss +0 -67
- data/generators/foundation/public/stylesheets/foundation6/components/_title-bar.scss +0 -84
- data/generators/foundation/public/stylesheets/foundation6/components/_tooltip.scss +0 -160
- data/generators/foundation/public/stylesheets/foundation6/components/_top-bar.scss +0 -175
- data/generators/foundation/public/stylesheets/foundation6/components/_visibility.scss +0 -132
- data/generators/foundation/public/stylesheets/foundation6/forms/_checkbox.scss +0 -41
- data/generators/foundation/public/stylesheets/foundation6/forms/_error.scss +0 -88
- data/generators/foundation/public/stylesheets/foundation6/forms/_fieldset.scss +0 -53
- data/generators/foundation/public/stylesheets/foundation6/forms/_forms.scss +0 -34
- data/generators/foundation/public/stylesheets/foundation6/forms/_help-text.scss +0 -30
- data/generators/foundation/public/stylesheets/foundation6/forms/_input-group.scss +0 -142
- data/generators/foundation/public/stylesheets/foundation6/forms/_label.scss +0 -50
- data/generators/foundation/public/stylesheets/foundation6/forms/_meter.scss +0 -116
- data/generators/foundation/public/stylesheets/foundation6/forms/_progress.scss +0 -94
- data/generators/foundation/public/stylesheets/foundation6/forms/_range.scss +0 -149
- data/generators/foundation/public/stylesheets/foundation6/forms/_select.scss +0 -86
- data/generators/foundation/public/stylesheets/foundation6/forms/_text.scss +0 -179
- data/generators/foundation/public/stylesheets/foundation6/foundation.scss +0 -133
- data/generators/foundation/public/stylesheets/foundation6/grid/_classes.scss +0 -176
- data/generators/foundation/public/stylesheets/foundation6/grid/_column.scss +0 -112
- data/generators/foundation/public/stylesheets/foundation6/grid/_flex-grid.scss +0 -259
- data/generators/foundation/public/stylesheets/foundation6/grid/_grid.scss +0 -48
- data/generators/foundation/public/stylesheets/foundation6/grid/_gutter.scss +0 -82
- data/generators/foundation/public/stylesheets/foundation6/grid/_layout.scss +0 -76
- data/generators/foundation/public/stylesheets/foundation6/grid/_position.scss +0 -76
- data/generators/foundation/public/stylesheets/foundation6/grid/_row.scss +0 -99
- data/generators/foundation/public/stylesheets/foundation6/grid/_size.scss +0 -24
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/_classes.scss +0 -109
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/_settings.scss +0 -61
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_fade.scss +0 -32
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_hinge.scss +0 -65
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_shake.scss +0 -15
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_slide.scss +0 -41
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_spin.scss +0 -28
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_wiggle.scss +0 -13
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_zoom.scss +0 -15
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/motion-ui.scss +0 -29
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_fade.scss +0 -28
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_hinge.scss +0 -43
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss +0 -42
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_spin.scss +0 -39
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_zoom.scss +0 -39
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_animation.scss +0 -7
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_args.scss +0 -15
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_keyframe.scss +0 -136
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss +0 -23
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_series.scss +0 -54
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_transition.scss +0 -45
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_unit.scss +0 -7
- data/generators/foundation/public/stylesheets/foundation6/prototype/_arrow.scss +0 -36
- data/generators/foundation/public/stylesheets/foundation6/prototype/_border-box.scss +0 -35
- data/generators/foundation/public/stylesheets/foundation6/prototype/_border-none.scss +0 -35
- data/generators/foundation/public/stylesheets/foundation6/prototype/_bordered.scss +0 -54
- data/generators/foundation/public/stylesheets/foundation6/prototype/_box.scss +0 -23
- data/generators/foundation/public/stylesheets/foundation6/prototype/_display.scss +0 -50
- data/generators/foundation/public/stylesheets/foundation6/prototype/_font-styling.scss +0 -95
- data/generators/foundation/public/stylesheets/foundation6/prototype/_list-style-type.scss +0 -95
- data/generators/foundation/public/stylesheets/foundation6/prototype/_overflow.scss +0 -72
- data/generators/foundation/public/stylesheets/foundation6/prototype/_position.scss +0 -114
- data/generators/foundation/public/stylesheets/foundation6/prototype/_prototype.scss +0 -87
- data/generators/foundation/public/stylesheets/foundation6/prototype/_relation.scss +0 -157
- data/generators/foundation/public/stylesheets/foundation6/prototype/_rotate.scss +0 -31
- data/generators/foundation/public/stylesheets/foundation6/prototype/_rounded.scss +0 -54
- data/generators/foundation/public/stylesheets/foundation6/prototype/_separator.scss +0 -96
- data/generators/foundation/public/stylesheets/foundation6/prototype/_shadow.scss +0 -43
- data/generators/foundation/public/stylesheets/foundation6/prototype/_sizing.scss +0 -73
- data/generators/foundation/public/stylesheets/foundation6/prototype/_spacing.scss +0 -204
- data/generators/foundation/public/stylesheets/foundation6/prototype/_text-decoration.scss +0 -48
- data/generators/foundation/public/stylesheets/foundation6/prototype/_text-transformation.scss +0 -48
- data/generators/foundation/public/stylesheets/foundation6/prototype/_text-utilities.scss +0 -88
- data/generators/foundation/public/stylesheets/foundation6/settings/_settings.scss +0 -869
- data/generators/foundation/public/stylesheets/foundation6/typography/_alignment.scss +0 -22
- data/generators/foundation/public/stylesheets/foundation6/typography/_base.scss +0 -509
- data/generators/foundation/public/stylesheets/foundation6/typography/_helpers.scss +0 -80
- data/generators/foundation/public/stylesheets/foundation6/typography/_print.scss +0 -86
- data/generators/foundation/public/stylesheets/foundation6/typography/_typography.scss +0 -26
- data/generators/foundation/public/stylesheets/foundation6/util/_breakpoint.scss +0 -348
- data/generators/foundation/public/stylesheets/foundation6/util/_color.scss +0 -129
- data/generators/foundation/public/stylesheets/foundation6/util/_direction.scss +0 -31
- data/generators/foundation/public/stylesheets/foundation6/util/_flex.scss +0 -85
- data/generators/foundation/public/stylesheets/foundation6/util/_math.scss +0 -72
- data/generators/foundation/public/stylesheets/foundation6/util/_mixins.scss +0 -313
- data/generators/foundation/public/stylesheets/foundation6/util/_selector.scss +0 -41
- data/generators/foundation/public/stylesheets/foundation6/util/_typography.scss +0 -26
- data/generators/foundation/public/stylesheets/foundation6/util/_unit.scss +0 -152
- data/generators/foundation/public/stylesheets/foundation6/util/_util.scss +0 -14
- data/generators/foundation/public/stylesheets/foundation6/util/_value.scss +0 -160
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/_normalize.scss +0 -3
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_import-now.scss +0 -11
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +0 -676
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_variables.scss +0 -36
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +0 -61
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_contain.scss +0 -31
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_purge.scss +0 -38
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_remove.scss +0 -31
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_replace.scss +0 -46
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_to-list.scss +0 -27
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +0 -25
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_true.scss +0 -13
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_cell.scss +0 -169
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_classes.scss +0 -476
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_collapse.scss +0 -74
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_frame.scss +0 -85
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_grid.scss +0 -35
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_gutters.scss +0 -45
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_layout.scss +0 -33
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_position.scss +0 -28
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_xy-grid.scss +0 -51
- data/generators/page/template.liquid.haml.tt +0 -47
- data/generators/snippet/template.liquid.haml.tt +0 -4
- data/lib/locomotive/wagon/generators/site/bootstrap.rb +0 -52
- data/lib/locomotive/wagon/generators/site/foundation.rb +0 -44
- data/lib/locomotive/wagon/generators/site/line_case.rb +0 -20
@@ -1,70 +0,0 @@
|
|
1
|
-
// Foundation for Sites by ZURB
|
2
|
-
// foundation.zurb.com
|
3
|
-
// Licensed under MIT Open Source
|
4
|
-
|
5
|
-
////
|
6
|
-
/// @group responsive-embed
|
7
|
-
////
|
8
|
-
|
9
|
-
/// Margin below a responsive embed container.
|
10
|
-
/// @type Number
|
11
|
-
$responsive-embed-margin-bottom: rem-calc(16) !default;
|
12
|
-
|
13
|
-
/// Aspect ratios used to determine padding-bottom of responsive embed containers.
|
14
|
-
/// @type Map
|
15
|
-
$responsive-embed-ratios: (
|
16
|
-
default: 4 by 3,
|
17
|
-
widescreen: 16 by 9,
|
18
|
-
) !default;
|
19
|
-
|
20
|
-
// WARNING: Will be removed in version 6.4
|
21
|
-
$responsive-embed-ratio: default;
|
22
|
-
|
23
|
-
/// Creates a responsive embed container.
|
24
|
-
/// @param {String|List} $ratio [default] - Ratio of the container. Can be a key from the `$responsive-embed-ratios` map or a list formatted as `x by y`.
|
25
|
-
@mixin responsive-embed($ratio: default) {
|
26
|
-
@if type-of($ratio) == 'string' {
|
27
|
-
$ratio: map-get($responsive-embed-ratios, $ratio);
|
28
|
-
}
|
29
|
-
position: relative;
|
30
|
-
height: 0;
|
31
|
-
margin-bottom: $responsive-embed-margin-bottom;
|
32
|
-
padding-bottom: ratio-to-percentage($ratio);
|
33
|
-
overflow: hidden;
|
34
|
-
|
35
|
-
iframe,
|
36
|
-
object,
|
37
|
-
embed,
|
38
|
-
video {
|
39
|
-
position: absolute;
|
40
|
-
top: 0;
|
41
|
-
#{$global-left}: 0;
|
42
|
-
width: 100%;
|
43
|
-
height: 100%;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
@mixin foundation-responsive-embed {
|
48
|
-
.responsive-embed,
|
49
|
-
.flex-video {
|
50
|
-
@include responsive-embed($ratio: default);
|
51
|
-
|
52
|
-
$ratios: map-remove($responsive-embed-ratios,default);
|
53
|
-
|
54
|
-
@each $name, $ratio in $ratios {
|
55
|
-
&.#{$name} {
|
56
|
-
padding-bottom: ratio-to-percentage($ratio);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}
|
61
|
-
|
62
|
-
@mixin foundation-flex-video {
|
63
|
-
@warn 'This mixin is being replaced by foundation-responsive-embed(). foundation-flex-video() will be removed in Foundation 6.4.';
|
64
|
-
@include foundation-responsive-embed;
|
65
|
-
}
|
66
|
-
|
67
|
-
@mixin flex-video($ratio: $responsive-embed-ratio) {
|
68
|
-
@warn 'This mixin is being replaced by responsive-embed(). flex-video() will be removed in Foundation 6.4.';
|
69
|
-
@include responsive-embed($ratio);
|
70
|
-
}
|
@@ -1,180 +0,0 @@
|
|
1
|
-
// Foundation for Sites by ZURB
|
2
|
-
// foundation.zurb.com
|
3
|
-
// Licensed under MIT Open Source
|
4
|
-
|
5
|
-
////
|
6
|
-
/// @group reveal
|
7
|
-
////
|
8
|
-
|
9
|
-
/// Default background color of a modal.
|
10
|
-
/// @type Color
|
11
|
-
$reveal-background: $white !default;
|
12
|
-
|
13
|
-
/// Default width of a modal, with no class applied.
|
14
|
-
/// @type Number
|
15
|
-
$reveal-width: 600px !default;
|
16
|
-
|
17
|
-
/// Default maximum width of a modal.
|
18
|
-
/// @type Number
|
19
|
-
$reveal-max-width: $global-width !default;
|
20
|
-
|
21
|
-
/// Default padding inside a modal.
|
22
|
-
/// @type Number
|
23
|
-
$reveal-padding: $global-padding !default;
|
24
|
-
|
25
|
-
/// Default border around a modal.
|
26
|
-
/// @type Number
|
27
|
-
$reveal-border: 1px solid $medium-gray !default;
|
28
|
-
|
29
|
-
/// Default radius for modal.
|
30
|
-
/// @type Number
|
31
|
-
$reveal-radius: $global-radius !default;
|
32
|
-
|
33
|
-
/// z-index for modals. The overlay uses this value, while the modal itself uses this value plus one.
|
34
|
-
/// @type Number
|
35
|
-
$reveal-zindex: 1005 !default;
|
36
|
-
|
37
|
-
/// Background color of modal overlays.
|
38
|
-
/// @type Color
|
39
|
-
$reveal-overlay-background: rgba($black, 0.45) !default;
|
40
|
-
|
41
|
-
|
42
|
-
// Placeholder selector for medium-and-up modals
|
43
|
-
// Prevents duplicate CSS when defining multiple Reveal sizes
|
44
|
-
@include breakpoint(medium) {
|
45
|
-
%reveal-centered {
|
46
|
-
right: auto;
|
47
|
-
left: auto;
|
48
|
-
margin: 0 auto;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
|
53
|
-
/// Adds styles for a modal overlay.
|
54
|
-
/// @param {Color} $background [$reveal-overlay-background] - Background color of the overlay.
|
55
|
-
@mixin reveal-overlay($background: $reveal-overlay-background) {
|
56
|
-
position: fixed;
|
57
|
-
top: 0;
|
58
|
-
right: 0;
|
59
|
-
bottom: 0;
|
60
|
-
left: 0;
|
61
|
-
z-index: $reveal-zindex;
|
62
|
-
|
63
|
-
display: none;
|
64
|
-
background-color: $background;
|
65
|
-
overflow-y: scroll;
|
66
|
-
}
|
67
|
-
|
68
|
-
/// Adds base styles for a modal.
|
69
|
-
@mixin reveal-modal-base {
|
70
|
-
@include disable-mouse-outline;
|
71
|
-
z-index: $reveal-zindex + 1;
|
72
|
-
// Workaround android browser z-index bug
|
73
|
-
backface-visibility: hidden;
|
74
|
-
|
75
|
-
display: none;
|
76
|
-
padding: $reveal-padding;
|
77
|
-
|
78
|
-
border: $reveal-border;
|
79
|
-
border-radius: $reveal-radius;
|
80
|
-
background-color: $reveal-background;
|
81
|
-
|
82
|
-
@include breakpoint(medium) {
|
83
|
-
min-height: 0;
|
84
|
-
}
|
85
|
-
|
86
|
-
// Make sure rows don't have a min-width on them
|
87
|
-
.column {
|
88
|
-
min-width: 0;
|
89
|
-
}
|
90
|
-
|
91
|
-
// Strip margins from the last item in the modal
|
92
|
-
> :last-child {
|
93
|
-
margin-bottom: 0;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
/// Adjusts the width of a modal.
|
98
|
-
/// @param {Number} $width - Width of the modal. Generally a percentage.
|
99
|
-
/// @param {Number} $max-width [$reveal-max-width] - Maximum width of the modal.
|
100
|
-
@mixin reveal-modal-width(
|
101
|
-
$width: $reveal-width,
|
102
|
-
$max-width: $reveal-max-width
|
103
|
-
) {
|
104
|
-
@include breakpoint(medium) {
|
105
|
-
@extend %reveal-centered;
|
106
|
-
width: $width;
|
107
|
-
max-width: $max-width;
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
/// Creates a full-screen modal, which stretches the full width and height of the window.
|
112
|
-
@mixin reveal-modal-fullscreen {
|
113
|
-
top: 0;
|
114
|
-
left: 0;
|
115
|
-
|
116
|
-
width: 100%;
|
117
|
-
max-width: none;
|
118
|
-
height: 100%;
|
119
|
-
height: 100vh; // sass-lint:disable-line no-duplicate-properties
|
120
|
-
min-height: 100vh;
|
121
|
-
margin-left: 0;
|
122
|
-
|
123
|
-
border: 0;
|
124
|
-
border-radius: 0;
|
125
|
-
}
|
126
|
-
|
127
|
-
@mixin foundation-reveal {
|
128
|
-
// [TODO] Is this necessary?
|
129
|
-
body.is-reveal-open { // sass-lint:disable-line no-qualifying-elements
|
130
|
-
overflow: hidden;
|
131
|
-
}
|
132
|
-
|
133
|
-
// html gets this class only in iOS
|
134
|
-
html.is-reveal-open,
|
135
|
-
html.is-reveal-open body {
|
136
|
-
min-height: 100%;
|
137
|
-
overflow: hidden;
|
138
|
-
position: fixed;
|
139
|
-
user-select: none;
|
140
|
-
}
|
141
|
-
|
142
|
-
// Overlay
|
143
|
-
.reveal-overlay {
|
144
|
-
@include reveal-overlay;
|
145
|
-
}
|
146
|
-
|
147
|
-
// Modal container
|
148
|
-
.reveal {
|
149
|
-
@include reveal-modal-base;
|
150
|
-
@include reveal-modal-width($reveal-width);
|
151
|
-
position: relative;
|
152
|
-
top: 100px;
|
153
|
-
margin-right: auto;
|
154
|
-
margin-left: auto;
|
155
|
-
overflow-y: auto;
|
156
|
-
|
157
|
-
// Remove padding
|
158
|
-
&.collapse {
|
159
|
-
padding: 0;
|
160
|
-
}
|
161
|
-
|
162
|
-
// Sizing classes
|
163
|
-
&.tiny { @include reveal-modal-width(30%); }
|
164
|
-
&.small { @include reveal-modal-width(50%); }
|
165
|
-
&.large { @include reveal-modal-width(90%); }
|
166
|
-
|
167
|
-
// Full-screen mode
|
168
|
-
&.full {
|
169
|
-
@include reveal-modal-fullscreen;
|
170
|
-
}
|
171
|
-
|
172
|
-
@include breakpoint($-zf-zero-breakpoint only) {
|
173
|
-
@include reveal-modal-fullscreen;
|
174
|
-
}
|
175
|
-
|
176
|
-
&.without-overlay {
|
177
|
-
position: fixed;
|
178
|
-
}
|
179
|
-
}
|
180
|
-
}
|
@@ -1,137 +0,0 @@
|
|
1
|
-
// Foundation for Sites by ZURB
|
2
|
-
// foundation.zurb.com
|
3
|
-
// Licensed under MIT Open Source
|
4
|
-
|
5
|
-
// [TODO] Check how plugin confirms disabled or vertical status
|
6
|
-
// [TODO] Check if transition: all; is necessary
|
7
|
-
|
8
|
-
////
|
9
|
-
/// @group slider
|
10
|
-
////
|
11
|
-
|
12
|
-
/// Default slider width of a vertical slider. (Doesn't apply to the native slider.)
|
13
|
-
/// @type Number
|
14
|
-
$slider-width-vertical: 0.5rem !default;
|
15
|
-
|
16
|
-
/// Transition properties to apply to the slider handle and fill. (Doesn't apply to the native slider.)
|
17
|
-
/// @type Transition
|
18
|
-
$slider-transition: all 0.2s ease-in-out !default;
|
19
|
-
|
20
|
-
/// Adds the general styles for sliders.
|
21
|
-
@mixin slider-container {
|
22
|
-
position: relative;
|
23
|
-
height: $slider-height;
|
24
|
-
margin-top: 1.25rem;
|
25
|
-
margin-bottom: 2.25rem;
|
26
|
-
|
27
|
-
background-color: $slider-background;
|
28
|
-
cursor: pointer;
|
29
|
-
user-select: none;
|
30
|
-
touch-action: none;
|
31
|
-
}
|
32
|
-
|
33
|
-
/// Adds the general styles for active fill for sliders.
|
34
|
-
@mixin slider-fill {
|
35
|
-
position: absolute;
|
36
|
-
top: 0;
|
37
|
-
left: 0;
|
38
|
-
|
39
|
-
display: inline-block;
|
40
|
-
max-width: 100%;
|
41
|
-
height: $slider-height;
|
42
|
-
|
43
|
-
background-color: $slider-fill-background;
|
44
|
-
transition: $slider-transition;
|
45
|
-
|
46
|
-
&.is-dragging {
|
47
|
-
transition: all 0s linear;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
/// Adds the general styles for the slider handles.
|
52
|
-
@mixin slider-handle {
|
53
|
-
@include disable-mouse-outline;
|
54
|
-
@include vertical-center;
|
55
|
-
left: 0;
|
56
|
-
z-index: 1;
|
57
|
-
|
58
|
-
display: inline-block;
|
59
|
-
width: $slider-handle-width;
|
60
|
-
height: $slider-handle-height;
|
61
|
-
|
62
|
-
border-radius: $slider-radius;
|
63
|
-
background-color: $slider-handle-background;
|
64
|
-
transition: $slider-transition;
|
65
|
-
touch-action: manipulation;
|
66
|
-
|
67
|
-
&:hover {
|
68
|
-
background-color: scale-color($slider-handle-background, $lightness: -15%);
|
69
|
-
}
|
70
|
-
|
71
|
-
&.is-dragging {
|
72
|
-
transition: all 0s linear;
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
|
-
@mixin slider-disabled {
|
77
|
-
opacity: $slider-opacity-disabled;
|
78
|
-
cursor: not-allowed;
|
79
|
-
}
|
80
|
-
|
81
|
-
@mixin slider-vertical {
|
82
|
-
display: inline-block;
|
83
|
-
width: $slider-width-vertical;
|
84
|
-
height: 12.5rem;
|
85
|
-
margin: 0 1.25rem;
|
86
|
-
transform: scale(1, -1);
|
87
|
-
|
88
|
-
.slider-fill {
|
89
|
-
top: 0;
|
90
|
-
width: $slider-width-vertical;
|
91
|
-
max-height: 100%;
|
92
|
-
}
|
93
|
-
|
94
|
-
.slider-handle {
|
95
|
-
position: absolute;
|
96
|
-
top: 0;
|
97
|
-
left: 50%;
|
98
|
-
width: $slider-handle-height;
|
99
|
-
height: $slider-handle-width;
|
100
|
-
transform: translateX(-50%);
|
101
|
-
}
|
102
|
-
}
|
103
|
-
|
104
|
-
@mixin foundation-slider {
|
105
|
-
// Container
|
106
|
-
.slider {
|
107
|
-
@include slider-container;
|
108
|
-
}
|
109
|
-
|
110
|
-
// Fill area
|
111
|
-
.slider-fill {
|
112
|
-
@include slider-fill;
|
113
|
-
}
|
114
|
-
|
115
|
-
// Draggable handle
|
116
|
-
.slider-handle {
|
117
|
-
@include slider-handle;
|
118
|
-
}
|
119
|
-
|
120
|
-
// Disabled state
|
121
|
-
.slider.disabled,
|
122
|
-
.slider[disabled] {
|
123
|
-
@include slider-disabled;
|
124
|
-
}
|
125
|
-
|
126
|
-
// Vertical slider
|
127
|
-
.slider.vertical {
|
128
|
-
@include slider-vertical;
|
129
|
-
}
|
130
|
-
|
131
|
-
// RTL support
|
132
|
-
@if $global-text-direction == rtl {
|
133
|
-
.slider:not(.vertical) {
|
134
|
-
transform: scale(-1, 1);
|
135
|
-
}
|
136
|
-
}
|
137
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
// Foundation for Sites by ZURB
|
2
|
-
// foundation.zurb.com
|
3
|
-
// Licensed under MIT Open Source
|
4
|
-
|
5
|
-
@mixin foundation-sticky {
|
6
|
-
.sticky-container {
|
7
|
-
position: relative;
|
8
|
-
}
|
9
|
-
|
10
|
-
.sticky {
|
11
|
-
position: relative;
|
12
|
-
z-index: 0;
|
13
|
-
transform: translate3d(0, 0, 0);
|
14
|
-
}
|
15
|
-
|
16
|
-
.sticky.is-stuck {
|
17
|
-
position: fixed;
|
18
|
-
z-index: 5;
|
19
|
-
width: 100%;
|
20
|
-
|
21
|
-
&.is-at-top {
|
22
|
-
top: 0;
|
23
|
-
}
|
24
|
-
|
25
|
-
&.is-at-bottom {
|
26
|
-
bottom: 0;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
.sticky.is-anchored {
|
31
|
-
position: relative;
|
32
|
-
right: auto;
|
33
|
-
left: auto;
|
34
|
-
|
35
|
-
&.is-at-bottom {
|
36
|
-
bottom: 0;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
@@ -1,247 +0,0 @@
|
|
1
|
-
// Foundation for Sites by ZURB
|
2
|
-
// foundation.zurb.com
|
3
|
-
// Licensed under MIT Open Source
|
4
|
-
|
5
|
-
////
|
6
|
-
/// @group switch
|
7
|
-
////
|
8
|
-
|
9
|
-
/// Background color of a switch.
|
10
|
-
/// @type Color
|
11
|
-
$switch-background: $medium-gray !default;
|
12
|
-
|
13
|
-
/// Background active color of a switch.
|
14
|
-
/// @type Color
|
15
|
-
$switch-background-active: $primary-color !default;
|
16
|
-
|
17
|
-
/// Height of a switch, with no class applied.
|
18
|
-
/// @type Number
|
19
|
-
$switch-height: 2rem !default;
|
20
|
-
|
21
|
-
/// Height of a switch with .tiny class.
|
22
|
-
/// @type Number
|
23
|
-
$switch-height-tiny: 1.5rem !default;
|
24
|
-
|
25
|
-
/// Height of a switch with .small class.
|
26
|
-
/// @type Number
|
27
|
-
$switch-height-small: 1.75rem !default;
|
28
|
-
|
29
|
-
/// Height of a switch with .large class.
|
30
|
-
/// @type Number
|
31
|
-
$switch-height-large: 2.5rem !default;
|
32
|
-
|
33
|
-
/// Border radius of the switch
|
34
|
-
/// @type Number
|
35
|
-
$switch-radius: $global-radius !default;
|
36
|
-
|
37
|
-
/// border around a modal.
|
38
|
-
/// @type Number
|
39
|
-
$switch-margin: $global-margin !default;
|
40
|
-
|
41
|
-
/// Background color for the switch container and paddle.
|
42
|
-
/// @type Color
|
43
|
-
$switch-paddle-background: $white !default;
|
44
|
-
|
45
|
-
/// Spacing between a switch paddle and the edge of the body.
|
46
|
-
/// @type Number
|
47
|
-
$switch-paddle-offset: 0.25rem !default;
|
48
|
-
|
49
|
-
/// border radius of the switch paddle
|
50
|
-
/// @type Number
|
51
|
-
$switch-paddle-radius: $global-radius !default;
|
52
|
-
|
53
|
-
/// switch transition.
|
54
|
-
/// @type Number
|
55
|
-
$switch-paddle-transition: all 0.25s ease-out !default;
|
56
|
-
|
57
|
-
// make them variables
|
58
|
-
// ask about accessibility on label
|
59
|
-
// change class name for text
|
60
|
-
|
61
|
-
/// Adds styles for a switch container. Apply this to a container class.
|
62
|
-
@mixin switch-container {
|
63
|
-
position: relative;
|
64
|
-
margin-bottom: $switch-margin;
|
65
|
-
outline: 0;
|
66
|
-
|
67
|
-
// These properties cascade down to the switch text
|
68
|
-
font-size: rem-calc(14);
|
69
|
-
font-weight: bold;
|
70
|
-
color: $white;
|
71
|
-
|
72
|
-
user-select: none;
|
73
|
-
}
|
74
|
-
|
75
|
-
/// Adds styles for a switch input. Apply this to an `<input>` within a switch.
|
76
|
-
@mixin switch-input {
|
77
|
-
position: absolute;
|
78
|
-
margin-bottom: 0;
|
79
|
-
opacity: 0;
|
80
|
-
}
|
81
|
-
|
82
|
-
/// Adds styles for the background and paddle of a switch. Apply this to a `<label>` within a switch.
|
83
|
-
@mixin switch-paddle {
|
84
|
-
$switch-width: $switch-height * 2;
|
85
|
-
$paddle-height: $switch-height - ($switch-paddle-offset * 2);
|
86
|
-
$paddle-width: $switch-height - ($switch-paddle-offset * 2);
|
87
|
-
$paddle-active-offest: $switch-width - $paddle-width - $switch-paddle-offset;
|
88
|
-
|
89
|
-
position: relative;
|
90
|
-
display: block;
|
91
|
-
width: $switch-width;
|
92
|
-
height: $switch-height;
|
93
|
-
|
94
|
-
border-radius: $switch-radius;
|
95
|
-
background: $switch-background;
|
96
|
-
transition: $switch-paddle-transition;
|
97
|
-
|
98
|
-
// Resetting these <label> presets so type styles cascade down
|
99
|
-
font-weight: inherit;
|
100
|
-
color: inherit;
|
101
|
-
|
102
|
-
cursor: pointer;
|
103
|
-
|
104
|
-
// Needed to override specificity
|
105
|
-
input + & {
|
106
|
-
margin: 0;
|
107
|
-
}
|
108
|
-
|
109
|
-
// The paddle itself
|
110
|
-
&::after {
|
111
|
-
position: absolute;
|
112
|
-
top: $switch-paddle-offset;
|
113
|
-
#{$global-left}: $switch-paddle-offset;
|
114
|
-
|
115
|
-
display: block;
|
116
|
-
width: $paddle-width;
|
117
|
-
height: $paddle-height;
|
118
|
-
|
119
|
-
transform: translate3d(0, 0, 0);
|
120
|
-
border-radius: $switch-paddle-radius;
|
121
|
-
background: $switch-paddle-background;
|
122
|
-
transition: $switch-paddle-transition;
|
123
|
-
content: '';
|
124
|
-
}
|
125
|
-
|
126
|
-
// Change the visual style when the switch is active
|
127
|
-
input:checked ~ & {
|
128
|
-
background: $switch-background-active;
|
129
|
-
|
130
|
-
&::after {
|
131
|
-
#{$global-left}: $paddle-active-offest;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
input:focus ~ & {
|
136
|
-
@include disable-mouse-outline;
|
137
|
-
}
|
138
|
-
}
|
139
|
-
|
140
|
-
/// Adds base styles for active/inactive text inside a switch. Apply this to text elements inside the switch `<label>`.
|
141
|
-
@mixin switch-text {
|
142
|
-
position: absolute;
|
143
|
-
top: 50%;
|
144
|
-
transform: translateY(-50%);
|
145
|
-
}
|
146
|
-
|
147
|
-
/// Adds styles for the active state text within a switch.
|
148
|
-
@mixin switch-text-active {
|
149
|
-
#{$global-left}: 8%;
|
150
|
-
display: none;
|
151
|
-
|
152
|
-
input:checked + label > & {
|
153
|
-
display: block;
|
154
|
-
}
|
155
|
-
}
|
156
|
-
|
157
|
-
/// Adds styles for the inactive state text within a switch.
|
158
|
-
@mixin switch-text-inactive {
|
159
|
-
#{$global-right}: 15%;
|
160
|
-
|
161
|
-
input:checked + label > & {
|
162
|
-
display: none;
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
|
-
/// Changes the size of a switch by modifying the size of the body and paddle. Apply this to a switch container.
|
167
|
-
/// @param {Number} $font-size [1rem] - Font size of label text within the switch.
|
168
|
-
/// @param {Number} $switch-height [2rem] - Height of the switch body.
|
169
|
-
/// @param {Number} $paddle-offset [0.25rem] - Spacing between the switch paddle and the edge of the switch body.
|
170
|
-
@mixin switch-size(
|
171
|
-
$font-size: 1rem,
|
172
|
-
$switch-height: 2rem,
|
173
|
-
$paddle-offset: 0.25rem
|
174
|
-
) {
|
175
|
-
|
176
|
-
$switch-width: $switch-height * 2;
|
177
|
-
$paddle-width: $switch-height - ($paddle-offset * 2);
|
178
|
-
$paddle-height: $switch-height - ($paddle-offset * 2);
|
179
|
-
$paddle-active-offest: $switch-width - $paddle-width - $paddle-offset;
|
180
|
-
|
181
|
-
height: $switch-height;
|
182
|
-
|
183
|
-
.switch-paddle {
|
184
|
-
width: $switch-width;
|
185
|
-
height: $switch-height;
|
186
|
-
font-size: $font-size;
|
187
|
-
}
|
188
|
-
|
189
|
-
.switch-paddle::after {
|
190
|
-
top: $paddle-offset;
|
191
|
-
#{$global-left}: $paddle-offset;
|
192
|
-
width: $paddle-width;
|
193
|
-
height: $paddle-height;
|
194
|
-
}
|
195
|
-
|
196
|
-
input:checked ~ .switch-paddle::after {
|
197
|
-
#{$global-left}: $paddle-active-offest;
|
198
|
-
}
|
199
|
-
}
|
200
|
-
|
201
|
-
@mixin foundation-switch {
|
202
|
-
// Container class
|
203
|
-
.switch {
|
204
|
-
height: $switch-height;
|
205
|
-
@include switch-container;
|
206
|
-
}
|
207
|
-
|
208
|
-
// <input> element
|
209
|
-
.switch-input {
|
210
|
-
@include switch-input;
|
211
|
-
}
|
212
|
-
|
213
|
-
// <label> element
|
214
|
-
.switch-paddle {
|
215
|
-
@include switch-paddle;
|
216
|
-
}
|
217
|
-
|
218
|
-
// Base label text styles
|
219
|
-
%switch-text {
|
220
|
-
@include switch-text;
|
221
|
-
}
|
222
|
-
|
223
|
-
// Active label text styles
|
224
|
-
.switch-active {
|
225
|
-
@extend %switch-text;
|
226
|
-
@include switch-text-active;
|
227
|
-
}
|
228
|
-
|
229
|
-
// Inactive label text styles
|
230
|
-
.switch-inactive {
|
231
|
-
@extend %switch-text;
|
232
|
-
@include switch-text-inactive;
|
233
|
-
}
|
234
|
-
|
235
|
-
// Switch sizes
|
236
|
-
.switch.tiny {
|
237
|
-
@include switch-size(rem-calc(10), $switch-height-tiny, $switch-paddle-offset);
|
238
|
-
}
|
239
|
-
|
240
|
-
.switch.small {
|
241
|
-
@include switch-size(rem-calc(12), $switch-height-small, $switch-paddle-offset);
|
242
|
-
}
|
243
|
-
|
244
|
-
.switch.large {
|
245
|
-
@include switch-size(rem-calc(16), $switch-height-large, $switch-paddle-offset);
|
246
|
-
}
|
247
|
-
}
|