├── .cherub.js ├── README.md ├── README.zh_CN.md ├── node_modules ├── preloader.js │ ├── .editorconfig │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── README_CN.md │ ├── package.json │ └── src │ │ └── preloader.js └── zepto │ ├── MIT-LICENSE │ ├── README.md │ ├── dist │ ├── zepto.js │ └── zepto.min.js │ ├── package.json │ └── src │ ├── ajax.js │ ├── assets.js │ ├── callbacks.js │ ├── data.js │ ├── deferred.js │ ├── detect.js │ ├── event.js │ ├── form.js │ ├── fx.js │ ├── fx_methods.js │ ├── gesture.js │ ├── ie.js │ ├── ios3.js │ ├── selector.js │ ├── stack.js │ ├── touch.js │ └── zepto.js ├── package-lock.json ├── package.json └── src ├── css ├── base.css ├── icons.scss ├── loading.scss ├── main.scss ├── main.style.0df89d64.css └── myanimate.scss ├── img ├── icon │ ├── audio_off.png │ ├── audio_on.png │ ├── card1_001.png │ ├── card1_002.png │ ├── card1_003.png │ ├── card1_004.png │ ├── card1_005.png │ ├── card1_006.png │ ├── card1_007.png │ ├── card1_008.png │ ├── card1_009.png │ ├── card1_010.png │ ├── card1_011.png │ ├── card1_012.png │ ├── card1_013.png │ ├── card1_014.png │ ├── card1_015.png │ ├── card1_016.png │ ├── card2_001.png │ ├── card2_002.png │ ├── card2_003.png │ ├── card2_004.png │ ├── card2_005.png │ ├── card2_006.png │ ├── card2_007.png │ ├── card2_007_2.png │ ├── card2_008.png │ ├── card2_009.png │ └── card2_010.png ├── icon2 │ ├── card2_011.png │ ├── card2_012.png │ ├── card2_013.png │ ├── card2_014.png │ ├── card4_001.png │ ├── card4_002.png │ ├── card4_003.png │ ├── card4_004.png │ ├── card4_005.png │ ├── card4_006.png │ ├── card4_007.png │ ├── card4_008.png │ ├── card5_001.png │ ├── card5_002.png │ ├── card5_003.png │ ├── card5_004.png │ ├── card5_005.png │ ├── card5_006.png │ ├── card5_007.png │ ├── card6_001.png │ ├── card6_002.png │ ├── card6_003.png │ ├── card6_004.png │ ├── card6_005.png │ ├── icon_music.png │ ├── share.png │ └── thanks.png ├── sprite.icon.png ├── sprite.icon2.png └── unsprite │ ├── bg.jpg │ ├── bg2.jpg │ ├── border1.png │ ├── border2.png │ ├── border3.png │ ├── loading.png │ ├── map.jpg │ ├── map2.jpg │ ├── map2.png │ ├── pic1.png │ ├── pic10.jpg │ ├── pic2.png │ ├── pic5.jpg │ ├── pic6.jpg │ ├── pic7.jpg │ ├── pic8.jpg │ ├── pic9.jpg │ └── share.jpg ├── index.html ├── js ├── lib │ ├── iriswipe.js │ ├── preloader.js │ ├── share.js │ ├── slider.js │ └── zepto-touch.js ├── main.js └── page.js └── plugin └── bg.mp3 /.cherub.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "devServer": { 3 | "port": 8088 4 | }, 5 | "designWidth": 750, 6 | "responsive": "vm", 7 | "entry": "src/js/main.js", 8 | "output": { 9 | "path": "dist", 10 | "publicPath": "./", 11 | "filename": "js/bundle.js" 12 | }, 13 | "outputCSS": "css/app.css", 14 | "outputCSSPublicPath": "../", 15 | "template": "base" 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | a html5 marry card , need install [cherub](https://github.com/l-zhi/cherub) before. 2 | 3 | [demo](https://l-zhi.com/dist2/index.html) 4 | 5 | Translations: [简体中文](https://github.com/l-zhi/marrycard/blob/master/README.zh_CN.md) 6 | 7 | ## install 8 | 9 | ```bash 10 | 11 | sudo npm install -g cherub 12 | 13 | # clone this repository 14 | 15 | clone https://github.com/l-zhi/marrycard.git 16 | 17 | cd marrycard 18 | 19 | npm install 20 | 21 | # run 22 | cherub start 23 | 24 | # build 25 | cherub build 26 | ``` 27 | -------------------------------------------------------------------------------- /README.zh_CN.md: -------------------------------------------------------------------------------- 1 | 基于cherub做的一个贺卡模板, 需要先安装[cherub](https://github.com/l-zhi/cherub) 2 | 3 | [体验地址](https://l-zhi.com/dist2/index.html) 4 | 5 | ## 安装 6 | 7 | ```bash 8 | 9 | # mac/linux 10 | SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ sudo npm install -g cherub --registry=https://registry.npm.taobao.org 11 | 12 | # windows 13 | sudo npm install -g cherub --registry=https://registry.npm.taobao.org --SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ 14 | 15 | # 安装ELF之后,clone 项目,安装依赖 16 | 17 | clone https://github.com/l-zhi/marrycard.git 18 | 19 | cd marrycard 20 | 21 | npm install # 或者使用 yarn install 22 | 23 | # 开发模式 24 | cherub start 25 | 26 | # 构建 27 | cherub build 28 | ``` 29 | 30 | ## 其他 31 | 32 | 1. 开发脚手架依赖于cherub 33 | 2. 后端数据存储用的是[leancloud](https://leancloud.cn/),可配置自己的数据存储地址 main.js 92行 34 | -------------------------------------------------------------------------------- /node_modules/preloader.js/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [{.travis.yml,package.json}] 15 | # The indent size used in the `package.json` file cannot be changed 16 | # https://github.com/npm/npm/pull/3180#issuecomment-16336516 17 | indent_size = 2 18 | indent_style = space 19 | -------------------------------------------------------------------------------- /node_modules/preloader.js/.npmignore: -------------------------------------------------------------------------------- 1 | *.seed 2 | *.log 3 | *.csv 4 | *.dat 5 | *.out 6 | *.pid 7 | *.gz 8 | *.swp 9 | .DS_Store 10 | .tern-port 11 | .vscode 12 | 13 | npm-debug.log 14 | node_modules 15 | 16 | coverage.html 17 | coverage 18 | lib-cov 19 | -------------------------------------------------------------------------------- /node_modules/preloader.js/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Liucw 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/preloader.js/README.md: -------------------------------------------------------------------------------- 1 | # preloader.js [![NPM version][npm-version-image]][npm-version-url] 2 | 3 | [中文说明](https://github.com/o2team/elf-preloader.js/blob/master/README_CN.md) 4 | 5 | A simple Javascript library for preload image and audio. The main feature: 6 | - set concurrency 7 | - set minimum loading time per resouce, for simulate slow load 8 | 9 | 10 | ## Install 11 | ``` 12 | npm install --save preloader.js 13 | ``` 14 | 15 | ## Usage 16 | 17 | Import 18 | ``` 19 | var Preloader = require('preloader.js') 20 | ``` 21 | 22 | Execute 23 | ```javascript 24 | var preloader = new Preloader({ 25 | resources: ['assert/images/logo.png', 'assert/audios/bg.mp3'], 26 | concurrency: 4 27 | }) 28 | preloader.addProgressListener(function (loaded, length) { 29 | console.log('loading ', loaded, length, loaded / length) 30 | }) 31 | preloader.addCompletionListener(function () { 32 | console.log('load completed') 33 | }) 34 | preloader.start() 35 | ``` 36 | 37 | PS: If no use module bundler (e.g.: webpack、browserify), you can direct reference 38 | ``` 39 | 40 | ``` 41 | 42 | ## Introduce 43 | 44 | ### configuration 45 | 46 | - **resources** `Array` 47 | 48 | Default: `[]`. 49 | 50 | Preload resouce list. The files of postfix belong to `['mp3', 'ogg', 'wav']` to according audio handle. 51 | 52 | PS:Resources in addition to here configuration, including configured `attr` value DOM node. 53 | 54 | - **concurrency** `Number` 55 | 56 | Default: `0`. 57 | 58 | Concurrent number. 0 is no concurrency limit. 59 | 60 | - **perMinTime** `Number` 61 | 62 | Default: `0`. Unit: `ms` 63 | 64 | Minimum loading time per resouce. Usually used to simulate load slow. 65 | 66 | - **attr** `String` 67 | 68 | Default: `preload`. 69 | 70 | DOM node attribute of preload. Example: ``, the `'img/logo.png'` will been added in `resources`. 71 | 72 | - **onProgress** `Function` 73 | 74 | Default: `null`. 75 | 76 | Every resouce load is completed the callback function. The effect same to `addProgressListener`. 77 | 78 | - **onCompletion** `Function` 79 | 80 | Default: `null`. 81 | 82 | All resouces load is completed the callback function. The effect same to `addCompletionListener`. 83 | 84 | 85 | ### instance method 86 | 87 | #### addProgressListener(Function) 88 | Set every resouce load is completed the callback function 89 | 90 | #### addCompletionListener(Function) 91 | Set all resouces load is completed the callback function 92 | 93 | #### get(String) 94 | Get instances of completed 95 | 96 | #### start() 97 | Begin load. All ready after invoke. 98 | 99 | 100 | ## License 101 | 102 | MIT 103 | 104 | [npm-version-image]: https://img.shields.io/npm/v/preloader.js.svg?style=flat-square 105 | [npm-version-url]: https://www.npmjs.com/package/preloader.js 106 | -------------------------------------------------------------------------------- /node_modules/preloader.js/README_CN.md: -------------------------------------------------------------------------------- 1 | # preloader.js [![NPM version][npm-version-image]][npm-version-url] 2 | 3 | [English Readme](https://github.com/o2team/elf-preloader.js/blob/master/README.md) 4 | 5 | 一个简单的 Javascript 库,用于预加载`图片`和`音频`。主要功能: 6 | - 设置并发数 7 | - 设置资源最小加载时间,模拟慢加载 8 | 9 | 10 | ## 安装 11 | ``` 12 | npm install --save preloader.js 13 | ``` 14 | 15 | ## 使用 16 | 17 | 引入 18 | ``` 19 | var Preloader = require('preloader.js') 20 | ``` 21 | 22 | 执行 23 | ```javascript 24 | var preloader = new Preloader({ 25 | resources: ['assert/images/logo.png', 'assert/audios/bg.mp3'], 26 | concurrency: 4 27 | }) 28 | preloader.addProgressListener(function (loaded, length) { 29 | console.log('loading ', loaded, length, loaded / length) 30 | }) 31 | preloader.addCompletionListener(function () { 32 | console.log('load completed') 33 | }) 34 | preloader.start() 35 | ``` 36 | 37 | PS: 如果没有使用打包工具(例如:webpack、browserify),则直接引入 38 | ``` 39 | 40 | ``` 41 | 42 | ## 说明 43 | 44 | ### 配置项 45 | - **resources** `Array` 46 | 47 | 默认: `[]`. 48 | 49 | 预加载的资源列表。这些后缀 `['mp3', 'ogg', 'wav']` 的文件按 `audio` 处理,其他的按 `image` 处理。 50 | 51 | PS:资源除了这里配置的外,还有包括配置了 `attr` 值的 DOM 标签。 52 | 53 | - **concurrency** `Number` 54 | 55 | 默认: `0`. 56 | 57 | 并发数。0 表示无限制。 58 | 59 | - **perMinTime** `Number` 60 | 61 | 默认: `0`. 单位: `ms` 62 | 63 | 单个资源的最小加载时间。一般用来模拟慢加载。 64 | 65 | - **attr** `String` 66 | 67 | 默认: `preload`. 68 | 69 | DOM 标签预加载的属性。例如:``,则 `'img/logo.png'` 也会加入到 `resources` 里。 70 | 71 | - **onProgress** `Function` 72 | 73 | 默认: `null`. 74 | 75 | 单个资源加载完成时的回调函数。与实例方法 `addProgressListener` 等效。 76 | 77 | - **onCompletion** `Function` 78 | 79 | 默认: `null`. 80 | 81 | 所有加载都完成时的回调函数。与实例方法 `addCompletionListener` 等效。 82 | 83 | 84 | ### 实例方法 85 | 86 | #### addProgressListener(Function) 87 | 设置单个资源加载完成时的回调函数 88 | 89 | #### addCompletionListener(Function) 90 | 设置所有加载都完成时的回调函数 91 | 92 | #### get(String) 93 | 获取资源加载完成后的实例 94 | 95 | #### start() 96 | 开始加载。 97 | 98 | 99 | ## 许可 100 | 101 | MIT 102 | 103 | [npm-version-image]: https://img.shields.io/npm/v/preloader.js.svg?style=flat-square 104 | [npm-version-url]: https://www.npmjs.com/package/preloader.js 105 | -------------------------------------------------------------------------------- /node_modules/preloader.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "preloader.js@1.0.0", 3 | "_id": "preloader.js@1.0.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-4c07zY7hGUkCqR9kvf32SQ5NkFk=", 6 | "_location": "/preloader.js", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "version", 10 | "registry": true, 11 | "raw": "preloader.js@1.0.0", 12 | "name": "preloader.js", 13 | "escapedName": "preloader.js", 14 | "rawSpec": "1.0.0", 15 | "saveSpec": null, 16 | "fetchSpec": "1.0.0" 17 | }, 18 | "_requiredBy": [ 19 | "/" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/preloader.js/-/preloader.js-1.0.0.tgz", 22 | "_shasum": "e1cd3bcd8ee1194902a91f64bdfdf6490e4d9059", 23 | "_spec": "preloader.js@1.0.0", 24 | "_where": "/Users/lizhifan/workspace/Me/marrycard", 25 | "author": { 26 | "name": "Liucw" 27 | }, 28 | "bugs": { 29 | "url": "https://github.com/o2team/elf-preloader.js/issues" 30 | }, 31 | "bundleDependencies": false, 32 | "deprecated": false, 33 | "description": "A js library for preload image and audio", 34 | "homepage": "https://github.com/o2team/elf-preloader.js#readme", 35 | "keywords": [ 36 | "preloader", 37 | "loader", 38 | "image", 39 | "audio" 40 | ], 41 | "license": "MIT", 42 | "main": "src/preloader.js", 43 | "name": "preloader.js", 44 | "repository": { 45 | "type": "git", 46 | "url": "git+https://github.com/o2team/elf-preloader.js.git" 47 | }, 48 | "scripts": {}, 49 | "version": "1.0.0" 50 | } 51 | -------------------------------------------------------------------------------- /node_modules/preloader.js/src/preloader.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | if (typeof define === 'function' && define.amd) { 3 | // AMD 4 | define([], factory) 5 | } else if (typeof module === 'object' && module.exports) { 6 | // CMD 7 | module.exports = factory() 8 | } else { 9 | // Browser globals (root is window) 10 | root.Orientation = factory() 11 | } 12 | }(this, function () { 13 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign 14 | var assign = Object.assign || function (target) { 15 | 'use strict' 16 | 17 | if (target === undefined || target === null) { 18 | throw new TypeError('Cannot convert undefined or null to object') 19 | } 20 | 21 | var output = Object(target) 22 | for (var index = 1; index < arguments.length; index++) { 23 | var source = arguments[index] 24 | if (source !== undefined && source !== null) { 25 | for (var nextKey in source) { 26 | if (Object.prototype.hasOwnProperty.call(source, nextKey)) { 27 | output[nextKey] = source[nextKey] 28 | } 29 | } 30 | } 31 | } 32 | return output 33 | } 34 | 35 | 36 | var Preloader = function (options) { 37 | this.opts = assign({ 38 | resources: [], 39 | concurrency: 0, 40 | perMinTime: 0, 41 | attr: 'preload', 42 | onProgress: null, 43 | onCompletion: null 44 | }, options) 45 | 46 | var preloads = document.querySelectorAll('[' + this.opts.attr + ']') 47 | for (var i = 0; i < preloads.length; i++) { 48 | var preload = preloads[i] 49 | if (preload.src) this.opts.resources.push(preload.src) 50 | } 51 | 52 | this.length = this.opts.resources.length 53 | this.completedCount = 0 54 | this.loadingIndex = 0 55 | this.resourceMap = {} 56 | 57 | this.done = function (resource, instance) { 58 | this.completedCount += 1 59 | this.resourceMap[resource] = instance 60 | 61 | this.onProgress && this.onProgress(this.completedCount, this.length, resource) 62 | if (this.completedCount >= this.length) { 63 | this.onCompletion && this.onCompletion(this.length) 64 | } else if (this.opts.concurrency > 0) { 65 | this.loader() 66 | } 67 | } 68 | 69 | this.loader = function () { 70 | if (this.loadingIndex >= this.length) return 71 | var resource = this.opts.resources[this.loadingIndex] 72 | this.loadingIndex++ 73 | 74 | if (~['mp3', 'ogg', 'wav'].indexOf(getType(resource))) { 75 | this.audioLoader(resource) 76 | } else { 77 | this.imageLoader(resource) 78 | } 79 | } 80 | 81 | this.imageLoader = function (resource) { 82 | var self = this 83 | 84 | var image = new Image() 85 | var startTime = new Date() 86 | image.onload = image.onerror = function () { 87 | var duration = new Date() - startTime 88 | var diff = self.opts.perMinTime - duration 89 | 90 | diff > 0 ? setTimeout(function () { 91 | self.done(resource, image) 92 | }, diff) : self.done(resource, image) 93 | } 94 | image.src = resource 95 | } 96 | this.audioLoader = function (resource) { 97 | var self = this 98 | var audio = new Audio() 99 | var startTime = new Date() 100 | var handler = function () { 101 | var duration = new Date() - startTime 102 | var diff = self.opts.perMinTime - duration 103 | 104 | diff > 0 ? setTimeout(function () { 105 | self.done(resource, audio) 106 | }, diff) : self.done(resource, audio) 107 | } 108 | audio.addEventListener('canplaythrough', handler) 109 | audio.addEventListener('error', handler) 110 | audio.preload = 'auto' 111 | audio.src = resource 112 | audio.load() 113 | } 114 | } 115 | 116 | /** 117 | * add progress event callback 118 | */ 119 | Preloader.prototype.addProgressListener = function (fn) { 120 | this.onProgress = fn 121 | } 122 | 123 | /** 124 | * add completed event callback 125 | */ 126 | Preloader.prototype.addCompletionListener = function (fn) { 127 | this.onCompletion = fn 128 | } 129 | 130 | /** 131 | * get resource instance 132 | */ 133 | Preloader.prototype.get = function (resource) { 134 | return this.resourceMap[resource] 135 | } 136 | 137 | /** 138 | * load begin 139 | */ 140 | Preloader.prototype.start = function () { 141 | if (!this.length) return this.done(null, null) 142 | 143 | if (this.opts.concurrency === 0) { 144 | while (this.loadingIndex < this.length) { 145 | this.loader() 146 | } 147 | } else { 148 | for (var i = 0; i < this.opts.concurrency; i++) { 149 | this.loader() 150 | } 151 | } 152 | } 153 | 154 | function getType (resource) { 155 | var parser = document.createElement('a') 156 | parser.href = resource 157 | return parser.pathname.split('.').pop().toLowerCase() 158 | } 159 | 160 | return Preloader 161 | })) 162 | -------------------------------------------------------------------------------- /node_modules/zepto/MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2016 Thomas Fuchs 2 | http://zeptojs.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/zepto/README.md: -------------------------------------------------------------------------------- 1 | # Zepto.js – a minimalist JavaScript library 2 | 3 | Zepto is a minimalist JavaScript library for modern browsers with a 4 | largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto. 5 | 6 | See [zeptojs.com][] for an extended introduction, downloads 7 | and documentation. 8 | 9 | Zepto.js is licensed under the terms of the MIT License. 10 | 11 | Want to give us money or a tip? Don't. 12 | Instead please donate to [charity: water](http://charitywater.org/). 13 | 14 | ## Building 15 | 16 | [![Build Status](https://secure.travis-ci.org/madrobby/zepto.svg?branch=master)](http://travis-ci.org/madrobby/zepto) 17 | 18 | The official site offers a download of the default distribution of Zepto. This 19 | is good for starting out. However, at some point you might want to add some 20 | optional modules and remove some of the default ones you don't need, to keep the 21 | size at a minimum. That's when you need to check out Zepto's source code and use 22 | the build commands. Alternatively you can use the web based [Zepto Builder](http://github.e-sites.nl/zeptobuilder/). 23 | 24 | You will need Node.js installed on your system. 25 | 26 | ~~~ sh 27 | $ npm install 28 | $ npm run-script dist 29 | 30 | # do a custom build 31 | $ MODULES="zepto event data" npm run-script dist 32 | 33 | # on Windows 34 | c:\zepto> SET MODULES=zepto event data 35 | c:\zepto> npm run-script dist 36 | ~~~ 37 | 38 | The resulting files are: 39 | 40 | 1. `dist/zepto.js` 41 | 2. `dist/zepto.min.js` 42 | 43 | If you install CoffeeScript globally, you can run `make` directly: 44 | 45 | ~~~ sh 46 | # one-time operation 47 | $ npm install coffee-script --global 48 | 49 | $ coffee make dist 50 | $ MODULES="zepto event data ..." ./make dist 51 | 52 | # on Windows 53 | c:\zepto> SET MODULES=zepto event data 54 | c:\zepto> coffee make dist 55 | ~~~ 56 | 57 | ## Zepto modules 58 | 59 | Zepto modules are individual files in the "src/" directory. 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 108 | 109 | 110 | 111 | 112 | 116 | 117 | 118 | 119 | 120 | 124 | 125 | 126 | 127 | 128 | 132 | 133 | 134 | 135 | 136 | 139 | 140 | 141 | 142 | 143 | 148 | 149 | 150 | 151 | 152 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 174 | 175 | 176 |
module default description
zeptoCore module; contains most methods
eventEvent handling via on() & off()
ajaxXMLHttpRequest and JSONP functionality
formSerialize & submit web forms
ieSupport for Internet Explorer 10+ on the desktop and Windows Phone 8
detectProvides $.os and $.browser information
fxThe animate() method
fx_methods 105 | Animated show, hide, toggle, 106 | and fade*() methods. 107 |
assets 113 | Experimental support for cleaning up iOS memory after removing 114 | image elements from the DOM. 115 |
data 121 | A full-blown data() method, capable of storing arbitrary 122 | objects in memory. 123 |
deferred 129 | Provides $.Deferred promises API. 130 | Depends on the "callbacks" module. 131 |
callbacks 137 | Provides $.Callbacks for use in "deferred" module. 138 |
selector 144 | Experimental jQuery 145 | CSS extensions support for functionality such as $('div:first') and 146 | el.is(':visible'). 147 |
touch 153 | Fires tap– and swipe–related events on touch devices. This works with both 154 | `touch` (iOS, Android) and `pointer` events (Windows Phone). 155 |
gestureFires pinch gesture events on touch devices
stackProvides andSelf & end() chaining methods
ios3 171 | String.prototype.trim and Array.prototype.reduce methods 172 | (if they are missing) for compatibility with iOS 3.x. 173 |
177 | 178 | ## Contributing 179 | 180 | Please read our [contribution guidelines](https://github.com/madrobby/zepto/blob/master/CONTRIBUTING.md) 181 | for information on how to contribute. 182 | 183 | Get in touch: 184 | 185 | * @[zeptojs](http://twitter.com/zeptojs) 186 | 187 | ### Write documentation 188 | 189 | Zepto docs are written in Markdown and live in the ["gh-pages" branch][docs]. 190 | They are published on [zeptojs.com][]. 191 | 192 | You can use GitHub's web interface to make quick changes to documentation for 193 | specific Zepto features 194 | ([example: ajaxSettings](https://github.com/madrobby/zepto/blob/gh-pages/ajax/_posts/1900-01-01-Z-ajaxSettings.md)). 195 | This will submit a pull request to us that we can review. 196 | 197 | ### Report a bug 198 | 199 | 1. Check if the bug is already fixed in the master branch since the last release. 200 | 2. Check [existing issues][issues]. Open a new one, including exact browser & 201 | platform information. For better formatting of your report, see 202 | [GitHub-flavored Markdown][mkd]. 203 | 204 | ### Running tests 205 | 206 | You will need to install [PhantomJS][]. On OS X, that's easy: 207 | 208 | ~~~ sh 209 | $ brew install phantomjs 210 | ~~~ 211 | 212 | To run the automated tests: 213 | 214 | ~~~ sh 215 | $ npm test 216 | ~~~ 217 | 218 | To run a test server, which you can hit with your browsers and devices: 219 | 220 | ~~~ sh 221 | $ npm start 222 | ~~~ 223 | 224 | Go to `http://your-ip-address:3000/` on your browser and follow the 225 | instructions. For your convenience test failures and exceptions will be 226 | reported to the the console you started the test server in (as well as 227 | the browser console if available). 228 | 229 | [zeptojs.com]: http://zeptojs.com 230 | [issues]: https://github.com/madrobby/zepto/issues 231 | [docs]: https://github.com/madrobby/zepto/tree/gh-pages#readme 232 | [mkd]: https://help.github.com/articles/creating-and-highlighting-code-blocks/ 233 | [evidence.js]: https://github.com/tobie/Evidence 234 | [phantomjs]: http://phantomjs.org/download.html 235 | -------------------------------------------------------------------------------- /node_modules/zepto/dist/zepto.min.js: -------------------------------------------------------------------------------- 1 | /* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */ 2 | !function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(this,function(t){var e=function(){function $(t){return null==t?String(t):S[C.call(t)]||"object"}function F(t){return"function"==$(t)}function k(t){return null!=t&&t==t.window}function M(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function R(t){return"object"==$(t)}function Z(t){return R(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!k(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function q(t){return a.call(t,function(t){return null!=t})}function H(t){return t.length>0?r.fn.concat.apply([],t):t}function I(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function V(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||h[I(t)]?e:e+"px"}function B(t){var e,n;return c[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function U(t){return"children"in t?u.call(t.children):r.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function J(t,r,i){for(n in r)i&&(Z(r[n])||L(r[n]))?(Z(r[n])&&!Z(t[n])&&(t[n]={}),L(r[n])&&!L(t[n])&&(t[n]=[]),J(t[n],r[n],i)):r[n]!==e&&(t[n]=r[n])}function W(t,e){return null==e?r(t):r(t).filter(e)}function Y(t,e,n,r){return F(e)?e.call(t,n,r):e}function G(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function K(t,n){var r=t.className||"",i=r&&r.baseVal!==e;return n===e?i?r.baseVal:r:void(i?r.baseVal=n:t.className=n)}function Q(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function tt(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)tt(t.childNodes[n],e)}var e,n,r,i,O,P,o=[],s=o.concat,a=o.filter,u=o.slice,f=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before","append"],b=f.createElement("table"),E=f.createElement("tr"),j={tr:f.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:E,th:E,"*":f.createElement("div")},w=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},C=S.toString,N={},A=f.createElement("div"),D={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};return N.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=A).appendChild(t),r=~N.qsa(i,e).indexOf(t),o&&A.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return a.call(t,function(e,n){return t.indexOf(e)==n})},N.fragment=function(t,n,i){var o,s,a;return d.test(t)&&(o=r(f.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1>")),n===e&&(n=p.test(t)&&RegExp.$1),n in j||(n="*"),a=j[n],a.innerHTML=""+t,o=r.each(u.call(a.childNodes),function(){a.removeChild(this)})),Z(i)&&(s=r(o),r.each(i,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},N.Z=function(t,e){return new X(t,e)},N.isZ=function(t){return t instanceof N.Z},N.init=function(t,n){var i;if(!t)return N.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))i=N.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}else{if(F(t))return r(f).ready(t);if(N.isZ(t))return t;if(L(t))i=q(t);else if(R(t))i=[t],t=null;else if(p.test(t))i=N.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}}return N.Z(i,t)},r=function(t,e){return N.init(t,e)},r.extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){J(t,n,e)}),t},N.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=$,r.isFunction=F,r.isWindow=k,r.isArray=L,r.isPlainObject=Z,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},r.camelCase=O,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,r=[];if(z(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return F(t)?this.not(this.not(t)):r(a.call(this,function(e){return N.matches(e,t)}))},add:function(t,e){return r(P(this.concat(r(t,e))))},is:function(t){return this.length>0&&N.matches(this[0],t)},not:function(t){var n=[];if(F(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):z(t)&&F(t.item)?u.call(t):r(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return r(n)},has:function(t){return this.filter(function(){return R(t)?r.contains(this,t):r(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!R(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!R(t)?t:r(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?r(t).filter(function(){var t=this;return o.some.call(n,function(e){return r.contains(e,t)})}):1==this.length?r(N.qsa(this[0],t)):this.map(function(){return N.qsa(this,t)}):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each(function(r,o){for(;o&&!(i?i.indexOf(o)>=0:N.matches(o,t));)o=o!==e&&!M(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,function(t){return(t=t.parentNode)&&!M(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return W(e,t)},parent:function(t){return W(P(this.pluck("parentNode")),t)},children:function(t){return W(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||u.call(this.childNodes)})},siblings:function(t){return W(this.map(function(t,e){return a.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return r.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=B(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=F(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each(function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){r(this[0]).before(t=r(t));for(var e;(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=F(t);return this.each(function(n){var i=r(this),o=i.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):i.append(s)})},unwrap:function(){return this.parent().each(function(){r(this).replaceWith(r(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;r(this).empty().append(Y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(R(t))for(n in t)G(this,n,t[n]);else G(this,t,Y(this,r,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){G(this,t)},this)})},prop:function(t,e){return t=D[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=D[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var r="data-"+t.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?Q(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=Y(this,t,e,this.value)})):this[0]&&(this[0].multiple?r(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=r(this),i=Y(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[O(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var o={},s=getComputedStyle(i,"");return r.each(t,function(t,e){o[e]=i.style[O(e)]||s.getPropertyValue(e)}),o}}var a="";if("string"==$(t))e||0===e?a=I(t)+":"+_(t,e):this.each(function(){this.style.removeProperty(I(t))});else for(n in t)t[n]||0===t[n]?a+=I(n)+":"+_(n,t[n])+";":this.each(function(){this.style.removeProperty(I(n))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(K(t))},V(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var n=K(this),o=Y(this,t,e,n);o.split(/\s+/g).forEach(function(t){r(this).hasClass(t)||i.push(t)},this),i.length&&K(this,n+(n?" ":"")+i.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return K(this,"");i=K(this),Y(this,t,n,i).split(/\s+/g).forEach(function(t){i=i.replace(V(t)," ")}),K(this,i.trim())}})},toggleClass:function(t,n){return t?this.each(function(i){var o=r(this),s=Y(this,t,i,K(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||f.body;t&&!g.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t})}},r.fn.detach=r.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});r.fn[t]=function(i){var o,s=this[0];return i===e?k(s)?s["inner"+n]:M(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=r(this),s.css(t,Y(this,i,e,s[t]()))})}}),x.forEach(function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,function(t){var i=[];return n=$(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(N.fragment(t)))}),i):"object"==n||null==t?t:N.fragment(t)}),u=this.length>1;return s.length<1?this:this.each(function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach(function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&tt(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}}),N.Z.prototype=X.prototype=r.fn,N.uniq=P,N.deserializeValue=Q,r.zepto=N,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,r){if(e=d(e),e.ns)var i=m(e.ns);return(a[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!r||t.sel==r)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!f&&t.e in c||!!e}function v(t){return l[t]||f&&c[t]||t}function y(t,n,i,o,s,u,f){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(i);var a=d(n);a.fn=i,a.sel=s,a.e in l&&(i=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?a.fn.apply(this,arguments):void 0}),a.del=u;var c=u||i;a.proxy=function(e){if(e=T(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==r?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(v(a.e),a.proxy,g(a,f))})}function x(t,e,n,r,i){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,r).forEach(function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,i))})})}function T(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(w,function(e,r){var i=n[e];t[e]=function(){return this[r]=b,i&&i.apply(n,arguments)},t[r]=E}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function S(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===r||(n[e]=t[e]);return T(n,t)}var r,n=1,i=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},a={},u={},f="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:y,remove:x},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var a=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return a._zid=h(t),a}if(s(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,w={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,u,f){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,a,e,f)}),h):(s(n)||o(u)||u===!1||(u=a,a=n,n=r),(u===r||a===!1)&&(u=a,a=r),u===!1&&(u=E),h.each(function(r,o){f&&(c=function(t){return x(o,t.type,u),u.apply(this,arguments)}),n&&(l=function(t){var r,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(r=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||u).apply(s,[r].concat(i.call(arguments,1)))):void 0}),y(o,t,u,a,n,l||c)}))},e.fn.off=function(t,n,i){var a=this;return t&&!s(t)?(e.each(t,function(t,e){a.off(t,n,e)}),a):(s(n)||o(i)||i===!1||(i=n,n=r),i===!1&&(i=E),a.each(function(){x(this,t,i,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):T(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(o,a){r=S(s(t)?e.Event(t):t),r._args=n,r.target=a,e.each(p(a,t.type||t),function(t,e){return i=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){function p(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function d(t,e,n,i){return t.global?p(e||r,n,i):void 0}function m(t){t.global&&0===e.active++&&d(t,null,"ajaxStart")}function g(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}function v(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||d(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void d(e,n,"ajaxSend",[t,e])}function y(t,e,n,r){var i=n.context,o="success";n.success.call(i,t,o,e),r&&r.resolveWith(i,[t,o,e]),d(n,i,"ajaxSuccess",[e,n,t]),b(o,e,n)}function x(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),b(e,n,r)}function b(t,e,n){var r=n.context;n.complete.call(r,e,t),d(n,r,"ajaxComplete",[e,n]),g(n)}function E(t,e,n){if(n.dataFilter==j)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function j(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==f?"json":a.test(t)?"script":u.test(t)&&"xml")||"text"}function T(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function S(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=T(t.url,t.data),t.data=void 0)}function C(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function O(t,n,r,i){var o,s=e.isArray(n),a=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?t.add(u.name,u.value):"array"==o||!r&&"object"==o?O(t,u,r,n):t.add(n,u)})}var i,o,n=+new Date,r=t.document,s=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,f="application/json",c="text/html",l=/^\s*$/,h=r.createElement("a");h.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,o){if(!("type"in i))return e.ajax(i);var c,p,s=i.jsonpCallback,a=(e.isFunction(s)?s():s)||"Zepto"+n++,u=r.createElement("script"),f=t[a],l=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:l};return o&&o.promise(h),e(u).on("load error",function(n,r){clearTimeout(p),e(u).off().remove(),"error"!=n.type&&c?y(c[0],h,i,o):x(null,r||"error",h,i,o),t[a]=f,c&&e.isFunction(f)&&f(c[0]),f=c=void 0}),v(h,i)===!1?(l("abort"),h):(t[a]=function(){c=arguments},u.src=i.url.replace(/\?(.+)=\?/,"?$1="+a),r.head.appendChild(u),i.timeout>0&&(p=setTimeout(function(){l("timeout")},i.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:f,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:j},e.ajax=function(n){var u,f,s=e.extend({},n||{}),a=e.Deferred&&e.Deferred();for(i in e.ajaxSettings)void 0===s[i]&&(s[i]=e.ajaxSettings[i]);m(s),s.crossDomain||(u=r.createElement("a"),u.href=s.url,u.href=u.href,s.crossDomain=h.protocol+"//"+h.host!=u.protocol+"//"+u.host),s.url||(s.url=t.location.toString()),(f=s.url.indexOf("#"))>-1&&(s.url=s.url.slice(0,f)),S(s);var c=s.dataType,p=/\?.+=\?/.test(s.url);if(p&&(c="jsonp"),s.cache!==!1&&(n&&n.cache===!0||"script"!=c&&"jsonp"!=c)||(s.url=T(s.url,"_="+Date.now())),"jsonp"==c)return p||(s.url=T(s.url,s.jsonp?s.jsonp+"=?":s.jsonp===!1?"":"callback=?")),e.ajaxJSONP(s,a);var P,d=s.accepts[c],g={},b=function(t,e){g[t.toLowerCase()]=[t,e]},C=/^([\w-]+:)\/\//.test(s.url)?RegExp.$1:t.location.protocol,N=s.xhr(),O=N.setRequestHeader;if(a&&a.promise(N),s.crossDomain||b("X-Requested-With","XMLHttpRequest"),b("Accept",d||"*/*"),(d=s.mimeType||d)&&(d.indexOf(",")>-1&&(d=d.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(d)),(s.contentType||s.contentType!==!1&&s.data&&"GET"!=s.type.toUpperCase())&&b("Content-Type",s.contentType||"application/x-www-form-urlencoded"),s.headers)for(o in s.headers)b(o,s.headers[o]);if(N.setRequestHeader=b,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=j,clearTimeout(P);var t,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==C){if(c=c||w(s.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)t=N.response;else{t=N.responseText;try{t=E(t,c,s),"script"==c?(1,eval)(t):"xml"==c?t=N.responseXML:"json"==c&&(t=l.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return x(n,"parsererror",N,s,a)}y(t,N,s,a)}else x(N.statusText||null,N.status?"error":"abort",N,s,a)}},v(N,s)===!1)return N.abort(),x(null,"abort",N,s,a),N;var A="async"in s?s.async:!0;if(N.open(s.type,s.url,A,s.username,s.password),s.xhrFields)for(o in s.xhrFields)N[o]=s.xhrFields[o];for(o in g)O.apply(N,g[o]);return s.timeout>0&&(P=setTimeout(function(){N.onreadystatechange=j,N.abort(),x(null,"timeout",N,s,a)},s.timeout)),N.send(s.data?s.data:null),N},e.get=function(){return e.ajax(C.apply(null,arguments))},e.post=function(){var t=C.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=C.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var a,i=this,o=t.split(/\s/),u=C(t,n,r),f=u.success;return o.length>1&&(u.url=o[0],a=o[1]),u.success=function(t){i.html(a?e("
").html(t.replace(s,"")).find(a):t),f&&f.apply(i,arguments)},e.ajax(u),this};var N=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(t)+"="+N(n))},O(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e}); -------------------------------------------------------------------------------- /node_modules/zepto/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "zepto", 3 | "_id": "zepto@1.2.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-4Se9nmb9hGvl6rSME5SIL3wOT5g=", 6 | "_location": "/zepto", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "zepto", 12 | "name": "zepto", 13 | "escapedName": "zepto", 14 | "rawSpec": "", 15 | "saveSpec": null, 16 | "fetchSpec": "latest" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/zepto/-/zepto-1.2.0.tgz", 23 | "_shasum": "e127bd9e66fd846be5eab48c1394882f7c0e4f98", 24 | "_spec": "zepto", 25 | "_where": "/Users/lizhifan/workspace/Me/marrycard", 26 | "bugs": { 27 | "url": "https://github.com/madrobby/zepto/issues" 28 | }, 29 | "bundleDependencies": false, 30 | "deprecated": false, 31 | "description": "Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.", 32 | "devDependencies": { 33 | "coffee-script": "1.5.x", 34 | "express": "3.1.x", 35 | "shelljs": "0.1.x", 36 | "uglify-js": "2.4.x" 37 | }, 38 | "homepage": "http://zeptojs.com", 39 | "license": "MIT", 40 | "main": "dist/zepto.js", 41 | "name": "zepto", 42 | "repository": { 43 | "type": "git", 44 | "url": "git+https://github.com/madrobby/zepto.git" 45 | }, 46 | "scripts": { 47 | "dist": "coffee make dist", 48 | "start": "coffee test/server.coffee", 49 | "test": "coffee make test" 50 | }, 51 | "version": "1.2.0" 52 | } 53 | -------------------------------------------------------------------------------- /node_modules/zepto/src/ajax.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | var jsonpID = +new Date(), 7 | document = window.document, 8 | key, 9 | name, 10 | rscript = /)<[^<]*)*<\/script>/gi, 11 | scriptTypeRE = /^(?:text|application)\/javascript/i, 12 | xmlTypeRE = /^(?:text|application)\/xml/i, 13 | jsonType = 'application/json', 14 | htmlType = 'text/html', 15 | blankRE = /^\s*$/, 16 | originAnchor = document.createElement('a') 17 | 18 | originAnchor.href = window.location.href 19 | 20 | // trigger a custom event and return false if it was cancelled 21 | function triggerAndReturn(context, eventName, data) { 22 | var event = $.Event(eventName) 23 | $(context).trigger(event, data) 24 | return !event.isDefaultPrevented() 25 | } 26 | 27 | // trigger an Ajax "global" event 28 | function triggerGlobal(settings, context, eventName, data) { 29 | if (settings.global) return triggerAndReturn(context || document, eventName, data) 30 | } 31 | 32 | // Number of active Ajax requests 33 | $.active = 0 34 | 35 | function ajaxStart(settings) { 36 | if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') 37 | } 38 | function ajaxStop(settings) { 39 | if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') 40 | } 41 | 42 | // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable 43 | function ajaxBeforeSend(xhr, settings) { 44 | var context = settings.context 45 | if (settings.beforeSend.call(context, xhr, settings) === false || 46 | triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) 47 | return false 48 | 49 | triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) 50 | } 51 | function ajaxSuccess(data, xhr, settings, deferred) { 52 | var context = settings.context, status = 'success' 53 | settings.success.call(context, data, status, xhr) 54 | if (deferred) deferred.resolveWith(context, [data, status, xhr]) 55 | triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) 56 | ajaxComplete(status, xhr, settings) 57 | } 58 | // type: "timeout", "error", "abort", "parsererror" 59 | function ajaxError(error, type, xhr, settings, deferred) { 60 | var context = settings.context 61 | settings.error.call(context, xhr, type, error) 62 | if (deferred) deferred.rejectWith(context, [xhr, type, error]) 63 | triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]) 64 | ajaxComplete(type, xhr, settings) 65 | } 66 | // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" 67 | function ajaxComplete(status, xhr, settings) { 68 | var context = settings.context 69 | settings.complete.call(context, xhr, status) 70 | triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) 71 | ajaxStop(settings) 72 | } 73 | 74 | function ajaxDataFilter(data, type, settings) { 75 | if (settings.dataFilter == empty) return data 76 | var context = settings.context 77 | return settings.dataFilter.call(context, data, type) 78 | } 79 | 80 | // Empty function, used as default callback 81 | function empty() {} 82 | 83 | $.ajaxJSONP = function(options, deferred){ 84 | if (!('type' in options)) return $.ajax(options) 85 | 86 | var _callbackName = options.jsonpCallback, 87 | callbackName = ($.isFunction(_callbackName) ? 88 | _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)), 89 | script = document.createElement('script'), 90 | originalCallback = window[callbackName], 91 | responseData, 92 | abort = function(errorType) { 93 | $(script).triggerHandler('error', errorType || 'abort') 94 | }, 95 | xhr = { abort: abort }, abortTimeout 96 | 97 | if (deferred) deferred.promise(xhr) 98 | 99 | $(script).on('load error', function(e, errorType){ 100 | clearTimeout(abortTimeout) 101 | $(script).off().remove() 102 | 103 | if (e.type == 'error' || !responseData) { 104 | ajaxError(null, errorType || 'error', xhr, options, deferred) 105 | } else { 106 | ajaxSuccess(responseData[0], xhr, options, deferred) 107 | } 108 | 109 | window[callbackName] = originalCallback 110 | if (responseData && $.isFunction(originalCallback)) 111 | originalCallback(responseData[0]) 112 | 113 | originalCallback = responseData = undefined 114 | }) 115 | 116 | if (ajaxBeforeSend(xhr, options) === false) { 117 | abort('abort') 118 | return xhr 119 | } 120 | 121 | window[callbackName] = function(){ 122 | responseData = arguments 123 | } 124 | 125 | script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName) 126 | document.head.appendChild(script) 127 | 128 | if (options.timeout > 0) abortTimeout = setTimeout(function(){ 129 | abort('timeout') 130 | }, options.timeout) 131 | 132 | return xhr 133 | } 134 | 135 | $.ajaxSettings = { 136 | // Default type of request 137 | type: 'GET', 138 | // Callback that is executed before request 139 | beforeSend: empty, 140 | // Callback that is executed if the request succeeds 141 | success: empty, 142 | // Callback that is executed the the server drops error 143 | error: empty, 144 | // Callback that is executed on request complete (both: error and success) 145 | complete: empty, 146 | // The context for the callbacks 147 | context: null, 148 | // Whether to trigger "global" Ajax events 149 | global: true, 150 | // Transport 151 | xhr: function () { 152 | return new window.XMLHttpRequest() 153 | }, 154 | // MIME types mapping 155 | // IIS returns Javascript as "application/x-javascript" 156 | accepts: { 157 | script: 'text/javascript, application/javascript, application/x-javascript', 158 | json: jsonType, 159 | xml: 'application/xml, text/xml', 160 | html: htmlType, 161 | text: 'text/plain' 162 | }, 163 | // Whether the request is to another domain 164 | crossDomain: false, 165 | // Default timeout 166 | timeout: 0, 167 | // Whether data should be serialized to string 168 | processData: true, 169 | // Whether the browser should be allowed to cache GET responses 170 | cache: true, 171 | //Used to handle the raw response data of XMLHttpRequest. 172 | //This is a pre-filtering function to sanitize the response. 173 | //The sanitized response should be returned 174 | dataFilter: empty 175 | } 176 | 177 | function mimeToDataType(mime) { 178 | if (mime) mime = mime.split(';', 2)[0] 179 | return mime && ( mime == htmlType ? 'html' : 180 | mime == jsonType ? 'json' : 181 | scriptTypeRE.test(mime) ? 'script' : 182 | xmlTypeRE.test(mime) && 'xml' ) || 'text' 183 | } 184 | 185 | function appendQuery(url, query) { 186 | if (query == '') return url 187 | return (url + '&' + query).replace(/[&?]{1,2}/, '?') 188 | } 189 | 190 | // serialize payload and append it to the URL for GET requests 191 | function serializeData(options) { 192 | if (options.processData && options.data && $.type(options.data) != "string") 193 | options.data = $.param(options.data, options.traditional) 194 | if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType)) 195 | options.url = appendQuery(options.url, options.data), options.data = undefined 196 | } 197 | 198 | $.ajax = function(options){ 199 | var settings = $.extend({}, options || {}), 200 | deferred = $.Deferred && $.Deferred(), 201 | urlAnchor, hashIndex 202 | for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] 203 | 204 | ajaxStart(settings) 205 | 206 | if (!settings.crossDomain) { 207 | urlAnchor = document.createElement('a') 208 | urlAnchor.href = settings.url 209 | // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049 210 | urlAnchor.href = urlAnchor.href 211 | settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host) 212 | } 213 | 214 | if (!settings.url) settings.url = window.location.toString() 215 | if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex) 216 | serializeData(settings) 217 | 218 | var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url) 219 | if (hasPlaceholder) dataType = 'jsonp' 220 | 221 | if (settings.cache === false || ( 222 | (!options || options.cache !== true) && 223 | ('script' == dataType || 'jsonp' == dataType) 224 | )) 225 | settings.url = appendQuery(settings.url, '_=' + Date.now()) 226 | 227 | if ('jsonp' == dataType) { 228 | if (!hasPlaceholder) 229 | settings.url = appendQuery(settings.url, 230 | settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?') 231 | return $.ajaxJSONP(settings, deferred) 232 | } 233 | 234 | var mime = settings.accepts[dataType], 235 | headers = { }, 236 | setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] }, 237 | protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, 238 | xhr = settings.xhr(), 239 | nativeSetHeader = xhr.setRequestHeader, 240 | abortTimeout 241 | 242 | if (deferred) deferred.promise(xhr) 243 | 244 | if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest') 245 | setHeader('Accept', mime || '*/*') 246 | if (mime = settings.mimeType || mime) { 247 | if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] 248 | xhr.overrideMimeType && xhr.overrideMimeType(mime) 249 | } 250 | if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) 251 | setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded') 252 | 253 | if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]) 254 | xhr.setRequestHeader = setHeader 255 | 256 | xhr.onreadystatechange = function(){ 257 | if (xhr.readyState == 4) { 258 | xhr.onreadystatechange = empty 259 | clearTimeout(abortTimeout) 260 | var result, error = false 261 | if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { 262 | dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type')) 263 | 264 | if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob') 265 | result = xhr.response 266 | else { 267 | result = xhr.responseText 268 | 269 | try { 270 | // http://perfectionkills.com/global-eval-what-are-the-options/ 271 | // sanitize response accordingly if data filter callback provided 272 | result = ajaxDataFilter(result, dataType, settings) 273 | if (dataType == 'script') (1,eval)(result) 274 | else if (dataType == 'xml') result = xhr.responseXML 275 | else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) 276 | } catch (e) { error = e } 277 | 278 | if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred) 279 | } 280 | 281 | ajaxSuccess(result, xhr, settings, deferred) 282 | } else { 283 | ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred) 284 | } 285 | } 286 | } 287 | 288 | if (ajaxBeforeSend(xhr, settings) === false) { 289 | xhr.abort() 290 | ajaxError(null, 'abort', xhr, settings, deferred) 291 | return xhr 292 | } 293 | 294 | var async = 'async' in settings ? settings.async : true 295 | xhr.open(settings.type, settings.url, async, settings.username, settings.password) 296 | 297 | if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name] 298 | 299 | for (name in headers) nativeSetHeader.apply(xhr, headers[name]) 300 | 301 | if (settings.timeout > 0) abortTimeout = setTimeout(function(){ 302 | xhr.onreadystatechange = empty 303 | xhr.abort() 304 | ajaxError(null, 'timeout', xhr, settings, deferred) 305 | }, settings.timeout) 306 | 307 | // avoid sending empty string (#319) 308 | xhr.send(settings.data ? settings.data : null) 309 | return xhr 310 | } 311 | 312 | // handle optional data/success arguments 313 | function parseArguments(url, data, success, dataType) { 314 | if ($.isFunction(data)) dataType = success, success = data, data = undefined 315 | if (!$.isFunction(success)) dataType = success, success = undefined 316 | return { 317 | url: url 318 | , data: data 319 | , success: success 320 | , dataType: dataType 321 | } 322 | } 323 | 324 | $.get = function(/* url, data, success, dataType */){ 325 | return $.ajax(parseArguments.apply(null, arguments)) 326 | } 327 | 328 | $.post = function(/* url, data, success, dataType */){ 329 | var options = parseArguments.apply(null, arguments) 330 | options.type = 'POST' 331 | return $.ajax(options) 332 | } 333 | 334 | $.getJSON = function(/* url, data, success */){ 335 | var options = parseArguments.apply(null, arguments) 336 | options.dataType = 'json' 337 | return $.ajax(options) 338 | } 339 | 340 | $.fn.load = function(url, data, success){ 341 | if (!this.length) return this 342 | var self = this, parts = url.split(/\s/), selector, 343 | options = parseArguments(url, data, success), 344 | callback = options.success 345 | if (parts.length > 1) options.url = parts[0], selector = parts[1] 346 | options.success = function(response){ 347 | self.html(selector ? 348 | $('
').html(response.replace(rscript, "")).find(selector) 349 | : response) 350 | callback && callback.apply(self, arguments) 351 | } 352 | $.ajax(options) 353 | return this 354 | } 355 | 356 | var escape = encodeURIComponent 357 | 358 | function serialize(params, obj, traditional, scope){ 359 | var type, array = $.isArray(obj), hash = $.isPlainObject(obj) 360 | $.each(obj, function(key, value) { 361 | type = $.type(value) 362 | if (scope) key = traditional ? scope : 363 | scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']' 364 | // handle data in serializeArray() format 365 | if (!scope && array) params.add(value.name, value.value) 366 | // recurse into nested objects 367 | else if (type == "array" || (!traditional && type == "object")) 368 | serialize(params, value, traditional, key) 369 | else params.add(key, value) 370 | }) 371 | } 372 | 373 | $.param = function(obj, traditional){ 374 | var params = [] 375 | params.add = function(key, value) { 376 | if ($.isFunction(value)) value = value() 377 | if (value == null) value = "" 378 | this.push(escape(key) + '=' + escape(value)) 379 | } 380 | serialize(params, obj, traditional) 381 | return params.join('&').replace(/%20/g, '+') 382 | } 383 | })(Zepto) 384 | -------------------------------------------------------------------------------- /node_modules/zepto/src/assets.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | var cache = [], timeout 7 | 8 | $.fn.remove = function(){ 9 | return this.each(function(){ 10 | if(this.parentNode){ 11 | if(this.tagName === 'IMG'){ 12 | cache.push(this) 13 | this.src = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=' 14 | if (timeout) clearTimeout(timeout) 15 | timeout = setTimeout(function(){ cache = [] }, 60000) 16 | } 17 | this.parentNode.removeChild(this) 18 | } 19 | }) 20 | } 21 | })(Zepto) 22 | -------------------------------------------------------------------------------- /node_modules/zepto/src/callbacks.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | // Create a collection of callbacks to be fired in a sequence, with configurable behaviour 7 | // Option flags: 8 | // - once: Callbacks fired at most one time. 9 | // - memory: Remember the most recent context and arguments 10 | // - stopOnFalse: Cease iterating over callback list 11 | // - unique: Permit adding at most one instance of the same callback 12 | $.Callbacks = function(options) { 13 | options = $.extend({}, options) 14 | 15 | var memory, // Last fire value (for non-forgettable lists) 16 | fired, // Flag to know if list was already fired 17 | firing, // Flag to know if list is currently firing 18 | firingStart, // First callback to fire (used internally by add and fireWith) 19 | firingLength, // End of the loop when firing 20 | firingIndex, // Index of currently firing callback (modified by remove if needed) 21 | list = [], // Actual callback list 22 | stack = !options.once && [], // Stack of fire calls for repeatable lists 23 | fire = function(data) { 24 | memory = options.memory && data 25 | fired = true 26 | firingIndex = firingStart || 0 27 | firingStart = 0 28 | firingLength = list.length 29 | firing = true 30 | for ( ; list && firingIndex < firingLength ; ++firingIndex ) { 31 | if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) { 32 | memory = false 33 | break 34 | } 35 | } 36 | firing = false 37 | if (list) { 38 | if (stack) stack.length && fire(stack.shift()) 39 | else if (memory) list.length = 0 40 | else Callbacks.disable() 41 | } 42 | }, 43 | 44 | Callbacks = { 45 | add: function() { 46 | if (list) { 47 | var start = list.length, 48 | add = function(args) { 49 | $.each(args, function(_, arg){ 50 | if (typeof arg === "function") { 51 | if (!options.unique || !Callbacks.has(arg)) list.push(arg) 52 | } 53 | else if (arg && arg.length && typeof arg !== 'string') add(arg) 54 | }) 55 | } 56 | add(arguments) 57 | if (firing) firingLength = list.length 58 | else if (memory) { 59 | firingStart = start 60 | fire(memory) 61 | } 62 | } 63 | return this 64 | }, 65 | remove: function() { 66 | if (list) { 67 | $.each(arguments, function(_, arg){ 68 | var index 69 | while ((index = $.inArray(arg, list, index)) > -1) { 70 | list.splice(index, 1) 71 | // Handle firing indexes 72 | if (firing) { 73 | if (index <= firingLength) --firingLength 74 | if (index <= firingIndex) --firingIndex 75 | } 76 | } 77 | }) 78 | } 79 | return this 80 | }, 81 | has: function(fn) { 82 | return !!(list && (fn ? $.inArray(fn, list) > -1 : list.length)) 83 | }, 84 | empty: function() { 85 | firingLength = list.length = 0 86 | return this 87 | }, 88 | disable: function() { 89 | list = stack = memory = undefined 90 | return this 91 | }, 92 | disabled: function() { 93 | return !list 94 | }, 95 | lock: function() { 96 | stack = undefined 97 | if (!memory) Callbacks.disable() 98 | return this 99 | }, 100 | locked: function() { 101 | return !stack 102 | }, 103 | fireWith: function(context, args) { 104 | if (list && (!fired || stack)) { 105 | args = args || [] 106 | args = [context, args.slice ? args.slice() : args] 107 | if (firing) stack.push(args) 108 | else fire(args) 109 | } 110 | return this 111 | }, 112 | fire: function() { 113 | return Callbacks.fireWith(this, arguments) 114 | }, 115 | fired: function() { 116 | return !!fired 117 | } 118 | } 119 | 120 | return Callbacks 121 | } 122 | })(Zepto) 123 | -------------------------------------------------------------------------------- /node_modules/zepto/src/data.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | // The following code is heavily inspired by jQuery's $.fn.data() 6 | 7 | ;(function($){ 8 | var data = {}, dataAttr = $.fn.data, camelize = $.camelCase, 9 | exp = $.expando = 'Zepto' + (+new Date()), emptyArray = [] 10 | 11 | // Get value from node: 12 | // 1. first try key as given, 13 | // 2. then try camelized key, 14 | // 3. fall back to reading "data-*" attribute. 15 | function getData(node, name) { 16 | var id = node[exp], store = id && data[id] 17 | if (name === undefined) return store || setData(node) 18 | else { 19 | if (store) { 20 | if (name in store) return store[name] 21 | var camelName = camelize(name) 22 | if (camelName in store) return store[camelName] 23 | } 24 | return dataAttr.call($(node), name) 25 | } 26 | } 27 | 28 | // Store value under camelized key on node 29 | function setData(node, name, value) { 30 | var id = node[exp] || (node[exp] = ++$.uuid), 31 | store = data[id] || (data[id] = attributeData(node)) 32 | if (name !== undefined) store[camelize(name)] = value 33 | return store 34 | } 35 | 36 | // Read all "data-*" attributes from a node 37 | function attributeData(node) { 38 | var store = {} 39 | $.each(node.attributes || emptyArray, function(i, attr){ 40 | if (attr.name.indexOf('data-') == 0) 41 | store[camelize(attr.name.replace('data-', ''))] = 42 | $.zepto.deserializeValue(attr.value) 43 | }) 44 | return store 45 | } 46 | 47 | $.fn.data = function(name, value) { 48 | return value === undefined ? 49 | // set multiple values via object 50 | $.isPlainObject(name) ? 51 | this.each(function(i, node){ 52 | $.each(name, function(key, value){ setData(node, key, value) }) 53 | }) : 54 | // get value from first element 55 | (0 in this ? getData(this[0], name) : undefined) : 56 | // set value on all elements 57 | this.each(function(){ setData(this, name, value) }) 58 | } 59 | 60 | $.data = function(elem, name, value) { 61 | return $(elem).data(name, value) 62 | } 63 | 64 | $.hasData = function(elem) { 65 | var id = elem[exp], store = id && data[id] 66 | return store ? !$.isEmptyObject(store) : false 67 | } 68 | 69 | $.fn.removeData = function(names) { 70 | if (typeof names == 'string') names = names.split(/\s+/) 71 | return this.each(function(){ 72 | var id = this[exp], store = id && data[id] 73 | if (store) $.each(names || store, function(key){ 74 | delete store[names ? camelize(this) : key] 75 | }) 76 | }) 77 | } 78 | 79 | // Generate extended `remove` and `empty` functions 80 | ;['remove', 'empty'].forEach(function(methodName){ 81 | var origFn = $.fn[methodName] 82 | $.fn[methodName] = function() { 83 | var elements = this.find('*') 84 | if (methodName === 'remove') elements = elements.add(this) 85 | elements.removeData() 86 | return origFn.call(this) 87 | } 88 | }) 89 | })(Zepto) 90 | -------------------------------------------------------------------------------- /node_modules/zepto/src/deferred.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | // 5 | // Some code (c) 2005, 2013 jQuery Foundation, Inc. and other contributors 6 | 7 | ;(function($){ 8 | var slice = Array.prototype.slice 9 | 10 | function Deferred(func) { 11 | var tuples = [ 12 | // action, add listener, listener list, final state 13 | [ "resolve", "done", $.Callbacks({once:1, memory:1}), "resolved" ], 14 | [ "reject", "fail", $.Callbacks({once:1, memory:1}), "rejected" ], 15 | [ "notify", "progress", $.Callbacks({memory:1}) ] 16 | ], 17 | state = "pending", 18 | promise = { 19 | state: function() { 20 | return state 21 | }, 22 | always: function() { 23 | deferred.done(arguments).fail(arguments) 24 | return this 25 | }, 26 | then: function(/* fnDone [, fnFailed [, fnProgress]] */) { 27 | var fns = arguments 28 | return Deferred(function(defer){ 29 | $.each(tuples, function(i, tuple){ 30 | var fn = $.isFunction(fns[i]) && fns[i] 31 | deferred[tuple[1]](function(){ 32 | var returned = fn && fn.apply(this, arguments) 33 | if (returned && $.isFunction(returned.promise)) { 34 | returned.promise() 35 | .done(defer.resolve) 36 | .fail(defer.reject) 37 | .progress(defer.notify) 38 | } else { 39 | var context = this === promise ? defer.promise() : this, 40 | values = fn ? [returned] : arguments 41 | defer[tuple[0] + "With"](context, values) 42 | } 43 | }) 44 | }) 45 | fns = null 46 | }).promise() 47 | }, 48 | 49 | promise: function(obj) { 50 | return obj != null ? $.extend( obj, promise ) : promise 51 | } 52 | }, 53 | deferred = {} 54 | 55 | $.each(tuples, function(i, tuple){ 56 | var list = tuple[2], 57 | stateString = tuple[3] 58 | 59 | promise[tuple[1]] = list.add 60 | 61 | if (stateString) { 62 | list.add(function(){ 63 | state = stateString 64 | }, tuples[i^1][2].disable, tuples[2][2].lock) 65 | } 66 | 67 | deferred[tuple[0]] = function(){ 68 | deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments) 69 | return this 70 | } 71 | deferred[tuple[0] + "With"] = list.fireWith 72 | }) 73 | 74 | promise.promise(deferred) 75 | if (func) func.call(deferred, deferred) 76 | return deferred 77 | } 78 | 79 | $.when = function(sub) { 80 | var resolveValues = slice.call(arguments), 81 | len = resolveValues.length, 82 | i = 0, 83 | remain = len !== 1 || (sub && $.isFunction(sub.promise)) ? len : 0, 84 | deferred = remain === 1 ? sub : Deferred(), 85 | progressValues, progressContexts, resolveContexts, 86 | updateFn = function(i, ctx, val){ 87 | return function(value){ 88 | ctx[i] = this 89 | val[i] = arguments.length > 1 ? slice.call(arguments) : value 90 | if (val === progressValues) { 91 | deferred.notifyWith(ctx, val) 92 | } else if (!(--remain)) { 93 | deferred.resolveWith(ctx, val) 94 | } 95 | } 96 | } 97 | 98 | if (len > 1) { 99 | progressValues = new Array(len) 100 | progressContexts = new Array(len) 101 | resolveContexts = new Array(len) 102 | for ( ; i < len; ++i ) { 103 | if (resolveValues[i] && $.isFunction(resolveValues[i].promise)) { 104 | resolveValues[i].promise() 105 | .done(updateFn(i, resolveContexts, resolveValues)) 106 | .fail(deferred.reject) 107 | .progress(updateFn(i, progressContexts, progressValues)) 108 | } else { 109 | --remain 110 | } 111 | } 112 | } 113 | if (!remain) deferred.resolveWith(resolveContexts, resolveValues) 114 | return deferred.promise() 115 | } 116 | 117 | $.Deferred = Deferred 118 | })(Zepto) 119 | -------------------------------------------------------------------------------- /node_modules/zepto/src/detect.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | function detect(ua, platform){ 7 | var os = this.os = {}, browser = this.browser = {}, 8 | webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/), 9 | android = ua.match(/(Android);?[\s\/]+([\d.]+)?/), 10 | osx = !!ua.match(/\(Macintosh\; Intel /), 11 | ipad = ua.match(/(iPad).*OS\s([\d_]+)/), 12 | ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/), 13 | iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/), 14 | webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/), 15 | win = /Win\d{2}|Windows/.test(platform), 16 | wp = ua.match(/Windows Phone ([\d.]+)/), 17 | touchpad = webos && ua.match(/TouchPad/), 18 | kindle = ua.match(/Kindle\/([\d.]+)/), 19 | silk = ua.match(/Silk\/([\d._]+)/), 20 | blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/), 21 | bb10 = ua.match(/(BB10).*Version\/([\d.]+)/), 22 | rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/), 23 | playbook = ua.match(/PlayBook/), 24 | chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/), 25 | firefox = ua.match(/Firefox\/([\d.]+)/), 26 | firefoxos = ua.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/), 27 | ie = ua.match(/MSIE\s([\d.]+)/) || ua.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/), 28 | webview = !chrome && ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/), 29 | safari = webview || ua.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/) 30 | 31 | // Todo: clean this up with a better OS/browser seperation: 32 | // - discern (more) between multiple browsers on android 33 | // - decide if kindle fire in silk mode is android or not 34 | // - Firefox on Android doesn't specify the Android version 35 | // - possibly devide in os, device and browser hashes 36 | 37 | if (browser.webkit = !!webkit) browser.version = webkit[1] 38 | 39 | if (android) os.android = true, os.version = android[2] 40 | if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.') 41 | if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.') 42 | if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null 43 | if (wp) os.wp = true, os.version = wp[1] 44 | if (webos) os.webos = true, os.version = webos[2] 45 | if (touchpad) os.touchpad = true 46 | if (blackberry) os.blackberry = true, os.version = blackberry[2] 47 | if (bb10) os.bb10 = true, os.version = bb10[2] 48 | if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2] 49 | if (playbook) browser.playbook = true 50 | if (kindle) os.kindle = true, os.version = kindle[1] 51 | if (silk) browser.silk = true, browser.version = silk[1] 52 | if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true 53 | if (chrome) browser.chrome = true, browser.version = chrome[1] 54 | if (firefox) browser.firefox = true, browser.version = firefox[1] 55 | if (firefoxos) os.firefoxos = true, os.version = firefoxos[1] 56 | if (ie) browser.ie = true, browser.version = ie[1] 57 | if (safari && (osx || os.ios || win)) { 58 | browser.safari = true 59 | if (!os.ios) browser.version = safari[1] 60 | } 61 | if (webview) browser.webview = true 62 | 63 | os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) || 64 | (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/))) 65 | os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || blackberry || bb10 || 66 | (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) || 67 | (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/)))) 68 | } 69 | 70 | detect.call($, navigator.userAgent, navigator.platform) 71 | // make available to unit tests 72 | $.__detect = detect 73 | 74 | })(Zepto) 75 | -------------------------------------------------------------------------------- /node_modules/zepto/src/event.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | var _zid = 1, undefined, 7 | slice = Array.prototype.slice, 8 | isFunction = $.isFunction, 9 | isString = function(obj){ return typeof obj == 'string' }, 10 | handlers = {}, 11 | specialEvents={}, 12 | focusinSupported = 'onfocusin' in window, 13 | focus = { focus: 'focusin', blur: 'focusout' }, 14 | hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } 15 | 16 | specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' 17 | 18 | function zid(element) { 19 | return element._zid || (element._zid = _zid++) 20 | } 21 | function findHandlers(element, event, fn, selector) { 22 | event = parse(event) 23 | if (event.ns) var matcher = matcherFor(event.ns) 24 | return (handlers[zid(element)] || []).filter(function(handler) { 25 | return handler 26 | && (!event.e || handler.e == event.e) 27 | && (!event.ns || matcher.test(handler.ns)) 28 | && (!fn || zid(handler.fn) === zid(fn)) 29 | && (!selector || handler.sel == selector) 30 | }) 31 | } 32 | function parse(event) { 33 | var parts = ('' + event).split('.') 34 | return {e: parts[0], ns: parts.slice(1).sort().join(' ')} 35 | } 36 | function matcherFor(ns) { 37 | return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') 38 | } 39 | 40 | function eventCapture(handler, captureSetting) { 41 | return handler.del && 42 | (!focusinSupported && (handler.e in focus)) || 43 | !!captureSetting 44 | } 45 | 46 | function realEvent(type) { 47 | return hover[type] || (focusinSupported && focus[type]) || type 48 | } 49 | 50 | function add(element, events, fn, data, selector, delegator, capture){ 51 | var id = zid(element), set = (handlers[id] || (handlers[id] = [])) 52 | events.split(/\s/).forEach(function(event){ 53 | if (event == 'ready') return $(document).ready(fn) 54 | var handler = parse(event) 55 | handler.fn = fn 56 | handler.sel = selector 57 | // emulate mouseenter, mouseleave 58 | if (handler.e in hover) fn = function(e){ 59 | var related = e.relatedTarget 60 | if (!related || (related !== this && !$.contains(this, related))) 61 | return handler.fn.apply(this, arguments) 62 | } 63 | handler.del = delegator 64 | var callback = delegator || fn 65 | handler.proxy = function(e){ 66 | e = compatible(e) 67 | if (e.isImmediatePropagationStopped()) return 68 | e.data = data 69 | var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args)) 70 | if (result === false) e.preventDefault(), e.stopPropagation() 71 | return result 72 | } 73 | handler.i = set.length 74 | set.push(handler) 75 | if ('addEventListener' in element) 76 | element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) 77 | }) 78 | } 79 | function remove(element, events, fn, selector, capture){ 80 | var id = zid(element) 81 | ;(events || '').split(/\s/).forEach(function(event){ 82 | findHandlers(element, event, fn, selector).forEach(function(handler){ 83 | delete handlers[id][handler.i] 84 | if ('removeEventListener' in element) 85 | element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) 86 | }) 87 | }) 88 | } 89 | 90 | $.event = { add: add, remove: remove } 91 | 92 | $.proxy = function(fn, context) { 93 | var args = (2 in arguments) && slice.call(arguments, 2) 94 | if (isFunction(fn)) { 95 | var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) } 96 | proxyFn._zid = zid(fn) 97 | return proxyFn 98 | } else if (isString(context)) { 99 | if (args) { 100 | args.unshift(fn[context], fn) 101 | return $.proxy.apply(null, args) 102 | } else { 103 | return $.proxy(fn[context], fn) 104 | } 105 | } else { 106 | throw new TypeError("expected function") 107 | } 108 | } 109 | 110 | $.fn.bind = function(event, data, callback){ 111 | return this.on(event, data, callback) 112 | } 113 | $.fn.unbind = function(event, callback){ 114 | return this.off(event, callback) 115 | } 116 | $.fn.one = function(event, selector, data, callback){ 117 | return this.on(event, selector, data, callback, 1) 118 | } 119 | 120 | var returnTrue = function(){return true}, 121 | returnFalse = function(){return false}, 122 | ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/, 123 | eventMethods = { 124 | preventDefault: 'isDefaultPrevented', 125 | stopImmediatePropagation: 'isImmediatePropagationStopped', 126 | stopPropagation: 'isPropagationStopped' 127 | } 128 | 129 | function compatible(event, source) { 130 | if (source || !event.isDefaultPrevented) { 131 | source || (source = event) 132 | 133 | $.each(eventMethods, function(name, predicate) { 134 | var sourceMethod = source[name] 135 | event[name] = function(){ 136 | this[predicate] = returnTrue 137 | return sourceMethod && sourceMethod.apply(source, arguments) 138 | } 139 | event[predicate] = returnFalse 140 | }) 141 | 142 | event.timeStamp || (event.timeStamp = Date.now()) 143 | 144 | if (source.defaultPrevented !== undefined ? source.defaultPrevented : 145 | 'returnValue' in source ? source.returnValue === false : 146 | source.getPreventDefault && source.getPreventDefault()) 147 | event.isDefaultPrevented = returnTrue 148 | } 149 | return event 150 | } 151 | 152 | function createProxy(event) { 153 | var key, proxy = { originalEvent: event } 154 | for (key in event) 155 | if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] 156 | 157 | return compatible(proxy, event) 158 | } 159 | 160 | $.fn.delegate = function(selector, event, callback){ 161 | return this.on(event, selector, callback) 162 | } 163 | $.fn.undelegate = function(selector, event, callback){ 164 | return this.off(event, selector, callback) 165 | } 166 | 167 | $.fn.live = function(event, callback){ 168 | $(document.body).delegate(this.selector, event, callback) 169 | return this 170 | } 171 | $.fn.die = function(event, callback){ 172 | $(document.body).undelegate(this.selector, event, callback) 173 | return this 174 | } 175 | 176 | $.fn.on = function(event, selector, data, callback, one){ 177 | var autoRemove, delegator, $this = this 178 | if (event && !isString(event)) { 179 | $.each(event, function(type, fn){ 180 | $this.on(type, selector, data, fn, one) 181 | }) 182 | return $this 183 | } 184 | 185 | if (!isString(selector) && !isFunction(callback) && callback !== false) 186 | callback = data, data = selector, selector = undefined 187 | if (callback === undefined || data === false) 188 | callback = data, data = undefined 189 | 190 | if (callback === false) callback = returnFalse 191 | 192 | return $this.each(function(_, element){ 193 | if (one) autoRemove = function(e){ 194 | remove(element, e.type, callback) 195 | return callback.apply(this, arguments) 196 | } 197 | 198 | if (selector) delegator = function(e){ 199 | var evt, match = $(e.target).closest(selector, element).get(0) 200 | if (match && match !== element) { 201 | evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) 202 | return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1))) 203 | } 204 | } 205 | 206 | add(element, event, callback, data, selector, delegator || autoRemove) 207 | }) 208 | } 209 | $.fn.off = function(event, selector, callback){ 210 | var $this = this 211 | if (event && !isString(event)) { 212 | $.each(event, function(type, fn){ 213 | $this.off(type, selector, fn) 214 | }) 215 | return $this 216 | } 217 | 218 | if (!isString(selector) && !isFunction(callback) && callback !== false) 219 | callback = selector, selector = undefined 220 | 221 | if (callback === false) callback = returnFalse 222 | 223 | return $this.each(function(){ 224 | remove(this, event, callback, selector) 225 | }) 226 | } 227 | 228 | $.fn.trigger = function(event, args){ 229 | event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event) 230 | event._args = args 231 | return this.each(function(){ 232 | // handle focus(), blur() by calling them directly 233 | if (event.type in focus && typeof this[event.type] == "function") this[event.type]() 234 | // items in the collection might not be DOM elements 235 | else if ('dispatchEvent' in this) this.dispatchEvent(event) 236 | else $(this).triggerHandler(event, args) 237 | }) 238 | } 239 | 240 | // triggers event handlers on current element just as if an event occurred, 241 | // doesn't trigger an actual event, doesn't bubble 242 | $.fn.triggerHandler = function(event, args){ 243 | var e, result 244 | this.each(function(i, element){ 245 | e = createProxy(isString(event) ? $.Event(event) : event) 246 | e._args = args 247 | e.target = element 248 | $.each(findHandlers(element, event.type || event), function(i, handler){ 249 | result = handler.proxy(e) 250 | if (e.isImmediatePropagationStopped()) return false 251 | }) 252 | }) 253 | return result 254 | } 255 | 256 | // shortcut methods for `.bind(event, fn)` for each event type 257 | ;('focusin focusout focus blur load resize scroll unload click dblclick '+ 258 | 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ 259 | 'change select keydown keypress keyup error').split(' ').forEach(function(event) { 260 | $.fn[event] = function(callback) { 261 | return (0 in arguments) ? 262 | this.bind(event, callback) : 263 | this.trigger(event) 264 | } 265 | }) 266 | 267 | $.Event = function(type, props) { 268 | if (!isString(type)) props = type, type = props.type 269 | var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true 270 | if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) 271 | event.initEvent(type, bubbles, true) 272 | return compatible(event) 273 | } 274 | 275 | })(Zepto) 276 | -------------------------------------------------------------------------------- /node_modules/zepto/src/form.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | $.fn.serializeArray = function() { 7 | var name, type, result = [], 8 | add = function(value) { 9 | if (value.forEach) return value.forEach(add) 10 | result.push({ name: name, value: value }) 11 | } 12 | if (this[0]) $.each(this[0].elements, function(_, field){ 13 | type = field.type, name = field.name 14 | if (name && field.nodeName.toLowerCase() != 'fieldset' && 15 | !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' && 16 | ((type != 'radio' && type != 'checkbox') || field.checked)) 17 | add($(field).val()) 18 | }) 19 | return result 20 | } 21 | 22 | $.fn.serialize = function(){ 23 | var result = [] 24 | this.serializeArray().forEach(function(elm){ 25 | result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value)) 26 | }) 27 | return result.join('&') 28 | } 29 | 30 | $.fn.submit = function(callback) { 31 | if (0 in arguments) this.bind('submit', callback) 32 | else if (this.length) { 33 | var event = $.Event('submit') 34 | this.eq(0).trigger(event) 35 | if (!event.isDefaultPrevented()) this.get(0).submit() 36 | } 37 | return this 38 | } 39 | 40 | })(Zepto) 41 | -------------------------------------------------------------------------------- /node_modules/zepto/src/fx.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($, undefined){ 6 | var prefix = '', eventPrefix, 7 | vendors = { Webkit: 'webkit', Moz: '', O: 'o' }, 8 | testEl = document.createElement('div'), 9 | supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i, 10 | transform, 11 | transitionProperty, transitionDuration, transitionTiming, transitionDelay, 12 | animationName, animationDuration, animationTiming, animationDelay, 13 | cssReset = {} 14 | 15 | function dasherize(str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase() } 16 | function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : name.toLowerCase() } 17 | 18 | if (testEl.style.transform === undefined) $.each(vendors, function(vendor, event){ 19 | if (testEl.style[vendor + 'TransitionProperty'] !== undefined) { 20 | prefix = '-' + vendor.toLowerCase() + '-' 21 | eventPrefix = event 22 | return false 23 | } 24 | }) 25 | 26 | transform = prefix + 'transform' 27 | cssReset[transitionProperty = prefix + 'transition-property'] = 28 | cssReset[transitionDuration = prefix + 'transition-duration'] = 29 | cssReset[transitionDelay = prefix + 'transition-delay'] = 30 | cssReset[transitionTiming = prefix + 'transition-timing-function'] = 31 | cssReset[animationName = prefix + 'animation-name'] = 32 | cssReset[animationDuration = prefix + 'animation-duration'] = 33 | cssReset[animationDelay = prefix + 'animation-delay'] = 34 | cssReset[animationTiming = prefix + 'animation-timing-function'] = '' 35 | 36 | $.fx = { 37 | off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined), 38 | speeds: { _default: 400, fast: 200, slow: 600 }, 39 | cssPrefix: prefix, 40 | transitionEnd: normalizeEvent('TransitionEnd'), 41 | animationEnd: normalizeEvent('AnimationEnd') 42 | } 43 | 44 | $.fn.animate = function(properties, duration, ease, callback, delay){ 45 | if ($.isFunction(duration)) 46 | callback = duration, ease = undefined, duration = undefined 47 | if ($.isFunction(ease)) 48 | callback = ease, ease = undefined 49 | if ($.isPlainObject(duration)) 50 | ease = duration.easing, callback = duration.complete, delay = duration.delay, duration = duration.duration 51 | if (duration) duration = (typeof duration == 'number' ? duration : 52 | ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000 53 | if (delay) delay = parseFloat(delay) / 1000 54 | return this.anim(properties, duration, ease, callback, delay) 55 | } 56 | 57 | $.fn.anim = function(properties, duration, ease, callback, delay){ 58 | var key, cssValues = {}, cssProperties, transforms = '', 59 | that = this, wrappedCallback, endEvent = $.fx.transitionEnd, 60 | fired = false 61 | 62 | if (duration === undefined) duration = $.fx.speeds._default / 1000 63 | if (delay === undefined) delay = 0 64 | if ($.fx.off) duration = 0 65 | 66 | if (typeof properties == 'string') { 67 | // keyframe animation 68 | cssValues[animationName] = properties 69 | cssValues[animationDuration] = duration + 's' 70 | cssValues[animationDelay] = delay + 's' 71 | cssValues[animationTiming] = (ease || 'linear') 72 | endEvent = $.fx.animationEnd 73 | } else { 74 | cssProperties = [] 75 | // CSS transitions 76 | for (key in properties) 77 | if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') ' 78 | else cssValues[key] = properties[key], cssProperties.push(dasherize(key)) 79 | 80 | if (transforms) cssValues[transform] = transforms, cssProperties.push(transform) 81 | if (duration > 0 && typeof properties === 'object') { 82 | cssValues[transitionProperty] = cssProperties.join(', ') 83 | cssValues[transitionDuration] = duration + 's' 84 | cssValues[transitionDelay] = delay + 's' 85 | cssValues[transitionTiming] = (ease || 'linear') 86 | } 87 | } 88 | 89 | wrappedCallback = function(event){ 90 | if (typeof event !== 'undefined') { 91 | if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from "below" 92 | $(event.target).unbind(endEvent, wrappedCallback) 93 | } else 94 | $(this).unbind(endEvent, wrappedCallback) // triggered by setTimeout 95 | 96 | fired = true 97 | $(this).css(cssReset) 98 | callback && callback.call(this) 99 | } 100 | if (duration > 0){ 101 | this.bind(endEvent, wrappedCallback) 102 | // transitionEnd is not always firing on older Android phones 103 | // so make sure it gets fired 104 | setTimeout(function(){ 105 | if (fired) return 106 | wrappedCallback.call(that) 107 | }, ((duration + delay) * 1000) + 25) 108 | } 109 | 110 | // trigger page reflow so new elements can animate 111 | this.size() && this.get(0).clientLeft 112 | 113 | this.css(cssValues) 114 | 115 | if (duration <= 0) setTimeout(function() { 116 | that.each(function(){ wrappedCallback.call(this) }) 117 | }, 0) 118 | 119 | return this 120 | } 121 | 122 | testEl = null 123 | })(Zepto) 124 | -------------------------------------------------------------------------------- /node_modules/zepto/src/fx_methods.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($, undefined){ 6 | var document = window.document, docElem = document.documentElement, 7 | origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle 8 | 9 | function anim(el, speed, opacity, scale, callback) { 10 | if (typeof speed == 'function' && !callback) callback = speed, speed = undefined 11 | var props = { opacity: opacity } 12 | if (scale) { 13 | props.scale = scale 14 | el.css($.fx.cssPrefix + 'transform-origin', '0 0') 15 | } 16 | return el.animate(props, speed, null, callback) 17 | } 18 | 19 | function hide(el, speed, scale, callback) { 20 | return anim(el, speed, 0, scale, function(){ 21 | origHide.call($(this)) 22 | callback && callback.call(this) 23 | }) 24 | } 25 | 26 | $.fn.show = function(speed, callback) { 27 | origShow.call(this) 28 | if (speed === undefined) speed = 0 29 | else this.css('opacity', 0) 30 | return anim(this, speed, 1, '1,1', callback) 31 | } 32 | 33 | $.fn.hide = function(speed, callback) { 34 | if (speed === undefined) return origHide.call(this) 35 | else return hide(this, speed, '0,0', callback) 36 | } 37 | 38 | $.fn.toggle = function(speed, callback) { 39 | if (speed === undefined || typeof speed == 'boolean') 40 | return origToggle.call(this, speed) 41 | else return this.each(function(){ 42 | var el = $(this) 43 | el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback) 44 | }) 45 | } 46 | 47 | $.fn.fadeTo = function(speed, opacity, callback) { 48 | return anim(this, speed, opacity, null, callback) 49 | } 50 | 51 | $.fn.fadeIn = function(speed, callback) { 52 | var target = this.css('opacity') 53 | if (target > 0) this.css('opacity', 0) 54 | else target = 1 55 | return origShow.call(this).fadeTo(speed, target, callback) 56 | } 57 | 58 | $.fn.fadeOut = function(speed, callback) { 59 | return hide(this, speed, null, callback) 60 | } 61 | 62 | $.fn.fadeToggle = function(speed, callback) { 63 | return this.each(function(){ 64 | var el = $(this) 65 | el[ 66 | (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut' 67 | ](speed, callback) 68 | }) 69 | } 70 | 71 | })(Zepto) 72 | -------------------------------------------------------------------------------- /node_modules/zepto/src/gesture.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | if ($.os.ios) { 7 | var gesture = {}, gestureTimeout 8 | 9 | function parentIfText(node){ 10 | return 'tagName' in node ? node : node.parentNode 11 | } 12 | 13 | $(document).bind('gesturestart', function(e){ 14 | var now = Date.now(), delta = now - (gesture.last || now) 15 | gesture.target = parentIfText(e.target) 16 | gestureTimeout && clearTimeout(gestureTimeout) 17 | gesture.e1 = e.scale 18 | gesture.last = now 19 | }).bind('gesturechange', function(e){ 20 | gesture.e2 = e.scale 21 | }).bind('gestureend', function(e){ 22 | if (gesture.e2 > 0) { 23 | Math.abs(gesture.e1 - gesture.e2) != 0 && $(gesture.target).trigger('pinch') && 24 | $(gesture.target).trigger('pinch' + (gesture.e1 - gesture.e2 > 0 ? 'In' : 'Out')) 25 | gesture.e1 = gesture.e2 = gesture.last = 0 26 | } else if ('last' in gesture) { 27 | gesture = {} 28 | } 29 | }) 30 | 31 | ;['pinch', 'pinchIn', 'pinchOut'].forEach(function(m){ 32 | $.fn[m] = function(callback){ return this.bind(m, callback) } 33 | }) 34 | } 35 | })(Zepto) 36 | -------------------------------------------------------------------------------- /node_modules/zepto/src/ie.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function(){ 6 | // getComputedStyle shouldn't freak out when called 7 | // without a valid element as argument 8 | try { 9 | getComputedStyle(undefined) 10 | } catch(e) { 11 | var nativeGetComputedStyle = getComputedStyle 12 | window.getComputedStyle = function(element, pseudoElement){ 13 | try { 14 | return nativeGetComputedStyle(element, pseudoElement) 15 | } catch(e) { 16 | return null 17 | } 18 | } 19 | } 20 | })() 21 | -------------------------------------------------------------------------------- /node_modules/zepto/src/ios3.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function(undefined){ 6 | if (String.prototype.trim === undefined) // fix for iOS 3.2 7 | String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, '') } 8 | 9 | // For iOS 3.x 10 | // from https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce 11 | if (Array.prototype.reduce === undefined) 12 | Array.prototype.reduce = function(fun){ 13 | if(this === void 0 || this === null) throw new TypeError() 14 | var t = Object(this), len = t.length >>> 0, k = 0, accumulator 15 | if(typeof fun != 'function') throw new TypeError() 16 | if(len == 0 && arguments.length == 1) throw new TypeError() 17 | 18 | if(arguments.length >= 2) 19 | accumulator = arguments[1] 20 | else 21 | do{ 22 | if(k in t){ 23 | accumulator = t[k++] 24 | break 25 | } 26 | if(++k >= len) throw new TypeError() 27 | } while (true) 28 | 29 | while (k < len){ 30 | if(k in t) accumulator = fun.call(undefined, accumulator, t[k], k, t) 31 | k++ 32 | } 33 | return accumulator 34 | } 35 | 36 | })() 37 | -------------------------------------------------------------------------------- /node_modules/zepto/src/selector.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches 7 | 8 | function visible(elem){ 9 | elem = $(elem) 10 | return !!(elem.width() || elem.height()) && elem.css("display") !== "none" 11 | } 12 | 13 | // Implements a subset from: 14 | // http://api.jquery.com/category/selectors/jquery-selector-extensions/ 15 | // 16 | // Each filter function receives the current index, all nodes in the 17 | // considered set, and a value if there were parentheses. The value 18 | // of `this` is the node currently being considered. The function returns the 19 | // resulting node(s), null, or undefined. 20 | // 21 | // Complex selectors are not supported: 22 | // li:has(label:contains("foo")) + li:has(label:contains("bar")) 23 | // ul.inner:first > li 24 | var filters = $.expr[':'] = { 25 | visible: function(){ if (visible(this)) return this }, 26 | hidden: function(){ if (!visible(this)) return this }, 27 | selected: function(){ if (this.selected) return this }, 28 | checked: function(){ if (this.checked) return this }, 29 | parent: function(){ return this.parentNode }, 30 | first: function(idx){ if (idx === 0) return this }, 31 | last: function(idx, nodes){ if (idx === nodes.length - 1) return this }, 32 | eq: function(idx, _, value){ if (idx === value) return this }, 33 | contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this }, 34 | has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this } 35 | } 36 | 37 | var filterRe = new RegExp('(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*'), 38 | childRe = /^\s*>/, 39 | classTag = 'Zepto' + (+new Date()) 40 | 41 | function process(sel, fn) { 42 | // quote the hash in `a[href^=#]` expression 43 | sel = sel.replace(/=#\]/g, '="#"]') 44 | var filter, arg, match = filterRe.exec(sel) 45 | if (match && match[2] in filters) { 46 | filter = filters[match[2]], arg = match[3] 47 | sel = match[1] 48 | if (arg) { 49 | var num = Number(arg) 50 | if (isNaN(num)) arg = arg.replace(/^["']|["']$/g, '') 51 | else arg = num 52 | } 53 | } 54 | return fn(sel, filter, arg) 55 | } 56 | 57 | zepto.qsa = function(node, selector) { 58 | return process(selector, function(sel, filter, arg){ 59 | try { 60 | var taggedParent 61 | if (!sel && filter) sel = '*' 62 | else if (childRe.test(sel)) 63 | // support "> *" child queries by tagging the parent node with a 64 | // unique class and prepending that classname onto the selector 65 | taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel 66 | 67 | var nodes = oldQsa(node, sel) 68 | } catch(e) { 69 | console.error('error performing selector: %o', selector) 70 | throw e 71 | } finally { 72 | if (taggedParent) taggedParent.removeClass(classTag) 73 | } 74 | return !filter ? nodes : 75 | zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) })) 76 | }) 77 | } 78 | 79 | zepto.matches = function(node, selector){ 80 | return process(selector, function(sel, filter, arg){ 81 | return (!sel || oldMatches(node, sel)) && 82 | (!filter || filter.call(node, null, arg) === node) 83 | }) 84 | } 85 | })(Zepto) 86 | -------------------------------------------------------------------------------- /node_modules/zepto/src/stack.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | $.fn.end = function(){ 7 | return this.prevObject || $() 8 | } 9 | 10 | $.fn.andSelf = function(){ 11 | return this.add(this.prevObject || $()) 12 | } 13 | 14 | 'filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings'.split(',').forEach(function(property){ 15 | var fn = $.fn[property] 16 | $.fn[property] = function(){ 17 | var ret = fn.apply(this, arguments) 18 | ret.prevObject = this 19 | return ret 20 | } 21 | }) 22 | })(Zepto) 23 | -------------------------------------------------------------------------------- /node_modules/zepto/src/touch.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ;(function($){ 6 | var touch = {}, 7 | touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, 8 | longTapDelay = 750, 9 | gesture 10 | 11 | function swipeDirection(x1, x2, y1, y2) { 12 | return Math.abs(x1 - x2) >= 13 | Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') 14 | } 15 | 16 | function longTap() { 17 | longTapTimeout = null 18 | if (touch.last) { 19 | touch.el.trigger('longTap') 20 | touch = {} 21 | } 22 | } 23 | 24 | function cancelLongTap() { 25 | if (longTapTimeout) clearTimeout(longTapTimeout) 26 | longTapTimeout = null 27 | } 28 | 29 | function cancelAll() { 30 | if (touchTimeout) clearTimeout(touchTimeout) 31 | if (tapTimeout) clearTimeout(tapTimeout) 32 | if (swipeTimeout) clearTimeout(swipeTimeout) 33 | if (longTapTimeout) clearTimeout(longTapTimeout) 34 | touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null 35 | touch = {} 36 | } 37 | 38 | function isPrimaryTouch(event){ 39 | return (event.pointerType == 'touch' || 40 | event.pointerType == event.MSPOINTER_TYPE_TOUCH) 41 | && event.isPrimary 42 | } 43 | 44 | function isPointerEventType(e, type){ 45 | return (e.type == 'pointer'+type || 46 | e.type.toLowerCase() == 'mspointer'+type) 47 | } 48 | 49 | $(document).ready(function(){ 50 | var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType 51 | 52 | if ('MSGesture' in window) { 53 | gesture = new MSGesture() 54 | gesture.target = document.body 55 | } 56 | 57 | $(document) 58 | .bind('MSGestureEnd', function(e){ 59 | var swipeDirectionFromVelocity = 60 | e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null 61 | if (swipeDirectionFromVelocity) { 62 | touch.el.trigger('swipe') 63 | touch.el.trigger('swipe'+ swipeDirectionFromVelocity) 64 | } 65 | }) 66 | .on('touchstart MSPointerDown pointerdown', function(e){ 67 | if((_isPointerType = isPointerEventType(e, 'down')) && 68 | !isPrimaryTouch(e)) return 69 | firstTouch = _isPointerType ? e : e.touches[0] 70 | if (e.touches && e.touches.length === 1 && touch.x2) { 71 | // Clear out touch movement data if we have it sticking around 72 | // This can occur if touchcancel doesn't fire due to preventDefault, etc. 73 | touch.x2 = undefined 74 | touch.y2 = undefined 75 | } 76 | now = Date.now() 77 | delta = now - (touch.last || now) 78 | touch.el = $('tagName' in firstTouch.target ? 79 | firstTouch.target : firstTouch.target.parentNode) 80 | touchTimeout && clearTimeout(touchTimeout) 81 | touch.x1 = firstTouch.pageX 82 | touch.y1 = firstTouch.pageY 83 | if (delta > 0 && delta <= 250) touch.isDoubleTap = true 84 | touch.last = now 85 | longTapTimeout = setTimeout(longTap, longTapDelay) 86 | // adds the current touch contact for IE gesture recognition 87 | if (gesture && _isPointerType) gesture.addPointer(e.pointerId) 88 | }) 89 | .on('touchmove MSPointerMove pointermove', function(e){ 90 | if((_isPointerType = isPointerEventType(e, 'move')) && 91 | !isPrimaryTouch(e)) return 92 | firstTouch = _isPointerType ? e : e.touches[0] 93 | cancelLongTap() 94 | touch.x2 = firstTouch.pageX 95 | touch.y2 = firstTouch.pageY 96 | 97 | deltaX += Math.abs(touch.x1 - touch.x2) 98 | deltaY += Math.abs(touch.y1 - touch.y2) 99 | }) 100 | .on('touchend MSPointerUp pointerup', function(e){ 101 | if((_isPointerType = isPointerEventType(e, 'up')) && 102 | !isPrimaryTouch(e)) return 103 | cancelLongTap() 104 | 105 | // swipe 106 | if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || 107 | (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) 108 | 109 | swipeTimeout = setTimeout(function() { 110 | if (touch.el){ 111 | touch.el.trigger('swipe') 112 | touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) 113 | } 114 | touch = {} 115 | }, 0) 116 | 117 | // normal tap 118 | else if ('last' in touch) 119 | // don't fire tap when delta position changed by more than 30 pixels, 120 | // for instance when moving to a point and back to origin 121 | if (deltaX < 30 && deltaY < 30) { 122 | // delay by one tick so we can cancel the 'tap' event if 'scroll' fires 123 | // ('tap' fires before 'scroll') 124 | tapTimeout = setTimeout(function() { 125 | 126 | // trigger universal 'tap' with the option to cancelTouch() 127 | // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) 128 | var event = $.Event('tap') 129 | event.cancelTouch = cancelAll 130 | // [by paper] fix -> "TypeError: 'undefined' is not an object (evaluating 'touch.el.trigger'), when double tap 131 | if (touch.el) touch.el.trigger(event) 132 | 133 | // trigger double tap immediately 134 | if (touch.isDoubleTap) { 135 | if (touch.el) touch.el.trigger('doubleTap') 136 | touch = {} 137 | } 138 | 139 | // trigger single tap after 250ms of inactivity 140 | else { 141 | touchTimeout = setTimeout(function(){ 142 | touchTimeout = null 143 | if (touch.el) touch.el.trigger('singleTap') 144 | touch = {} 145 | }, 250) 146 | } 147 | }, 0) 148 | } else { 149 | touch = {} 150 | } 151 | deltaX = deltaY = 0 152 | 153 | }) 154 | // when the browser window loses focus, 155 | // for example when a modal dialog is shown, 156 | // cancel all ongoing events 157 | .on('touchcancel MSPointerCancel pointercancel', cancelAll) 158 | 159 | // scrolling the window indicates intention of the user 160 | // to scroll, not tap or swipe, so cancel all ongoing events 161 | $(window).on('scroll', cancelAll) 162 | }) 163 | 164 | ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 165 | 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){ 166 | $.fn[eventName] = function(callback){ return this.on(eventName, callback) } 167 | }) 168 | })(Zepto) 169 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "elf-base-template", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "preloader.js": { 8 | "version": "1.0.0", 9 | "resolved": "https://registry.npmjs.org/preloader.js/-/preloader.js-1.0.0.tgz", 10 | "integrity": "sha1-4c07zY7hGUkCqR9kvf32SQ5NkFk=" 11 | }, 12 | "zepto": { 13 | "version": "1.2.0", 14 | "resolved": "https://registry.npmjs.org/zepto/-/zepto-1.2.0.tgz", 15 | "integrity": "sha1-4Se9nmb9hGvl6rSME5SIL3wOT5g=" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "elf-base-template", 3 | "version": "1.0.0", 4 | "description": "ELF Base Template", 5 | "scripts": { 6 | "start": "elf start", 7 | "build": "elf build" 8 | }, 9 | "devDependencies": {}, 10 | "dependencies": { 11 | "preloader.js": "1.0.0", 12 | "zepto": "^1.2.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/css/base.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | * { 3 | -webkit-tap-highlight-color: transparent; 4 | outline: 0; 5 | margin: 0; 6 | padding: 0; 7 | vertical-align: baseline; 8 | } 9 | 10 | html, 11 | body { 12 | width: 100%; 13 | height: 100%; 14 | } 15 | 16 | body, 17 | h1, 18 | h2, 19 | h3, 20 | h4, 21 | h5, 22 | h6, 23 | hr, 24 | p, 25 | blockquote, 26 | dl, 27 | dt, 28 | dd, 29 | ul, 30 | ol, 31 | li, 32 | pre, 33 | form, 34 | fieldset, 35 | legend, 36 | button, 37 | input, 38 | textarea, 39 | th, 40 | td { 41 | margin: 0; 42 | padding: 0; 43 | vertical-align: baseline; 44 | } 45 | 46 | img { 47 | border: 0 none; 48 | vertical-align: top; 49 | } 50 | 51 | i, 52 | em { 53 | font-style: normal; 54 | } 55 | 56 | ol, 57 | ul { 58 | list-style: none; 59 | } 60 | 61 | input, 62 | select, 63 | button, 64 | h1, 65 | h2, 66 | h3, 67 | h4, 68 | h5, 69 | h6 { 70 | font-size: 100%; 71 | font-family: inherit; 72 | } 73 | 74 | table { 75 | border-collapse: collapse; 76 | border-spacing: 0; 77 | } 78 | 79 | a { 80 | text-decoration: none; 81 | color: #666; 82 | } 83 | 84 | body { 85 | margin: 0 auto; 86 | min-width: 320px; 87 | max-width: 640px; 88 | height: 100%; 89 | font-size: 14px; 90 | /*font-family: Helvetica, STHeiti STXihei, Microsoft JhengHei, Microsoft YaHei, Arial;*/ 91 | font-family:Tahoma,Arial,Roboto,”Droid Sans”,”Helvetica Neue”,”Droid Sans Fallback”,”Heiti SC”,sans-self; 92 | line-height: 1.5; 93 | color: #21201E; 94 | -webkit-text-size-adjust: 100% !important; 95 | text-size-adjust: 100% !important; 96 | } 97 | 98 | input[type="text"], 99 | textarea { 100 | -webkit-appearance: none; 101 | -moz-appearance: none; 102 | appearance: none; 103 | } 104 | 105 | .hide { 106 | display: none !important; 107 | } -------------------------------------------------------------------------------- /src/css/icons.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/css/icons.scss -------------------------------------------------------------------------------- /src/css/loading.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | .loading { 3 | position: absolute; 4 | left: 0; 5 | right: 0; 6 | top: 0; 7 | bottom: 0; 8 | z-index: 9999; 9 | background-color: #21201E; 10 | .inner{ 11 | display: block; 12 | position: absolute; 13 | left: 50%; 14 | top: 50%; 15 | background-image: url(../img/unsprite/loading.png); 16 | width: 84px; 17 | height: 84px; 18 | margin: -42px -42px; 19 | animation: spin 2s linear infinite; 20 | background-size: 100% 100%; 21 | } 22 | // .before { 23 | // position: absolute; 24 | // top: 5px; 25 | // left: 5px; 26 | // right: 5px; 27 | // bottom: 5px; 28 | // border-radius: 50%; 29 | // border: 3px solid transparent; 30 | // border-top-color: #e74c3c; 31 | // animation: spin 3s linear infinite; 32 | // } 33 | // .after { 34 | // position: absolute; 35 | // top: 15px; 36 | // left: 15px; 37 | // right: 15px; 38 | // bottom: 15px; 39 | // border-radius: 50%; 40 | // border: 3px solid transparent; 41 | // border-top-color: #e74c3c; 42 | // border-bottom-color: #3498db; 43 | // animation: spin 1.5s linear infinite; 44 | // } 45 | // } 46 | // .inner { 47 | // display: block; 48 | // position: absolute; 49 | // left: 50%; 50 | // top: 50%; 51 | // width: 200px; 52 | // height: 200px; 53 | // margin: -100px 0 0 -100px; 54 | // border-radius: 50%; 55 | // border: 8px solid transparent; 56 | // border-top-color: #3498db; 57 | // animation: spin 2s linear infinite; 58 | // .before { 59 | // position: absolute; 60 | // top: 5px; 61 | // left: 5px; 62 | // right: 5px; 63 | // bottom: 5px; 64 | // border-radius: 50%; 65 | // border: 8px solid transparent; 66 | // border-top-color: #e74c3c; 67 | // animation: spin 3s linear infinite; 68 | // } 69 | // .after { 70 | // position: absolute; 71 | // top: 15px; 72 | // left: 15px; 73 | // right: 15px; 74 | // bottom: 15px; 75 | // border-radius: 50%; 76 | // border: 8px solid transparent; 77 | // border-top-color: #f9c922; 78 | // animation: spin 1.5s linear infinite; 79 | // } 80 | // } 81 | // .text { 82 | // // width: 100px; 83 | // // position: absolute; 84 | // // left: 50%; 85 | // // top: 50%; 86 | // // margin: -30px 0 0 -50px; 87 | // // line-height: 60px; 88 | // // font-size: 30px; 89 | // // text-align: center; 90 | // // color: #eadcdb; 91 | // &:before{ 92 | // content: ''; 93 | // @include img-bg('icon2/card4_004'); 94 | // position: absolute; 95 | // left: 50%; 96 | // top: 50%; 97 | // margin: -100px 0 0 -84px; 98 | // transform: scale(0.6); 99 | // } 100 | //} 101 | } 102 | 103 | @keyframes spin { 104 | 0% { 105 | transform: rotate(0deg); 106 | } 107 | 100% { 108 | transform: rotate(360deg); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/css/main.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "./base.css"; 3 | @mixin img-bg($name) { 4 | $url: '../img/#{$name}.png'; 5 | // background-size: size($url); 6 | background-image: url($url); 7 | background-repeat: no-repeat; 8 | } 9 | 10 | @mixin img-box($name) { 11 | $url: '../img/#{$name}.png'; 12 | width: width($url); 13 | height: height($url); 14 | } 15 | @import "./loading.scss"; 16 | @import "./myanimate.scss"; 17 | 18 | .main { 19 | width: 100%; 20 | height: 100%; 21 | background-color: #21201E; 22 | background-image: url(../img/unsprite/bg2.jpg); 23 | background-repeat: no-repeat; 24 | background-size: 100% 100%; 25 | display: flex; 26 | justify-content: center; 27 | align-items: center; 28 | .info { 29 | text-align: center; 30 | .name { 31 | margin: 0 auto 30px; 32 | width: 200px; 33 | height: 200px; 34 | line-height: 200px; 35 | background-color: #FFF; 36 | border-radius: 100%; 37 | font-size: 60px; 38 | text-transform: uppercase; 39 | } 40 | } 41 | } 42 | .audio{ 43 | position: absolute; 44 | top: 2%; 45 | right: 5%; 46 | z-index: 9; 47 | width: 100px; 48 | height: 100px; 49 | &:before{ 50 | content: ''; 51 | background-image: url(../img/icon/audio_on.png); 52 | background-repeat: no-repeat; 53 | position: absolute; 54 | top: 50%; 55 | left: 50%; 56 | width: 56px; 57 | height: 55px; 58 | transform: translate(-50%, -50%); 59 | } 60 | &.off{ 61 | &:before{ 62 | background-image: url(../img/icon/audio_off.png); 63 | } 64 | } 65 | } 66 | 67 | /* 箭头 */ 68 | .arraw{ 69 | position: absolute; 70 | display: block; 71 | width: 16px; 72 | height: 16px; 73 | position: absolute; 74 | bottom: 25px; 75 | left: 50%; 76 | margin-left: -11px; 77 | border: 6px solid transparent; 78 | border-top: 6px solid #ccc; 79 | border-left: 6px solid #ccc; 80 | z-index: 99; 81 | opacity: .8; 82 | -webkit-transform: rotate(45deg); 83 | -webkit-animation: arrow 1.5s infinite ease-in-out; 84 | } 85 | 86 | @-webkit-keyframes arrow { 87 | 0% { 88 | opacity:0; 89 | -webkit-transform:translate(0, 0px) rotate(45deg) 90 | } 91 | 60% { 92 | opacity:1; 93 | -webkit-transform:translate(0, -15px) rotate(45deg) 94 | } 95 | 100% { 96 | opacity:0; 97 | -webkit-transform:translate(0, -20px) rotate(45deg) 98 | } 99 | } 100 | 101 | body { 102 | overflow: hidden; 103 | font-size: 30px; 104 | background-color: #21201E; 105 | } 106 | .slider{ 107 | width: 100%; 108 | height: 100%; 109 | .slider-card{ 110 | text-align: center; 111 | display: flex; 112 | -webkit-box-pack: center; 113 | -ms-flex-pack: center; 114 | -webkit-justify-content: center; 115 | justify-content: center; 116 | -webkit-box-align: center; 117 | -ms-flex-align: center; 118 | -webkit-align-items: center; 119 | align-items: center; 120 | height: 100%; 121 | display: none; 122 | background-color: #21201E; 123 | background-image: url(../img/unsprite/bg.jpg); 124 | background-repeat: no-repeat; 125 | background-size: 100% 100%; 126 | .inner{ 127 | div{ 128 | display: none; 129 | } 130 | } 131 | &.slider-active{ 132 | display: block; 133 | .inner{ 134 | div{ 135 | display: block; 136 | } 137 | } 138 | } 139 | &.slider-out{ 140 | .iris{ 141 | animation: aniscaleto1 0.5s 0s 1 linear; 142 | animation-fill-mode: forwards; 143 | } 144 | } 145 | &.slider-in{ 146 | .iris{ 147 | animation: ani-scaleto0 0.5s 0s 1 linear; 148 | animation-fill-mode: forwards; 149 | } 150 | } 151 | } 152 | .card_border{ 153 | position: absolute; 154 | background-image: url(../img/unsprite/border1.png); 155 | background-repeat: no-repeat; 156 | background-size: 100% auto; 157 | background-position: top center; 158 | width: 100%; 159 | height: 100%; 160 | } 161 | .card6_border{ 162 | position: absolute; 163 | background-image: url(../img/unsprite/border3.png); 164 | background-repeat: no-repeat; 165 | background-size: 100% auto; 166 | background-position: top center; 167 | width: 100%; 168 | height: 100%; 169 | } 170 | .card7_border{ 171 | position: absolute; 172 | background-image: url(../img/unsprite/border2.png); 173 | background-repeat: no-repeat; 174 | background-size: 100% auto; 175 | background-position: top center; 176 | width: 100%; 177 | height: 100%; 178 | } 179 | .card_01{ 180 | @include img-bg('icon/card1_001'); 181 | left: 0; 182 | top: 0; 183 | position: absolute; 184 | z-index: 2; 185 | opacity: 0; 186 | animation: stretchLeft 1s ease 1s 1 both; 187 | } 188 | .card_02{ 189 | @include img-bg('icon/card1_002'); 190 | right: 0; 191 | top: 0; 192 | position: absolute; 193 | z-index: 2; 194 | opacity: 0; 195 | animation: stretchRight 1s ease 1.3s 1 both; 196 | } 197 | .card_03{ 198 | &:before{ 199 | content: ''; 200 | position: absolute; 201 | top: 0; 202 | left: 0; 203 | @include img-bg('icon/card1_003'); 204 | transform: scale(0.7); 205 | } 206 | @include img-box('icon/card1_003'); 207 | position: absolute; 208 | left: -56px; 209 | top: 40px; 210 | opacity: 0; 211 | animation: fadeInUp 1s ease 4.2s 1 both; 212 | } 213 | .card_04{ 214 | @include img-bg('icon/card1_004'); 215 | right: -64px; 216 | top: 0px; 217 | position: absolute; 218 | opacity: 0; 219 | animation: fadeInUp 1s ease 4.2s 1 both; 220 | } 221 | .card_05{ 222 | @include img-bg('icon/card1_005'); 223 | left: 70px; 224 | top: 100px; 225 | position: absolute; 226 | opacity: 0; 227 | animation: bounceIn 1s ease 1.6s 1 both; 228 | } 229 | .card_06{ 230 | @include img-bg('icon/card1_006'); 231 | left: 50%; 232 | margin-left: -250px; 233 | top: 320px; 234 | position: absolute; 235 | animation: pullUp 1s ease 3.2s 1 both; 236 | 237 | } 238 | .card_07{ 239 | @include img-bg('icon/card1_007'); 240 | left: 50%; 241 | margin-left: -300px; 242 | top: 460px; 243 | position: absolute; 244 | animation: rotateIn 1s ease 2.6s 1 both; 245 | } 246 | .card_08{ 247 | @include img-bg('icon/card1_008'); 248 | left: 50%; 249 | margin-left: -200px; 250 | top: 570px; 251 | position: absolute; 252 | animation: fadeInUp 1s ease 5s 1 both; 253 | } 254 | .card_09{ 255 | @include img-bg('icon/card1_009'); 256 | left: 50%; 257 | margin-left: -150px; 258 | top: 660px; 259 | position: absolute; 260 | animation: pullDown 1s ease 5.4s 1 both; 261 | } 262 | .card_10{ 263 | &:before{ 264 | content: ''; 265 | position: absolute; 266 | top: 0; 267 | left: 0; 268 | @include img-bg('icon/card1_010'); 269 | transform: scale(0.7); 270 | } 271 | @include img-box('icon/card1_010'); 272 | left: 50%; 273 | margin-left: -50px; 274 | top: 710px; 275 | position: absolute; 276 | animation: rotateIn 1s ease 5.8s 1 both; 277 | } 278 | .card_11{ 279 | @include img-bg('icon/card1_011'); 280 | left: 50%; 281 | margin-left: -320px; 282 | top: 820px; 283 | position: absolute; 284 | animation: fadeInLeft 1s ease 6s 1 both; 285 | } 286 | .card_11_2{ 287 | &:before{ 288 | content: ''; 289 | position: absolute; 290 | left: 0; 291 | top: 0; 292 | @include img-bg('icon/card1_011'); 293 | transform: rotate(180deg); 294 | } 295 | @include img-box('icon/card1_011'); 296 | left: 50%; 297 | margin-left: 120px; 298 | top: 810px; 299 | position: absolute; 300 | animation: fadeInRight 1s ease 6s 1 both; 301 | } 302 | .card_12{ 303 | @include img-bg('icon/card1_012'); 304 | left: 50%; 305 | margin-left: -90px; 306 | top: 948px; 307 | position: absolute; 308 | animation: zoomIn 1s ease 7.4s 1 both; 309 | } 310 | .card_13{ 311 | @include img-bg('icon/card1_013'); 312 | left: 50%; 313 | margin-left: -270px; 314 | top: 940px; 315 | position: absolute; 316 | animation: rotateInRightDown 1s ease 7.8s 1 both; 317 | } 318 | .card_13_2{ 319 | left: 50%; 320 | margin-left: 50px; 321 | top: 940px; 322 | position: absolute; 323 | &:before{ 324 | content: ''; 325 | position: absolute; 326 | left: 0; 327 | top: 0; 328 | @include img-bg('icon/card1_013'); 329 | transform: rotateY(180deg); 330 | } 331 | @include img-box('icon/card1_013'); 332 | animation: rotateInLeftDown 1s ease 7.8s 1 both; 333 | } 334 | .card_15{ 335 | @include img-bg('icon/card1_015'); 336 | left: 50%; 337 | margin-left: -100px; 338 | top: 1010px; 339 | position: absolute; 340 | animation: pullUp 1s ease 4.2s 1 both; 341 | } 342 | .card_16{ 343 | left: 50%; 344 | margin-left: -360px; 345 | top: 980px; 346 | position: absolute; 347 | &:before{ 348 | content: ''; 349 | position: absolute; 350 | left: 0; 351 | top: 0; 352 | @include img-bg('icon/card1_016'); 353 | transform: scale(0.6); 354 | } 355 | @include img-box('icon/card1_016'); 356 | animation: rotateInRightDown 1s ease 4.2s 1 both; 357 | } 358 | .card_16_2{ 359 | left: 50%; 360 | margin-left: 160px; 361 | top: 980px; 362 | position: absolute; 363 | &:before{ 364 | content: ''; 365 | position: absolute; 366 | left: 0; 367 | top: 0; 368 | @include img-bg('icon/card1_016'); 369 | transform: scale(0.6) rotateY(180deg); 370 | } 371 | @include img-box('icon/card1_016'); 372 | animation: rotateInLeftDown 1s ease 4.2s 1 both; 373 | } 374 | .name1{ 375 | word-wrap: break-word; 376 | font-size: 50px; 377 | font-weight: bold; 378 | font-style: normal; 379 | text-decoration: none; 380 | color: #f29ec4; 381 | text-align: center; 382 | text-shadow: none; 383 | left: 50%; 384 | margin-left: -200px; 385 | top: 738px; 386 | position: absolute; 387 | animation: bounceIn 1s ease 5.8s 1 both; 388 | } 389 | .name2{ 390 | word-wrap: break-word; 391 | font-size: 50px; 392 | font-weight: bold; 393 | font-style: normal; 394 | text-decoration: none; 395 | color: #f29ec4; 396 | text-align: center; 397 | text-shadow: none; 398 | left: 50%; 399 | margin-left: 50px; 400 | top: 740px; 401 | position: absolute; 402 | animation: bounceIn 1s ease 5.8s 1 both; 403 | } 404 | .month{ 405 | position: absolute; 406 | left: 50%; 407 | width: 300px; 408 | margin-left: -150px; 409 | top: 830px; 410 | color: #fefefe; 411 | animation: pullDown 1s ease 6.6s 1 both; 412 | } 413 | .date{ 414 | position: absolute; 415 | left: 50%; 416 | width: 600px; 417 | margin-left: -300px; 418 | top: 890px; 419 | color: #fefefe; 420 | animation: pullDown 1s ease 7s 1 both; 421 | } 422 | .card2_01{ 423 | position: absolute; 424 | @include img-bg('icon/card2_001'); 425 | left: 50%; 426 | top: 30px; 427 | margin-left: -200px; 428 | animation: fadeIn 1s ease 0.6s 1 both 429 | } 430 | .card2_02{ 431 | position: absolute; 432 | left: 50%; 433 | margin-left: 100px; 434 | top: 70px; 435 | @include img-box('icon/card2_002'); 436 | &:after{ 437 | content:''; 438 | @include img-bg('icon/card2_002'); 439 | position: absolute; 440 | top: 0; 441 | left: 0; 442 | transform: scale(0.7); 443 | } 444 | animation: rotateIn 1s ease 7s 1 both; 445 | } 446 | .card2_03{ 447 | position: absolute; 448 | left: -20px; 449 | top: -220px; 450 | @include img-box('icon/card2_003'); 451 | &:after{ 452 | content:''; 453 | @include img-bg('icon/card2_003'); 454 | position: absolute; 455 | top: 0; 456 | left: 0; 457 | transform: scale(0.6); 458 | } 459 | animation: pullDown 1s ease 6s 1 both; 460 | } 461 | .card2_04{ 462 | position: absolute; 463 | @include img-box('icon/card2_004'); 464 | right: -20px; 465 | top: -220px; 466 | &:after{ 467 | content:''; 468 | @include img-bg('icon/card2_004'); 469 | position: absolute; 470 | top: 0; 471 | left: 0; 472 | transform: scale(0.6); 473 | } 474 | animation: pullDown 1s ease 6.5s 1 both; 475 | } 476 | .card2_05{ 477 | position: absolute; 478 | top: 170px; 479 | left: 50%; 480 | margin-left: -250px; 481 | @include img-box('icon/card2_005'); 482 | animation: bounceIn 1s ease 0.6s 1 both; 483 | &:after{ 484 | content:''; 485 | @include img-bg('icon/card2_005'); 486 | position: absolute; 487 | top: 0; 488 | left: 0; 489 | } 490 | >img{ 491 | width: 360px; 492 | height: 360px; 493 | position: absolute; 494 | left: 50%; 495 | top: 50%; 496 | margin: -180px 0 0 -170px; 497 | } 498 | } 499 | .card2_06{ 500 | position: absolute; 501 | @include img-bg('icon/card2_006'); 502 | top: 640px; 503 | left: 50%; 504 | margin-left: -300px; 505 | animation: flipInY 1s ease 3s 1 both; 506 | } 507 | .card2_07{ 508 | position: absolute; 509 | @include img-bg('icon/card2_007'); 510 | top: 680px; 511 | left: 50%; 512 | margin-left: -130px; 513 | animation: zoomIn 1s ease 3s 1 both; 514 | } 515 | .card2_07_2{ 516 | position: absolute; 517 | @include img-bg('icon/card2_007_2'); 518 | top: 680px; 519 | left: 50%; 520 | margin-left: -130px; 521 | animation: zoomIn 1s ease 3s 1 both; 522 | } 523 | .card2_08{ 524 | position: absolute; 525 | @include img-bg('icon/card2_008'); 526 | left: 120px; 527 | top: 780px; 528 | animation: zoomIn 1s ease 5s 1 both; 529 | } 530 | .card2_09{ 531 | position: absolute; 532 | @include img-bg('icon/card2_009'); 533 | left: 50%; 534 | margin-left: -250px; 535 | top: 930px; 536 | animation: fadeInDown 1s ease 4s 1 both; 537 | } 538 | .card2_name{ 539 | width: 200px; 540 | color: #fefefe; 541 | position: absolute; 542 | left: 50%; 543 | top: 960px; 544 | margin-left: -100px; 545 | font-size: 36px; 546 | animation: fadeInDown 1s ease 4s 1 both; 547 | } 548 | .card2_10{ 549 | position: absolute; 550 | @include img-bg('icon/card2_010'); 551 | left: 50px; 552 | top: 840px; 553 | 554 | animation: pullUp 1s ease 4.5s 1 both 555 | } 556 | .card7_01{ 557 | position: absolute; 558 | @include img-bg('icon/card2_010'); 559 | left: 50px; 560 | top: 960px; 561 | } 562 | .card2_11{ 563 | position: absolute; 564 | @include img-box('icon2/card2_011'); 565 | right: 80px; 566 | top: 800px; 567 | &:after{ 568 | content:''; 569 | @include img-bg('icon2/card2_011'); 570 | position: absolute; 571 | top: 0; 572 | left: 0; 573 | transform: scale(0.7); 574 | } 575 | animation: fadeInDown 1s ease 5.5s 1 both; 576 | } 577 | .card7_02{ 578 | position: absolute; 579 | @include img-bg('icon2/card2_011'); 580 | right: 70px; 581 | top: 200px; 582 | transform: scale(0.7); 583 | } 584 | .card2_12{ 585 | position: absolute; 586 | @include img-box('icon2/card2_012'); 587 | left: -20px; 588 | top: 880px; 589 | &:after{ 590 | content:''; 591 | @include img-bg('icon2/card2_012'); 592 | position: absolute; 593 | top: 0; 594 | left: 0; 595 | transform: scale(0.8); 596 | } 597 | animation: fadeIn 1s ease 0.6s 1 both; 598 | } 599 | .card2_13{ 600 | position: absolute; 601 | @include img-bg('icon2/card2_013'); 602 | right: 40px; 603 | top: 910px; 604 | animation: fadeIn 1s ease 1.6s 1 both 605 | 606 | } 607 | .card2_14{ 608 | position: absolute; 609 | @include img-bg('icon2/card2_014'); 610 | right: -20px; 611 | top: 990px; 612 | animation: rotateInLeftDown 1s ease 0.6s 1 both; 613 | } 614 | } 615 | .iris{ 616 | width: 2000px; 617 | height: 2000px; 618 | background: #fff; 619 | border-radius: 1000px; 620 | position: absolute; 621 | left: 50%; 622 | top: 50%; 623 | margin: -1000px 0 0 -1000px; 624 | z-index: 100; 625 | &.iris0{ 626 | transform: scale(0); 627 | } 628 | } 629 | 630 | .card4_01{ 631 | position: absolute; 632 | @include img-bg('icon2/card4_001'); 633 | top: 30px; 634 | left: 50%; 635 | margin-left: -350px; 636 | animation: fadeInUp 1s ease 0.6s 1 both; 637 | } 638 | .card4_02{ 639 | position: absolute; 640 | @include img-bg('icon2/card4_002'); 641 | top: 110px; 642 | left: 50%; 643 | margin-left: -100px; 644 | animation: zoomIn 1s ease 1s 1 both; 645 | } 646 | .photo_4_1, .photo_4_2{ 647 | width: 660px; 648 | height: 400px; 649 | background-color: #eee; 650 | border: 1px solid #ccc; 651 | position: absolute; 652 | left: 50%; 653 | top: 200px; 654 | margin-left: -330px; 655 | .pin_l{ 656 | position: absolute; 657 | left: -25px; 658 | top: -30px; 659 | @include img-bg('icon2/card4_003'); 660 | } 661 | .pin_r{ 662 | position: absolute; 663 | right: -25px; 664 | top: -30px; 665 | @include img-bg('icon2/card4_003'); 666 | transform:rotateY(180deg); 667 | } 668 | .cont{ 669 | width: 600px; 670 | height:340px; 671 | margin: 30px auto; 672 | background-color: lightslategray; 673 | >img{ 674 | width: 100%; 675 | } 676 | } 677 | animation: rotateIn 1s ease 2s 1 both; 678 | } 679 | .photo_4_2{ 680 | top: 770px; 681 | animation: rotateIn 1s ease 4.5s 1 both; 682 | } 683 | .card4_03{ 684 | position: absolute; 685 | @include img-bg('icon2/card4_003'); 686 | } 687 | .card4_04{ 688 | position: absolute; 689 | @include img-box('icon2/card4_004'); 690 | right: -40px; 691 | top: 200px; 692 | 693 | &:after{ 694 | content:''; 695 | @include img-bg('icon2/card4_004'); 696 | position: absolute; 697 | top: 0; 698 | left: 0; 699 | transform: scale(0.6); 700 | } 701 | animation: bounceIn 1s ease 10s 1 both; 702 | } 703 | .card4_05{ 704 | position: absolute; 705 | @include img-box('icon2/card4_005'); 706 | left: -30px; 707 | top: 550px; 708 | transform: scale(0.6); 709 | &:after{ 710 | content:''; 711 | @include img-bg('icon2/card4_005'); 712 | position: absolute; 713 | top: 0; 714 | left: 0; 715 | transform: scale(0.6); 716 | } 717 | animation: fadeIn 1s ease 8s 1 both; 718 | } 719 | .card4_06{ 720 | position: absolute; 721 | @include img-bg('icon2/card4_006'); 722 | top: 560px; 723 | left: 50%; 724 | margin-left: -200px; 725 | animation: flipInY 1s ease 7s 1 both; 726 | } 727 | .card4_06_01{ 728 | @include img-box('icon/card1_016'); 729 | left: 50%; 730 | margin-left: -300px; 731 | top: 600px; 732 | position: absolute; 733 | &:after{ 734 | content:''; 735 | @include img-bg('icon/card1_016'); 736 | position: absolute; 737 | top: 0; 738 | left: 0; 739 | transform: scale(0.6); 740 | } 741 | animation: rotateInRightDown 1s ease 7s 1 both; 742 | } 743 | .card4_06_02{ 744 | @include img-box('icon/card1_016'); 745 | left: 50%; 746 | margin-left: 110px; 747 | top: 600px; 748 | position: absolute; 749 | &:after{ 750 | content:''; 751 | @include img-bg('icon/card1_016'); 752 | position: absolute; 753 | top: 0; 754 | left: 0; 755 | transform: scale(0.6) rotateY(180deg); 756 | } 757 | animation: rotateInLeftDown 1s ease 7s 1 both; 758 | } 759 | .card4_07{ 760 | position: absolute; 761 | @include img-bg('icon2/card4_007'); 762 | animation: bounceIn 1s ease 10s 1 both; 763 | } 764 | .card4_08{ 765 | position: absolute; 766 | @include img-bg('icon2/card4_008'); 767 | right: 30px; 768 | top: 930px; 769 | animation: fadeInDown 1s ease 8.5s 1 both; 770 | } 771 | .card5_01{ 772 | position: absolute; 773 | @include img-bg('icon2/card5_001'); 774 | left: 0; 775 | top: -70px; 776 | animation: fadeInLeft 1s ease 0.6s 1 both; 777 | } 778 | .card5_02{ 779 | position: absolute; 780 | @include img-box('icon2/card5_002'); 781 | left: 30px; 782 | top: 0; 783 | &:after{ 784 | content:''; 785 | @include img-bg('icon2/card5_002'); 786 | position: absolute; 787 | top: 0; 788 | left: 0; 789 | transform: scale(0.6); 790 | } 791 | animation: fadeInLeft 1s ease 1.2s 1 both; 792 | } 793 | .card5_03{ 794 | animation: fadeInDown 1s ease 1.6s 1 both; 795 | &:after{ 796 | content: ''; 797 | position: absolute; 798 | left: 0; 799 | top: 0; 800 | @include img-bg('icon2/card5_003'); 801 | } 802 | position: absolute; 803 | @include img-box('icon2/card5_003'); 804 | right: 0px; 805 | top: 200px; 806 | >img{ 807 | width: 250px; 808 | height: 220px; 809 | position: absolute; 810 | left: 50%; 811 | top: 50%; 812 | margin: -112px 0 0 -130px; 813 | } 814 | } 815 | .card5_04{ 816 | animation: rotateIn 1s ease 3.6s 1 both; 817 | &:after{ 818 | content: ''; 819 | position: absolute; 820 | left: 0; 821 | top: 0; 822 | @include img-bg('icon2/card5_004'); 823 | } 824 | position: absolute; 825 | @include img-box('icon2/card5_004'); 826 | left: 0; 827 | top: 350px; 828 | >img{ 829 | width: 280px; 830 | height: 280px; 831 | position: absolute; 832 | left: 50%; 833 | top: 50%; 834 | margin: -145px 0 0 -145px; 835 | } 836 | } 837 | .card5_05{ 838 | position: absolute; 839 | @include img-bg('icon2/card5_005'); 840 | right: 100px; 841 | top: 500px; 842 | animation: fadeInRight 1s ease 7.6s 1 both; 843 | } 844 | .card5_06{ 845 | position: absolute; 846 | @include img-bg('icon2/card5_006'); 847 | right: 20px; 848 | top: 500px; 849 | animation: pullDown 1s ease 2.6s 1 both; 850 | } 851 | .card5_07{ 852 | animation: fadeInLeft 1s ease 5.6s 1 both; 853 | &:after{ 854 | content: ''; 855 | position: absolute; 856 | left: 0; 857 | top: 0; 858 | @include img-bg('icon2/card5_007'); 859 | } 860 | position: absolute; 861 | @include img-box('icon2/card5_007'); 862 | left: 0; 863 | top: 700px; 864 | >img{ 865 | width: 450px; 866 | height: 326px; 867 | position: absolute; 868 | left: 50%; 869 | top: 50%; 870 | margin: -150px 0 0 -220px; 871 | } 872 | } 873 | .card6_01{ 874 | position: absolute; 875 | @include img-bg('icon2/card6_001'); 876 | left: 0; 877 | top: 30px; 878 | .card6_name1{ 879 | position: absolute; 880 | top: 80px; 881 | left: 100px; 882 | font-size: 32px; 883 | color: #fff; 884 | animation: zoomIn 1s ease 2.6s 1 both; 885 | } 886 | .card6_name2{ 887 | position: absolute; 888 | top: 140px; 889 | right: 90px; 890 | font-size: 32px; 891 | color: #fff; 892 | animation: zoomIn 1s ease 3s 1 both; 893 | } 894 | animation: bounceIn 1s ease 1.6s 1 both; 895 | } 896 | .card6_02{ 897 | position: absolute; 898 | @include img-bg('icon2/card6_002'); 899 | top: 300px; 900 | left: 30px; 901 | animation: fadeInDown 1s ease 1.6s 1 both; 902 | } 903 | .card6_03{ 904 | position: absolute; 905 | @include img-bg('icon2/card6_003'); 906 | right: 0; 907 | top: 0; 908 | 909 | animation: flipInX 1s ease 3s 1 both; 910 | } 911 | .map{ 912 | width: 500px; 913 | height: 250px; 914 | position: absolute; 915 | left: 50%; 916 | top: 470px; 917 | margin-left: -250px; 918 | background-color: #fefefe; 919 | img{ 920 | width: 100%; 921 | } 922 | .site_name{ 923 | width: 100%; 924 | position: absolute; 925 | bottom: -70px; 926 | text-align: center; 927 | color: #fefefe; 928 | } 929 | animation: fadeIn 1s ease 4s 1 both; 930 | } 931 | .card6_04{ 932 | position: absolute; 933 | @include img-bg('icon2/card6_004'); 934 | margin-left: -350px; 935 | top: 700px; 936 | left: 50%; 937 | font-size: 36px; 938 | color: #fefefe; 939 | .flag1{ 940 | position: absolute; 941 | left: 116px; 942 | top: 134px; 943 | transform: rotate(12deg); 944 | } 945 | .flag2{ 946 | position: absolute; 947 | @include img-box('icon2/card4_004'); 948 | left: 50%; 949 | top: 100px; 950 | margin-left: -80px; 951 | 952 | &:after{ 953 | content: ''; 954 | position: absolute; 955 | left: 0; 956 | top: 0; 957 | transform: scale(0.6); 958 | @include img-bg('icon2/card4_004'); 959 | } 960 | animation: fadeInDown 1s ease 7s 1 both; 961 | } 962 | .flag3{ 963 | position: absolute; 964 | right: 100px; 965 | top: 134px; 966 | transform: rotate(-12deg); 967 | } 968 | animation: pullDown 1s ease 5s 1 both; 969 | } 970 | .card6_05{ 971 | position: absolute; 972 | @include img-bg('icon2/card6_005'); 973 | margin-left: -300px; 974 | top: 1000px; 975 | left: 50%; 976 | animation: fadeInDown 1s ease 9s 1 both; 977 | } 978 | .card7_photo{ 979 | position: absolute; 980 | left: 50%; 981 | width: 500px; 982 | height: 300px; 983 | top: 110px; 984 | margin-left: -250px; 985 | .cont{ 986 | width:200px; 987 | height: 220px; 988 | background-color: #fefefe; 989 | margin: 0 auto; 990 | border: 1px solid #ddd; 991 | animation: fadeIn 1s ease 1s 1 both; 992 | >img{ 993 | width: 100%; 994 | height: 100%; 995 | } 996 | } 997 | .btm1{ 998 | position: absolute; 999 | @include img-bg('icon/card1_015'); 1000 | left: 50%; 1001 | bottom: 0; 1002 | margin-left: -100px; 1003 | animation: pullUp 1s ease 2s 1 both; 1004 | } 1005 | .btm2{ 1006 | @include img-box('icon/card1_016'); 1007 | left: 50%; 1008 | margin-left: -200px; 1009 | bottom: -20px; 1010 | position: absolute; 1011 | &:after{ 1012 | content: ''; 1013 | position: absolute; 1014 | left: 0; 1015 | top: 0; 1016 | transform: scale(0.6); 1017 | @include img-bg('icon/card1_016'); 1018 | } 1019 | animation: rotateInRightDown 1s ease 2.6s 1 both; 1020 | } 1021 | .btm3{ 1022 | @include img-box('icon/card1_016'); 1023 | left: 50%; 1024 | margin-left: 0px; 1025 | bottom: -20px; 1026 | position: absolute; 1027 | 1028 | &:after{ 1029 | content: ''; 1030 | position: absolute; 1031 | left: 0; 1032 | top: 0; 1033 | transform: scale(0.6) rotateY(180deg); 1034 | @include img-bg('icon/card1_016'); 1035 | } 1036 | animation: rotateInLeftDown 1s ease 2.6s 1 both; 1037 | } 1038 | } 1039 | .formbox{ 1040 | width: 500px; 1041 | position: absolute; 1042 | left: 50%; 1043 | top: 500px; 1044 | margin-left: -250px; 1045 | >input{ 1046 | padding: 5px 5%; 1047 | border: 0; 1048 | background-color: #fff; 1049 | height: 60px; 1050 | width: 90%; 1051 | line-height: 50px; 1052 | color: #666; 1053 | margin-bottom: 40px; 1054 | } 1055 | >textarea{ 1056 | font-size: 100%; 1057 | padding: 5px 5%; 1058 | border: 0; 1059 | background-color: #fff; 1060 | height: 160px; 1061 | width: 90%; 1062 | line-height: 50px; 1063 | color: #666; 1064 | margin-bottom: 40px; 1065 | } 1066 | .save{ 1067 | width: 100%; 1068 | background-color: rgb(98, 166, 143); 1069 | line-height: 70px; 1070 | height: 70px; 1071 | color: #ddd; 1072 | font-weight: normal; 1073 | border: 0; 1074 | } 1075 | } 1076 | @keyframes arrowAni{ 1077 | 0%{ 1078 | transform: translate3d(0, 0, 0) rotate(0deg); 1079 | } 1080 | 50%{ 1081 | transform: translate3d(10px, -50px, 0) rotate(-10deg); 1082 | } 1083 | 100%{ 1084 | transform: translate3d(0, 0, 0) rotate(0deg); 1085 | } 1086 | } 1087 | 1088 | @keyframes aniscaleto1 { 1089 | 0% { 1090 | transform:scale(0) 1091 | } 1092 | 100% { 1093 | transform:scale(1) 1094 | } 1095 | } 1096 | 1097 | @keyframes ani-scaleto0 { 1098 | 0% { 1099 | transform:scale(1) 1100 | } 1101 | 100% { 1102 | transform:scale(0) 1103 | } 1104 | } 1105 | #_embed_v3_main{ 1106 | display: none; 1107 | } -------------------------------------------------------------------------------- /src/css/myanimate.scss: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes stretchRight{ 2 | 0%{opacity:0;-moz-transform:scaleX(.3);transform:scaleX(.3)} 3 | 40%{opacity:1;-moz-transform:scaleX(1.02);transform:scaleX(1.02)} 4 | 100%,60%{opacity:1; -moz-transform:scaleX(.98);transform:scaleX(.98)} 5 | 80%{opacity:1;-moz-transform:scaleX(1.01);transform:scaleX(1.01)} 6 | 100%{opacity:1;-moz-transform:scaleX(1);transform:scaleX(1)} 7 | } 8 | 9 | @-webkit-keyframes stretchLeft{0%{opacity:0;-moz-transform:scaleX(.3);transform:scaleX(.3)}40%{opacity:1;-moz-transform:scaleX(1.02);transform:scaleX(1.02)}100%,60%{opacity:1;-moz-transform:scaleX(.98);transform:scaleX(.98)}80%{opacity:1;-moz-transform:scaleX(1.01);transform:scaleX(1.01)}100%{opacity:1;-moz-transform:scaleX(1);transform:scaleX(1)}} 10 | 11 | @-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,-100px,0);transform:translate3d(0,-100px,0)}100%{opacity:1;-webkit-transform:none;transform:none}} 12 | 13 | @-webkit-keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}} 14 | 15 | 16 | @-webkit-keyframes pullUp{0%{opacity:0;-moz-transform:scaleY(.1)translateZ(0);transform:scaleY(.1)translateZ(0)}40%{opacity:1;-moz-transform:scaleY(1.02);transform:scaleY(1.02)}100%,60%{-moz-transform:scaleY(.98);transform:scaleY(.98)}80%{-moz-transform:scaleY(1.01);transform:scaleY(1.01)}100%{-moz-transform:scaleY(1);transform:scaleY(1)}} 17 | 18 | @-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}} 19 | 20 | @-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,-100px,0);transform:translate3d(0,-100px,0)}100%{opacity:1;-webkit-transform:none;transform:none}} 21 | 22 | @-webkit-keyframes pullDown{0%{opacity:0;-moz-transform:scaleY(.1)translateZ(0);transform:scaleY(.1)translateZ(0)}40%{opacity:1;-moz-transform:scaleY(1.02)translateZ(0);transform:scaleY(1.02)translateZ(0)}100%,60%{-moz-transform:scaleY(.98)translateZ(0);transform:scaleY(.98)translateZ(0)}80%{-moz-transform:scaleY(1.01)translateZ(0);transform:scaleY(1.01)translateZ(0)}100%{-moz-transform:scaleY(1)translateZ(0);transform:scaleY(1)translateZ(0)}} 23 | 24 | @-webkit-keyframes fadeInLeftDown{0%{opacity:0;-webkit-transform:translate3d(-100px,100px,0);transform:translate3d(-100px,100px,0)}100%{opacity:1;-webkit-transform:none;transform:none}} 25 | 26 | @-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100px,0,0);transform:translate3d(100px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}} 27 | 28 | @-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100px,0,0);transform:translate3d(-100px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}} 29 | 30 | @-webkit-keyframes rotateInRightDown{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}} 31 | 32 | @-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%,50%{opacity:1}} 33 | 34 | @-webkit-keyframes rotateInLeftDown{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}} 35 | 36 | @keyframes fadeIn{0%{opacity:0}100%{opacity:1}} 37 | 38 | @keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}} 39 | 40 | @keyframes flipInY{0%{-webkit-transform:perspective(400px)rotateY(90deg)translateZ(0);-moz-transform:perspective(400px)rotateY(90deg)translateZ(0);transform:perspective(400px)rotateY(90deg)translateZ(0);opacity:0}40%{-webkit-transform:perspective(400px)rotateY(-10deg)translateZ(0);transform:perspective(400px)rotateY(-10deg)translateZ(0)}70%{-webkit-transform:perspective(400px)rotateY(10deg)translateZ(0);transform:perspective(400px)rotateY(10deg)translateZ(0)}100%{-webkit-transform:perspective(400px)rotateY(0)translateZ(0);transform:perspective(400px)rotateY(0)translateZ(0);opacity:1}} 41 | 42 | @keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,100px,0);transform:translate3d(0,100px,0)}100%{opacity:1}} 43 | 44 | @keyframes rotateInLeftDown{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}} 45 | 46 | @keyframes flipInX{0%{-webkit-transform:perspective(400px)rotateX(90deg);transform:perspective(400px)rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px)rotateX(-10deg);transform:perspective(400px)rotateX(-10deg)}70%{-webkit-transform:perspective(400px)rotateX(10deg);transform:perspective(400px)rotateX(10deg)}100%{-webkit-transform:perspective(400px)rotateX(0);transform:perspective(400px)rotateX(0);opacity:1}} -------------------------------------------------------------------------------- /src/img/icon/audio_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/audio_off.png -------------------------------------------------------------------------------- /src/img/icon/audio_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/audio_on.png -------------------------------------------------------------------------------- /src/img/icon/card1_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_001.png -------------------------------------------------------------------------------- /src/img/icon/card1_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_002.png -------------------------------------------------------------------------------- /src/img/icon/card1_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_003.png -------------------------------------------------------------------------------- /src/img/icon/card1_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_004.png -------------------------------------------------------------------------------- /src/img/icon/card1_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_005.png -------------------------------------------------------------------------------- /src/img/icon/card1_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_006.png -------------------------------------------------------------------------------- /src/img/icon/card1_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_007.png -------------------------------------------------------------------------------- /src/img/icon/card1_008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_008.png -------------------------------------------------------------------------------- /src/img/icon/card1_009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_009.png -------------------------------------------------------------------------------- /src/img/icon/card1_010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_010.png -------------------------------------------------------------------------------- /src/img/icon/card1_011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_011.png -------------------------------------------------------------------------------- /src/img/icon/card1_012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_012.png -------------------------------------------------------------------------------- /src/img/icon/card1_013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_013.png -------------------------------------------------------------------------------- /src/img/icon/card1_014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_014.png -------------------------------------------------------------------------------- /src/img/icon/card1_015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_015.png -------------------------------------------------------------------------------- /src/img/icon/card1_016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card1_016.png -------------------------------------------------------------------------------- /src/img/icon/card2_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_001.png -------------------------------------------------------------------------------- /src/img/icon/card2_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_002.png -------------------------------------------------------------------------------- /src/img/icon/card2_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_003.png -------------------------------------------------------------------------------- /src/img/icon/card2_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_004.png -------------------------------------------------------------------------------- /src/img/icon/card2_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_005.png -------------------------------------------------------------------------------- /src/img/icon/card2_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_006.png -------------------------------------------------------------------------------- /src/img/icon/card2_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_007.png -------------------------------------------------------------------------------- /src/img/icon/card2_007_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_007_2.png -------------------------------------------------------------------------------- /src/img/icon/card2_008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_008.png -------------------------------------------------------------------------------- /src/img/icon/card2_009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_009.png -------------------------------------------------------------------------------- /src/img/icon/card2_010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon/card2_010.png -------------------------------------------------------------------------------- /src/img/icon2/card2_011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card2_011.png -------------------------------------------------------------------------------- /src/img/icon2/card2_012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card2_012.png -------------------------------------------------------------------------------- /src/img/icon2/card2_013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card2_013.png -------------------------------------------------------------------------------- /src/img/icon2/card2_014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card2_014.png -------------------------------------------------------------------------------- /src/img/icon2/card4_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_001.png -------------------------------------------------------------------------------- /src/img/icon2/card4_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_002.png -------------------------------------------------------------------------------- /src/img/icon2/card4_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_003.png -------------------------------------------------------------------------------- /src/img/icon2/card4_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_004.png -------------------------------------------------------------------------------- /src/img/icon2/card4_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_005.png -------------------------------------------------------------------------------- /src/img/icon2/card4_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_006.png -------------------------------------------------------------------------------- /src/img/icon2/card4_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_007.png -------------------------------------------------------------------------------- /src/img/icon2/card4_008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card4_008.png -------------------------------------------------------------------------------- /src/img/icon2/card5_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_001.png -------------------------------------------------------------------------------- /src/img/icon2/card5_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_002.png -------------------------------------------------------------------------------- /src/img/icon2/card5_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_003.png -------------------------------------------------------------------------------- /src/img/icon2/card5_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_004.png -------------------------------------------------------------------------------- /src/img/icon2/card5_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_005.png -------------------------------------------------------------------------------- /src/img/icon2/card5_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_006.png -------------------------------------------------------------------------------- /src/img/icon2/card5_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card5_007.png -------------------------------------------------------------------------------- /src/img/icon2/card6_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card6_001.png -------------------------------------------------------------------------------- /src/img/icon2/card6_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card6_002.png -------------------------------------------------------------------------------- /src/img/icon2/card6_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card6_003.png -------------------------------------------------------------------------------- /src/img/icon2/card6_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card6_004.png -------------------------------------------------------------------------------- /src/img/icon2/card6_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/card6_005.png -------------------------------------------------------------------------------- /src/img/icon2/icon_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/icon_music.png -------------------------------------------------------------------------------- /src/img/icon2/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/share.png -------------------------------------------------------------------------------- /src/img/icon2/thanks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/icon2/thanks.png -------------------------------------------------------------------------------- /src/img/sprite.icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/sprite.icon.png -------------------------------------------------------------------------------- /src/img/sprite.icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/sprite.icon2.png -------------------------------------------------------------------------------- /src/img/unsprite/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/bg.jpg -------------------------------------------------------------------------------- /src/img/unsprite/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/bg2.jpg -------------------------------------------------------------------------------- /src/img/unsprite/border1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/border1.png -------------------------------------------------------------------------------- /src/img/unsprite/border2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/border2.png -------------------------------------------------------------------------------- /src/img/unsprite/border3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/border3.png -------------------------------------------------------------------------------- /src/img/unsprite/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/loading.png -------------------------------------------------------------------------------- /src/img/unsprite/map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/map.jpg -------------------------------------------------------------------------------- /src/img/unsprite/map2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/map2.jpg -------------------------------------------------------------------------------- /src/img/unsprite/map2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/map2.png -------------------------------------------------------------------------------- /src/img/unsprite/pic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic1.png -------------------------------------------------------------------------------- /src/img/unsprite/pic10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic10.jpg -------------------------------------------------------------------------------- /src/img/unsprite/pic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic2.png -------------------------------------------------------------------------------- /src/img/unsprite/pic5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic5.jpg -------------------------------------------------------------------------------- /src/img/unsprite/pic6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic6.jpg -------------------------------------------------------------------------------- /src/img/unsprite/pic7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic7.jpg -------------------------------------------------------------------------------- /src/img/unsprite/pic8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic8.jpg -------------------------------------------------------------------------------- /src/img/unsprite/pic9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/pic9.jpg -------------------------------------------------------------------------------- /src/img/unsprite/share.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/img/unsprite/share.jpg -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | > 3 | 4 | 5 | 6 | 7 | 8 | 9 | 我们要结婚啦!lizhi&wuqin 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 |
24 |
loading
25 |
26 | 27 | 28 |
29 | 30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
lizhi
58 |
zero   琴
59 |
五月六日
60 |
星期六 上午 11:00
61 |
62 |
63 |
64 | 65 |
66 |
67 |
68 |
69 |
70 | 71 |
72 |
73 |
74 |
75 |
76 |
范 立 之
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | 85 |
86 |
87 |
88 |
89 |
90 | 91 |
92 |
93 |
94 |
95 |
96 |
zero   琴
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | 105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | 113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | 125 |
126 |
127 |
128 |
129 |
130 |
131 | 132 |
133 |
134 |
135 | 136 |
137 |
138 | 139 |
140 |
141 |
142 |
143 | 144 |
145 |
146 |
147 | 148 |
149 |
150 |
lizhi
151 |
wuqin
152 |
153 |
154 |
155 |
156 | 157 |
十堰三堰九头鸟云鹤酒店
158 |
159 |
160 |
2017
05.01
161 |
162 |
不见
不散
163 |
164 |
165 |
166 |
167 | 168 |
169 |
170 |
171 | 172 |
173 |
174 |
175 |
176 |
177 |
178 | 179 | 180 | 181 |
182 |
183 |
184 |
185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /src/js/lib/iriswipe.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @author lizhi 5 | * @date 2016-4-20 6 | * @desc 虹膜转场 7 | */ 8 | 9 | (function () { 10 | var lastTime = 0; 11 | var vendors = ['ms', 'moz', 'webkit', 'o']; 12 | for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 13 | window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; 14 | window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] 15 | || window[vendors[x] + 'CancelRequestAnimationFrame']; 16 | } 17 | 18 | if (!window.requestAnimationFrame) 19 | window.requestAnimationFrame = function (callback, element) { 20 | var currTime = new Date().getTime(); 21 | var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 22 | var id = window.setTimeout(function () { callback(currTime + timeToCall); }, 23 | timeToCall); 24 | lastTime = currTime + timeToCall; 25 | return id; 26 | }; 27 | 28 | if (!window.cancelAnimationFrame) 29 | window.cancelAnimationFrame = function (id) { 30 | clearTimeout(id); 31 | }; 32 | }()); 33 | 34 | (function (root, factory) { 35 | if (window.Zepto) { 36 | module.exports = factory(Zepto) 37 | } else { 38 | throw 'needs zepto' 39 | } 40 | }(this, function ($) { 41 | 'use strict'; 42 | 43 | /* 44 | * Tween.js 45 | * t: current time(当前时间); 46 | * b: beginning value(初始值); 47 | * c: change in value(变化量); 48 | * d: duration(持续时间)。 49 | * you can visit 'http://easings.net/zh-cn' to get easing 50 | */ 51 | var Tween = { 52 | Linear: function (t, b, c, d) { return c * t / d + b; }, 53 | Quad: { 54 | easeIn: function (t, b, c, d) { 55 | return c * (t /= d) * t + b; 56 | }, 57 | easeOut: function (t, b, c, d) { 58 | return -c * (t /= d) * (t - 2) + b; 59 | }, 60 | easeInOut: function (t, b, c, d) { 61 | if ((t /= d / 2) < 1) return c / 2 * t * t + b; 62 | return -c / 2 * ((--t) * (t - 2) - 1) + b; 63 | } 64 | }, 65 | Cubic: { 66 | easeIn: function (t, b, c, d) { 67 | return c * (t /= d) * t * t + b; 68 | }, 69 | easeOut: function (t, b, c, d) { 70 | return c * ((t = t / d - 1) * t * t + 1) + b; 71 | }, 72 | easeInOut: function (t, b, c, d) { 73 | if ((t /= d / 2) < 1) return c / 2 * t * t * t + b; 74 | return c / 2 * ((t -= 2) * t * t + 2) + b; 75 | } 76 | }, 77 | Quart: { 78 | easeIn: function (t, b, c, d) { 79 | return c * (t /= d) * t * t * t + b; 80 | }, 81 | easeOut: function (t, b, c, d) { 82 | return -c * ((t = t / d - 1) * t * t * t - 1) + b; 83 | }, 84 | easeInOut: function (t, b, c, d) { 85 | if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b; 86 | return -c / 2 * ((t -= 2) * t * t * t - 2) + b; 87 | } 88 | }, 89 | Quint: { 90 | easeIn: function (t, b, c, d) { 91 | return c * (t /= d) * t * t * t * t + b; 92 | }, 93 | easeOut: function (t, b, c, d) { 94 | return c * ((t = t / d - 1) * t * t * t * t + 1) + b; 95 | }, 96 | easeInOut: function (t, b, c, d) { 97 | if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b; 98 | return c / 2 * ((t -= 2) * t * t * t * t + 2) + b; 99 | } 100 | }, 101 | Sine: { 102 | easeIn: function (t, b, c, d) { 103 | return -c * Math.cos(t / d * (Math.PI / 2)) + c + b; 104 | }, 105 | easeOut: function (t, b, c, d) { 106 | return c * Math.sin(t / d * (Math.PI / 2)) + b; 107 | }, 108 | easeInOut: function (t, b, c, d) { 109 | return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b; 110 | } 111 | }, 112 | Expo: { 113 | easeIn: function (t, b, c, d) { 114 | return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b; 115 | }, 116 | easeOut: function (t, b, c, d) { 117 | return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b; 118 | }, 119 | easeInOut: function (t, b, c, d) { 120 | if (t == 0) return b; 121 | if (t == d) return b + c; 122 | if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b; 123 | return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b; 124 | } 125 | }, 126 | Circ: { 127 | easeIn: function (t, b, c, d) { 128 | return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b; 129 | }, 130 | easeOut: function (t, b, c, d) { 131 | return c * Math.sqrt(1 - (t = t / d - 1) * t) + b; 132 | }, 133 | easeInOut: function (t, b, c, d) { 134 | if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b; 135 | return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b; 136 | } 137 | }, 138 | Elastic: { 139 | easeIn: function (t, b, c, d, a, p) { 140 | var s; 141 | if (t == 0) return b; 142 | if ((t /= d) == 1) return b + c; 143 | if (typeof p == "undefined") p = d * .3; 144 | if (!a || a < Math.abs(c)) { 145 | s = p / 4; 146 | a = c; 147 | } else { 148 | s = p / (2 * Math.PI) * Math.asin(c / a); 149 | } 150 | return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; 151 | }, 152 | easeOut: function (t, b, c, d, a, p) { 153 | var s; 154 | if (t == 0) return b; 155 | if ((t /= d) == 1) return b + c; 156 | if (typeof p == "undefined") p = d * .3; 157 | if (!a || a < Math.abs(c)) { 158 | a = c; 159 | s = p / 4; 160 | } else { 161 | s = p / (2 * Math.PI) * Math.asin(c / a); 162 | } 163 | return (a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b); 164 | }, 165 | easeInOut: function (t, b, c, d, a, p) { 166 | var s; 167 | if (t == 0) return b; 168 | if ((t /= d / 2) == 2) return b + c; 169 | if (typeof p == "undefined") p = d * (.3 * 1.5); 170 | if (!a || a < Math.abs(c)) { 171 | a = c; 172 | s = p / 4; 173 | } else { 174 | s = p / (2 * Math.PI) * Math.asin(c / a); 175 | } 176 | if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; 177 | return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b; 178 | } 179 | }, 180 | Back: { 181 | easeIn: function (t, b, c, d, s) { 182 | if (typeof s == "undefined") s = 1.70158; 183 | return c * (t /= d) * t * ((s + 1) * t - s) + b; 184 | }, 185 | easeOut: function (t, b, c, d, s) { 186 | if (typeof s == "undefined") s = 1.70158; 187 | return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; 188 | }, 189 | easeInOut: function (t, b, c, d, s) { 190 | if (typeof s == "undefined") s = 1.70158; 191 | if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; 192 | return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; 193 | } 194 | }, 195 | Bounce: { 196 | easeIn: function (t, b, c, d) { 197 | return c - Tween.Bounce.easeOut(d - t, 0, c, d) + b; 198 | }, 199 | easeOut: function (t, b, c, d) { 200 | if ((t /= d) < (1 / 2.75)) { 201 | return c * (7.5625 * t * t) + b; 202 | } else if (t < (2 / 2.75)) { 203 | return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b; 204 | } else if (t < (2.5 / 2.75)) { 205 | return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b; 206 | } else { 207 | return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b; 208 | } 209 | }, 210 | easeInOut: function (t, b, c, d) { 211 | if (t < d / 2) { 212 | return Tween.Bounce.easeIn(t * 2, 0, c, d) * .5 + b; 213 | } else { 214 | return Tween.Bounce.easeOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b; 215 | } 216 | } 217 | } 218 | } 219 | 220 | 221 | var _defualtOption = { 222 | duration: 1000, 223 | easing: 'Linear', 224 | x: 0, 225 | y: 0, 226 | bgcolor: '#000', 227 | zIndex: 100 228 | }, 229 | _RADIUS = 0 230 | 231 | var WIDTH = 0, HEIGHT = 0, $el = 0, OPTIONS = 0, CTX = 0, _start = 0, _end = 0, _StartTime, radius = 0, cb = 0 232 | 233 | var Iris = function (options) { 234 | // var opts = $.extend({}, _defualtOption, options) 235 | _init(options || {}) 236 | return Iris 237 | } 238 | 239 | var _init = function (opts) { 240 | var canvas = document.createElement('canvas'); 241 | WIDTH = canvas.width = $(window).width() 242 | HEIGHT = canvas.height = $(window).height() 243 | $el = $(canvas) 244 | _defualtOption.x = WIDTH / 2 245 | _defualtOption.y = HEIGHT / 2 246 | OPTIONS = $.extend({}, _defualtOption, opts) 247 | $el.css({ 248 | width: WIDTH + 'px', 249 | height: HEIGHT + 'px', 250 | position: 'absolute', 251 | left: 0, 252 | top: 0, 253 | 'z-index': opts.zIndex || 100, 254 | 'display': 'none' 255 | }) 256 | CTX = canvas.getContext('2d') 257 | $('body').append(canvas) 258 | } 259 | 260 | var setRadius = function (x, y, w, h) { 261 | w = w || WIDTH 262 | h = h || HEIGHT 263 | var xGap = Math.max((w - x), x), 264 | yGap = Math.max((h - y), y) 265 | _RADIUS = Math.ceil(Math.sqrt((xGap * xGap) + (yGap * yGap))) 266 | return _RADIUS; 267 | } 268 | 269 | var circle = function () { 270 | CTX.clearRect(0, 0, WIDTH, HEIGHT); 271 | CTX.fillStyle = OPTIONS.bgcolor; 272 | CTX.fillRect(0, 0, WIDTH, HEIGHT); 273 | CTX.globalCompositeOperation = "destination-out"; 274 | CTX.beginPath(); 275 | CTX.fillStyle = "red"; 276 | CTX.arc(OPTIONS.x, OPTIONS.y, radius, 0, 2 * Math.PI); 277 | CTX.fill(); 278 | CTX.globalCompositeOperation = "source-over"; 279 | } 280 | 281 | var _showCanvas = function () { 282 | $el.css({ 'display': 'block' }) 283 | } 284 | 285 | var _hideCanvas = function () { 286 | $el.css({ 'display': 'none' }) 287 | } 288 | 289 | var draw = function () { 290 | var time = new Date().getTime() - _StartTime 291 | if (time > 0) { 292 | radius = OPTIONS.easing(time, _start, _end - _start, OPTIONS.duration) 293 | } else { 294 | radius = _start 295 | } 296 | if (time >= OPTIONS.duration) { 297 | window.cancelAnimationFrame(draw) 298 | _hideCanvas() 299 | cb && cb() 300 | return 301 | } 302 | circle() 303 | window.requestAnimationFrame(draw) 304 | } 305 | 306 | var initOptions = function (opt) { 307 | opt = opt || {} 308 | OPTIONS = $.extend({}, OPTIONS, opt) 309 | _RADIUS = setRadius(OPTIONS.x, OPTIONS.y, WIDTH, HEIGHT) 310 | if (opt.compelate && typeof opt.compelate === 'function') { 311 | cb = opt.compelate 312 | } else { 313 | cb = 0 314 | } 315 | if (OPTIONS.easing && typeof OPTIONS.easing === 'string') { 316 | var easing = OPTIONS.easing.slice(0, 1).toUpperCase() + OPTIONS.easing.slice(1); 317 | var arrKeyTween = easing.split('.'); 318 | var fnGetValue; 319 | if (arrKeyTween.length == 1) { 320 | fnGetValue = Tween[arrKeyTween[0]]; 321 | } else if (arrKeyTween.length == 2) { 322 | fnGetValue = Tween[arrKeyTween[0]] && Tween[arrKeyTween[0]][arrKeyTween[1]]; 323 | } 324 | if (typeof fnGetValue !== 'function') { 325 | console.error('没有找到名为"' + options.easing + '"的动画算法'); 326 | return; 327 | } 328 | OPTIONS.easing = fnGetValue 329 | } 330 | } 331 | 332 | Iris.show = function (opt) { //放大 333 | initOptions(opt) 334 | _start = 0 335 | _end = _RADIUS 336 | _StartTime = new Date().getTime() 337 | _showCanvas() 338 | window.requestAnimationFrame(draw) 339 | } 340 | 341 | Iris.hide = function (opt) { //缩小 342 | initOptions(opt) 343 | _start = _RADIUS 344 | _end = 0 345 | _StartTime = new Date().getTime() 346 | _showCanvas() 347 | window.requestAnimationFrame(draw) 348 | } 349 | 350 | return Iris 351 | })); -------------------------------------------------------------------------------- /src/js/lib/preloader.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | if (typeof define === 'function' && define.amd) { 3 | // AMD 4 | define([], factory) 5 | } else if (typeof module === 'object' && module.exports) { 6 | // CMD 7 | module.exports = factory() 8 | } else { 9 | // Browser globals (root is window) 10 | root.Orientation = factory() 11 | } 12 | } (this, function () { 13 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign 14 | var assign = Object.assign || function (target) { 15 | 'use strict' 16 | 17 | if (target === undefined || target === null) { 18 | throw new TypeError('Cannot convert undefined or null to object') 19 | } 20 | 21 | var output = Object(target) 22 | for (var index = 1; index < arguments.length; index++) { 23 | var source = arguments[index] 24 | if (source !== undefined && source !== null) { 25 | for (var nextKey in source) { 26 | if (Object.prototype.hasOwnProperty.call(source, nextKey)) { 27 | output[nextKey] = source[nextKey] 28 | } 29 | } 30 | } 31 | } 32 | return output 33 | } 34 | 35 | 36 | var Preloader = function (options) { 37 | this.opts = assign({ 38 | resources: [], 39 | concurrency: 0, 40 | perMinTime: 0, 41 | attr: 'preload', 42 | onProgress: null, 43 | onCompletion: null 44 | }, options) 45 | 46 | var preloads = document.querySelectorAll('[' + this.opts.attr + ']') 47 | for (var i = 0; i < preloads.length; i++) { 48 | var preload = preloads[i] 49 | if (preload.src) this.opts.resources.push(preload.src) 50 | } 51 | 52 | this.length = this.opts.resources.length 53 | this.completedCount = 0 54 | this.loadingIndex = 0 55 | this.resourceMap = {} 56 | 57 | this.done = function (resource, instance) { 58 | this.completedCount += 1 59 | this.resourceMap[resource] = instance 60 | 61 | this.onProgress && this.onProgress(this.completedCount, this.length, resource) 62 | if (this.completedCount >= this.length) { 63 | this.onCompletion && this.onCompletion(this.length) 64 | } else if (this.opts.concurrency > 0) { 65 | this.loader() 66 | } 67 | } 68 | 69 | this.loader = function () { 70 | if (this.loadingIndex >= this.length) return 71 | var resource = this.opts.resources[this.loadingIndex] 72 | this.loadingIndex++ 73 | 74 | if (~['mp3', 'ogg', 'wav'].indexOf(getType(resource))) { 75 | this.audioLoader(resource) 76 | } else { 77 | this.imageLoader(resource) 78 | } 79 | } 80 | 81 | this.imageLoader = function (resource) { 82 | var self = this 83 | 84 | var image = new Image() 85 | var startTime = new Date() 86 | image.onload = image.onerror = function () { 87 | var duration = new Date() - startTime 88 | var diff = self.opts.perMinTime - duration 89 | 90 | diff > 0 ? setTimeout(function () { 91 | self.done(resource, image) 92 | }, diff) : self.done(resource, image) 93 | } 94 | image.src = resource 95 | } 96 | this.audioLoader = function (resource) { 97 | var self = this 98 | var audio = new Audio() 99 | var startTime = new Date() 100 | var isComplete = false 101 | 102 | var handler = function () { 103 | isComplete = true 104 | var duration = new Date() - startTime 105 | var diff = self.opts.perMinTime - duration 106 | 107 | diff > 0 ? setTimeout(function () { 108 | self.done(resource, audio) 109 | }, diff) : self.done(resource, audio) 110 | audio.removeEventListener('canplaythrough', handler) 111 | } 112 | audio.addEventListener('canplaythrough', handler) 113 | audio.addEventListener('error', handler) 114 | audio.preload = 'auto' 115 | audio.src = resource 116 | audio.load() 117 | setTimeout(function () { 118 | if (!isComplete) { 119 | isComplete = true 120 | audio.removeEventListener('canplaythrough', handler) 121 | self.done(resource, audio) 122 | } 123 | }, 3000); 124 | } 125 | } 126 | 127 | /** 128 | * add progress event callback 129 | */ 130 | Preloader.prototype.addProgressListener = function (fn) { 131 | this.onProgress = fn 132 | } 133 | 134 | /** 135 | * add completed event callback 136 | */ 137 | Preloader.prototype.addCompletionListener = function (fn) { 138 | this.onCompletion = fn 139 | } 140 | 141 | /** 142 | * get resource instance 143 | */ 144 | Preloader.prototype.get = function (resource) { 145 | return this.resourceMap[resource] 146 | } 147 | 148 | /** 149 | * load begin 150 | */ 151 | Preloader.prototype.start = function () { 152 | if (!this.length) return this.done(null, null) 153 | 154 | if (this.opts.concurrency === 0) { 155 | while (this.loadingIndex < this.length) { 156 | this.loader() 157 | } 158 | } else { 159 | for (var i = 0; i < this.opts.concurrency; i++) { 160 | this.loader() 161 | } 162 | } 163 | } 164 | 165 | function getType(resource) { 166 | var parser = document.createElement('a') 167 | parser.href = resource 168 | return parser.pathname.split('.').pop().toLowerCase() 169 | } 170 | 171 | return Preloader 172 | })) 173 | -------------------------------------------------------------------------------- /src/js/lib/share.js: -------------------------------------------------------------------------------- 1 | ; (function (global, doc) { 2 | 3 | var noop = function () { }; 4 | 5 | // map 掉恶心的不统一的 api 6 | var Wechat = function () { 7 | this.calls = []; 8 | 9 | this.map = { 10 | events: { 11 | friend: 'menu:share:appmessage', 12 | timeline: 'menu:share:timeline', 13 | weibo: 'menu:share:weibo', 14 | email: 'email' // 分享到邮件 15 | }, 16 | actions: { 17 | friend: 'sendAppMessage', 18 | timeline: 'shareTimeline', 19 | weibo: 'shareWeibo', 20 | email: 'email' 21 | }, 22 | direct: { 23 | network: 'getNetworkType', 24 | hideToolbar: 'hideToolbar', 25 | hideOptionMenu: 'hideOptionMenu', 26 | showOptionMenu: 'showOptionMenu', 27 | closeWebView: 'closeWindow', // 关闭webview 28 | scanQRCode: 'scanQRCode', //跳转到扫码页面 29 | imagePreview: 'imagePreview' //图片预览/查看大图 30 | } 31 | }; 32 | }; 33 | 34 | // 有些 data 是延时获取的,这时候应该支持传入 callback 35 | Wechat.prototype._data = function (data, name) { 36 | if (!data) return {}; 37 | 38 | var tmp = {}; 39 | 40 | for (var p in data) { 41 | if (!data.hasOwnProperty(p)) return; 42 | tmp[p] = (typeof data[p] === 'function') ? data[p]() : data[p]; 43 | } 44 | 45 | // 接口命名统一 46 | tmp.appid = tmp.app; 47 | tmp.img_url = tmp.img; 48 | 49 | delete tmp.app; 50 | delete tmp.img; 51 | 52 | // 分享到微博的接口不同 53 | if (name === 'weibo') { 54 | tmp.content = tmp.desc; 55 | tmp.url = tmp.link; 56 | 57 | // 朋友圈的 title 是不显示的,直接拼接 58 | } else if (name === 'timeline') { 59 | tmp.title = tmp.title + ' - ' + tmp.desc; 60 | 61 | // Android 下有时候会需要 desc (*-.-) 62 | tmp.desc = tmp.title; 63 | } else if (name === 'email') { 64 | tmp.content = tmp.desc + ' ' + tmp.link; 65 | } 66 | 67 | return tmp; 68 | }; 69 | 70 | 71 | // 处理数据接入 72 | Wechat.prototype._make = function (obj) { 73 | if (typeof WeixinJSBridge === 'undefined') return this.calls.push(obj); 74 | 75 | var name = obj.name 76 | , direct = this.map.direct[name] 77 | , data = obj.data 78 | , callback = obj.callback; 79 | 80 | // 直接获取的情况 81 | if (direct) { 82 | // 获取用户网络状态的返回值如下: 83 | // network_type:wifi wifi网络 84 | // network_type:edge 非wifi,包含3G/2G 85 | // network_type:fail 网络断开连接 86 | // network_type:wwan(2g或者3g) 87 | if (name === 'network') { 88 | return WeixinJSBridge.invoke(direct, {}, callback); 89 | // 图片预览/查看大图 90 | } else if (name === 'imagePreview') { 91 | return WeixinJSBridge.invoke(direct, data, callback); 92 | } 93 | 94 | return WeixinJSBridge.call(direct, callback); 95 | } 96 | 97 | // Email 直接处理 98 | if (name === 'email') return WeixinJSBridge.invoke('sendEmail', this._data(data, name), callback); 99 | 100 | var that = this; 101 | // 当 WeixinJSBridge 存在则直接绑定事件 102 | WeixinJSBridge.on(this.map.events[name], function () { 103 | WeixinJSBridge.invoke(that.map.actions[name], that._data(data, name), callback); 104 | }); 105 | }; 106 | 107 | // 添加监听 108 | Wechat.prototype.on = function (name, data, callback) { 109 | if (!name) return; 110 | 111 | if (typeof data === 'function') { 112 | callback = data; 113 | data = null; 114 | } 115 | 116 | this._make({ 117 | name: name, 118 | data: data, 119 | callback: callback || noop 120 | }); 121 | 122 | // 返回本身,支持链式 123 | return this; 124 | }; 125 | 126 | // WeixingJSBridgeReady 后执行绑定的队列 127 | var ready = function () { 128 | for (var i = 0, len = wx.calls.length; i < len; i++) { 129 | wx._make(wx.calls[i]); 130 | } 131 | }; 132 | 133 | // 对外只分享一个接口,不过会返回本身,可以有备用 134 | var wx = new Wechat(); 135 | 136 | // 创建唯一实例 137 | var entry = function () { 138 | return wx.on.apply(wx, arguments); 139 | }; 140 | 141 | //spm3 和 cortex 6.x 已经支持自动构建成module 142 | if (typeof exports !== 'undefined' && module.exports) { 143 | module.exports = exports = entry; 144 | } else if (typeof define === 'function') { 145 | define(function (require, exports, module) { 146 | module.exports = exports = entry; 147 | }); 148 | } else { 149 | //浏览器端直接运行 150 | global.wechat = global.wechat || entry; 151 | } 152 | 153 | if (typeof WeixinJSBridge === 'undefined') { 154 | if (doc.addEventListener) { 155 | doc.addEventListener('WeixinJSBridgeReady', ready, false); 156 | } else { 157 | doc.attachEvent('WeixinJSBridgeReady', ready); 158 | doc.attachEvent('onWeixinJSBridgeReady', ready); 159 | } 160 | } else { 161 | ready(); 162 | } 163 | 164 | })(window, document); -------------------------------------------------------------------------------- /src/js/lib/slider.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | require('./zepto-touch.js') 3 | if (window.Zepto) { 4 | module.exports = factory(Zepto) 5 | } 6 | }(this, function ($) { 7 | 'use strict'; 8 | 9 | var _defualtOption = { 10 | index: 0, 11 | container_cls: 'slider', 12 | card_cls: 'slider-card', 13 | prefix_cls: 'slider' 14 | } 15 | 16 | var Slider = function (selector, options) { 17 | this.$el = $(selector) 18 | var opts = $.extend({}, _defualtOption, options) 19 | this._init(opts) 20 | } 21 | 22 | Slider.fn = Slider.prototype 23 | 24 | /** 25 | * 初始化 26 | */ 27 | Slider.fn._init = function (opts) { 28 | 29 | this.opts = opts 30 | this.collections = this.$el.find('.' + this.opts.card_cls) 31 | this.cls = this.opts.prefix_cls ? [this.opts.prefix_cls + '-in', this.opts.prefix_cls + '-out', this.opts.prefix_cls + '-active'] : ['in', 'out', 'active'] 32 | this.idx = this.opts.index 33 | this.to(this.idx) 34 | this._isInAnimation = false; 35 | 36 | this._initEvent() 37 | } 38 | 39 | /** 40 | * 初始化事件 41 | */ 42 | Slider.fn._initEvent = function () { 43 | 44 | this.$el.on('tap', $.proxy(this.next, this)); 45 | 46 | // this.$el.on('swipeRight', $.proxy(this.prev, this)); 47 | this.$el.on('swipeDown', $.proxy(this.prev, this)); 48 | 49 | // this.$el.on('swipeLeft', $.proxy(this.next, this)); 50 | this.$el.on('swipeUp', $.proxy(this.next, this)); 51 | 52 | this.$el.on('sliderOut', $.proxy(function (event, idx) { 53 | this.opts.sliderOut(this, idx) 54 | }, this) || $.noop) 55 | 56 | this.$el.on('resetSlider', $.proxy(function (event, idx) { 57 | this.opts.resetSlider(this, idx) 58 | }, this) || $.noop) 59 | 60 | this.$el.on('sliderIn', $.proxy(function (event, idx) { 61 | this.opts.sliderIn(this, idx) 62 | }, this) || $.noop) 63 | } 64 | 65 | 66 | /** 67 | * 翻页 68 | */ 69 | Slider.fn.to = function (idx) { 70 | if ((idx < this.collections.length && idx >= 0)) { 71 | if (idx == this.idx) { 72 | $(this.collections[this.idx]) 73 | .addClass(this.cls[0]) 74 | .addClass(this.cls[2]) 75 | } else { 76 | if ($(this.collections[this.idx]).hasClass(this.cls[0])) { 77 | $(this.collections[this.idx]) 78 | .removeClass(this.cls[0]) 79 | .addClass(this.cls[1]) 80 | this._lastidx = idx; 81 | this.$el.trigger('sliderOut', this.idx) 82 | } else { 83 | $(this.collections[this.idx]) 84 | .removeClass(this.cls[1]) 85 | .removeClass(this.cls[2]) 86 | $(this.collections[idx]) 87 | .addClass(this.cls[0]) 88 | .addClass(this.cls[2]) 89 | this.$el.trigger('resetSlider', this.idx) 90 | this.idx = idx 91 | this._lastidx = 0; 92 | this.$el.trigger('sliderIn', idx) 93 | } 94 | 95 | } 96 | } 97 | } 98 | 99 | Slider.fn.next = function () { 100 | if (this._isInAnimation) 101 | return 102 | if (this.idx < this.collections.length - 1) { 103 | this._isInAnimation = true 104 | this.to(this.idx + 1) 105 | } 106 | } 107 | 108 | Slider.fn.prev = function () { 109 | if (this._isInAnimation) 110 | return 111 | if (this.idx > 0) { 112 | this._isInAnimation = true 113 | this.to(this.idx - 1) 114 | } 115 | } 116 | 117 | /** 118 | * 继续翻页 从 out -> in 119 | */ 120 | Slider.fn.countinue = function () { 121 | if (this._lastidx >= 0 && this._lastidx < this.collections.length) { 122 | this.to(this._lastidx) 123 | this._isInAnimation = false 124 | } 125 | } 126 | 127 | return Slider 128 | })); 129 | -------------------------------------------------------------------------------- /src/js/lib/zepto-touch.js: -------------------------------------------------------------------------------- 1 | // Zepto.js 2 | // (c) 2010-2016 Thomas Fuchs 3 | // Zepto.js may be freely distributed under the MIT license. 4 | 5 | ; (function ($) { 6 | var touch = {}, 7 | touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, 8 | longTapDelay = 750, 9 | gesture 10 | 11 | function swipeDirection(x1, x2, y1, y2) { 12 | return Math.abs(x1 - x2) >= 13 | Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') 14 | } 15 | 16 | function longTap() { 17 | longTapTimeout = null 18 | if (touch.last) { 19 | touch.el.trigger('longTap') 20 | touch = {} 21 | } 22 | } 23 | 24 | function cancelLongTap() { 25 | if (longTapTimeout) clearTimeout(longTapTimeout) 26 | longTapTimeout = null 27 | } 28 | 29 | function cancelAll() { 30 | if (touchTimeout) clearTimeout(touchTimeout) 31 | if (tapTimeout) clearTimeout(tapTimeout) 32 | if (swipeTimeout) clearTimeout(swipeTimeout) 33 | if (longTapTimeout) clearTimeout(longTapTimeout) 34 | touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null 35 | touch = {} 36 | } 37 | 38 | function isPrimaryTouch(event) { 39 | return (event.pointerType == 'touch' || 40 | event.pointerType == event.MSPOINTER_TYPE_TOUCH) 41 | && event.isPrimary 42 | } 43 | 44 | function isPointerEventType(e, type) { 45 | return (e.type == 'pointer' + type || 46 | e.type.toLowerCase() == 'mspointer' + type) 47 | } 48 | 49 | $(document).ready(function () { 50 | var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType 51 | 52 | if ('MSGesture' in window) { 53 | gesture = new MSGesture() 54 | gesture.target = document.body 55 | } 56 | 57 | $(document) 58 | .bind('MSGestureEnd', function (e) { 59 | var swipeDirectionFromVelocity = 60 | e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null 61 | if (swipeDirectionFromVelocity) { 62 | touch.el.trigger('swipe') 63 | touch.el.trigger('swipe' + swipeDirectionFromVelocity) 64 | } 65 | }) 66 | .on('touchstart MSPointerDown pointerdown', function (e) { 67 | if ((_isPointerType = isPointerEventType(e, 'down')) && 68 | !isPrimaryTouch(e)) return 69 | firstTouch = _isPointerType ? e : e.touches[0] 70 | if (e.touches && e.touches.length === 1 && touch.x2) { 71 | // Clear out touch movement data if we have it sticking around 72 | // This can occur if touchcancel doesn't fire due to preventDefault, etc. 73 | touch.x2 = undefined 74 | touch.y2 = undefined 75 | } 76 | now = Date.now() 77 | delta = now - (touch.last || now) 78 | touch.el = $('tagName' in firstTouch.target ? 79 | firstTouch.target : firstTouch.target.parentNode) 80 | touchTimeout && clearTimeout(touchTimeout) 81 | touch.x1 = firstTouch.pageX 82 | touch.y1 = firstTouch.pageY 83 | if (delta > 0 && delta <= 250) touch.isDoubleTap = true 84 | touch.last = now 85 | longTapTimeout = setTimeout(longTap, longTapDelay) 86 | // adds the current touch contact for IE gesture recognition 87 | if (gesture && _isPointerType) gesture.addPointer(e.pointerId) 88 | }) 89 | .on('touchmove MSPointerMove pointermove', function (e) { 90 | if ((_isPointerType = isPointerEventType(e, 'move')) && 91 | !isPrimaryTouch(e)) return 92 | firstTouch = _isPointerType ? e : e.touches[0] 93 | cancelLongTap() 94 | touch.x2 = firstTouch.pageX 95 | touch.y2 = firstTouch.pageY 96 | 97 | deltaX += Math.abs(touch.x1 - touch.x2) 98 | deltaY += Math.abs(touch.y1 - touch.y2) 99 | }) 100 | .on('touchend MSPointerUp pointerup', function (e) { 101 | if ((_isPointerType = isPointerEventType(e, 'up')) && 102 | !isPrimaryTouch(e)) return 103 | cancelLongTap() 104 | 105 | // swipe 106 | if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || 107 | (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) 108 | 109 | swipeTimeout = setTimeout(function () { 110 | if (touch.el) { 111 | touch.el.trigger('swipe') 112 | touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) 113 | } 114 | touch = {} 115 | }, 0) 116 | 117 | // normal tap 118 | else if ('last' in touch) 119 | // don't fire tap when delta position changed by more than 30 pixels, 120 | // for instance when moving to a point and back to origin 121 | if (deltaX < 30 && deltaY < 30) { 122 | // delay by one tick so we can cancel the 'tap' event if 'scroll' fires 123 | // ('tap' fires before 'scroll') 124 | tapTimeout = setTimeout(function () { 125 | 126 | // trigger universal 'tap' with the option to cancelTouch() 127 | // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) 128 | var event = $.Event('tap') 129 | event.cancelTouch = cancelAll 130 | // [by paper] fix -> "TypeError: 'undefined' is not an object (evaluating 'touch.el.trigger'), when double tap 131 | if (touch.el) touch.el.trigger(event) 132 | 133 | // trigger double tap immediately 134 | if (touch.isDoubleTap) { 135 | if (touch.el) touch.el.trigger('doubleTap') 136 | touch = {} 137 | } 138 | 139 | // trigger single tap after 250ms of inactivity 140 | else { 141 | touchTimeout = setTimeout(function () { 142 | touchTimeout = null 143 | if (touch.el) touch.el.trigger('singleTap') 144 | touch = {} 145 | }, 250) 146 | } 147 | }, 0) 148 | } else { 149 | touch = {} 150 | } 151 | deltaX = deltaY = 0 152 | 153 | }) 154 | // when the browser window loses focus, 155 | // for example when a modal dialog is shown, 156 | // cancel all ongoing events 157 | .on('touchcancel MSPointerCancel pointercancel', cancelAll) 158 | 159 | // scrolling the window indicates intention of the user 160 | // to scroll, not tap or swipe, so cancel all ongoing events 161 | $(window).on('scroll', cancelAll) 162 | }) 163 | 164 | ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 165 | 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function (eventName) { 166 | $.fn[eventName] = function (callback) { return this.on(eventName, callback) } 167 | }) 168 | })(Zepto) -------------------------------------------------------------------------------- /src/js/main.js: -------------------------------------------------------------------------------- 1 | var Preloader = require('./lib/preloader.js') 2 | var Slider = require('./lib/slider.js') 3 | var page = require('./page.js') 4 | var audio = 0, $audio = 0 5 | var hasMusic = false 6 | var playAudio = function () { 7 | hasMusic = true; 8 | $audio.addClass('off'); 9 | audio.play(); 10 | } 11 | 12 | var pauseAudio = function () { 13 | hasMusic = false; 14 | $audio.removeClass('off'); 15 | audio.pause(); 16 | } 17 | 18 | /** 19 | * preloader && start 20 | */ 21 | var preloader = new Preloader({ 22 | resources: ['img/loading.png', 'img/border1.png', 'img/sprite.icon.png', 'img/sprite.icon2.png'], 23 | concurrency: 4, 24 | perMinTime: 1000 // 加载每个资源所需的最小时间,一般用来测试 loading 25 | }) 26 | preloader.addProgressListener(function (loaded, length) { 27 | console.log('loaded', loaded, length, loaded / length) 28 | }) 29 | preloader.addCompletionListener(function () { 30 | $('#o2_loading').hide() 31 | $('#o2_main').removeClass('hide') 32 | init() 33 | }) 34 | preloader.start() 35 | 36 | document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false); 37 | 38 | function init() { 39 | $audio = $('#J_audio') 40 | audio = document.getElementById('J_mp3') 41 | playAudio(); 42 | 43 | document.addEventListener("WeixinJSBridgeReady", function () { 44 | playAudio(); 45 | }, false); 46 | 47 | audio.addEventListener("playing", function () { 48 | playAudio(); 49 | }, false); 50 | 51 | audio.addEventListener("pause", function () { 52 | pauseAudio(); 53 | }, false); 54 | 55 | $audio.on('touchstart', function () { 56 | if (hasMusic) { 57 | pauseAudio(); 58 | } else { 59 | playAudio(); 60 | } 61 | }) 62 | new Slider('.slider', { 63 | sliderOut: function (slider, idx) { 64 | page.get(idx).slideOut($.proxy(slider.countinue, slider)) 65 | }, 66 | sliderIn: function (slider, idx) { 67 | page.get(idx).slideIn() 68 | }, 69 | resetSlider: function (slider, idx) { 70 | page.get(idx).reset() 71 | } 72 | }) 73 | page.start() 74 | 75 | var isSubmit = false 76 | $(document).on('touchend', '#J_save', function () { 77 | if (isSubmit) { 78 | return 79 | } 80 | isSubmit = true 81 | $('#J_save').text('嘿嘿~提交成功!') 82 | var name = $('#J_name').val() 83 | var msg = $('#J_msg').val() 84 | $('#J_msg').val('') 85 | $('#J_name').val('') 86 | $.ajax({ 87 | type: 'POST', 88 | url: 'https://leancloud.cn:443/1.1/classes/actor', 89 | headers: { 90 | 'X-LC-Id': 'xxx',// 自己的leancloud参数或者接口 91 | 'X-LC-Key': 'xxx', 92 | }, 93 | contentType: 'application/json', 94 | data: JSON.stringify({ "name": name, "message": msg }), 95 | success: function () { 96 | 97 | setTimeout(function () { 98 | $('#J_save').text('再次提交') 99 | isSubmit = false 100 | }, 5000); 101 | 102 | } 103 | }) 104 | }) 105 | } 106 | /* 107 | 微信已经不支持此方式分享 108 | var wxShare = function (t, i, e, s, n, a, o, r) { 109 | document.addEventListener("WeixinJSBridgeReady", function () { 110 | WeixinJSBridge.on("menu:share:timeline", function (r) { 111 | ATlog && ATlog.custom('wxTimeline', '', 1) 112 | WeixinJSBridge.invoke("shareTimeline", { 113 | img_url: t, 114 | img_width: i, 115 | img_height: e, 116 | link: s, 117 | title: n, 118 | desc: a 119 | }, function () { 120 | o && o("timeline") 121 | }) 122 | }), WeixinJSBridge.on("menu:share:appmessage", function (c) { 123 | ATlog && ATlog.custom('wxMessage', '', 1) 124 | WeixinJSBridge.invoke("sendAppMessage", { 125 | appid: r || "", 126 | img_url: t, 127 | img_width: i, 128 | img_height: e, 129 | link: s, 130 | title: n, 131 | desc: a 132 | }, function () { 133 | o && o("appmessage") 134 | }) 135 | }), WeixinJSBridge.on("menu:share:weibo", function (t) { 136 | ATlog && ATlog.custom('weibo', '', 1) 137 | WeixinJSBridge.invoke("shareWeibo", { 138 | content: n, 139 | url: s 140 | }, function (t) { 141 | o && o("weibo") 142 | }) 143 | }), WeixinJSBridge.on("menu:share:facebook", function (r) { 144 | ATlog && ATlog.custom('facebook', '', 1) 145 | dataForWeixin.callback(), WeixinJSBridge.invoke("shareFB", { 146 | img_url: t, 147 | img_width: i, 148 | img_height: e, 149 | link: s, 150 | title: n, 151 | desc: a 152 | }, function (t) { 153 | o && o("facebook") 154 | }) 155 | }) 156 | }) 157 | } 158 | wxShare('../img/share.jpg', 200, 200, location.href, '分享标题', '分享文案'); */ -------------------------------------------------------------------------------- /src/js/page.js: -------------------------------------------------------------------------------- 1 | 2 | require('../css/main.scss') 3 | var page = {}, _page = [] 4 | var Iris = require('./lib/iriswipe.js') 5 | var iris = Iris({ 6 | duration: 600 7 | }) 8 | 9 | var currPage = 0 10 | var ys = [{ y: 200 }, { y: 200 }, { y: 200 }, { y: 200 }, { y: 200 }, { y: 200 }, { y: 200 }] 11 | _pageEmpty = { 12 | slideOut: function (cb) { 13 | var config = { 14 | y: ys[currPage].y, 15 | compelate: function () { 16 | cb && cb() 17 | } 18 | } 19 | iris.hide(config) 20 | console.info('Empty.slideOut') 21 | }, 22 | slideIn: function () { 23 | iris.show() 24 | console.info('Empty.slideIn') 25 | }, 26 | reset: function () { 27 | console.info('重置') 28 | } 29 | } 30 | 31 | page.get = function (idx) { 32 | currPage = idx 33 | 34 | return _pageEmpty 35 | } 36 | page.start = function () { 37 | iris.show() 38 | } 39 | module.exports = page; -------------------------------------------------------------------------------- /src/plugin/bg.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l-zhi/marrycard/a56a0a577f713571d83dc324b26c5dd7ab60cd29/src/plugin/bg.mp3 --------------------------------------------------------------------------------