vapid 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.gitmodules +6 -0
- data/.rspec +2 -0
- data/.rubocop.yml +133 -0
- data/.travis.yml +5 -0
- data/Gemfile +10 -0
- data/README.md +37 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/vapid +7 -0
- data/lib/vapid.rb +24 -0
- data/lib/vapid/assets/javascripts/vapid/admin.coffee +2 -0
- data/lib/vapid/assets/stylesheets/vapid/admin.scss +72 -0
- data/lib/vapid/builder.rb +70 -0
- data/lib/vapid/cli.rb +96 -0
- data/lib/vapid/controllers/admin_controller.rb +282 -0
- data/lib/vapid/controllers/project_controller.rb +41 -0
- data/lib/vapid/db/migrate/20170202182310_create_groups.rb +12 -0
- data/lib/vapid/db/migrate/20170202183017_create_records.rb +11 -0
- data/lib/vapid/db/migrate/20170202185150_create_users.rb +11 -0
- data/lib/vapid/directive.rb +168 -0
- data/lib/vapid/directives.rb +30 -0
- data/lib/vapid/directives/audio.rb +27 -0
- data/lib/vapid/directives/group.rb +71 -0
- data/lib/vapid/directives/hide.rb +11 -0
- data/lib/vapid/directives/href.rb +11 -0
- data/lib/vapid/directives/image.rb +14 -0
- data/lib/vapid/directives/richtext.rb +15 -0
- data/lib/vapid/directives/show.rb +11 -0
- data/lib/vapid/directives/text.rb +24 -0
- data/lib/vapid/directives/video.rb +28 -0
- data/lib/vapid/generator_template/.gitignore +21 -0
- data/lib/vapid/generator_template/Gemfile.tt +13 -0
- data/lib/vapid/generator_template/README.md +0 -0
- data/lib/vapid/generator_template/assets/favicon.ico +0 -0
- data/lib/vapid/generator_template/assets/images/.keep +0 -0
- data/lib/vapid/generator_template/assets/javascripts/.keep +0 -0
- data/lib/vapid/generator_template/assets/stylesheets/.keep +0 -0
- data/lib/vapid/generator_template/assets/stylesheets/application.css +120 -0
- data/lib/vapid/generator_template/config.ru +3 -0
- data/lib/vapid/generator_template/config/database.yml +12 -0
- data/lib/vapid/generator_template/config/settings.yml.tt +11 -0
- data/lib/vapid/generator_template/templates/index.html.erb +25 -0
- data/lib/vapid/generator_template/templates/layouts/default.html.erb +22 -0
- data/lib/vapid/models.rb +18 -0
- data/lib/vapid/models/group.rb +36 -0
- data/lib/vapid/models/record.rb +30 -0
- data/lib/vapid/models/user.rb +16 -0
- data/lib/vapid/server.rb +93 -0
- data/lib/vapid/settings.rb +13 -0
- data/lib/vapid/template.rb +79 -0
- data/lib/vapid/template/node.rb +91 -0
- data/lib/vapid/template/parser.rb +50 -0
- data/lib/vapid/vendor/semantic-ui/.versions +4 -0
- data/lib/vapid/vendor/semantic-ui/LICENSE +22 -0
- data/lib/vapid/vendor/semantic-ui/README.md +7 -0
- data/lib/vapid/vendor/semantic-ui/components/accordion.css +252 -0
- data/lib/vapid/vendor/semantic-ui/components/accordion.js +610 -0
- data/lib/vapid/vendor/semantic-ui/components/accordion.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/accordion.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/ad.css +275 -0
- data/lib/vapid/vendor/semantic-ui/components/ad.min.css +10 -0
- data/lib/vapid/vendor/semantic-ui/components/api.js +1167 -0
- data/lib/vapid/vendor/semantic-ui/components/api.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/breadcrumb.css +124 -0
- data/lib/vapid/vendor/semantic-ui/components/breadcrumb.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/button.css +3450 -0
- data/lib/vapid/vendor/semantic-ui/components/button.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/card.css +964 -0
- data/lib/vapid/vendor/semantic-ui/components/card.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/checkbox.css +625 -0
- data/lib/vapid/vendor/semantic-ui/components/checkbox.js +831 -0
- data/lib/vapid/vendor/semantic-ui/components/checkbox.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/checkbox.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/colorize.js +274 -0
- data/lib/vapid/vendor/semantic-ui/components/colorize.min.js +11 -0
- data/lib/vapid/vendor/semantic-ui/components/comment.css +270 -0
- data/lib/vapid/vendor/semantic-ui/components/comment.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/container.css +147 -0
- data/lib/vapid/vendor/semantic-ui/components/container.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/dimmer.css +200 -0
- data/lib/vapid/vendor/semantic-ui/components/dimmer.js +708 -0
- data/lib/vapid/vendor/semantic-ui/components/dimmer.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/dimmer.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/divider.css +260 -0
- data/lib/vapid/vendor/semantic-ui/components/divider.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/dropdown.css +1442 -0
- data/lib/vapid/vendor/semantic-ui/components/dropdown.js +3767 -0
- data/lib/vapid/vendor/semantic-ui/components/dropdown.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/dropdown.min.js +11 -0
- data/lib/vapid/vendor/semantic-ui/components/embed.css +166 -0
- data/lib/vapid/vendor/semantic-ui/components/embed.js +696 -0
- data/lib/vapid/vendor/semantic-ui/components/embed.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/embed.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/feed.css +296 -0
- data/lib/vapid/vendor/semantic-ui/components/feed.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/flag.css +1031 -0
- data/lib/vapid/vendor/semantic-ui/components/flag.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/form.css +1067 -0
- data/lib/vapid/vendor/semantic-ui/components/form.js +1603 -0
- data/lib/vapid/vendor/semantic-ui/components/form.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/form.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/grid.css +2002 -0
- data/lib/vapid/vendor/semantic-ui/components/grid.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/header.css +721 -0
- data/lib/vapid/vendor/semantic-ui/components/header.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/icon.css +3292 -0
- data/lib/vapid/vendor/semantic-ui/components/icon.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/image.css +306 -0
- data/lib/vapid/vendor/semantic-ui/components/image.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/input.css +510 -0
- data/lib/vapid/vendor/semantic-ui/components/input.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/item.css +486 -0
- data/lib/vapid/vendor/semantic-ui/components/item.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/label.css +1307 -0
- data/lib/vapid/vendor/semantic-ui/components/label.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/list.css +951 -0
- data/lib/vapid/vendor/semantic-ui/components/list.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/loader.css +347 -0
- data/lib/vapid/vendor/semantic-ui/components/loader.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/menu.css +2002 -0
- data/lib/vapid/vendor/semantic-ui/components/menu.min.css +1 -0
- data/lib/vapid/vendor/semantic-ui/components/message.css +477 -0
- data/lib/vapid/vendor/semantic-ui/components/message.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/modal.css +502 -0
- data/lib/vapid/vendor/semantic-ui/components/modal.js +913 -0
- data/lib/vapid/vendor/semantic-ui/components/modal.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/modal.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/nag.css +147 -0
- data/lib/vapid/vendor/semantic-ui/components/nag.js +507 -0
- data/lib/vapid/vendor/semantic-ui/components/nag.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/nag.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/popup.css +733 -0
- data/lib/vapid/vendor/semantic-ui/components/popup.js +1475 -0
- data/lib/vapid/vendor/semantic-ui/components/popup.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/popup.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/progress.css +516 -0
- data/lib/vapid/vendor/semantic-ui/components/progress.js +931 -0
- data/lib/vapid/vendor/semantic-ui/components/progress.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/progress.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/rail.css +152 -0
- data/lib/vapid/vendor/semantic-ui/components/rail.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/rating.css +263 -0
- data/lib/vapid/vendor/semantic-ui/components/rating.js +508 -0
- data/lib/vapid/vendor/semantic-ui/components/rating.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/rating.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/reset.css +424 -0
- data/lib/vapid/vendor/semantic-ui/components/reset.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/reveal.css +284 -0
- data/lib/vapid/vendor/semantic-ui/components/reveal.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/search.css +408 -0
- data/lib/vapid/vendor/semantic-ui/components/search.js +1442 -0
- data/lib/vapid/vendor/semantic-ui/components/search.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/search.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/segment.css +798 -0
- data/lib/vapid/vendor/semantic-ui/components/segment.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/shape.css +157 -0
- data/lib/vapid/vendor/semantic-ui/components/shape.js +921 -0
- data/lib/vapid/vendor/semantic-ui/components/shape.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/shape.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/sidebar.css +634 -0
- data/lib/vapid/vendor/semantic-ui/components/sidebar.js +1036 -0
- data/lib/vapid/vendor/semantic-ui/components/sidebar.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/sidebar.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/site.css +160 -0
- data/lib/vapid/vendor/semantic-ui/components/site.js +487 -0
- data/lib/vapid/vendor/semantic-ui/components/site.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/site.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/state.js +708 -0
- data/lib/vapid/vendor/semantic-ui/components/state.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/statistic.css +569 -0
- data/lib/vapid/vendor/semantic-ui/components/statistic.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/step.css +623 -0
- data/lib/vapid/vendor/semantic-ui/components/step.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/sticky.css +78 -0
- data/lib/vapid/vendor/semantic-ui/components/sticky.js +942 -0
- data/lib/vapid/vendor/semantic-ui/components/sticky.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/sticky.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/tab.css +91 -0
- data/lib/vapid/vendor/semantic-ui/components/tab.js +952 -0
- data/lib/vapid/vendor/semantic-ui/components/tab.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/tab.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/table.css +1108 -0
- data/lib/vapid/vendor/semantic-ui/components/table.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/transition.css +1964 -0
- data/lib/vapid/vendor/semantic-ui/components/transition.js +1095 -0
- data/lib/vapid/vendor/semantic-ui/components/transition.min.css +9 -0
- data/lib/vapid/vendor/semantic-ui/components/transition.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/video.css +125 -0
- data/lib/vapid/vendor/semantic-ui/components/video.js +532 -0
- data/lib/vapid/vendor/semantic-ui/components/video.min.css +10 -0
- data/lib/vapid/vendor/semantic-ui/components/video.min.js +11 -0
- data/lib/vapid/vendor/semantic-ui/components/visibility.js +1288 -0
- data/lib/vapid/vendor/semantic-ui/components/visibility.min.js +10 -0
- data/lib/vapid/vendor/semantic-ui/components/visit.js +517 -0
- data/lib/vapid/vendor/semantic-ui/components/visit.min.js +11 -0
- data/lib/vapid/vendor/semantic-ui/package.js +34 -0
- data/lib/vapid/vendor/semantic-ui/package.json +20 -0
- data/lib/vapid/vendor/semantic-ui/semantic.css +36844 -0
- data/lib/vapid/vendor/semantic-ui/semantic.js +22617 -0
- data/lib/vapid/vendor/semantic-ui/semantic.min.css +364 -0
- data/lib/vapid/vendor/semantic-ui/semantic.min.js +19 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/fonts/icons.eot +0 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/fonts/icons.otf +0 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/fonts/icons.svg +2671 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/fonts/icons.ttf +0 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/fonts/icons.woff +0 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/fonts/icons.woff2 +0 -0
- data/lib/vapid/vendor/semantic-ui/themes/default/assets/images/flags.png +0 -0
- data/lib/vapid/vendor/trix/.blade.yml +45 -0
- data/lib/vapid/vendor/trix/.github/ISSUE_TEMPLATE.md +13 -0
- data/lib/vapid/vendor/trix/.gitignore +3 -0
- data/lib/vapid/vendor/trix/.ruby-version +1 -0
- data/lib/vapid/vendor/trix/.travis.yml +6 -0
- data/lib/vapid/vendor/trix/CONDUCT.md +79 -0
- data/lib/vapid/vendor/trix/Gemfile +17 -0
- data/lib/vapid/vendor/trix/Gemfile.lock +152 -0
- data/lib/vapid/vendor/trix/LICENSE +20 -0
- data/lib/vapid/vendor/trix/README.md +382 -0
- data/lib/vapid/vendor/trix/assets/index.html +55 -0
- data/lib/vapid/vendor/trix/assets/trix-core.coffee +2 -0
- data/lib/vapid/vendor/trix/assets/trix.coffee +3 -0
- data/lib/vapid/vendor/trix/assets/trix.scss +5 -0
- data/lib/vapid/vendor/trix/assets/trix/banner/index.coffee.erb +3 -0
- data/lib/vapid/vendor/trix/assets/trix/banner/index.scss.erb +3 -0
- data/lib/vapid/vendor/trix/assets/trix/banner/index.txt.erb +3 -0
- data/lib/vapid/vendor/trix/assets/trix/images/README.md +6 -0
- data/lib/vapid/vendor/trix/assets/trix/images/attach.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/bold.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/bullets.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/code.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/heading_1.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/italic.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/link.svg +6 -0
- data/lib/vapid/vendor/trix/assets/trix/images/nesting_level_decrease.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/nesting_level_increase.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/numbers.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/quote.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/redo.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/remove.svg +4 -0
- data/lib/vapid/vendor/trix/assets/trix/images/strike.svg +6 -0
- data/lib/vapid/vendor/trix/assets/trix/images/trash.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/images/undo.svg +5 -0
- data/lib/vapid/vendor/trix/assets/trix/stylesheets/attachments.scss +112 -0
- data/lib/vapid/vendor/trix/assets/trix/stylesheets/content.scss +88 -0
- data/lib/vapid/vendor/trix/assets/trix/stylesheets/editor.scss +8 -0
- data/lib/vapid/vendor/trix/assets/trix/stylesheets/icons.scss +14 -0
- data/lib/vapid/vendor/trix/assets/trix/stylesheets/media-queries.scss +7 -0
- data/lib/vapid/vendor/trix/assets/trix/stylesheets/toolbar.scss +194 -0
- data/lib/vapid/vendor/trix/bin/blade +16 -0
- data/lib/vapid/vendor/trix/bin/ci +21 -0
- data/lib/vapid/vendor/trix/bin/rackup +16 -0
- data/lib/vapid/vendor/trix/bin/rake +16 -0
- data/lib/vapid/vendor/trix/bin/release +139 -0
- data/lib/vapid/vendor/trix/bin/setup +69 -0
- data/lib/vapid/vendor/trix/bin/update-status-image +100 -0
- data/lib/vapid/vendor/trix/bower.json +34 -0
- data/lib/vapid/vendor/trix/config.ru +32 -0
- data/lib/vapid/vendor/trix/dist/trix-core.js +11 -0
- data/lib/vapid/vendor/trix/dist/trix.css +286 -0
- data/lib/vapid/vendor/trix/dist/trix.js +20 -0
- data/lib/vapid/vendor/trix/package.json +29 -0
- data/lib/vapid/vendor/trix/polyfills/polyfills.coffee +3 -0
- data/lib/vapid/vendor/trix/polyfills/set.coffee +24 -0
- data/lib/vapid/vendor/trix/polyfills/vendor/CustomElements.js +1029 -0
- data/lib/vapid/vendor/trix/polyfills/vendor/README.md +2 -0
- data/lib/vapid/vendor/trix/polyfills/vendor/promise.js +228 -0
- data/lib/vapid/vendor/trix/src/trix/VERSION +1 -0
- data/lib/vapid/vendor/trix/src/trix/config/block_attributes.coffee +37 -0
- data/lib/vapid/vendor/trix/src/trix/config/css.coffee +12 -0
- data/lib/vapid/vendor/trix/src/trix/config/file_size_formatting.coffee +22 -0
- data/lib/vapid/vendor/trix/src/trix/config/index.coffee +9 -0
- data/lib/vapid/vendor/trix/src/trix/config/lang.coffee +26 -0
- data/lib/vapid/vendor/trix/src/trix/config/selection_elements.coffee +26 -0
- data/lib/vapid/vendor/trix/src/trix/config/serialization.coffee +63 -0
- data/lib/vapid/vendor/trix/src/trix/config/text_attributes.coffee +25 -0
- data/lib/vapid/vendor/trix/src/trix/config/toolbar.coffee +41 -0
- data/lib/vapid/vendor/trix/src/trix/config/undo_interval.coffee +7 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/attachment_editor_controller.coffee +104 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/composition_controller.coffee +117 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/controller.coffee +3 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/editor_controller.coffee +369 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/input/composition_input.coffee +57 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/input_controller.coffee +473 -0
- data/lib/vapid/vendor/trix/src/trix/controllers/toolbar_controller.coffee +173 -0
- data/lib/vapid/vendor/trix/src/trix/core/basic_object.coffee +44 -0
- data/lib/vapid/vendor/trix/src/trix/core/collections/element_store.coffee +21 -0
- data/lib/vapid/vendor/trix/src/trix/core/collections/hash.coffee +98 -0
- data/lib/vapid/vendor/trix/src/trix/core/collections/index.coffee +4 -0
- data/lib/vapid/vendor/trix/src/trix/core/collections/object_group.coffee +37 -0
- data/lib/vapid/vendor/trix/src/trix/core/collections/object_map.coffee +10 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/arrays.coffee +34 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/config.coffee +23 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/custom_elements.coffee +45 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/dom.coffee +185 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/extend.coffee +4 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/functions.coffee +3 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/global.coffee +23 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/index.coffee +10 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/objects.coffee +11 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/ranges.coffee +33 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/selection.coffee +25 -0
- data/lib/vapid/vendor/trix/src/trix/core/helpers/strings.coffee +46 -0
- data/lib/vapid/vendor/trix/src/trix/core/index.coffee +4 -0
- data/lib/vapid/vendor/trix/src/trix/core/object.coffee +33 -0
- data/lib/vapid/vendor/trix/src/trix/core/utilities/index.coffee +2 -0
- data/lib/vapid/vendor/trix/src/trix/core/utilities/operation.coffee +37 -0
- data/lib/vapid/vendor/trix/src/trix/core/utilities/utf16_string.coffee +93 -0
- data/lib/vapid/vendor/trix/src/trix/elements/trix_editor_element.coffee +166 -0
- data/lib/vapid/vendor/trix/src/trix/elements/trix_toolbar_element.coffee +28 -0
- data/lib/vapid/vendor/trix/src/trix/index.coffee.erb +14 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/control_element.coffee +60 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/debugger.coffee +104 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/element.coffee +86 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/index.coffee +17 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/polyfills/vendor/details-element-polyfill.js +5 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/templates/debug.jst.eco +17 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/templates/document.jst.eco +33 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/templates/performance.jst.eco +10 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/templates/render.jst.eco +1 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/templates/selection.jst.eco +5 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/templates/undo.jst.eco +13 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/view.coffee +58 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/views/debug_view.coffee +33 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/views/document_view.coffee +12 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/views/performance_view.coffee +51 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/views/render_view.coffee +21 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/views/selection_view.coffee +33 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/views/undo_view.coffee +12 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/deserializer.coffee +55 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/index.coffee +5 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/player.coffee +60 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/player_controller.coffee +43 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/player_element.coffee +32 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/player_view.coffee +133 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/recorder.coffee +82 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/recording.coffee +54 -0
- data/lib/vapid/vendor/trix/src/trix/inspector/watchdog/serializer.coffee +61 -0
- data/lib/vapid/vendor/trix/src/trix/models/attachment.coffee +157 -0
- data/lib/vapid/vendor/trix/src/trix/models/attachment_manager.coffee +24 -0
- data/lib/vapid/vendor/trix/src/trix/models/attachment_piece.coffee +47 -0
- data/lib/vapid/vendor/trix/src/trix/models/block.coffee +230 -0
- data/lib/vapid/vendor/trix/src/trix/models/composition.coffee +521 -0
- data/lib/vapid/vendor/trix/src/trix/models/document.coffee +538 -0
- data/lib/vapid/vendor/trix/src/trix/models/editor.coffee +141 -0
- data/lib/vapid/vendor/trix/src/trix/models/html_parser.coffee +335 -0
- data/lib/vapid/vendor/trix/src/trix/models/line_break_insertion.coffee +31 -0
- data/lib/vapid/vendor/trix/src/trix/models/location_mapper.coffee +156 -0
- data/lib/vapid/vendor/trix/src/trix/models/managed_attachment.coffee +28 -0
- data/lib/vapid/vendor/trix/src/trix/models/piece.coffee +95 -0
- data/lib/vapid/vendor/trix/src/trix/models/point_mapper.coffee +28 -0
- data/lib/vapid/vendor/trix/src/trix/models/selection_manager.coffee +129 -0
- data/lib/vapid/vendor/trix/src/trix/models/splittable_list.coffee +168 -0
- data/lib/vapid/vendor/trix/src/trix/models/string_piece.coffee +49 -0
- data/lib/vapid/vendor/trix/src/trix/models/text.coffee +168 -0
- data/lib/vapid/vendor/trix/src/trix/models/undo_manager.coffee +40 -0
- data/lib/vapid/vendor/trix/src/trix/observers/mutation_observer.coffee +131 -0
- data/lib/vapid/vendor/trix/src/trix/observers/selection_change_observer.coffee +56 -0
- data/lib/vapid/vendor/trix/src/trix/operations/file_verification_operation.coffee +15 -0
- data/lib/vapid/vendor/trix/src/trix/operations/image_preload_operation.coffee +15 -0
- data/lib/vapid/vendor/trix/src/trix/views/attachment_view.coffee +99 -0
- data/lib/vapid/vendor/trix/src/trix/views/block_view.coffee +37 -0
- data/lib/vapid/vendor/trix/src/trix/views/document_view.coffee +68 -0
- data/lib/vapid/vendor/trix/src/trix/views/object_group_view.coffee +23 -0
- data/lib/vapid/vendor/trix/src/trix/views/object_view.coffee +86 -0
- data/lib/vapid/vendor/trix/src/trix/views/piece_view.coffee +97 -0
- data/lib/vapid/vendor/trix/src/trix/views/previewable_attachment_view.coffee +49 -0
- data/lib/vapid/vendor/trix/src/trix/views/text_view.coffee +30 -0
- data/lib/vapid/vendor/trix/test/.gitignore +1 -0
- data/lib/vapid/vendor/trix/test/src/system/attachment_test.coffee +70 -0
- data/lib/vapid/vendor/trix/test/src/system/basic_input_test.coffee +68 -0
- data/lib/vapid/vendor/trix/test/src/system/block_formatting_test.coffee +602 -0
- data/lib/vapid/vendor/trix/test/src/system/caching_test.coffee +21 -0
- data/lib/vapid/vendor/trix/test/src/system/composition_input_test.coffee +138 -0
- data/lib/vapid/vendor/trix/test/src/system/cursor_movement_test.coffee +54 -0
- data/lib/vapid/vendor/trix/test/src/system/custom_element_test.coffee +314 -0
- data/lib/vapid/vendor/trix/test/src/system/html_loading_test.coffee +62 -0
- data/lib/vapid/vendor/trix/test/src/system/html_replacement_test.coffee +101 -0
- data/lib/vapid/vendor/trix/test/src/system/installation_process_test.coffee +59 -0
- data/lib/vapid/vendor/trix/test/src/system/list_formatting_test.coffee +70 -0
- data/lib/vapid/vendor/trix/test/src/system/mutation_input_test.coffee +73 -0
- data/lib/vapid/vendor/trix/test/src/system/pasting_test.coffee +215 -0
- data/lib/vapid/vendor/trix/test/src/system/text_formatting_test.coffee +151 -0
- data/lib/vapid/vendor/trix/test/src/system/undo_test.coffee +48 -0
- data/lib/vapid/vendor/trix/test/src/test.coffee +16 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/assertions.coffee +38 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/editor_helpers.coffee +37 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_empty.jst.eco +1 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_html.jst.eco +2 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_in_table.jst.eco +7 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_with_block_styles.jst.eco +6 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_with_bold_styles.jst.eco +7 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_with_image.jst.eco +2 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_with_styled_content.jst.eco +7 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/editor_with_toolbar_and_input.jst.eco +5 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/fixtures.coffee +536 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/fixtures/logo.png +0 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/index.coffee +18 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/input_helpers.coffee +183 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/selection_helpers.coffee +91 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/test_helpers.coffee +72 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/test_stubs.coffee +31 -0
- data/lib/vapid/vendor/trix/test/src/test_helpers/toolbar_helpers.coffee +45 -0
- data/lib/vapid/vendor/trix/test/src/unit/attachment_test.coffee +23 -0
- data/lib/vapid/vendor/trix/test/src/unit/block_test.coffee +22 -0
- data/lib/vapid/vendor/trix/test/src/unit/composition_test.coffee +13 -0
- data/lib/vapid/vendor/trix/test/src/unit/document_test.coffee +11 -0
- data/lib/vapid/vendor/trix/test/src/unit/document_view_test.coffee +6 -0
- data/lib/vapid/vendor/trix/test/src/unit/html_parser_test.coffee +162 -0
- data/lib/vapid/vendor/trix/test/src/unit/location_mapper_test.coffee +185 -0
- data/lib/vapid/vendor/trix/test/src/unit/mutation_observer_test.coffee +84 -0
- data/lib/vapid/vendor/trix/test/src/unit/serialization_test.coffee +7 -0
- data/lib/vapid/vendor/trix/test/src/unit/string_change_summary_test.coffee +57 -0
- data/lib/vapid/vendor/trix/test/src/unit/text_test.coffee +19 -0
- data/lib/vapid/vendor/trix/test/vendor/rangy-core.js +3845 -0
- data/lib/vapid/vendor/trix/test/vendor/rangy-textrange.js +1930 -0
- data/lib/vapid/version.rb +4 -0
- data/lib/vapid/views/admin/install.html.erb +19 -0
- data/lib/vapid/views/admin/login.html.erb +11 -0
- data/lib/vapid/views/admin/overview/index.html.erb +1 -0
- data/lib/vapid/views/admin/records/_form.erb +9 -0
- data/lib/vapid/views/admin/records/edit.html.erb +5 -0
- data/lib/vapid/views/admin/records/index.html.erb +38 -0
- data/lib/vapid/views/admin/records/new.html.erb +3 -0
- data/lib/vapid/views/errors/404.html.erb +1 -0
- data/lib/vapid/views/errors/500.html.erb +1 -0
- data/lib/vapid/views/layouts/admin.html.erb +41 -0
- data/lib/vapid/views/layouts/admin_form.html.erb +22 -0
- data/lib/vapid/views/layouts/error.html.erb +11 -0
- data/vapid.gemspec +48 -0
- metadata +811 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
/*!
|
2
|
+
* # Semantic UI 2.2.9 - Segment
|
3
|
+
* http://github.com/semantic-org/semantic-ui/
|
4
|
+
*
|
5
|
+
*
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://opensource.org/licenses/MIT
|
8
|
+
*
|
9
|
+
*/.ui.segment{position:relative;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15);margin:1rem 0;padding:1em 1em;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15)}.ui.segment:first-child{margin-top:0}.ui.segment:last-child{margin-bottom:0}.ui.vertical.segment{margin:0;padding-left:0;padding-right:0;background:none transparent;border-radius:0;box-shadow:none;border:none;border-bottom:1px solid rgba(34,36,38,.15)}.ui.vertical.segment:last-child{border-bottom:none}.ui.inverted.segment>.ui.header{color:#fff}.ui[class*="bottom attached"].segment>[class*="top attached"].label{border-top-left-radius:0;border-top-right-radius:0}.ui[class*="top attached"].segment>[class*="bottom attached"].label{border-bottom-left-radius:0;border-bottom-right-radius:0}.ui.attached.segment:not(.top):not(.bottom)>[class*="top attached"].label{border-top-left-radius:0;border-top-right-radius:0}.ui.attached.segment:not(.top):not(.bottom)>[class*="bottom attached"].label{border-bottom-left-radius:0;border-bottom-right-radius:0}.ui.grid>.row>.ui.segment.column,.ui.grid>.ui.segment.column,.ui.page.grid.segment{padding-top:2em;padding-bottom:2em}.ui.grid.segment{margin:1rem 0;border-radius:.28571429rem}.ui.basic.table.segment{background:#fff;border:1px solid rgba(34,36,38,.15);box-shadow:0 1px 2px 0 rgba(34,36,38,.15)}.ui[class*="very basic"].table.segment{padding:1em 1em}.ui.piled.segment,.ui.piled.segments{margin:3em 0;box-shadow:'';z-index:auto}.ui.piled.segment:first-child{margin-top:0}.ui.piled.segment:last-child{margin-bottom:0}.ui.piled.segment:after,.ui.piled.segment:before,.ui.piled.segments:after,.ui.piled.segments:before{background-color:#fff;visibility:visible;content:'';display:block;height:100%;left:0;position:absolute;width:100%;border:1px solid rgba(34,36,38,.15);box-shadow:''}.ui.piled.segment:before,.ui.piled.segments:before{-webkit-transform:rotate(-1.2deg);transform:rotate(-1.2deg);top:0;z-index:-2}.ui.piled.segment:after,.ui.piled.segments:after{-webkit-transform:rotate(1.2deg);transform:rotate(1.2deg);top:0;z-index:-1}.ui[class*="top attached"].piled.segment{margin-top:3em;margin-bottom:0}.ui.piled.segment[class*="top attached"]:first-child{margin-top:0}.ui.piled.segment[class*="bottom attached"]{margin-top:0;margin-bottom:3em}.ui.piled.segment[class*="bottom attached"]:last-child{margin-bottom:0}.ui.stacked.segment{padding-bottom:1.4em}.ui.stacked.segment:after,.ui.stacked.segment:before,.ui.stacked.segments:after,.ui.stacked.segments:before{content:'';position:absolute;bottom:-3px;left:0;border-top:1px solid rgba(34,36,38,.15);background:rgba(0,0,0,.03);width:100%;height:6px;visibility:visible}.ui.stacked.segment:before,.ui.stacked.segments:before{display:none}.ui.tall.stacked.segment:before,.ui.tall.stacked.segments:before{display:block;bottom:0}.ui.stacked.inverted.segment:after,.ui.stacked.inverted.segment:before,.ui.stacked.inverted.segments:after,.ui.stacked.inverted.segments:before{background-color:rgba(0,0,0,.03);border-top:1px solid rgba(34,36,38,.35)}.ui.padded.segment{padding:1.5em}.ui[class*="very padded"].segment{padding:3em}.ui.padded.segment.vertical.segment,.ui[class*="very padded"].vertical.segment{padding-left:0;padding-right:0}.ui.compact.segment{display:table}.ui.compact.segments{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.ui.compact.segments .segment,.ui.segments .compact.segment{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.ui.circular.segment{display:table-cell;padding:2em;text-align:center;vertical-align:middle;border-radius:500em}.ui.raised.segment,.ui.raised.segments{box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.segments{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative;margin:1rem 0;border:1px solid rgba(34,36,38,.15);box-shadow:0 1px 2px 0 rgba(34,36,38,.15);border-radius:.28571429rem}.ui.segments:first-child{margin-top:0}.ui.segments:last-child{margin-bottom:0}.ui.segments>.segment{top:0;bottom:0;border-radius:0;margin:0;width:auto;box-shadow:none;border:none;border-top:1px solid rgba(34,36,38,.15)}.ui.segments:not(.horizontal)>.segment:first-child{border-top:none;margin-top:0;bottom:0;margin-bottom:0;top:0;border-radius:.28571429rem .28571429rem 0 0}.ui.segments:not(.horizontal)>.segment:last-child{top:0;bottom:0;margin-top:0;margin-bottom:0;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),none;border-radius:0 0 .28571429rem .28571429rem}.ui.segments:not(.horizontal)>.segment:only-child{border-radius:.28571429rem}.ui.segments>.ui.segments{border-top:1px solid rgba(34,36,38,.15);margin:1rem 1rem}.ui.segments>.segments:first-child{border-top:none}.ui.segments>.segment+.segments:not(.horizontal){margin-top:0}.ui.horizontal.segments{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;background-color:transparent;border-radius:0;padding:0;background-color:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15);margin:1rem 0;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15)}.ui.segments>.horizontal.segments{margin:0;background-color:transparent;border-radius:0;border:none;box-shadow:none;border-top:1px solid rgba(34,36,38,.15)}.ui.horizontal.segments>.segment{-webkit-box-flex:1;flex:1 1 auto;-ms-flex:1 1 0px;margin:0;min-width:0;background-color:transparent;border-radius:0;border:none;box-shadow:none;border-left:1px solid rgba(34,36,38,.15)}.ui.segments>.horizontal.segments:first-child{border-top:none}.ui.horizontal.segments>.segment:first-child{border-left:none}.ui.disabled.segment{opacity:.45;color:rgba(40,40,40,.3)}.ui.loading.segment{position:relative;cursor:default;pointer-events:none;text-shadow:none!important;color:transparent!important;-webkit-transition:all 0s linear;transition:all 0s linear}.ui.loading.segment:before{position:absolute;content:'';top:0;left:0;background:rgba(255,255,255,.8);width:100%;height:100%;border-radius:.28571429rem;z-index:100}.ui.loading.segment:after{position:absolute;content:'';top:50%;left:50%;margin:-1.5em 0 0 -1.5em;width:3em;height:3em;-webkit-animation:segment-spin .6s linear;animation:segment-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.1);border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent;visibility:visible;z-index:101}@-webkit-keyframes segment-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes segment-spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.basic.segment{background:none transparent;box-shadow:none;border:none;border-radius:0}.ui.clearing.segment:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui.red.segment:not(.inverted){border-top:2px solid #db2828}.ui.inverted.red.segment{background-color:#db2828!important;color:#fff!important}.ui.orange.segment:not(.inverted){border-top:2px solid #f2711c}.ui.inverted.orange.segment{background-color:#f2711c!important;color:#fff!important}.ui.yellow.segment:not(.inverted){border-top:2px solid #fbbd08}.ui.inverted.yellow.segment{background-color:#fbbd08!important;color:#fff!important}.ui.olive.segment:not(.inverted){border-top:2px solid #b5cc18}.ui.inverted.olive.segment{background-color:#b5cc18!important;color:#fff!important}.ui.green.segment:not(.inverted){border-top:2px solid #21ba45}.ui.inverted.green.segment{background-color:#21ba45!important;color:#fff!important}.ui.teal.segment:not(.inverted){border-top:2px solid #00b5ad}.ui.inverted.teal.segment{background-color:#00b5ad!important;color:#fff!important}.ui.blue.segment:not(.inverted){border-top:2px solid #2185d0}.ui.inverted.blue.segment{background-color:#2185d0!important;color:#fff!important}.ui.violet.segment:not(.inverted){border-top:2px solid #6435c9}.ui.inverted.violet.segment{background-color:#6435c9!important;color:#fff!important}.ui.purple.segment:not(.inverted){border-top:2px solid #a333c8}.ui.inverted.purple.segment{background-color:#a333c8!important;color:#fff!important}.ui.pink.segment:not(.inverted){border-top:2px solid #e03997}.ui.inverted.pink.segment{background-color:#e03997!important;color:#fff!important}.ui.brown.segment:not(.inverted){border-top:2px solid #a5673f}.ui.inverted.brown.segment{background-color:#a5673f!important;color:#fff!important}.ui.grey.segment:not(.inverted){border-top:2px solid #767676}.ui.inverted.grey.segment{background-color:#767676!important;color:#fff!important}.ui.black.segment:not(.inverted){border-top:2px solid #1b1c1d}.ui.inverted.black.segment{background-color:#1b1c1d!important;color:#fff!important}.ui[class*="left aligned"].segment{text-align:left}.ui[class*="right aligned"].segment{text-align:right}.ui[class*="center aligned"].segment{text-align:center}.ui.floated.segment,.ui[class*="left floated"].segment{float:left;margin-right:1em}.ui[class*="right floated"].segment{float:right;margin-left:1em}.ui.inverted.segment{border:none;box-shadow:none}.ui.inverted.segment,.ui.primary.inverted.segment{background:#1b1c1d;color:rgba(255,255,255,.9)}.ui.inverted.segment .segment{color:rgba(0,0,0,.87)}.ui.inverted.segment .inverted.segment{color:rgba(255,255,255,.9)}.ui.inverted.attached.segment{border-color:#555}.ui.secondary.segment{background:#f3f4f5;color:rgba(0,0,0,.6)}.ui.secondary.inverted.segment{background:#4c4f52 -webkit-linear-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.2) 100%);background:#4c4f52 linear-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.2) 100%);color:rgba(255,255,255,.8)}.ui.tertiary.segment{background:#dcddde;color:rgba(0,0,0,.6)}.ui.tertiary.inverted.segment{background:#717579 -webkit-linear-gradient(rgba(255,255,255,.35) 0,rgba(255,255,255,.35) 100%);background:#717579 linear-gradient(rgba(255,255,255,.35) 0,rgba(255,255,255,.35) 100%);color:rgba(255,255,255,.8)}.ui.attached.segment{top:0;bottom:0;border-radius:0;margin:0 -1px;width:calc(100% + 2px);max-width:calc(100% + 2px);box-shadow:none;border:1px solid #d4d4d5}.ui.attached:not(.message)+.ui.attached.segment:not(.top){border-top:none}.ui[class*="top attached"].segment{bottom:0;margin-bottom:0;top:0;margin-top:1rem;border-radius:.28571429rem .28571429rem 0 0}.ui.segment[class*="top attached"]:first-child{margin-top:0}.ui.segment[class*="bottom attached"]{bottom:0;margin-top:0;top:0;margin-bottom:1rem;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),none;border-radius:0 0 .28571429rem .28571429rem}.ui.segment[class*="bottom attached"]:last-child{margin-bottom:0}.ui.mini.segment,.ui.mini.segments .segment{font-size:.78571429rem}.ui.tiny.segment,.ui.tiny.segments .segment{font-size:.85714286rem}.ui.small.segment,.ui.small.segments .segment{font-size:.92857143rem}.ui.segment,.ui.segments .segment{font-size:1rem}.ui.large.segment,.ui.large.segments .segment{font-size:1.14285714rem}.ui.big.segment,.ui.big.segments .segment{font-size:1.28571429rem}.ui.huge.segment,.ui.huge.segments .segment{font-size:1.42857143rem}.ui.massive.segment,.ui.massive.segments .segment{font-size:1.71428571rem}
|
@@ -0,0 +1,157 @@
|
|
1
|
+
/*!
|
2
|
+
* # Semantic UI 2.2.9 - Shape
|
3
|
+
* http://github.com/semantic-org/semantic-ui/
|
4
|
+
*
|
5
|
+
*
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://opensource.org/licenses/MIT
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
|
11
|
+
|
12
|
+
/*******************************
|
13
|
+
Shape
|
14
|
+
*******************************/
|
15
|
+
|
16
|
+
.ui.shape {
|
17
|
+
position: relative;
|
18
|
+
vertical-align: top;
|
19
|
+
display: inline-block;
|
20
|
+
-webkit-perspective: 2000px;
|
21
|
+
perspective: 2000px;
|
22
|
+
-webkit-transition: left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
|
23
|
+
transition: left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
|
24
|
+
transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out;
|
25
|
+
transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
|
26
|
+
}
|
27
|
+
.ui.shape .sides {
|
28
|
+
-webkit-transform-style: preserve-3d;
|
29
|
+
transform-style: preserve-3d;
|
30
|
+
}
|
31
|
+
.ui.shape .side {
|
32
|
+
opacity: 1;
|
33
|
+
width: 100%;
|
34
|
+
margin: 0em !important;
|
35
|
+
-webkit-backface-visibility: hidden;
|
36
|
+
backface-visibility: hidden;
|
37
|
+
}
|
38
|
+
.ui.shape .side {
|
39
|
+
display: none;
|
40
|
+
}
|
41
|
+
.ui.shape .side * {
|
42
|
+
-webkit-backface-visibility: visible !important;
|
43
|
+
backface-visibility: visible !important;
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
/*******************************
|
48
|
+
Types
|
49
|
+
*******************************/
|
50
|
+
|
51
|
+
.ui.cube.shape .side {
|
52
|
+
min-width: 15em;
|
53
|
+
height: 15em;
|
54
|
+
padding: 2em;
|
55
|
+
background-color: #E6E6E6;
|
56
|
+
color: rgba(0, 0, 0, 0.87);
|
57
|
+
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3);
|
58
|
+
}
|
59
|
+
.ui.cube.shape .side > .content {
|
60
|
+
width: 100%;
|
61
|
+
height: 100%;
|
62
|
+
display: table;
|
63
|
+
text-align: center;
|
64
|
+
-webkit-user-select: text;
|
65
|
+
-moz-user-select: text;
|
66
|
+
-ms-user-select: text;
|
67
|
+
user-select: text;
|
68
|
+
}
|
69
|
+
.ui.cube.shape .side > .content > div {
|
70
|
+
display: table-cell;
|
71
|
+
vertical-align: middle;
|
72
|
+
font-size: 2em;
|
73
|
+
}
|
74
|
+
|
75
|
+
|
76
|
+
/*******************************
|
77
|
+
Variations
|
78
|
+
*******************************/
|
79
|
+
|
80
|
+
.ui.text.shape.animating .sides {
|
81
|
+
position: static;
|
82
|
+
}
|
83
|
+
.ui.text.shape .side {
|
84
|
+
white-space: nowrap;
|
85
|
+
}
|
86
|
+
.ui.text.shape .side > * {
|
87
|
+
white-space: normal;
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
/*******************************
|
92
|
+
States
|
93
|
+
*******************************/
|
94
|
+
|
95
|
+
|
96
|
+
/*--------------
|
97
|
+
Loading
|
98
|
+
---------------*/
|
99
|
+
|
100
|
+
.ui.loading.shape {
|
101
|
+
position: absolute;
|
102
|
+
top: -9999px;
|
103
|
+
left: -9999px;
|
104
|
+
}
|
105
|
+
|
106
|
+
/*--------------
|
107
|
+
Animating
|
108
|
+
---------------*/
|
109
|
+
|
110
|
+
.ui.shape .animating.side {
|
111
|
+
position: absolute;
|
112
|
+
top: 0px;
|
113
|
+
left: 0px;
|
114
|
+
display: block;
|
115
|
+
z-index: 100;
|
116
|
+
}
|
117
|
+
.ui.shape .hidden.side {
|
118
|
+
opacity: 0.6;
|
119
|
+
}
|
120
|
+
|
121
|
+
/*--------------
|
122
|
+
CSS
|
123
|
+
---------------*/
|
124
|
+
|
125
|
+
.ui.shape.animating .sides {
|
126
|
+
position: absolute;
|
127
|
+
}
|
128
|
+
.ui.shape.animating .sides {
|
129
|
+
-webkit-transition: left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
|
130
|
+
transition: left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
|
131
|
+
transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out;
|
132
|
+
transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
|
133
|
+
}
|
134
|
+
.ui.shape.animating .side {
|
135
|
+
-webkit-transition: opacity 0.6s ease-in-out;
|
136
|
+
transition: opacity 0.6s ease-in-out;
|
137
|
+
}
|
138
|
+
|
139
|
+
/*--------------
|
140
|
+
Active
|
141
|
+
---------------*/
|
142
|
+
|
143
|
+
.ui.shape .active.side {
|
144
|
+
display: block;
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
/*******************************
|
149
|
+
Theme Overrides
|
150
|
+
*******************************/
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
/*******************************
|
155
|
+
User Overrides
|
156
|
+
*******************************/
|
157
|
+
|
@@ -0,0 +1,921 @@
|
|
1
|
+
/*!
|
2
|
+
* # Semantic UI 2.2.9 - Shape
|
3
|
+
* http://github.com/semantic-org/semantic-ui/
|
4
|
+
*
|
5
|
+
*
|
6
|
+
* Released under the MIT license
|
7
|
+
* http://opensource.org/licenses/MIT
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
|
11
|
+
;(function ($, window, document, undefined) {
|
12
|
+
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
window = (typeof window != 'undefined' && window.Math == Math)
|
16
|
+
? window
|
17
|
+
: (typeof self != 'undefined' && self.Math == Math)
|
18
|
+
? self
|
19
|
+
: Function('return this')()
|
20
|
+
;
|
21
|
+
|
22
|
+
$.fn.shape = function(parameters) {
|
23
|
+
var
|
24
|
+
$allModules = $(this),
|
25
|
+
$body = $('body'),
|
26
|
+
|
27
|
+
time = new Date().getTime(),
|
28
|
+
performance = [],
|
29
|
+
|
30
|
+
query = arguments[0],
|
31
|
+
methodInvoked = (typeof query == 'string'),
|
32
|
+
queryArguments = [].slice.call(arguments, 1),
|
33
|
+
|
34
|
+
requestAnimationFrame = window.requestAnimationFrame
|
35
|
+
|| window.mozRequestAnimationFrame
|
36
|
+
|| window.webkitRequestAnimationFrame
|
37
|
+
|| window.msRequestAnimationFrame
|
38
|
+
|| function(callback) { setTimeout(callback, 0); },
|
39
|
+
|
40
|
+
returnedValue
|
41
|
+
;
|
42
|
+
|
43
|
+
$allModules
|
44
|
+
.each(function() {
|
45
|
+
var
|
46
|
+
moduleSelector = $allModules.selector || '',
|
47
|
+
settings = ( $.isPlainObject(parameters) )
|
48
|
+
? $.extend(true, {}, $.fn.shape.settings, parameters)
|
49
|
+
: $.extend({}, $.fn.shape.settings),
|
50
|
+
|
51
|
+
// internal aliases
|
52
|
+
namespace = settings.namespace,
|
53
|
+
selector = settings.selector,
|
54
|
+
error = settings.error,
|
55
|
+
className = settings.className,
|
56
|
+
|
57
|
+
// define namespaces for modules
|
58
|
+
eventNamespace = '.' + namespace,
|
59
|
+
moduleNamespace = 'module-' + namespace,
|
60
|
+
|
61
|
+
// selector cache
|
62
|
+
$module = $(this),
|
63
|
+
$sides = $module.find(selector.sides),
|
64
|
+
$side = $module.find(selector.side),
|
65
|
+
|
66
|
+
// private variables
|
67
|
+
nextIndex = false,
|
68
|
+
$activeSide,
|
69
|
+
$nextSide,
|
70
|
+
|
71
|
+
// standard module
|
72
|
+
element = this,
|
73
|
+
instance = $module.data(moduleNamespace),
|
74
|
+
module
|
75
|
+
;
|
76
|
+
|
77
|
+
module = {
|
78
|
+
|
79
|
+
initialize: function() {
|
80
|
+
module.verbose('Initializing module for', element);
|
81
|
+
module.set.defaultSide();
|
82
|
+
module.instantiate();
|
83
|
+
},
|
84
|
+
|
85
|
+
instantiate: function() {
|
86
|
+
module.verbose('Storing instance of module', module);
|
87
|
+
instance = module;
|
88
|
+
$module
|
89
|
+
.data(moduleNamespace, instance)
|
90
|
+
;
|
91
|
+
},
|
92
|
+
|
93
|
+
destroy: function() {
|
94
|
+
module.verbose('Destroying previous module for', element);
|
95
|
+
$module
|
96
|
+
.removeData(moduleNamespace)
|
97
|
+
.off(eventNamespace)
|
98
|
+
;
|
99
|
+
},
|
100
|
+
|
101
|
+
refresh: function() {
|
102
|
+
module.verbose('Refreshing selector cache for', element);
|
103
|
+
$module = $(element);
|
104
|
+
$sides = $(this).find(selector.shape);
|
105
|
+
$side = $(this).find(selector.side);
|
106
|
+
},
|
107
|
+
|
108
|
+
repaint: function() {
|
109
|
+
module.verbose('Forcing repaint event');
|
110
|
+
var
|
111
|
+
shape = $sides[0] || document.createElement('div'),
|
112
|
+
fakeAssignment = shape.offsetWidth
|
113
|
+
;
|
114
|
+
},
|
115
|
+
|
116
|
+
animate: function(propertyObject, callback) {
|
117
|
+
module.verbose('Animating box with properties', propertyObject);
|
118
|
+
callback = callback || function(event) {
|
119
|
+
module.verbose('Executing animation callback');
|
120
|
+
if(event !== undefined) {
|
121
|
+
event.stopPropagation();
|
122
|
+
}
|
123
|
+
module.reset();
|
124
|
+
module.set.active();
|
125
|
+
};
|
126
|
+
settings.beforeChange.call($nextSide[0]);
|
127
|
+
if(module.get.transitionEvent()) {
|
128
|
+
module.verbose('Starting CSS animation');
|
129
|
+
$module
|
130
|
+
.addClass(className.animating)
|
131
|
+
;
|
132
|
+
$sides
|
133
|
+
.css(propertyObject)
|
134
|
+
.one(module.get.transitionEvent(), callback)
|
135
|
+
;
|
136
|
+
module.set.duration(settings.duration);
|
137
|
+
requestAnimationFrame(function() {
|
138
|
+
$module
|
139
|
+
.addClass(className.animating)
|
140
|
+
;
|
141
|
+
$activeSide
|
142
|
+
.addClass(className.hidden)
|
143
|
+
;
|
144
|
+
});
|
145
|
+
}
|
146
|
+
else {
|
147
|
+
callback();
|
148
|
+
}
|
149
|
+
},
|
150
|
+
|
151
|
+
queue: function(method) {
|
152
|
+
module.debug('Queueing animation of', method);
|
153
|
+
$sides
|
154
|
+
.one(module.get.transitionEvent(), function() {
|
155
|
+
module.debug('Executing queued animation');
|
156
|
+
setTimeout(function(){
|
157
|
+
$module.shape(method);
|
158
|
+
}, 0);
|
159
|
+
})
|
160
|
+
;
|
161
|
+
},
|
162
|
+
|
163
|
+
reset: function() {
|
164
|
+
module.verbose('Animating states reset');
|
165
|
+
$module
|
166
|
+
.removeClass(className.animating)
|
167
|
+
.attr('style', '')
|
168
|
+
.removeAttr('style')
|
169
|
+
;
|
170
|
+
// removeAttr style does not consistently work in safari
|
171
|
+
$sides
|
172
|
+
.attr('style', '')
|
173
|
+
.removeAttr('style')
|
174
|
+
;
|
175
|
+
$side
|
176
|
+
.attr('style', '')
|
177
|
+
.removeAttr('style')
|
178
|
+
.removeClass(className.hidden)
|
179
|
+
;
|
180
|
+
$nextSide
|
181
|
+
.removeClass(className.animating)
|
182
|
+
.attr('style', '')
|
183
|
+
.removeAttr('style')
|
184
|
+
;
|
185
|
+
},
|
186
|
+
|
187
|
+
is: {
|
188
|
+
complete: function() {
|
189
|
+
return ($side.filter('.' + className.active)[0] == $nextSide[0]);
|
190
|
+
},
|
191
|
+
animating: function() {
|
192
|
+
return $module.hasClass(className.animating);
|
193
|
+
}
|
194
|
+
},
|
195
|
+
|
196
|
+
set: {
|
197
|
+
|
198
|
+
defaultSide: function() {
|
199
|
+
$activeSide = $module.find('.' + settings.className.active);
|
200
|
+
$nextSide = ( $activeSide.next(selector.side).length > 0 )
|
201
|
+
? $activeSide.next(selector.side)
|
202
|
+
: $module.find(selector.side).first()
|
203
|
+
;
|
204
|
+
nextIndex = false;
|
205
|
+
module.verbose('Active side set to', $activeSide);
|
206
|
+
module.verbose('Next side set to', $nextSide);
|
207
|
+
},
|
208
|
+
|
209
|
+
duration: function(duration) {
|
210
|
+
duration = duration || settings.duration;
|
211
|
+
duration = (typeof duration == 'number')
|
212
|
+
? duration + 'ms'
|
213
|
+
: duration
|
214
|
+
;
|
215
|
+
module.verbose('Setting animation duration', duration);
|
216
|
+
if(settings.duration || settings.duration === 0) {
|
217
|
+
$sides.add($side)
|
218
|
+
.css({
|
219
|
+
'-webkit-transition-duration': duration,
|
220
|
+
'-moz-transition-duration': duration,
|
221
|
+
'-ms-transition-duration': duration,
|
222
|
+
'-o-transition-duration': duration,
|
223
|
+
'transition-duration': duration
|
224
|
+
})
|
225
|
+
;
|
226
|
+
}
|
227
|
+
},
|
228
|
+
|
229
|
+
currentStageSize: function() {
|
230
|
+
var
|
231
|
+
$activeSide = $module.find('.' + settings.className.active),
|
232
|
+
width = $activeSide.outerWidth(true),
|
233
|
+
height = $activeSide.outerHeight(true)
|
234
|
+
;
|
235
|
+
$module
|
236
|
+
.css({
|
237
|
+
width: width,
|
238
|
+
height: height
|
239
|
+
})
|
240
|
+
;
|
241
|
+
},
|
242
|
+
|
243
|
+
stageSize: function() {
|
244
|
+
var
|
245
|
+
$clone = $module.clone().addClass(className.loading),
|
246
|
+
$activeSide = $clone.find('.' + settings.className.active),
|
247
|
+
$nextSide = (nextIndex)
|
248
|
+
? $clone.find(selector.side).eq(nextIndex)
|
249
|
+
: ( $activeSide.next(selector.side).length > 0 )
|
250
|
+
? $activeSide.next(selector.side)
|
251
|
+
: $clone.find(selector.side).first(),
|
252
|
+
newWidth = (settings.width == 'next')
|
253
|
+
? $nextSide.outerWidth(true)
|
254
|
+
: (settings.width == 'initial')
|
255
|
+
? $module.width()
|
256
|
+
: settings.width,
|
257
|
+
newHeight = (settings.height == 'next')
|
258
|
+
? $nextSide.outerHeight(true)
|
259
|
+
: (settings.height == 'initial')
|
260
|
+
? $module.height()
|
261
|
+
: settings.height
|
262
|
+
;
|
263
|
+
$activeSide.removeClass(className.active);
|
264
|
+
$nextSide.addClass(className.active);
|
265
|
+
$clone.insertAfter($module);
|
266
|
+
$clone.remove();
|
267
|
+
if(settings.width != 'auto') {
|
268
|
+
$module.css('width', newWidth + settings.jitter);
|
269
|
+
module.verbose('Specifying width during animation', newWidth);
|
270
|
+
}
|
271
|
+
if(settings.height != 'auto') {
|
272
|
+
$module.css('height', newHeight + settings.jitter);
|
273
|
+
module.verbose('Specifying height during animation', newHeight);
|
274
|
+
}
|
275
|
+
},
|
276
|
+
|
277
|
+
nextSide: function(selector) {
|
278
|
+
nextIndex = selector;
|
279
|
+
$nextSide = $side.filter(selector);
|
280
|
+
nextIndex = $side.index($nextSide);
|
281
|
+
if($nextSide.length === 0) {
|
282
|
+
module.set.defaultSide();
|
283
|
+
module.error(error.side);
|
284
|
+
}
|
285
|
+
module.verbose('Next side manually set to', $nextSide);
|
286
|
+
},
|
287
|
+
|
288
|
+
active: function() {
|
289
|
+
module.verbose('Setting new side to active', $nextSide);
|
290
|
+
$side
|
291
|
+
.removeClass(className.active)
|
292
|
+
;
|
293
|
+
$nextSide
|
294
|
+
.addClass(className.active)
|
295
|
+
;
|
296
|
+
settings.onChange.call($nextSide[0]);
|
297
|
+
module.set.defaultSide();
|
298
|
+
}
|
299
|
+
},
|
300
|
+
|
301
|
+
flip: {
|
302
|
+
|
303
|
+
up: function() {
|
304
|
+
if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {
|
305
|
+
module.debug('Side already visible', $nextSide);
|
306
|
+
return;
|
307
|
+
}
|
308
|
+
if( !module.is.animating()) {
|
309
|
+
module.debug('Flipping up', $nextSide);
|
310
|
+
var
|
311
|
+
transform = module.get.transform.up()
|
312
|
+
;
|
313
|
+
module.set.stageSize();
|
314
|
+
module.stage.above();
|
315
|
+
module.animate(transform);
|
316
|
+
}
|
317
|
+
else {
|
318
|
+
module.queue('flip up');
|
319
|
+
}
|
320
|
+
},
|
321
|
+
|
322
|
+
down: function() {
|
323
|
+
if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {
|
324
|
+
module.debug('Side already visible', $nextSide);
|
325
|
+
return;
|
326
|
+
}
|
327
|
+
if( !module.is.animating()) {
|
328
|
+
module.debug('Flipping down', $nextSide);
|
329
|
+
var
|
330
|
+
transform = module.get.transform.down()
|
331
|
+
;
|
332
|
+
module.set.stageSize();
|
333
|
+
module.stage.below();
|
334
|
+
module.animate(transform);
|
335
|
+
}
|
336
|
+
else {
|
337
|
+
module.queue('flip down');
|
338
|
+
}
|
339
|
+
},
|
340
|
+
|
341
|
+
left: function() {
|
342
|
+
if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {
|
343
|
+
module.debug('Side already visible', $nextSide);
|
344
|
+
return;
|
345
|
+
}
|
346
|
+
if( !module.is.animating()) {
|
347
|
+
module.debug('Flipping left', $nextSide);
|
348
|
+
var
|
349
|
+
transform = module.get.transform.left()
|
350
|
+
;
|
351
|
+
module.set.stageSize();
|
352
|
+
module.stage.left();
|
353
|
+
module.animate(transform);
|
354
|
+
}
|
355
|
+
else {
|
356
|
+
module.queue('flip left');
|
357
|
+
}
|
358
|
+
},
|
359
|
+
|
360
|
+
right: function() {
|
361
|
+
if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {
|
362
|
+
module.debug('Side already visible', $nextSide);
|
363
|
+
return;
|
364
|
+
}
|
365
|
+
if( !module.is.animating()) {
|
366
|
+
module.debug('Flipping right', $nextSide);
|
367
|
+
var
|
368
|
+
transform = module.get.transform.right()
|
369
|
+
;
|
370
|
+
module.set.stageSize();
|
371
|
+
module.stage.right();
|
372
|
+
module.animate(transform);
|
373
|
+
}
|
374
|
+
else {
|
375
|
+
module.queue('flip right');
|
376
|
+
}
|
377
|
+
},
|
378
|
+
|
379
|
+
over: function() {
|
380
|
+
if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {
|
381
|
+
module.debug('Side already visible', $nextSide);
|
382
|
+
return;
|
383
|
+
}
|
384
|
+
if( !module.is.animating()) {
|
385
|
+
module.debug('Flipping over', $nextSide);
|
386
|
+
module.set.stageSize();
|
387
|
+
module.stage.behind();
|
388
|
+
module.animate(module.get.transform.over() );
|
389
|
+
}
|
390
|
+
else {
|
391
|
+
module.queue('flip over');
|
392
|
+
}
|
393
|
+
},
|
394
|
+
|
395
|
+
back: function() {
|
396
|
+
if(module.is.complete() && !module.is.animating() && !settings.allowRepeats) {
|
397
|
+
module.debug('Side already visible', $nextSide);
|
398
|
+
return;
|
399
|
+
}
|
400
|
+
if( !module.is.animating()) {
|
401
|
+
module.debug('Flipping back', $nextSide);
|
402
|
+
module.set.stageSize();
|
403
|
+
module.stage.behind();
|
404
|
+
module.animate(module.get.transform.back() );
|
405
|
+
}
|
406
|
+
else {
|
407
|
+
module.queue('flip back');
|
408
|
+
}
|
409
|
+
}
|
410
|
+
|
411
|
+
},
|
412
|
+
|
413
|
+
get: {
|
414
|
+
|
415
|
+
transform: {
|
416
|
+
up: function() {
|
417
|
+
var
|
418
|
+
translate = {
|
419
|
+
y: -(($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),
|
420
|
+
z: -($activeSide.outerHeight(true) / 2)
|
421
|
+
}
|
422
|
+
;
|
423
|
+
return {
|
424
|
+
transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(-90deg)'
|
425
|
+
};
|
426
|
+
},
|
427
|
+
|
428
|
+
down: function() {
|
429
|
+
var
|
430
|
+
translate = {
|
431
|
+
y: -(($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),
|
432
|
+
z: -($activeSide.outerHeight(true) / 2)
|
433
|
+
}
|
434
|
+
;
|
435
|
+
return {
|
436
|
+
transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(90deg)'
|
437
|
+
};
|
438
|
+
},
|
439
|
+
|
440
|
+
left: function() {
|
441
|
+
var
|
442
|
+
translate = {
|
443
|
+
x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),
|
444
|
+
z : -($activeSide.outerWidth(true) / 2)
|
445
|
+
}
|
446
|
+
;
|
447
|
+
return {
|
448
|
+
transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(90deg)'
|
449
|
+
};
|
450
|
+
},
|
451
|
+
|
452
|
+
right: function() {
|
453
|
+
var
|
454
|
+
translate = {
|
455
|
+
x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),
|
456
|
+
z : -($activeSide.outerWidth(true) / 2)
|
457
|
+
}
|
458
|
+
;
|
459
|
+
return {
|
460
|
+
transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(-90deg)'
|
461
|
+
};
|
462
|
+
},
|
463
|
+
|
464
|
+
over: function() {
|
465
|
+
var
|
466
|
+
translate = {
|
467
|
+
x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2)
|
468
|
+
}
|
469
|
+
;
|
470
|
+
return {
|
471
|
+
transform: 'translateX(' + translate.x + 'px) rotateY(180deg)'
|
472
|
+
};
|
473
|
+
},
|
474
|
+
|
475
|
+
back: function() {
|
476
|
+
var
|
477
|
+
translate = {
|
478
|
+
x : -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2)
|
479
|
+
}
|
480
|
+
;
|
481
|
+
return {
|
482
|
+
transform: 'translateX(' + translate.x + 'px) rotateY(-180deg)'
|
483
|
+
};
|
484
|
+
}
|
485
|
+
},
|
486
|
+
|
487
|
+
transitionEvent: function() {
|
488
|
+
var
|
489
|
+
element = document.createElement('element'),
|
490
|
+
transitions = {
|
491
|
+
'transition' :'transitionend',
|
492
|
+
'OTransition' :'oTransitionEnd',
|
493
|
+
'MozTransition' :'transitionend',
|
494
|
+
'WebkitTransition' :'webkitTransitionEnd'
|
495
|
+
},
|
496
|
+
transition
|
497
|
+
;
|
498
|
+
for(transition in transitions){
|
499
|
+
if( element.style[transition] !== undefined ){
|
500
|
+
return transitions[transition];
|
501
|
+
}
|
502
|
+
}
|
503
|
+
},
|
504
|
+
|
505
|
+
nextSide: function() {
|
506
|
+
return ( $activeSide.next(selector.side).length > 0 )
|
507
|
+
? $activeSide.next(selector.side)
|
508
|
+
: $module.find(selector.side).first()
|
509
|
+
;
|
510
|
+
}
|
511
|
+
|
512
|
+
},
|
513
|
+
|
514
|
+
stage: {
|
515
|
+
|
516
|
+
above: function() {
|
517
|
+
var
|
518
|
+
box = {
|
519
|
+
origin : (($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),
|
520
|
+
depth : {
|
521
|
+
active : ($nextSide.outerHeight(true) / 2),
|
522
|
+
next : ($activeSide.outerHeight(true) / 2)
|
523
|
+
}
|
524
|
+
}
|
525
|
+
;
|
526
|
+
module.verbose('Setting the initial animation position as above', $nextSide, box);
|
527
|
+
$sides
|
528
|
+
.css({
|
529
|
+
'transform' : 'translateZ(-' + box.depth.active + 'px)'
|
530
|
+
})
|
531
|
+
;
|
532
|
+
$activeSide
|
533
|
+
.css({
|
534
|
+
'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'
|
535
|
+
})
|
536
|
+
;
|
537
|
+
$nextSide
|
538
|
+
.addClass(className.animating)
|
539
|
+
.css({
|
540
|
+
'top' : box.origin + 'px',
|
541
|
+
'transform' : 'rotateX(90deg) translateZ(' + box.depth.next + 'px)'
|
542
|
+
})
|
543
|
+
;
|
544
|
+
},
|
545
|
+
|
546
|
+
below: function() {
|
547
|
+
var
|
548
|
+
box = {
|
549
|
+
origin : (($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2),
|
550
|
+
depth : {
|
551
|
+
active : ($nextSide.outerHeight(true) / 2),
|
552
|
+
next : ($activeSide.outerHeight(true) / 2)
|
553
|
+
}
|
554
|
+
}
|
555
|
+
;
|
556
|
+
module.verbose('Setting the initial animation position as below', $nextSide, box);
|
557
|
+
$sides
|
558
|
+
.css({
|
559
|
+
'transform' : 'translateZ(-' + box.depth.active + 'px)'
|
560
|
+
})
|
561
|
+
;
|
562
|
+
$activeSide
|
563
|
+
.css({
|
564
|
+
'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'
|
565
|
+
})
|
566
|
+
;
|
567
|
+
$nextSide
|
568
|
+
.addClass(className.animating)
|
569
|
+
.css({
|
570
|
+
'top' : box.origin + 'px',
|
571
|
+
'transform' : 'rotateX(-90deg) translateZ(' + box.depth.next + 'px)'
|
572
|
+
})
|
573
|
+
;
|
574
|
+
},
|
575
|
+
|
576
|
+
left: function() {
|
577
|
+
var
|
578
|
+
height = {
|
579
|
+
active : $activeSide.outerWidth(true),
|
580
|
+
next : $nextSide.outerWidth(true)
|
581
|
+
},
|
582
|
+
box = {
|
583
|
+
origin : ( ( height.active - height.next ) / 2),
|
584
|
+
depth : {
|
585
|
+
active : (height.next / 2),
|
586
|
+
next : (height.active / 2)
|
587
|
+
}
|
588
|
+
}
|
589
|
+
;
|
590
|
+
module.verbose('Setting the initial animation position as left', $nextSide, box);
|
591
|
+
$sides
|
592
|
+
.css({
|
593
|
+
'transform' : 'translateZ(-' + box.depth.active + 'px)'
|
594
|
+
})
|
595
|
+
;
|
596
|
+
$activeSide
|
597
|
+
.css({
|
598
|
+
'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'
|
599
|
+
})
|
600
|
+
;
|
601
|
+
$nextSide
|
602
|
+
.addClass(className.animating)
|
603
|
+
.css({
|
604
|
+
'left' : box.origin + 'px',
|
605
|
+
'transform' : 'rotateY(-90deg) translateZ(' + box.depth.next + 'px)'
|
606
|
+
})
|
607
|
+
;
|
608
|
+
},
|
609
|
+
|
610
|
+
right: function() {
|
611
|
+
var
|
612
|
+
height = {
|
613
|
+
active : $activeSide.outerWidth(true),
|
614
|
+
next : $nextSide.outerWidth(true)
|
615
|
+
},
|
616
|
+
box = {
|
617
|
+
origin : ( ( height.active - height.next ) / 2),
|
618
|
+
depth : {
|
619
|
+
active : (height.next / 2),
|
620
|
+
next : (height.active / 2)
|
621
|
+
}
|
622
|
+
}
|
623
|
+
;
|
624
|
+
module.verbose('Setting the initial animation position as left', $nextSide, box);
|
625
|
+
$sides
|
626
|
+
.css({
|
627
|
+
'transform' : 'translateZ(-' + box.depth.active + 'px)'
|
628
|
+
})
|
629
|
+
;
|
630
|
+
$activeSide
|
631
|
+
.css({
|
632
|
+
'transform' : 'rotateY(0deg) translateZ(' + box.depth.active + 'px)'
|
633
|
+
})
|
634
|
+
;
|
635
|
+
$nextSide
|
636
|
+
.addClass(className.animating)
|
637
|
+
.css({
|
638
|
+
'left' : box.origin + 'px',
|
639
|
+
'transform' : 'rotateY(90deg) translateZ(' + box.depth.next + 'px)'
|
640
|
+
})
|
641
|
+
;
|
642
|
+
},
|
643
|
+
|
644
|
+
behind: function() {
|
645
|
+
var
|
646
|
+
height = {
|
647
|
+
active : $activeSide.outerWidth(true),
|
648
|
+
next : $nextSide.outerWidth(true)
|
649
|
+
},
|
650
|
+
box = {
|
651
|
+
origin : ( ( height.active - height.next ) / 2),
|
652
|
+
depth : {
|
653
|
+
active : (height.next / 2),
|
654
|
+
next : (height.active / 2)
|
655
|
+
}
|
656
|
+
}
|
657
|
+
;
|
658
|
+
module.verbose('Setting the initial animation position as behind', $nextSide, box);
|
659
|
+
$activeSide
|
660
|
+
.css({
|
661
|
+
'transform' : 'rotateY(0deg)'
|
662
|
+
})
|
663
|
+
;
|
664
|
+
$nextSide
|
665
|
+
.addClass(className.animating)
|
666
|
+
.css({
|
667
|
+
'left' : box.origin + 'px',
|
668
|
+
'transform' : 'rotateY(-180deg)'
|
669
|
+
})
|
670
|
+
;
|
671
|
+
}
|
672
|
+
},
|
673
|
+
setting: function(name, value) {
|
674
|
+
module.debug('Changing setting', name, value);
|
675
|
+
if( $.isPlainObject(name) ) {
|
676
|
+
$.extend(true, settings, name);
|
677
|
+
}
|
678
|
+
else if(value !== undefined) {
|
679
|
+
if($.isPlainObject(settings[name])) {
|
680
|
+
$.extend(true, settings[name], value);
|
681
|
+
}
|
682
|
+
else {
|
683
|
+
settings[name] = value;
|
684
|
+
}
|
685
|
+
}
|
686
|
+
else {
|
687
|
+
return settings[name];
|
688
|
+
}
|
689
|
+
},
|
690
|
+
internal: function(name, value) {
|
691
|
+
if( $.isPlainObject(name) ) {
|
692
|
+
$.extend(true, module, name);
|
693
|
+
}
|
694
|
+
else if(value !== undefined) {
|
695
|
+
module[name] = value;
|
696
|
+
}
|
697
|
+
else {
|
698
|
+
return module[name];
|
699
|
+
}
|
700
|
+
},
|
701
|
+
debug: function() {
|
702
|
+
if(!settings.silent && settings.debug) {
|
703
|
+
if(settings.performance) {
|
704
|
+
module.performance.log(arguments);
|
705
|
+
}
|
706
|
+
else {
|
707
|
+
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
708
|
+
module.debug.apply(console, arguments);
|
709
|
+
}
|
710
|
+
}
|
711
|
+
},
|
712
|
+
verbose: function() {
|
713
|
+
if(!settings.silent && settings.verbose && settings.debug) {
|
714
|
+
if(settings.performance) {
|
715
|
+
module.performance.log(arguments);
|
716
|
+
}
|
717
|
+
else {
|
718
|
+
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
719
|
+
module.verbose.apply(console, arguments);
|
720
|
+
}
|
721
|
+
}
|
722
|
+
},
|
723
|
+
error: function() {
|
724
|
+
if(!settings.silent) {
|
725
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
726
|
+
module.error.apply(console, arguments);
|
727
|
+
}
|
728
|
+
},
|
729
|
+
performance: {
|
730
|
+
log: function(message) {
|
731
|
+
var
|
732
|
+
currentTime,
|
733
|
+
executionTime,
|
734
|
+
previousTime
|
735
|
+
;
|
736
|
+
if(settings.performance) {
|
737
|
+
currentTime = new Date().getTime();
|
738
|
+
previousTime = time || currentTime;
|
739
|
+
executionTime = currentTime - previousTime;
|
740
|
+
time = currentTime;
|
741
|
+
performance.push({
|
742
|
+
'Name' : message[0],
|
743
|
+
'Arguments' : [].slice.call(message, 1) || '',
|
744
|
+
'Element' : element,
|
745
|
+
'Execution Time' : executionTime
|
746
|
+
});
|
747
|
+
}
|
748
|
+
clearTimeout(module.performance.timer);
|
749
|
+
module.performance.timer = setTimeout(module.performance.display, 500);
|
750
|
+
},
|
751
|
+
display: function() {
|
752
|
+
var
|
753
|
+
title = settings.name + ':',
|
754
|
+
totalTime = 0
|
755
|
+
;
|
756
|
+
time = false;
|
757
|
+
clearTimeout(module.performance.timer);
|
758
|
+
$.each(performance, function(index, data) {
|
759
|
+
totalTime += data['Execution Time'];
|
760
|
+
});
|
761
|
+
title += ' ' + totalTime + 'ms';
|
762
|
+
if(moduleSelector) {
|
763
|
+
title += ' \'' + moduleSelector + '\'';
|
764
|
+
}
|
765
|
+
if($allModules.length > 1) {
|
766
|
+
title += ' ' + '(' + $allModules.length + ')';
|
767
|
+
}
|
768
|
+
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
769
|
+
console.groupCollapsed(title);
|
770
|
+
if(console.table) {
|
771
|
+
console.table(performance);
|
772
|
+
}
|
773
|
+
else {
|
774
|
+
$.each(performance, function(index, data) {
|
775
|
+
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
|
776
|
+
});
|
777
|
+
}
|
778
|
+
console.groupEnd();
|
779
|
+
}
|
780
|
+
performance = [];
|
781
|
+
}
|
782
|
+
},
|
783
|
+
invoke: function(query, passedArguments, context) {
|
784
|
+
var
|
785
|
+
object = instance,
|
786
|
+
maxDepth,
|
787
|
+
found,
|
788
|
+
response
|
789
|
+
;
|
790
|
+
passedArguments = passedArguments || queryArguments;
|
791
|
+
context = element || context;
|
792
|
+
if(typeof query == 'string' && object !== undefined) {
|
793
|
+
query = query.split(/[\. ]/);
|
794
|
+
maxDepth = query.length - 1;
|
795
|
+
$.each(query, function(depth, value) {
|
796
|
+
var camelCaseValue = (depth != maxDepth)
|
797
|
+
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
798
|
+
: query
|
799
|
+
;
|
800
|
+
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
|
801
|
+
object = object[camelCaseValue];
|
802
|
+
}
|
803
|
+
else if( object[camelCaseValue] !== undefined ) {
|
804
|
+
found = object[camelCaseValue];
|
805
|
+
return false;
|
806
|
+
}
|
807
|
+
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
|
808
|
+
object = object[value];
|
809
|
+
}
|
810
|
+
else if( object[value] !== undefined ) {
|
811
|
+
found = object[value];
|
812
|
+
return false;
|
813
|
+
}
|
814
|
+
else {
|
815
|
+
return false;
|
816
|
+
}
|
817
|
+
});
|
818
|
+
}
|
819
|
+
if ( $.isFunction( found ) ) {
|
820
|
+
response = found.apply(context, passedArguments);
|
821
|
+
}
|
822
|
+
else if(found !== undefined) {
|
823
|
+
response = found;
|
824
|
+
}
|
825
|
+
if($.isArray(returnedValue)) {
|
826
|
+
returnedValue.push(response);
|
827
|
+
}
|
828
|
+
else if(returnedValue !== undefined) {
|
829
|
+
returnedValue = [returnedValue, response];
|
830
|
+
}
|
831
|
+
else if(response !== undefined) {
|
832
|
+
returnedValue = response;
|
833
|
+
}
|
834
|
+
return found;
|
835
|
+
}
|
836
|
+
};
|
837
|
+
|
838
|
+
if(methodInvoked) {
|
839
|
+
if(instance === undefined) {
|
840
|
+
module.initialize();
|
841
|
+
}
|
842
|
+
module.invoke(query);
|
843
|
+
}
|
844
|
+
else {
|
845
|
+
if(instance !== undefined) {
|
846
|
+
instance.invoke('destroy');
|
847
|
+
}
|
848
|
+
module.initialize();
|
849
|
+
}
|
850
|
+
})
|
851
|
+
;
|
852
|
+
|
853
|
+
return (returnedValue !== undefined)
|
854
|
+
? returnedValue
|
855
|
+
: this
|
856
|
+
;
|
857
|
+
};
|
858
|
+
|
859
|
+
$.fn.shape.settings = {
|
860
|
+
|
861
|
+
// module info
|
862
|
+
name : 'Shape',
|
863
|
+
|
864
|
+
// hide all debug content
|
865
|
+
silent : false,
|
866
|
+
|
867
|
+
// debug content outputted to console
|
868
|
+
debug : false,
|
869
|
+
|
870
|
+
// verbose debug output
|
871
|
+
verbose : false,
|
872
|
+
|
873
|
+
// fudge factor in pixels when swapping from 2d to 3d (can be useful to correct rounding errors)
|
874
|
+
jitter : 0,
|
875
|
+
|
876
|
+
// performance data output
|
877
|
+
performance: true,
|
878
|
+
|
879
|
+
// event namespace
|
880
|
+
namespace : 'shape',
|
881
|
+
|
882
|
+
// width during animation, can be set to 'auto', initial', 'next' or pixel amount
|
883
|
+
width: 'initial',
|
884
|
+
|
885
|
+
// height during animation, can be set to 'auto', 'initial', 'next' or pixel amount
|
886
|
+
height: 'initial',
|
887
|
+
|
888
|
+
// callback occurs on side change
|
889
|
+
beforeChange : function() {},
|
890
|
+
onChange : function() {},
|
891
|
+
|
892
|
+
// allow animation to same side
|
893
|
+
allowRepeats: false,
|
894
|
+
|
895
|
+
// animation duration
|
896
|
+
duration : false,
|
897
|
+
|
898
|
+
// possible errors
|
899
|
+
error: {
|
900
|
+
side : 'You tried to switch to a side that does not exist.',
|
901
|
+
method : 'The method you called is not defined'
|
902
|
+
},
|
903
|
+
|
904
|
+
// classnames used
|
905
|
+
className : {
|
906
|
+
animating : 'animating',
|
907
|
+
hidden : 'hidden',
|
908
|
+
loading : 'loading',
|
909
|
+
active : 'active'
|
910
|
+
},
|
911
|
+
|
912
|
+
// selectors used
|
913
|
+
selector : {
|
914
|
+
sides : '.sides',
|
915
|
+
side : '.side'
|
916
|
+
}
|
917
|
+
|
918
|
+
};
|
919
|
+
|
920
|
+
|
921
|
+
})( jQuery, window, document );
|