adding initial fast-api
This commit is contained in:
47
fast-api/bower_components/Morphext/.bower.json
vendored
Normal file
47
fast-api/bower_components/Morphext/.bower.json
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "Morphext",
|
||||
"version": "2.4.4",
|
||||
"description": "A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.",
|
||||
"authors": [
|
||||
"Ian Lai <ian@fyianlai.com>"
|
||||
],
|
||||
"main": [
|
||||
"dist/morphext.min.js",
|
||||
"dist/morphext.css"
|
||||
],
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"text rotator",
|
||||
"rotating text",
|
||||
"ticker",
|
||||
"cycle",
|
||||
"animate.css",
|
||||
"text animation",
|
||||
"carousel",
|
||||
"inline"
|
||||
],
|
||||
"license": "http://ian.mit-license.org/",
|
||||
"private": false,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"animate.css": "~3.2.5",
|
||||
"jquery": "~2.1.4"
|
||||
},
|
||||
"homepage": "https://github.com/MrSaints/Morphext",
|
||||
"_release": "2.4.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.4.4",
|
||||
"commit": "5e534f48aaadfc7cc8ce415c472e56b9badf7c15"
|
||||
},
|
||||
"_source": "https://github.com/MrSaints/Morphext.git",
|
||||
"_target": "^2.4.4",
|
||||
"_originalSource": "Morphext",
|
||||
"_direct": true
|
||||
}
|
||||
20
fast-api/bower_components/Morphext/Gruntfile.coffee
vendored
Normal file
20
fast-api/bower_components/Morphext/Gruntfile.coffee
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
module.exports = (grunt) ->
|
||||
grunt.initConfig
|
||||
pkg: grunt.file.readJSON 'package.json'
|
||||
|
||||
uglify:
|
||||
options:
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
|
||||
'<%= grunt.template.today("yyyy-mm-dd") %> */'
|
||||
dist:
|
||||
files:
|
||||
'dist/morphext.min.js': ['dist/morphext.js']
|
||||
|
||||
eslint:
|
||||
all: ['dist/morphext.js']
|
||||
|
||||
grunt.loadNpmTasks 'grunt-contrib-uglify'
|
||||
grunt.loadNpmTasks 'grunt-eslint'
|
||||
|
||||
grunt.registerTask 'default', ['test', 'uglify']
|
||||
grunt.registerTask 'test', ['eslint']
|
||||
20
fast-api/bower_components/Morphext/LICENSE
vendored
Normal file
20
fast-api/bower_components/Morphext/LICENSE
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
Copyright © 2014 Ian Lai <ian@fyianlai.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the “Software”), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
128
fast-api/bower_components/Morphext/README.md
vendored
Normal file
128
fast-api/bower_components/Morphext/README.md
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
Morphext
|
||||
========
|
||||
|
||||
[](https://david-dm.org/MrSaints/Morphext#info=devDependencies)
|
||||
|
||||
A simple, high-performance and cross-browser [jQuery][jquery] rotating / carousel plugin for text phrases powered by [Animate.css][animatecss]. It is more succinctly described by [Softpedia](http://webscripts.softpedia.com/script/Text-Management/Text-Tools/Morphext-82875.html) as:
|
||||
|
||||
> A [jQuery][jquery] plugin for creating text-based carousels, rotating small or large pieces of text one after the other, just like a slider does with images... This can be a great tool for displaying catch phrases, mission statements, tag lines, and so on.
|
||||
|
||||
If you would like to achieve a similar effect with more flexibility (e.g. out animation) and with HTML objects rather than text phrases (e.g. unordered list items), please check out [Morphist][morphist].
|
||||
|
||||
[Website][website] / [Demo][demo]
|
||||
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
Download from the [project page][downloads].
|
||||
|
||||
Install with [Bower][bower]: `bower install --save Morphext`
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
1. Import the latest [Animate.css][animatecss] and [jQuery][jquery] library into your HTML.
|
||||
|
||||
2. Import `morphext.css` and include `morphext.min.js` in your HTML document.
|
||||
|
||||
3. Encapsulate your rotating phrases in an element and separate each phrase with a comma or a separator of your choice:
|
||||
|
||||
```html
|
||||
I am a <span id="js-rotating">So Simple, Very Doge, Much Wow, Such Cool</span> Text Rotator
|
||||
```
|
||||
|
||||
4. Trigger the plugin by calling Morphext() on the element containing the rotating phrases:
|
||||
|
||||
```js
|
||||
$("#js-rotating").Morphext();
|
||||
```
|
||||
|
||||
A demo titled `index.html` is included in this repository. Open it to see the end-result.
|
||||
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
Morphext exposes the following options to alter the behaviour of the plugin:
|
||||
|
||||
Option | Type | Default | Description
|
||||
--- | --- | --- | ---
|
||||
animation | `string` | `bounceIn` | The [in] animation type. Refer to [Animate.css][animatecss] for a list of available animations.
|
||||
separator | `string` | `,` | An array of phrases to rotate are created based on this separator. Change it if you wish to separate the phrases differently (e.g. So Simple / Very Doge / Much Wow / Such Cool).
|
||||
speed | `int` | `2000` | The delay between the changing of each phrase in milliseconds.
|
||||
complete | `object Function` | `null` | A callback that is executed after an item is animated in.
|
||||
|
||||
They may be used like so:
|
||||
|
||||
```js
|
||||
$("#js-rotating").Morphext({
|
||||
animation: "fadeIn", // Overrides default "bounceIn"
|
||||
separator: "|", // Overrides default ","
|
||||
speed: 3000, // Overrides default 2000
|
||||
complete: function () {
|
||||
// Overrides default empty function
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
The plugin relies heavily on [Animate.css][animatecss] for its [smooth, high performance animations](http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/) to transition between each phrase. Thus, the default animation speed (different from the interval between each phrase as described above) may be altered via CSS:
|
||||
|
||||
```css
|
||||
#yourElement, .yourClass {
|
||||
/* Overrides Animate.css 1s duration */
|
||||
-vendor-animation-duration: 3s;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
"Issues"
|
||||
----------
|
||||
|
||||
Issue | Description | Solution
|
||||
--- | --- | ---
|
||||
Viewport | Certain animations (e.g. "up" and "down") by [Animate.css][animatecss] involves translating the element beyond the viewport thereby leading to unintended vertical and/or horizontal whitespace (further evident by the scrollbar "following" the animation effect. This is not a bug. | It may be eradicated by applying `overflow: hidden;` (CSS) to the parent of the element being animated.
|
||||
JavaScript | JavaScript is required for the addition / removal of elements with [Animate.css][animatecss] [CSS animation] classes thereby creating the "transitioning effect". If JavaScript is disabled or unavailable, nothing will happen. All the phrases and its separator will be shown as it is (graceful degradation). | N/A
|
||||
CSS3 | [Animate.css][animatecss] relies on CSS3 animations and transformations (available in most modern browsers). If CSS3 is disabled or unavailable, the phrases will continue to transition from one to another (assuming JavaScript is enabled), but there will be no animation effect. | No fallback is provided by this plugin. You may however, handle the fallback through the use of [Modernizr](http://modernizr.com/) (for feature detection) and [polyfills](http://html5polyfill.com/).
|
||||
|
||||
Should you encounter any problems or require assistance with this plugin, simply open a GitHub issue in this repository or you may contact [me via Twitter][twitter].
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- [jQuery][jquery]
|
||||
- [Animate.css][animatecss]
|
||||
|
||||
|
||||
Others
|
||||
------
|
||||
|
||||
Native ports of Morphext have been developed in other JavaScript frameworks (e.g. [React](http://facebook.github.io/react/) and [Polymer](http://www.polymer-project.org/)):
|
||||
|
||||
- [Morphext React][morphext-react]
|
||||
- [Morphext Polymer][morphext-polymer]
|
||||
|
||||
They are not part of the official plugin development and the approach used in developing these ports may not be idiomatic. Please use them at your own risk.
|
||||
|
||||
Issues and pull requests are welcomed.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Morphext is licensed under the MIT license [(http://ian.mit-license.org/)](http://ian.mit-license.org/).
|
||||
|
||||
[website]: http://morphext.fyianlai.com/
|
||||
[twitter]: https://www.twitter.com/MrSaints
|
||||
[demo]: http://www.enactuslse.co.uk/
|
||||
[downloads]: https://github.com/MrSaints/Morphext/releases
|
||||
|
||||
[bower]: http://bower.io/
|
||||
[jquery]: https://www.jquery.com/
|
||||
[animatecss]: //daneden.github.io/animate.css/
|
||||
|
||||
[morphist]: https://github.com/MrSaints/Morphist
|
||||
[morphext-react]: https://gist.github.com/MrSaints/7e84c68c086d5a6a3ee2#file-morphext-react-jsx
|
||||
[morphext-polymer]: https://gist.github.com/MrSaints/7e84c68c086d5a6a3ee2#file-morphext-polymer-html
|
||||
36
fast-api/bower_components/Morphext/bower.json
vendored
Normal file
36
fast-api/bower_components/Morphext/bower.json
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "Morphext",
|
||||
"version": "2.4.4",
|
||||
"description": "A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.",
|
||||
"authors": [
|
||||
"Ian Lai <ian@fyianlai.com>"
|
||||
],
|
||||
"main": [
|
||||
"dist/morphext.min.js",
|
||||
"dist/morphext.css"
|
||||
],
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"text rotator",
|
||||
"rotating text",
|
||||
"ticker",
|
||||
"cycle",
|
||||
"animate.css",
|
||||
"text animation",
|
||||
"carousel",
|
||||
"inline"
|
||||
],
|
||||
"license": "http://ian.mit-license.org/",
|
||||
"private": false,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"animate.css": "~3.2.5",
|
||||
"jquery": "~2.1.4"
|
||||
}
|
||||
}
|
||||
3
fast-api/bower_components/Morphext/dist/morphext.css
vendored
Normal file
3
fast-api/bower_components/Morphext/dist/morphext.css
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.morphext > .animated {
|
||||
display: inline-block;
|
||||
}
|
||||
77
fast-api/bower_components/Morphext/dist/morphext.js
vendored
Normal file
77
fast-api/bower_components/Morphext/dist/morphext.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* Morphext - Text Rotating Plugin for jQuery
|
||||
* https://github.com/MrSaints/Morphext
|
||||
*
|
||||
* Built on jQuery Boilerplate
|
||||
* http://jqueryboilerplate.com/
|
||||
*
|
||||
* Copyright 2014 Ian Lai and other contributors
|
||||
* Released under the MIT license
|
||||
* http://ian.mit-license.org/
|
||||
*/
|
||||
|
||||
/*eslint-env browser */
|
||||
/*global jQuery:false */
|
||||
/*eslint-disable no-underscore-dangle */
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var pluginName = "Morphext",
|
||||
defaults = {
|
||||
animation: "bounceIn",
|
||||
separator: ",",
|
||||
speed: 2000,
|
||||
complete: $.noop
|
||||
};
|
||||
|
||||
function Plugin (element, options) {
|
||||
this.element = $(element);
|
||||
|
||||
this.settings = $.extend({}, defaults, options);
|
||||
this._defaults = defaults;
|
||||
this._init();
|
||||
}
|
||||
|
||||
Plugin.prototype = {
|
||||
_init: function () {
|
||||
var $that = this;
|
||||
this.phrases = [];
|
||||
|
||||
this.element.addClass("morphext");
|
||||
|
||||
$.each(this.element.text().split(this.settings.separator), function (key, value) {
|
||||
$that.phrases.push($.trim(value));
|
||||
});
|
||||
|
||||
this.index = -1;
|
||||
this.animate();
|
||||
this.start();
|
||||
},
|
||||
animate: function () {
|
||||
this.index = ++this.index % this.phrases.length;
|
||||
this.element[0].innerHTML = "<span class=\"animated " + this.settings.animation + "\">" + this.phrases[this.index] + "</span>";
|
||||
|
||||
if ($.isFunction(this.settings.complete)) {
|
||||
this.settings.complete.call(this);
|
||||
}
|
||||
},
|
||||
start: function () {
|
||||
var $that = this;
|
||||
this._interval = setInterval(function () {
|
||||
$that.animate();
|
||||
}, this.settings.speed);
|
||||
},
|
||||
stop: function () {
|
||||
this._interval = clearInterval(this._interval);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[pluginName] = function (options) {
|
||||
return this.each(function() {
|
||||
if (!$.data(this, "plugin_" + pluginName)) {
|
||||
$.data(this, "plugin_" + pluginName, new Plugin(this, options));
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
1
fast-api/bower_components/Morphext/dist/morphext.min.js
vendored
Normal file
1
fast-api/bower_components/Morphext/dist/morphext.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/*! Morphext - v2.4.4 - 2015-05-21 */!function(a){"use strict";function b(b,c){this.element=a(b),this.settings=a.extend({},d,c),this._defaults=d,this._init()}var c="Morphext",d={animation:"bounceIn",separator:",",speed:2e3,complete:a.noop};b.prototype={_init:function(){var b=this;this.phrases=[],this.element.addClass("morphext"),a.each(this.element.text().split(this.settings.separator),function(c,d){b.phrases.push(a.trim(d))}),this.index=-1,this.animate(),this.start()},animate:function(){this.index=++this.index%this.phrases.length,this.element[0].innerHTML='<span class="animated '+this.settings.animation+'">'+this.phrases[this.index]+"</span>",a.isFunction(this.settings.complete)&&this.settings.complete.call(this)},start:function(){var a=this;this._interval=setInterval(function(){a.animate()},this.settings.speed)},stop:function(){this._interval=clearInterval(this._interval)}},a.fn[c]=function(d){return this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))})}}(jQuery);
|
||||
29
fast-api/bower_components/Morphext/index.html
vendored
Normal file
29
fast-api/bower_components/Morphext/index.html
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Morphext Example / Demo</title>
|
||||
<meta name="description" content="A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="bower_components/animate.css/animate.min.css">
|
||||
<link rel="stylesheet" href="dist/morphext.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align:center">
|
||||
I am a <span id="js-rotating">So Simple, Very Doge, Much Wow, Such Cool</span> Text Rotator
|
||||
</div>
|
||||
|
||||
<script src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="bower_components/jquery/jquery.min.js"><\/script>')</script>
|
||||
<script src="dist/morphext.js"></script>
|
||||
<script>
|
||||
$("#js-rotating").Morphext({
|
||||
animation: "rotateIn",
|
||||
complete: function () {
|
||||
console.log("This is called after a phrase is animated in! Current phrase index: " + this.index);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
29
fast-api/bower_components/Morphext/package.json
vendored
Normal file
29
fast-api/bower_components/Morphext/package.json
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "Morphext",
|
||||
"version": "2.4.4",
|
||||
"description": "A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.",
|
||||
"main": "Gruntfile.coffee",
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/MrSaints/Morphext.git"
|
||||
},
|
||||
"author": "Ian Lai <ian@fyianlai.com>",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://ian.mit-license.org/"
|
||||
}
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/MrSaints/Morphext/issues"
|
||||
},
|
||||
"homepage": "https://github.com/MrSaints/Morphext",
|
||||
"devDependencies": {
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-contrib-uglify": "^0.9.1",
|
||||
"grunt-eslint": "^13.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user