Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/workarea-commerce/workarea-super-hero
We can be heroes. Just for one day.
https://github.com/workarea-commerce/workarea-super-hero
Last synced: about 1 month ago
JSON representation
We can be heroes. Just for one day.
- Host: GitHub
- URL: https://github.com/workarea-commerce/workarea-super-hero
- Owner: workarea-commerce
- License: other
- Created: 2019-08-21T19:34:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T09:15:01.000Z (almost 2 years ago)
- Last Synced: 2024-09-21T18:30:00.351Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 586 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Workarea Super Hero
================================================================================>Give your content super powers!
Super Hero plugin for the Workarea platform.
Features
--------------------------------------------------------------------------------Super hero provides a fleshed out set of content tools that allows admin users to deliver beautiful content easily.
## Media Modes
Media Modes offers a set of options that dictate how media will be rendered
### Resize mode
Stretches/squishes media to fit the viewport or container.
automatically deteects and retains the aspect ratio of the chosen media
### Crop Mode
Allows the admin to select a 'crop to' location (left, center, right)
The image will maintain it's original height and crop to the designated location as the browser is resized
### Switch Mode
Allows the user to select up to 3 images which are rendered as a element
### Video Mode
Provides the Admin user with a text area input to paste in a full embed code from Vimeo or Youtube
The full iframe embed code must be provided, this will be parsed in the view model and constructed into a responsive iframe on the store front.
## Color Pickers
Super hero provides a full color picker for both text and background colors. Brand colors can be configured on a per-installation basis inside the super_hero_tasks.rake file.
The background color picker also provides a range slider and text input to control opacity. This accepts values between 0 - 100 and is converted to an alpha channel in the view model.
>Currently browser support for input type='color' is patchy, a polyfill is in the works to allow users on unsupported browsers to use this functionality.
## Content Positioning
The admin user is able to select from 9 content positions using a sweet SVG UI element. By default a position offset of 5% is defined, you can override the $positioning-offset scss variable in your host application to customize the space between content and the edge of the block.
Video Embedder
--------------------------------------------------------------------------------Super hero includes a VideoEmbedder service which parses youtube and vimeo iframes
and generates iframe parameters.
The embedder accepts the iframe embed code and a set of options.
Options are part of the advanced_video Content::Field and include: loop, autoplay,
and mute functionality.The plugin also includes js player API integrations for youtube and vimeo.
This enables the mute functionality and fires events to Workarea analytics.js.
In order to use those analytics events in your host application you will need
to write analytics adapter callbacks for the service you wish to send the data to.Example callbacks:
```
'vimeo': function (payload) {
send('send', payload.eventCategory, payload.eventAction, payload.eventLabel, payload.eventValue);
},'youtube': function (payload) {
send('send', payload.eventCategory, payload.eventAction, payload.eventLabel, payload.eventValue);
},
```Getting Started
--------------------------------------------------------------------------------Add the gem to your application's Gemfile:
```ruby
# ...
gem 'workarea-super_hero'
# ...
```Update your application's bundle.
```bash
cd path/to/application
bundle
```Configuration
--------------------------------------------------------------------------------Superhero implements a content block type which no longer requires any initial
configuration. You may wish to override the config for the block type in order
to change the preset colors for background and text color pickers.Workarea Commerce Documentation
--------------------------------------------------------------------------------See [https://developer.workarea.com](https://developer.workarea.com) for Workarea Commerce documentation.
License
--------------------------------------------------------------------------------Workarea Super Hero is released under the [Business Software License](LICENSE)