├── .bowerrc ├── .editorconfig ├── .gitignore ├── .jshintignore ├── .jshintrc ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── bower.json ├── demo ├── assets │ ├── css │ │ ├── fastgap.min.css │ │ ├── snap.css │ │ ├── style.css │ │ └── topcoat-mobile-light.min.css │ ├── font │ │ └── .gitkeep │ ├── img │ │ ├── back.png │ │ ├── fastgap_logo.jpg │ │ ├── gustavocostaw.jpg │ │ └── mayron.jpg │ └── js │ │ ├── fastgap.controllers.js │ │ ├── fastgap.core.js │ │ ├── fastgap.js │ │ ├── fastgap.libs.js │ │ └── fastgap.min.js ├── index.html └── pages │ ├── home.html │ ├── page1.html │ ├── page2.html │ ├── page3.html │ ├── page4.html │ └── page5.html ├── dist ├── css │ ├── fastgap.css │ └── fastgap.min.css ├── font │ └── .gitkeep ├── img │ ├── back.png │ ├── fastgap_logo.jpg │ ├── gustavocostaw.jpg │ └── mayron.jpg └── js │ ├── fastgap.controllers.js │ ├── fastgap.core.js │ ├── fastgap.js │ ├── fastgap.libs.js │ └── fastgap.min.js ├── package.json └── src ├── img ├── back.png ├── fastgap_logo.jpg ├── gustavocostaw.jpg └── mayron.jpg ├── js ├── FG.js ├── History.js ├── Navigator.js ├── PageLoad.js ├── Transition.js ├── controllers │ ├── AppController.js │ ├── HomeController.js │ ├── Page1Controller.js │ ├── Page2Controller.js │ ├── Page3Controller.js │ ├── Page4Controller.js │ ├── Page5Controller.js │ └── ViewController.js └── index.js └── scss ├── base ├── _fastgap.scss ├── _fonts.scss ├── _reset.scss ├── _transitions.scss └── _variables.scss └── build.scss /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | # Tabs in JS unless otherwise specified 13 | [**.js] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | bower_components 3 | node_modules 4 | .sass-cache 5 | 6 | 7 | .ruby-version 8 | .ruby-gemset 9 | -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/.jshintignore -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "bitwise": true, 3 | "eqeqeq": true, 4 | "eqnull": true, 5 | "immed": true, 6 | "newcap": true, 7 | "esnext": true, 8 | "latedef": true, 9 | "noarg": true, 10 | "node": true, 11 | "undef": true, 12 | "browser": true, 13 | "trailing": true, 14 | "jquery": true, 15 | "curly": true, 16 | "trailing": true, 17 | "smarttabs": true 18 | } 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### CHANGELOG 2 | 3 | ## v0.0.4 4 | 5 | * **Remove** 6 | - ```vendor``` path: ***dist*** has no vendor and vendor of ***src*** are in ```bower_components```, this don't included in repo, as good practice. 7 | - ```css``` files in ***src*** path: use only ```scss``` 8 | - ```assets``` dir of ***src*** and ***dist***: use this only in ```demo``` path 9 | - ```copy:{distVendor, distFonts, distHtml, distJs, distImages, distPages, distCss}``` **Grunt** task 10 | 11 | * **Change** 12 | - ```load-grunt-tasks``` -> ```matchdep```: for load all ***grunt tasks*** 13 | - ```overthrow-dist``` -> ```overthrow```: library for good use with bower 14 | - ```dist``` task: include ```dist-js``` and ```dist-css``` tasks 15 | - ```grunt-sass``` -> ```grunt-contrib-compass```: because this, *config.rb* isn't necessary 16 | 17 | * **Add** 18 | - ```grunt-banner``` with ```usebanner``` task: for ***js*** and ***css*** dist files 19 | - http://fastgap.mobi/ as ***homepage***: in ```package.json``` 20 | - ```dist-js``` task: with ```concat``` and ```uglify``` tasks 21 | - ```dist-css``` task: with ```sass``` *compressed* mode 22 | - ```~Controllers.js``` are in ```fastgap.controllers.js``` with ```~.min.js``` version 23 | - libraries: ***zepto***, ***fastclick***, ***overthrow*** and ***snap*** are in ```fastgap.libs.js``` with ```~.min.js``` version 24 | - ```fastgap.core.js``` is ***History.js***, ***FG.js***, ***Navigator.js***, ***Transition.js***, ***PageLoad.js***, and ***index.js*** also containing ```~.min.js``` version 25 | - ```fastgap.js``` or ```fastgap.min.js```containing *all* ***js*** src 26 | - ```demo``` path with a **FastGap** example project ready to run 27 | - ```clean``` **Grunt** task: for clear ***dist*** files and rebuild with *banner* 28 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 1. Fork it! 4 | 2. Create your feature branch: `git checkout -b my-new-feature` 5 | 3. Make your changes on the `src` folder, never on the `dist` folder. 6 | 4. Commit your changes: `git commit -m 'Add some feature'` 7 | 5. Push to the branch: `git push origin my-new-feature` 8 | 6. Submit a pull request :D 9 | 10 | ### Style 11 | 12 | Always use two spaces, no tabs. This goes for any HTML, CSS, or Javascript. 13 | 14 | ### License 15 | 16 | By contributing your code, you agree to license your contribution under the MIT license. 17 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap's Gruntfile 3 | * http://fastgap.mobi/ 4 | * Licensed under MIT 5 | */ 6 | 7 | module.exports = function (grunt) { 8 | "use strict"; 9 | 10 | var appConfig = { 11 | 12 | // Default Paths 13 | paths: { 14 | src: 'src', 15 | dist: 'dist', 16 | bower: 'bower_components' 17 | }, 18 | 19 | // Assets directory 20 | dirs: { 21 | sass: "<%= paths.src %>/assets/scss", 22 | css: "<%= paths.src %>/assets/css", 23 | img: "<%= paths.src %>/assets/images", 24 | vendor: "<%= paths.src %>/vendor", 25 | pages: "<%= paths.src %>/pages", 26 | fonts: "<%= paths.src %>/vendor/topcoat/font" 27 | }, 28 | 29 | // Load package.json 30 | pkg: grunt.file.readJSON("package.json"), 31 | 32 | // Banner 33 | banner: '/*!\n' + 34 | " * FastGap v<%= pkg.version %> (<%= pkg.homepage %>)\n" + 35 | " * Author: <%= pkg.author.name %>\n" + 36 | " * Maintainers: https://github.com/orgs/FastGap/members\n" + 37 | " * Copyright (c) <%= grunt.template.today(\"yyyy\") %>\n" + 38 | ' * Licensed under <%= pkg.license %>\n' + 39 | ' */\n', 40 | 41 | /************************************ 42 | * grunt-contrib-clean 43 | * Clean files and folders 44 | ************************************/ 45 | clean: { 46 | dist: 'dist/{css,js}' 47 | }, 48 | 49 | /************************************ 50 | * grunt-sass 51 | * Compile SCSS to CSS using node-sass 52 | ************************************/ 53 | sass: { 54 | development: { 55 | options: { 56 | includePaths: ['<%= paths.src %>/scss/base/'], 57 | outputStyle: 'nested' 58 | }, 59 | files: { 60 | '<%= paths.dist %>/css/fastgap.css': '<%= paths.src %>/scss/build.scss' 61 | } 62 | }, 63 | production: { 64 | options: { 65 | includePaths: ['<%= paths.src %>/scss/base/'], 66 | outputStyle: 'compressed' 67 | }, 68 | files: { 69 | '<%= paths.dist %>/css/fastgap.min.css': '<%= paths.src %>/scss/build.scss' 70 | } 71 | } 72 | }, 73 | 74 | // Watch files 75 | watch: { 76 | options: { 77 | livereload: true 78 | }, 79 | css: { 80 | files: ["<%= dirs.sass %>/{,*/}*.{scss,sass}"], 81 | tasks: ["compass", "notify:compass"] 82 | }, 83 | js: { 84 | files: ["<%= jshint.all %>"], 85 | tasks: ["jshint", "uglify", "notify:js"] 86 | }, 87 | html: { 88 | files: [ 89 | // carregamento automático do browser para as atualizações das extensões abaixo 90 | "/*.{html,htm,shtml,shtm,xhtml,php,jsp,asp,aspx,erb,ctp}" 91 | ] 92 | } 93 | }, 94 | 95 | // Files Validation 96 | jshint: { 97 | options: { 98 | jshintrc: ".jshintrc" 99 | }, 100 | all: [ 101 | "Gruntfile.js", 102 | "<%= dirs.js %>/main.js" 103 | ] 104 | }, 105 | 106 | /************************************ 107 | * grunt-contrib-concat 108 | * Concatenate files 109 | ************************************/ 110 | concat: { 111 | controllers: { 112 | src: [ 113 | // Main 114 | '<%= paths.src %>/js/controllers/AppController.js', 115 | '<%= paths.src %>/js/controllers/HomeController.js', 116 | // Custom 117 | '<%= paths.src %>/js/controllers/Page1Controller.js', 118 | '<%= paths.src %>/js/controllers/Page2Controller.js', 119 | '<%= paths.src %>/js/controllers/Page3Controller.js', 120 | '<%= paths.src %>/js/controllers/Page4Controller.js', 121 | '<%= paths.src %>/js/controllers/Page5Controller.js' 122 | ], 123 | dest: '<%= paths.dist %>/js/fastgap.controllers.js' 124 | }, 125 | libraries: { 126 | src: [ 127 | // Main 128 | '<%= paths.bower %>/zepto/zepto.js', 129 | '<%= paths.bower %>/fastclick/lib/fastclick.js', 130 | // Scroll 131 | '<%= paths.bower %>/overthrow-dist/overthrow.js', 132 | // Snap.js (menu) 133 | '<%= paths.bower %>/snapjs/snap.js' 134 | ], 135 | dest: '<%= paths.dist %>/js/fastgap.libs.js' 136 | }, 137 | core: { 138 | src: [ 139 | // Main 140 | '<%= paths.src %>/js/History.js', 141 | '<%= paths.src %>/js/FG.js', 142 | '<%= paths.src %>/js/Navigator.js', 143 | '<%= paths.src %>/js/Transition.js', 144 | '<%= paths.src %>/js/PageLoad.js', 145 | '<%= paths.src %>/js/index.js' 146 | ], 147 | dest: '<%= paths.dist %>/js/fastgap.core.js' 148 | }, 149 | fastgap: { 150 | src: [ 151 | '<%= paths.dist %>/js/fastgap.controllers.js', 152 | '<%= paths.dist %>/js/fastgap.libs.js', 153 | '<%= paths.dist %>/js/fastgap.core.js' 154 | ], 155 | dest: '<%= paths.dist %>/js/fastgap.js' 156 | } 157 | }, 158 | 159 | /************************************ 160 | * grunt-contrib-uglify 161 | * Minify files 162 | ************************************/ 163 | uglify: { 164 | js: { 165 | src: '<%= paths.dist %>/js/fastgap.js', 166 | dest: '<%= paths.dist %>/js/fastgap.min.js' 167 | } 168 | }, 169 | 170 | // Notificações 171 | notify: { 172 | compass: { 173 | options: { 174 | title: "SASS - <%= pkg.title %>", 175 | message: "Build with success!" 176 | } 177 | }, 178 | js: { 179 | options: { 180 | title: "Javascript - <%= pkg.title %>", 181 | message: "Minified and validated with success!" 182 | } 183 | } 184 | }, 185 | 186 | /************************************ 187 | * grunt-contrib-imagemin 188 | * Minify PNG, JPEG and GIF images 189 | ************************************/ 190 | imagemin: { // Task 191 | dynamic: { 192 | options: { // Target options 193 | optimizationLevel: 3 194 | }, // Another target 195 | files: [{ 196 | expand: true, // Enable dynamic expansion 197 | cwd: '<%= paths.src %>/', // Src matches are relative to this path 198 | src: ['**/*.{png,jpg,gif}'], // Actual patterns to match 199 | dest: '<%= paths.dist %>/' // Destination path prefix 200 | }] 201 | } 202 | }, 203 | 204 | /************************************ 205 | * grunt-contrib-copy 206 | * Copy files and folders to a specific path 207 | ************************************/ 208 | copy: { 209 | imagesToDemo: { 210 | expand: true, 211 | cwd: '<%= paths.dist %>/img', 212 | src: ['*.png', '*.jpg', '*.gif'], 213 | dest: 'demo/assets/img' 214 | }, 215 | fastgapJs: { 216 | expand: true, 217 | cwd: '<%= paths.dist %>/js', 218 | src: ['*.js'], 219 | dest: 'demo/assets/js' 220 | }, 221 | snapCSS: { 222 | expand: true, 223 | cwd: '<%= paths.bower %>/snapjs', 224 | src: ['snap.css'], 225 | dest: 'demo/assets/css' 226 | }, 227 | topcoatCSS: { 228 | expand: true, 229 | cwd: '<%= paths.bower %>/topcoat/css', 230 | src: ['topcoat-mobile-light.min.css'], 231 | dest: 'demo/assets/css' 232 | }, 233 | fastgapCSS: { 234 | expand: true, 235 | cwd: '<%= paths.dist %>/css', 236 | src: ['fastgap.min.css'], 237 | dest: 'demo/assets/css' 238 | } 239 | }, 240 | 241 | /************************************ 242 | * grunt-banner 243 | * Adds a simple banner to files 244 | ************************************/ 245 | usebanner: { 246 | options: { 247 | position: 'top', 248 | banner: '<%= banner %>' 249 | }, 250 | files: { 251 | src: '<%= paths.dist %>/{css,js}/{*.css,*.js}' 252 | } 253 | }, 254 | 255 | /************************************ 256 | * grunt-bump 257 | * Bump package version, create tag, commit, push... 258 | ************************************/ 259 | bump: { 260 | options: { 261 | files: ['package.json', 'bower.json'], 262 | updateConfigs: [], 263 | commit: true, 264 | commitMessage: '%VERSION%', 265 | commitFiles: ['package.json', 'bower.json', 'dist/', 'demo/'], // '-a' for all files 266 | createTag: true, 267 | tagName: '%VERSION%', 268 | tagMessage: '%VERSION%', 269 | push: true, 270 | pushTo: 'master', 271 | gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe' 272 | } 273 | } 274 | 275 | }; 276 | 277 | // Init grunt configurations 278 | grunt.initConfig(appConfig); 279 | 280 | 281 | // Tasks 282 | // -------------------------- 283 | 284 | // load all grunt tasks matching the `grunt-*` pattern 285 | require('load-grunt-tasks')(grunt); 286 | 287 | // Displays the execution time of grunt tasks 288 | require('time-grunt')(grunt); 289 | 290 | // Dist JS 291 | grunt.registerTask('dist-js', ['concat', 'uglify']); 292 | // Dist CSS 293 | grunt.registerTask('dist-css', ['sass']); 294 | // Dist IMG 295 | grunt.registerTask('dist-img', ['imagemin']); 296 | 297 | // Watch Task 298 | grunt.registerTask('w', ['watch']); 299 | 300 | // Default task 301 | grunt.registerTask('dist', ['clean', 'dist-js', 'dist-css', 'dist-img', 'usebanner', 'copy']); 302 | grunt.registerTask('build', ['dist']); 303 | grunt.registerTask('default', ['dist']); 304 | 305 | }; 306 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 FastGap 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FastGap [![Stories in Ready](https://badge.waffle.io/FastGap/fastgap.png?label=ready)](https://waffle.io/FastGap/fastgap) [![devDependency Status](https://david-dm.org/FastGap/fastgap/dev-status.svg?theme=shields.io)](https://david-dm.org/FastGap/fastgap#info=devDependencies) 2 | 3 | > Template for jump start developing native mobile apps using Phonegap. 4 | 5 | ## We use 6 | 7 | - [**Zepto.js**](http://zeptojs.com) 8 | *"A minimalist JavaScript library for modern browsers."* 9 | - [**Overthrow**](http://filamentgroup.github.io/Overthrow/) 10 | *"A tiny, no-frills, framework-independent, targeted overflow: auto polyfill for use in responsive design."* 11 | - [**Snap.js**](https://github.com/jakiestfu/Snap.js/) 12 | *"A Library for creating beautiful mobile shelfs in Javascript."* 13 | - [**TopCoat**](http://topcoat.io) 14 | *"CSS for clean and fast web apps."* 15 | 16 | ## How to start 17 | 18 | **1.** Download the latest version of **Demo pack** ([see releases](https://github.com/FastGap/fastgap/releases/download/0.0.45/FastGap-Demo-0.0.45.zip) for this). 19 | 20 | **2.** Copy ```assets/```, ```pages/``` folder and ```index.html``` file. 21 | 22 | **3**. Put the *files* and *folders* in ```www/```path of your phonegap project and enjoy! 23 | 24 | ###### If you use with [Bower](http://bower.io/) 25 | 26 | **1.** Run ```bower install fastgap``` 27 | 28 | **2.** Put in ```index.html``` of your app the ```fastgap.min.js``` and the ```fastgap.min.css``` files. 29 | 30 | ## How to contributing 31 | 32 | ### 1. Read the Guidelines 33 | 34 | See the [**Contributing guide**](https://github.com/FastGap/fastgap/blob/master/CONTRIBUTING.md). 35 | 36 | ### 2. Install dependencies 37 | 38 | First, ensure that you have installed on your machine: 39 | 40 | - [**Node.js**](href='http://nodejs.org/') 41 | 42 | - [**Bower**](href='http://bower.io') ```[sudo] npm install bower -g``` 43 | 44 | - [**Grunt**](href='http://gruntjs.com') ```[sudo] npm install grunt-cli -g``` 45 | 46 | Second, go to ```fastgap/``` folder (after [**fork**](https://github.com/FastGap/fastgap/fork) and **clone** this repo) and run ```npm install && bower install``` for install all dependencies of the project. 47 | 48 | ### 3. Make a PR ;-) 49 | Wait for the [core team](https://github.com/orgs/FastGap/members) to evaluate and accept your *pull request*. All contributions are welcome. :ok_hand: 50 | 51 | ## Changelog 52 | See the [Changelog](https://github.com/FastGap/fastgap/blob/master/CHANGELOG.md) for list history changes. 53 | 54 | ## Screencasts 55 | 56 | #### Introduce to the FastGap development (pt-BR) 57 | [![Introduce to the FastGap development](http://img.youtube.com/vi/qWncqneN5HQ/0.jpg)](http://www.youtube.com/watch?v=qWncqneN5HQ) 58 | 59 | #### How to begin in FastGap (pt-BR) 60 | 61 | [![How to begin in FastGap](http://img.youtube.com/vi/GZpSuTN3ln0/0.jpg)](http://www.youtube.com/watch?v=GZpSuTN3ln0) 62 | 63 | 64 | #### Licensed under [MIT](https://github.com/FastGap/fastgap/blob/master/LICENSE). 65 | > Made with ♥ by Brazilians [crazy guys](https://github.com/orgs/FastGap/members). 66 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FastGap", 3 | "version": "0.0.49", 4 | "homepage": "http://fastgap.mobi/", 5 | "authors": [ 6 | "Gustavo Costa ", 7 | "Mayron Cachina ", 8 | "Daniel Torres ", 9 | "Ivan Santos " 10 | ], 11 | "description": "Faster PhoneGap Template", 12 | "keywords": [ 13 | "fastgap", 14 | "mobile", 15 | "phonegap", 16 | "template" 17 | ], 18 | "license": "MIT", 19 | "main": [ 20 | "dist/js/fastgap.controllers.css", 21 | "dist/js/fastgap.libs.js", 22 | "dist/js/fastgap.core.js", 23 | "dist/js/fastgap.js", 24 | "dist/js/fastgap.min.js", 25 | "dist/css/fastgap.css", 26 | "dist/css/fastgap.min.css" 27 | ], 28 | "ignore": [ 29 | "**/.*", 30 | "Gruntfile.js", 31 | "*.json", 32 | "CONTRIBUTING.md", 33 | "node_modules", 34 | "bower_components", 35 | "dist/img", 36 | "src", 37 | "test", 38 | "tests" 39 | ], 40 | "dependencies": { 41 | "fastclick": "~0.6.11", 42 | "overthrow-dist": "~0.7.0", 43 | "zepto": "~1.1.3", 44 | "topcoat": "~0.8.0", 45 | "snapjs": "*" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /demo/assets/css/fastgap.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}menu{-webkit-transition:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);}#scroll{transform:translate3d(0, 0, 0);-webkit-backface-visibility:hidden;-webkit-transition:all 0.2s ease;}.transitionApp1{opacity:0;}.transitionApp2{-webkit-transform:translateX(100%);}.transitionApp3{-webkit-transform:scale(0.1);}.transitionApp4{-webkit-transform:rotateY(180deg);opacity:0;}.transitionApp5{opacity:0;-webkit-transform:rotateX(180deg);}*:not(input):not(textarea){-webkit-user-select:none;-webkit-touch-callout:none;}html,body{width:100%;overflow:hidden;position:relative;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;}input,textarea{user-select:text;}header#header-app{width:100%;top:0;}.overthrow-enabled .overthrow{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;}#page{width:100%;height:100%;-webkit-transition:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);overflow:hidden;}#content{overflow:hidden;}#content,#page,#scroll{-webkit-overflow-scrolling:touch;}#menu-button{position:absolute;z-index:999;display:block;}menu{position:absolute;top:0;left:0;height:100%;}#menu-content{height:100%;position:relative;} -------------------------------------------------------------------------------- /demo/assets/css/snap.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: sans-serif; 3 | margin: 0; 4 | padding: 0; 5 | width: 100%; 6 | height: 100%; 7 | overflow: hidden; 8 | } 9 | 10 | .snap-content { 11 | position: absolute; 12 | top: 0; 13 | right: 0; 14 | bottom: 0; 15 | left: 0; 16 | width: auto; 17 | height: auto; 18 | z-index: 2; 19 | overflow: auto; 20 | -webkit-overflow-scrolling: touch; 21 | -webkit-transform: translate3d(0, 0, 0); 22 | -moz-transform: translate3d(0, 0, 0); 23 | -ms-transform: translate3d(0, 0, 0); 24 | -o-transform: translate3d(0, 0, 0); 25 | transform: translate3d(0, 0, 0); 26 | } 27 | 28 | .snap-drawers { 29 | position: absolute; 30 | top: 0; 31 | right: 0; 32 | bottom: 0; 33 | left: 0; 34 | width: auto; 35 | height: auto; 36 | } 37 | 38 | .snap-drawer { 39 | position: absolute; 40 | top: 0; 41 | right: auto; 42 | bottom: 0; 43 | left: auto; 44 | width: 265px; 45 | height: auto; 46 | overflow: auto; 47 | -webkit-overflow-scrolling: touch; 48 | -webkit-transition: width 0.3s ease; 49 | -moz-transition: width 0.3s ease; 50 | -ms-transition: width 0.3s ease; 51 | -o-transition: width 0.3s ease; 52 | transition: width 0.3s ease; 53 | } 54 | 55 | .snap-drawer-left { 56 | left: 0; 57 | z-index: 1; 58 | } 59 | 60 | .snap-drawer-right { 61 | right: 0; 62 | z-index: 1; 63 | } 64 | 65 | .snapjs-left .snap-drawer-right, 66 | .snapjs-right .snap-drawer-left { 67 | display: none; 68 | } 69 | 70 | .snapjs-expand-left .snap-drawer-left, 71 | .snapjs-expand-right .snap-drawer-right { 72 | width: 100%; 73 | } 74 | -------------------------------------------------------------------------------- /demo/assets/css/style.css: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 2 | /* CUSTOMIZE YOUR APP */ 3 | 4 | body { 5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } 6 | 7 | #menu ul li { 8 | color: #A02615; 9 | font-weight: bold; } 10 | 11 | #scroll { 12 | padding: 10px; 13 | box-sizing: border-box; } 14 | 15 | #content { 16 | background: white; 17 | color: #A02615; } 18 | 19 | #content a { 20 | font-weight: bold; 21 | color: #A02615; 22 | font-size: 13px; } 23 | 24 | .title-page { 25 | font-size: 30px; 26 | color: #A02615; 27 | font-weight: bold; 28 | padding-bottom: 20px; 29 | border-bottom: 1px solid #ccc; } 30 | 31 | .page-item { 32 | margin-top: 20px; 33 | border-bottom: 1px solid #ccc; 34 | padding-bottom: 15px; } 35 | 36 | .page-item img { 37 | float: right; 38 | width: 80px; 39 | height: 80px; 40 | border-radius: 60px; 41 | margin-left: 10px; 42 | margin-top: 10px; } 43 | 44 | #internal-page { 45 | width: 100%; } 46 | 47 | #internal-page h1 { 48 | font: 5px "Source Sans", helvetica, arial, sans-serif; 49 | width: 100%; 50 | font-size: 25px; 51 | text-align: center; } 52 | 53 | .page-item p { 54 | margin-top: 10px; 55 | text-align: center; 56 | font-size: 16px; } 57 | 58 | .developers { 59 | margin-top: 10px; 60 | text-align: center; } 61 | 62 | .developers img { 63 | border-radius: 60px; } 64 | 65 | .developers div { 66 | display: inline-block; 67 | padding: 5px; } 68 | 69 | /*-----------------------*/ 70 | 71 | html, 72 | body { 73 | background: white; 74 | } 75 | body { 76 | background: #f4f4f4; 77 | } 78 | /* APP LOGO IMG */ 79 | 80 | header#header-app { 81 | height: 60px; 82 | text-align: center; 83 | background: #ab0207 url('../img/fastgap_logo.jpg') no-repeat center; 84 | } 85 | /* BOX LOAD PAGES */ 86 | 87 | /* SCROLL */ 88 | .overthrow-enabled #scroll { 89 | background: #f4f4f4; 90 | } 91 | /* MENU BUTTON */ 92 | 93 | #menu-button { 94 | top: 5px; 95 | left: 3px; 96 | width: 80px; 97 | color: white; 98 | height: 50px; 99 | text-decoration: none; 100 | text-align: center; 101 | line-height: 37px; 102 | background: #345365; 103 | background: url('../img/back.png') no-repeat center; 104 | } 105 | /* MENU APP */ 106 | 107 | menu { 108 | width: 180px; 109 | height: 100%; 110 | border-right: 1px solid #ccc; 111 | } 112 | -------------------------------------------------------------------------------- /demo/assets/css/topcoat-mobile-light.min.css: -------------------------------------------------------------------------------- 1 | .button-bar{display:table;table-layout:fixed;white-space:nowrap;margin:0;padding:0}.button-bar__item{display:table-cell;width:auto;border-radius:0}.button-bar__item>input{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.button-bar__button{border-radius:inherit}.button-bar__item:disabled{opacity:.3;cursor:default;pointer-events:none}.button,.topcoat-button,.topcoat-button--quiet,.topcoat-button--large,.topcoat-button--large--quiet,.topcoat-button--cta,.topcoat-button--large--cta,.topcoat-button-bar__button,.topcoat-button-bar__button--large{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.button--disabled,.topcoat-button:disabled,.topcoat-button--quiet:disabled,.topcoat-button--large:disabled,.topcoat-button--large--quiet:disabled,.topcoat-button--cta:disabled,.topcoat-button--large--cta:disabled,.topcoat-button-bar__button:disabled,.topcoat-button-bar__button--large:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-button,.topcoat-button--quiet,.topcoat-button--large,.topcoat-button--large--quiet,.topcoat-button--cta,.topcoat-button--large--cta,.topcoat-button-bar__button,.topcoat-button-bar__button--large{padding:0 1.25rem;font-size:16px;line-height:3rem;letter-spacing:1px;color:#454545;text-shadow:0 1px #fff;vertical-align:top;background-color:#e5e9e8;box-shadow:inset 0 1px #fff;border:1px solid #9daca9;border-radius:6px}.topcoat-button:hover,.topcoat-button--quiet:hover,.topcoat-button--large:hover,.topcoat-button--large--quiet:hover,.topcoat-button-bar__button:hover,.topcoat-button-bar__button--large:hover{background-color:#eff1f1}.topcoat-button:focus,.topcoat-button--quiet:focus,.topcoat-button--quiet:hover:focus,.topcoat-button--large:focus,.topcoat-button--large--quiet:focus,.topcoat-button--large--quiet:hover:focus,.topcoat-button--cta:focus,.topcoat-button--large--cta:focus,.topcoat-button-bar__button:focus,.topcoat-button-bar__button--large:focus{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1;outline:0}.topcoat-button:active,.topcoat-button--large:active,.topcoat-button-bar__button:active,.topcoat-button-bar__button--large:active,:checked+.topcoat-button-bar__button{border:1px solid #9daca9;background-color:#d2d6d6;box-shadow:inset 0 1px rgba(0,0,0,.1)}.topcoat-button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.topcoat-button--quiet:hover,.topcoat-button--large--quiet:hover{text-shadow:0 1px #fff;border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.topcoat-button--quiet:active,.topcoat-button--quiet:focus:active,.topcoat-button--large--quiet:active,.topcoat-button--large--quiet:focus:active{color:#454545;text-shadow:0 1px #fff;background-color:#d2d6d6;border:1px solid #9daca9;box-shadow:inset 0 1px rgba(0,0,0,.1)}.topcoat-button--large,.topcoat-button--large--quiet,.topcoat-button-bar__button--large{font-size:1.3rem;font-weight:400;line-height:4.375rem;padding:0 1.25rem}.topcoat-button--large--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.topcoat-button--cta,.topcoat-button--large--cta{border:1px solid #134f7f;background-color:#288edf;box-shadow:inset 0 1px rgba(255,255,255,.36);color:#fff;font-weight:500;text-shadow:0 -1px rgba(0,0,0,.36)}.topcoat-button--cta:hover,.topcoat-button--large--cta:hover{background-color:#4ca1e4}.topcoat-button--cta:active,.topcoat-button--large--cta:active{background-color:#1e7dc8;box-shadow:inset 0 1px rgba(0,0,0,.12)}.topcoat-button--large--cta{font-size:1.3rem;font-weight:400;line-height:4.375rem;padding:0 1.25rem}.button-bar,.topcoat-button-bar{display:table;table-layout:fixed;white-space:nowrap;margin:0;padding:0}.button-bar__item,.topcoat-button-bar__item{display:table-cell;width:auto;border-radius:0}.button-bar__item>input,.topcoat-button-bar__item>input{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.button-bar__button{border-radius:inherit}.button-bar__item:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-button-bar>.topcoat-button-bar__item:first-child{border-top-left-radius:6px;border-bottom-left-radius:6px}.topcoat-button-bar>.topcoat-button-bar__item:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.topcoat-button-bar__item:first-child>.topcoat-button-bar__button,.topcoat-button-bar__item:first-child>.topcoat-button-bar__button--large{border-right:0}.topcoat-button-bar__item:last-child>.topcoat-button-bar__button,.topcoat-button-bar__item:last-child>.topcoat-button-bar__button--large{border-left:0}.topcoat-button-bar__button{border-radius:inherit}.topcoat-button-bar__button:focus,.topcoat-button-bar__button--large:focus{z-index:1}.topcoat-button-bar__button--large{border-radius:inherit}.button{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.button--disabled{opacity:.3;cursor:default;pointer-events:none}.button,.topcoat-button,.topcoat-button--quiet,.topcoat-button--large,.topcoat-button--large--quiet,.topcoat-button--cta,.topcoat-button--large--cta{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.button--disabled,.topcoat-button:disabled,.topcoat-button--quiet:disabled,.topcoat-button--large:disabled,.topcoat-button--large--quiet:disabled,.topcoat-button--cta:disabled,.topcoat-button--large--cta:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-button,.topcoat-button--quiet,.topcoat-button--large,.topcoat-button--large--quiet,.topcoat-button--cta,.topcoat-button--large--cta{padding:0 1.25rem;font-size:16px;line-height:3rem;letter-spacing:1px;color:#454545;text-shadow:0 1px #fff;vertical-align:top;background-color:#e5e9e8;box-shadow:inset 0 1px #fff;border:1px solid #9daca9;border-radius:6px}.topcoat-button:hover,.topcoat-button--quiet:hover,.topcoat-button--large:hover,.topcoat-button--large--quiet:hover{background-color:#eff1f1}.topcoat-button:focus,.topcoat-button--quiet:focus,.topcoat-button--quiet:hover:focus,.topcoat-button--large:focus,.topcoat-button--large--quiet:focus,.topcoat-button--large--quiet:hover:focus,.topcoat-button--cta:focus,.topcoat-button--large--cta:focus{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1;outline:0}.topcoat-button:active,.topcoat-button--large:active{border:1px solid #9daca9;background-color:#d2d6d6;box-shadow:inset 0 1px rgba(0,0,0,.1)}.topcoat-button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.topcoat-button--quiet:hover,.topcoat-button--large--quiet:hover{text-shadow:0 1px #fff;border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.topcoat-button--quiet:active,.topcoat-button--quiet:focus:active,.topcoat-button--large--quiet:active,.topcoat-button--large--quiet:focus:active{color:#454545;text-shadow:0 1px #fff;background-color:#d2d6d6;border:1px solid #9daca9;box-shadow:inset 0 1px rgba(0,0,0,.1)}.topcoat-button--large,.topcoat-button--large--quiet{font-size:1.3rem;font-weight:400;line-height:4.375rem;padding:0 1.25rem}.topcoat-button--large--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.topcoat-button--cta,.topcoat-button--large--cta{border:1px solid #134f7f;background-color:#288edf;box-shadow:inset 0 1px rgba(255,255,255,.36);color:#fff;font-weight:500;text-shadow:0 -1px rgba(0,0,0,.36)}.topcoat-button--cta:hover,.topcoat-button--large--cta:hover{background-color:#4ca1e4}.topcoat-button--cta:active,.topcoat-button--large--cta:active{background-color:#1e7dc8;box-shadow:inset 0 1px rgba(0,0,0,.12)}.topcoat-button--large--cta{font-size:1.3rem;font-weight:400;line-height:4.375rem;padding:0 1.25rem}input[type=checkbox]{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.checkbox{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox__label{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox--disabled{opacity:.3;cursor:default;pointer-events:none}.checkbox:before,.checkbox:after{content:'';position:absolute}.checkbox:before{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}input[type=checkbox]{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.checkbox,.topcoat-checkbox__checkmark{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox__label,.topcoat-checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox--disabled,input[type=checkbox]:disabled+.topcoat-checkbox__checkmark{opacity:.3;cursor:default;pointer-events:none}.checkbox:before,.checkbox:after,.topcoat-checkbox__checkmark:before,.topcoat-checkbox__checkmark:after{content:'';position:absolute}.checkbox:before,.topcoat-checkbox__checkmark:before{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.topcoat-checkbox__checkmark{height:2rem}input[type=checkbox]{height:2rem;width:2rem;margin-top:0;margin-right:-2rem;margin-bottom:-2rem;margin-left:0}input[type=checkbox]:checked+.topcoat-checkbox__checkmark:after{opacity:1}.topcoat-checkbox{line-height:2rem}.topcoat-checkbox__checkmark:before{width:2rem;height:2rem;background:#e5e9e8;border:1px solid #9daca9;border-radius:3px;box-shadow:inset 0 1px #fff}.topcoat-checkbox__checkmark{width:2rem;height:2rem}.topcoat-checkbox__checkmark:after{top:1px;left:2px;opacity:0;width:28px;height:11px;background:transparent;border:7px solid #454545;border-width:7px;border-top:0;border-right:0;border-radius:2px;-webkit-transform:rotate(-50deg);-ms-transform:rotate(-50deg);transform:rotate(-50deg)}input[type=checkbox]:focus+.topcoat-checkbox__checkmark:before{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1}input[type=checkbox]:active+.topcoat-checkbox__checkmark:before{border:1px solid #9daca9;background-color:#d2d6d6;box-shadow:inset 0 1px rgba(0,0,0,.1)}input[type=checkbox]:disabled:active+.topcoat-checkbox__checkmark:before{border:1px solid #9daca9;background:#e5e9e8;box-shadow:inset 0 1px #fff}.button,.topcoat-icon-button,.topcoat-icon-button--quiet,.topcoat-icon-button--large,.topcoat-icon-button--large--quiet{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.button--disabled,.topcoat-icon-button:disabled,.topcoat-icon-button--quiet:disabled,.topcoat-icon-button--large:disabled,.topcoat-icon-button--large--quiet:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-icon-button,.topcoat-icon-button--quiet,.topcoat-icon-button--large,.topcoat-icon-button--large--quiet{padding:0 .75rem;line-height:3rem;letter-spacing:1px;color:#454545;text-shadow:0 1px #fff;vertical-align:baseline;background-color:#e5e9e8;box-shadow:inset 0 1px #fff;border:1px solid #9daca9;border-radius:6px}.topcoat-icon-button:hover,.topcoat-icon-button--quiet:hover,.topcoat-icon-button--large:hover,.topcoat-icon-button--large--quiet:hover{background-color:#eff1f1}.topcoat-icon-button:focus,.topcoat-icon-button--quiet:focus,.topcoat-icon-button--quiet:hover:focus,.topcoat-icon-button--large:focus,.topcoat-icon-button--large--quiet:focus,.topcoat-icon-button--large--quiet:hover:focus{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1;outline:0}.topcoat-icon-button:active,.topcoat-icon-button--large:active{border:1px solid #9daca9;background-color:#d2d6d6;box-shadow:inset 0 1px rgba(0,0,0,.1)}.topcoat-icon-button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.topcoat-icon-button--quiet:hover,.topcoat-icon-button--large--quiet:hover{text-shadow:0 1px #fff;border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.topcoat-icon-button--quiet:active,.topcoat-icon-button--quiet:focus:active,.topcoat-icon-button--large--quiet:active,.topcoat-icon-button--large--quiet:focus:active{color:#454545;text-shadow:0 1px #fff;background-color:#d2d6d6;border:1px solid #9daca9;box-shadow:inset 0 1px rgba(0,0,0,.1)}.topcoat-icon-button--large,.topcoat-icon-button--large--quiet{width:4.375rem;height:4.375rem;line-height:4.375rem}.topcoat-icon-button--large--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.topcoat-icon,.topcoat-icon--large{position:relative;display:inline-block;vertical-align:top;overflow:hidden;width:1.62rem;height:1.62rem;vertical-align:middle;top:-1px}.topcoat-icon--large{width:2.499999998125rem;height:2.499999998125rem;top:-2px}.input{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;vertical-align:top;outline:0}.input:disabled{opacity:.3;cursor:default;pointer-events:none}.list{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:auto;-webkit-overflow-scrolling:touch}.list__header{margin:0}.list__container{padding:0;margin:0;list-style-type:none}.list__item{margin:0;padding:0}.list,.topcoat-list{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:auto;-webkit-overflow-scrolling:touch}.list__header,.topcoat-list__header{margin:0}.list__container,.topcoat-list__container{padding:0;margin:0;list-style-type:none}.list__item,.topcoat-list__item{margin:0;padding:0}.topcoat-list{border-top:1px solid #9daca9;border-bottom:1px solid #fff;background-color:#e5e9e8}.topcoat-list__header{padding:4px 20px;font-size:.9em;font-weight:400;background-color:#d2d6d6;color:#454545;text-shadow:0 1px 0 rgba(255,255,255,.5);border-top:1px solid rgba(255,255,255,.5);border-bottom:1px solid rgba(255,255,255,.23)}.topcoat-list__container{border-top:1px solid #9daca9;color:#454545}.topcoat-list__item{padding:1.25rem;border-top:1px solid #fff;border-bottom:1px solid #9daca9}.topcoat-list__item:first-child{border-top:1px solid #d6dcdb}.navigation-bar{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;white-space:nowrap;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-bar__item{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0}.navigation-bar__title{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.navigation-bar,.topcoat-navigation-bar{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;white-space:nowrap;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-bar__item,.topcoat-navigation-bar__item{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0}.navigation-bar__title,.topcoat-navigation-bar__title{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.topcoat-navigation-bar{height:4.375rem;padding-left:1rem;padding-right:1rem;background:#e5e9e8;color:#454545;box-shadow:inset 0 -1px #9daca9,0 1px #d6dcdb}.topcoat-navigation-bar__item{margin:0;line-height:4.375rem;vertical-align:top}.topcoat-navigation-bar__title{font-size:1.3rem;font-weight:400;color:#454545}.notification{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.notification,.topcoat-notification{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.topcoat-notification{padding:.15em .5em .2em;border-radius:2px;background-color:#ec514e;color:#fff}input[type=radio]{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.radio-button{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio-button__label{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio-button:before,.radio-button:after{content:'';position:absolute;border-radius:100%}.radio-button:after{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.radio-button:before{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.radio-button--disabled{opacity:.3;cursor:default;pointer-events:none}input[type=radio]{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.radio-button,.topcoat-radio-button__checkmark{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio-button__label,.topcoat-radio-button{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio-button:before,.radio-button:after,.topcoat-radio-button__checkmark:before,.topcoat-radio-button__checkmark:after{content:'';position:absolute;border-radius:100%}.radio-button:after,.topcoat-radio-button__checkmark:after{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.radio-button:before,.topcoat-radio-button__checkmark:before{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.radio-button--disabled,input[type=radio]:disabled+.topcoat-radio-button__checkmark{opacity:.3;cursor:default;pointer-events:none}input[type=radio]{height:1.875rem;width:1.875rem;margin-top:0;margin-right:-1.875rem;margin-bottom:-1.875rem;margin-left:0}input[type=radio]:checked+.topcoat-radio-button__checkmark:after{opacity:1}.topcoat-radio-button{color:#454545;line-height:1.875rem}.topcoat-radio-button__checkmark:before{width:1.875rem;height:1.875rem;background:#e5e9e8;border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.topcoat-radio-button__checkmark{position:relative;width:1.875rem;height:1.875rem}.topcoat-radio-button__checkmark:after{opacity:0;width:.875rem;height:.875rem;background:#454545;border:1px solid rgba(0,0,0,.1);box-shadow:0 1px rgba(255,255,255,.5);-webkit-transform:none;-ms-transform:none;transform:none;top:7px;left:7px}input[type=radio]:focus+.topcoat-radio-button__checkmark:before{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1}input[type=radio]:active+.topcoat-radio-button__checkmark:before{border:1px solid #9daca9;background-color:#d2d6d6;box-shadow:inset 0 1px rgba(0,0,0,.1)}input[type=radio]:disabled:active+.topcoat-radio-button__checkmark:before{border:1px solid #9daca9;background:#e5e9e8;box-shadow:inset 0 1px #fff}.range{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;vertical-align:top;outline:0;-webkit-appearance:none}.range__thumb{cursor:pointer}.range__thumb--webkit{cursor:pointer;-webkit-appearance:none}.range:disabled{opacity:.3;cursor:default;pointer-events:none}.range,.topcoat-range{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;vertical-align:top;outline:0;-webkit-appearance:none}.range__thumb,.topcoat-range::-moz-range-thumb{cursor:pointer}.range__thumb--webkit,.topcoat-range::-webkit-slider-thumb{cursor:pointer;-webkit-appearance:none}.range:disabled,.topcoat-range:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-range{border-radius:6px;border:1px solid #9daca9;background-color:#d6dcdb;height:1rem;border-radius:30px}.topcoat-range::-moz-range-track{border-radius:6px;border:1px solid #9daca9;background-color:#d6dcdb;height:1rem;border-radius:30px}.topcoat-range::-webkit-slider-thumb{height:3rem;width:2rem;background-color:#e5e9e8;border:1px solid #9daca9;border-radius:6px;box-shadow:inset 0 1px #fff}.topcoat-range::-moz-range-thumb{height:3rem;width:2rem;background-color:#e5e9e8;border:1px solid #9daca9;border-radius:6px;box-shadow:inset 0 1px #fff}.topcoat-range:focus::-webkit-slider-thumb{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1}.topcoat-range:focus::-moz-range-thumb{border:1px solid #0036ff;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1}.topcoat-range:active::-webkit-slider-thumb{border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.topcoat-range:active::-moz-range-thumb{border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.search-input{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;vertical-align:top;outline:0;-webkit-appearance:none}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}.search-input:disabled{opacity:.3;cursor:default;pointer-events:none}.search-input,.topcoat-search-input,.topcoat-search-input--large{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;vertical-align:top;outline:0;-webkit-appearance:none}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}.search-input:disabled,.topcoat-search-input:disabled,.topcoat-search-input--large:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-search-input,.topcoat-search-input--large{line-height:3rem;height:3rem;font-size:16px;border:1px solid #9daca9;background-color:#fff;box-shadow:inset 0 1px 0 rgba(0,0,0,.23);color:#454545;padding:0 0 0 2rem;border-radius:30px;background-image:url(../img/search.svg);background-position:1rem center;background-repeat:no-repeat;background-size:16px}.topcoat-search-input:focus,.topcoat-search-input--large:focus{background-color:#fff;color:#454545;border:1px solid #0036ff;box-shadow:inset 0 1px 0 rgba(0,0,0,.23),0 0 0 2px #6fb5f1}.topcoat-search-input::-webkit-search-cancel-button,.topcoat-search-input::-webkit-search-decoration,.topcoat-search-input--large::-webkit-search-cancel-button,.topcoat-search-input--large::-webkit-search-decoration{margin-right:5px}.topcoat-search-input:focus::-webkit-input-placeholder,.topcoat-search-input:focus::-webkit-input-placeholder{color:#c6c8c8}.topcoat-search-input:disabled::-webkit-input-placeholder{color:#454545}.topcoat-search-input:disabled::-moz-placeholder{color:#454545}.topcoat-search-input:disabled:-ms-input-placeholder{color:#454545}.topcoat-search-input--large{line-height:4.375rem;height:4.375rem;font-size:1.3rem;font-weight:400;padding:0 0 0 2.9rem;border-radius:40px;background-position:1.2rem center;background-size:1.3rem}.topcoat-search-input--large:disabled{color:#454545}.topcoat-search-input--large:disabled::-webkit-input-placeholder{color:#454545}.topcoat-search-input--large:disabled::-moz-placeholder{color:#454545}.topcoat-search-input--large:disabled:-ms-input-placeholder{color:#454545}.switch{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.switch__input{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.switch__toggle{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch__toggle:before,.switch__toggle:after{content:'';position:absolute;z-index:-1;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.switch--disabled{opacity:.3;cursor:default;pointer-events:none}.switch,.topcoat-switch{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.switch__input,.topcoat-switch__input{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.switch__toggle,.topcoat-switch__toggle{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch__toggle:before,.switch__toggle:after,.topcoat-switch__toggle:before,.topcoat-switch__toggle:after{content:'';position:absolute;z-index:-1;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box}.switch--disabled,.topcoat-switch__input:disabled+.topcoat-switch__toggle{opacity:.3;cursor:default;pointer-events:none}.topcoat-switch{font-size:16px;padding:0 1.25rem;border-radius:6px;border:1px solid #9daca9;overflow:hidden;width:6rem}.topcoat-switch__toggle:before,.topcoat-switch__toggle:after{top:-1px;width:5rem}.topcoat-switch__toggle:before{content:'ON';color:#288edf;background-color:#e5f1fb;right:1rem;padding-left:1.5rem}.topcoat-switch__toggle{line-height:3rem;height:3rem;width:2rem;border-radius:6px;color:#454545;text-shadow:0 1px #fff;background-color:#e5e9e8;border:1px solid #9daca9;margin-left:-1.3rem;margin-bottom:-1px;margin-top:-1px;box-shadow:inset 0 1px #fff;-webkit-transition:margin-left .05s ease-in-out;transition:margin-left .05s ease-in-out}.topcoat-switch__toggle:after{content:'OFF';background-color:#d2d6d6;left:1rem;padding-left:2rem}.topcoat-switch__input:checked+.topcoat-switch__toggle{margin-left:2.7rem}.topcoat-switch__input:active+.topcoat-switch__toggle{border:1px solid #9daca9;box-shadow:inset 0 1px #fff}.topcoat-switch__input:focus+.topcoat-switch__toggle{border:1px solid #0036ff;box-shadow:0 0 0 2px #6fb5f1}.topcoat-switch__input:disabled+.topcoat-switch__toggle:after,.topcoat-switch__input:disabled+.topcoat-switch__toggle:before{background:transparent}.button,.topcoat-tab-bar__button{position:relative;display:inline-block;vertical-align:top;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none}.button--quiet{background:transparent;border:1px solid transparent;box-shadow:none}.button--disabled,.topcoat-tab-bar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.button-bar,.topcoat-tab-bar{display:table;table-layout:fixed;white-space:nowrap;margin:0;padding:0}.button-bar__item,.topcoat-tab-bar__item{display:table-cell;width:auto;border-radius:0}.button-bar__item>input,.topcoat-tab-bar__item>input{position:absolute;overflow:hidden;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0}.button-bar__button{border-radius:inherit}.button-bar__item:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-tab-bar__button{padding:0 1.25rem;height:3rem;line-height:3rem;letter-spacing:1px;color:#454545;text-shadow:0 1px #fff;vertical-align:top;background-color:#e5e9e8;box-shadow:inset 0 1px #fff;border-top:1px solid #9daca9}.topcoat-tab-bar__button:active,.topcoat-tab-bar__button--large:active,:checked+.topcoat-tab-bar__button{color:#288edf;background-color:#e5f1fb;box-shadow:inset 0 0 1px rgba(0,0,0,.1)}.topcoat-tab-bar__button:focus,.topcoat-tab-bar__button--large:focus{z-index:1;box-shadow:inset 0 1px rgba(255,255,255,.36),0 0 0 2px #6fb5f1;outline:0}.input,.topcoat-text-input,.topcoat-text-input--large{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;vertical-align:top;outline:0}.input:disabled,.topcoat-text-input:disabled,.topcoat-text-input--large:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-text-input,.topcoat-text-input--large{line-height:3rem;font-size:16px;letter-spacing:1px;padding:0 1.25rem;border:1px solid #9daca9;border-radius:6px;background-color:#fff;box-shadow:inset 0 1px rgba(0,0,0,.1);color:#454545;vertical-align:top}.topcoat-text-input:focus,.topcoat-text-input--large:focus{background-color:#fff;color:#454545;border:1px solid #0036ff;box-shadow:0 0 0 2px #6fb5f1}.topcoat-text-input:disabled::-webkit-input-placeholder{color:#454545}.topcoat-text-input:disabled::-moz-placeholder{color:#454545}.topcoat-text-input:disabled:-ms-input-placeholder{color:#454545}.topcoat-text-input:invalid{border:1px solid #ec514e}.topcoat-text-input--large{line-height:4.375rem;font-size:1.3rem}.topcoat-text-input--large:disabled{color:#454545}.topcoat-text-input--large:disabled::-webkit-input-placeholder{color:#454545}.topcoat-text-input--large:disabled::-moz-placeholder{color:#454545}.topcoat-text-input--large:disabled:-ms-input-placeholder{color:#454545}.topcoat-text-input--large:invalid{border:1px solid #ec514e}.textarea{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;vertical-align:top;resize:none;outline:0}.textarea:disabled{opacity:.3;cursor:default;pointer-events:none}.textarea,.topcoat-textarea,.topcoat-textarea--large{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;vertical-align:top;resize:none;outline:0}.textarea:disabled,.topcoat-textarea:disabled,.topcoat-textarea--large:disabled{opacity:.3;cursor:default;pointer-events:none}.topcoat-textarea,.topcoat-textarea--large{padding:2rem;font-size:2.5rem;font-weight:400;border-radius:6px;line-height:3rem;border:1px solid #9daca9;background-color:#fff;box-shadow:inset 0 1px rgba(0,0,0,.1);color:#454545;letter-spacing:1px}.topcoat-textarea:focus,.topcoat-textarea--large:focus{background-color:#fff;color:#454545;border:1px solid #0036ff;box-shadow:0 0 0 2px #6fb5f1}.topcoat-textarea:disabled::-webkit-input-placeholder{color:#454545}.topcoat-textarea:disabled::-moz-placeholder{color:#454545}.topcoat-textarea:disabled:-ms-input-placeholder{color:#454545}.topcoat-textarea--large{font-size:3rem;line-height:4.375rem}.topcoat-textarea--large:disabled{color:#454545}.topcoat-textarea--large:disabled::-webkit-input-placeholder{color:#454545}.topcoat-textarea--large:disabled::-moz-placeholder{color:#454545}.topcoat-textarea--large:disabled:-ms-input-placeholder{color:#454545}@font-face{font-family:"Source Sans";src:url(../font/SourceSansPro-Regular.otf)}@font-face{font-family:"Source Sans";src:url(../font/SourceSansPro-Light.otf);font-weight:200}@font-face{font-family:"Source Sans";src:url(../font/SourceSansPro-Semibold.otf);font-weight:600}body{margin:0;padding:0;background:#dfe2e2;color:#000;font:16px "Source Sans",helvetica,arial,sans-serif;font-weight:400}:focus{outline-color:transparent;outline-style:none}.topcoat-icon--menu-stack{background:url(../img/hamburger_dark.svg) no-repeat;background-size:cover}.quarter{width:25%}.half{width:50%}.three-quarters{width:75%}.third{width:33.333%}.two-thirds{width:66.666%}.full{width:100%}.left{text-align:left}.center{text-align:center}.right{text-align:right}.reset-ui{-moz-box-sizing:border-box;box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden} -------------------------------------------------------------------------------- /demo/assets/font/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/demo/assets/font/.gitkeep -------------------------------------------------------------------------------- /demo/assets/img/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/demo/assets/img/back.png -------------------------------------------------------------------------------- /demo/assets/img/fastgap_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/demo/assets/img/fastgap_logo.jpg -------------------------------------------------------------------------------- /demo/assets/img/gustavocostaw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/demo/assets/img/gustavocostaw.jpg -------------------------------------------------------------------------------- /demo/assets/img/mayron.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/demo/assets/img/mayron.jpg -------------------------------------------------------------------------------- /demo/assets/js/fastgap.controllers.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | /* FASTGAP https://github.com/FastGap/FastGap 10 | 11 | IMPORTANT, READ LIBRARY DOCS FOR BETTER CUSTOMIZATION 12 | 13 | http://zeptojs.com 14 | http://topcoat.io 15 | */ 16 | 17 | 18 | var AppController = function () {}; 19 | 20 | AppController.prototype = { 21 | initialize: function () { 22 | 23 | //YOUR "GLOBAL CODE" HERE. 24 | 25 | 26 | }, 27 | destroy: function () { 28 | PageLoad.ajxHandle = null; 29 | } 30 | }; 31 | var HomeController = function () {}; 32 | 33 | HomeController.prototype = { 34 | self: Object, 35 | initialize: function () { 36 | //your code here 37 | }, 38 | destroy: function () { 39 | // unset events 40 | // stop ajax 41 | // destroy components 42 | FG.scroll = null; 43 | PageLoad.ajxHandle = null; 44 | } 45 | }; 46 | var Page1Controller = function () {}; 47 | 48 | Page1Controller.prototype = { 49 | onScroll: Function, 50 | self: Object, 51 | initialize: function () { 52 | self = this; 53 | //scroll listener 54 | FG.$scrollApp.addEventListener("scroll", self.onScroll); 55 | }, 56 | onScroll: function (e) { 57 | //checkscrol 58 | 59 | //the calc 60 | if (Number(FG.$scrollApp.scrollHeight - e.srcElement.scrollTop) - e.srcElement.clientHeight <= 350) { 61 | div = document.createElement("div"); 62 | //fake content 63 | div.innerHTML = "

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

"; 64 | //preload 65 | preload = document.createElement("div"); 66 | preload.innerHTML = "

simulando requisição server...

"; 67 | //add preload 68 | FG.$scrollApp.appendChild(preload); 69 | //remove listener on scroll 70 | FG.$scrollApp.removeEventListener("scroll", self.onScroll); 71 | 72 | /* SIMULATE DELAY 2 SECONDS FROM TO SERVER AJAX REQUEST */ 73 | setTimeout(function () { 74 | //add listener 75 | FG.$scrollApp.addEventListener("scroll", self.onScroll); 76 | //remove child and add content 77 | FG.$scrollApp.removeChild(preload); 78 | FG.$scrollApp.appendChild(div); 79 | 80 | FG.$scrollApp.scrollTop += 20; 81 | }, 2000); 82 | 83 | } 84 | }, 85 | destroy: function () { 86 | // unset events 87 | // stop ajax 88 | //remove listener scroll 89 | FG.$scrollApp.removeEventListener("scroll", self.onScroll); 90 | PageLoad.ajxHandle = null; 91 | } 92 | }; 93 | var Page2Controller = function() {}; 94 | 95 | Page2Controller.prototype = { 96 | initialize: function() { 97 | alert("initialize Page2 Controller, create elements"); 98 | }, 99 | destroy: function() { 100 | alert("destroy Page2 Controller, destroy elements, scroll and ajax"); 101 | 102 | PageLoad.ajxHandle = null; 103 | } 104 | }; 105 | var Page3Controller = function() {}; 106 | 107 | Page3Controller.prototype = { 108 | initialize: function() { 109 | 110 | }, 111 | destroy: function() { 112 | // unset events 113 | // stop ajax 114 | // destroy components 115 | PageLoad.ajxHandle = null; 116 | } 117 | }; 118 | var Page4Controller = function() {}; 119 | 120 | Page4Controller.prototype = { 121 | initialize: function() { 122 | 123 | }, 124 | destroy: function() { 125 | // unset events 126 | // stop ajax 127 | // destroy components 128 | PageLoad.ajxHandle = null; 129 | } 130 | }; 131 | var Page5Controller = function() {}; 132 | 133 | Page5Controller.prototype = { 134 | initialize: function() { 135 | 136 | }, 137 | destroy: function() { 138 | // unset events 139 | // stop ajax 140 | // destroy components 141 | PageLoad.ajxHandle = null; 142 | } 143 | }; -------------------------------------------------------------------------------- /demo/assets/js/fastgap.core.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | /* FASTGAP https://github.com/FastGap/FastGap 10 | 11 | ;(function(window,undefined){ 12 | "use strict"; 13 | 14 | // Localise Globals 15 | //var History = window.History = window.history||{}; 16 | 17 | /*History.bind = function(event, callback){ 18 | //window.addEventListener(event, callback); 19 | }; 20 | 21 | })(window);*/ 22 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 23 | 24 | 25 | (function (window) { 26 | // FastGap object 27 | var FG = window.FG = { 28 | scrollApp: null, 29 | currentController: null, 30 | $contentLoad: null, 31 | $menu: null, 32 | $content: null, 33 | $headerApp: null, 34 | }; 35 | //init project 36 | FG.init = function () { 37 | FG.setDomElements(); 38 | this.addEventListeners(); 39 | this.definitions(); 40 | /* PHONEGAP EVENT DEVICE READY LOAD HOME PAGE */ 41 | 42 | //document.addEventListener("deviceready",function(){ 43 | //prevent bug call transitionend 44 | setTimeout(function () { 45 | Transition.control = true; 46 | Navigator.loadPage('home.html','HomeController'); 47 | }, 10); 48 | //}); 49 | }; 50 | //set fg elements 51 | FG.setDomElements = function () { 52 | FG.$contentLoad = $("#scroll"); 53 | FG.$menu = $("#menu"); 54 | FG.$content = $("#content"); 55 | FG.$headerApp = $('#header-app'); 56 | FG.$scrollApp = document.getElementById("scroll"); 57 | } 58 | //set definitions project 59 | FG.definitions = function () { 60 | //fastclick, performance library of mouse events to touch events 61 | FastClick.attach(document.body); 62 | 63 | 64 | /*block drag "navegator box", this code locks the drag in the browser but it locks the scroll, BlackBerry and Android is not necessary, and to avoid this in iOS add the following code in config.xml 65 | 66 | 67 | 68 | 69 | $(document).on('touchmove', function (event) { 70 | e.preventDefault(); 71 | });*/ 72 | } 73 | //set fastgap listeners 74 | FG.addEventListeners = function () { 75 | //orientation change event 76 | window.addEventListener("orientationchange", function () { 77 | //scroll - CSS CALC() NOT WORKS IN ANDROID < 4.3 AND IOS 6.0 < 78 | $("#scroll").height(window.innerHeight - FG.$headerApp.height()); 79 | }, false); 80 | 81 | //load internal pages 82 | $("#page").on('click', '.botoes-app', Navigator.loadPage); 83 | 84 | //listener menu button 85 | $("#page").on('click', "#menu-button", Transition.toggleMenu); 86 | 87 | //SNAP JS 88 | snapper = new Snap({ 89 | element: document.getElementById('content'), //your content 90 | maxPosition: $("menu").width(), //width of the menu 91 | disable: 'right', //disable right menu 92 | transitionSpeed: 0.2 //speed transition 93 | }); 94 | 95 | //scroll - CSS CALC() NOT WORKS IN ANDROID < 4.3 AND IOS 6.0 < 96 | $("#scroll").height(window.innerHeight - FG.$headerApp.height()); 97 | 98 | }; 99 | })(window); 100 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 101 | 102 | (function (window) { 103 | //navigator object 104 | var Navigator = window.Navigator = { 105 | control: true, 106 | currentPage: '', 107 | controlers:'', 108 | isBack: false 109 | }; 110 | //load page*****************modifiquei **************** 111 | Navigator.loadPage = function (url, Dcontrolers) { 112 | //if string page is url 113 | if (typeof url == "string") { 114 | Navigator.currentPage = url; 115 | Navigator.controlers=Dcontrolers; 116 | } else { 117 | // or page is data-url attr in menu ul li element 118 | Navigator.currentPage = $(this).data("url"); 119 | Navigator.controlers=$(this).data("controler"); 120 | 121 | } 122 | 123 | //start transition 124 | Transition.start(); 125 | }; 126 | 127 | 128 | })(window); 129 | /* FASTGAP https://github.com/FastGap/FastGap */ 130 | 131 | (function (window) { 132 | 133 | // transition object 134 | var Transition = window.Transition = { 135 | control: false, 136 | class: 'transitionApp1' 137 | /* VIEW TRANSITIONS.CSS OR CREATE YOUR TRANSITION */ 138 | }; 139 | 140 | //start transition 141 | Transition.start = function () { 142 | if (!firstrequestapp) { 143 | FG.$contentLoad.addClass(Transition.class); 144 | //time for alpha 150 mileseconds 145 | setTimeout(Transition.End, 150); 146 | } else { 147 | //first request open app 148 | firstrequestapp = false; 149 | Transition.End(); 150 | } 151 | }; 152 | //end transition with listener 153 | Transition.End = function () { 154 | if (Transition.control) { 155 | PageLoad.load(Navigator.currentPage); 156 | //control load pages 157 | Transition.control = false; 158 | } 159 | }; 160 | //toggleMenu 161 | Transition.toggleMenu = function () { 162 | if (snapper.state().state == "closed") { 163 | Transition.showMenu(); 164 | } else { 165 | Transition.hideMenu(); 166 | } 167 | }; 168 | //hide panel menu 169 | Transition.hideMenu = function () { 170 | snapper.close(); 171 | }; 172 | //show panel menu 173 | Transition.showMenu = function () { 174 | snapper.open('left'); 175 | }; 176 | 177 | })(window); 178 | /* FASTGAP https://github.com/FastGap/FastGap */ 179 | 180 | (function (window) { 181 | 182 | // page load object 183 | var PageLoad = window.PageLoad = { 184 | ajxHandle: null 185 | }; 186 | 187 | //load ajax 188 | PageLoad.load = function (page) { 189 | PageLoad.ajxHandle = $.get("pages/" + page, PageLoad.success); 190 | }; 191 | //sucess load 192 | PageLoad.success = function (content) { 193 | 194 | if (FG.currentController != null) { 195 | // unset everything in the previous controller 196 | // prevent memory leaks 197 | FG.currentController.destroy(); 198 | } 199 | 200 | 201 | FG.$contentLoad.html(content); 202 | 203 | //create new controller 204 | FG.currentController = new this[Navigator.controlers](); 205 | 206 | // once new controller created, initialize it 207 | if (FG.currentController != null) { 208 | FG.currentController.initialize(); 209 | } 210 | 211 | //hide my menu 212 | Transition.hideMenu(); 213 | //remove transition in my app 214 | Transition.control = true; 215 | FG.$contentLoad.removeClass(Transition.class); 216 | }; 217 | 218 | 219 | })(window); 220 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 221 | 222 | 223 | /* GLOBAL VAR */ 224 | var app; 225 | /* SNAP JS*/ 226 | var snapper; 227 | /*FIRST REQUEST APP*/ 228 | var firstrequestapp = true; 229 | 230 | //ready app 231 | $(document).ready(function () { 232 | //create the project 233 | FG.init(); 234 | app = new AppController(); 235 | app.initialize(); 236 | }); -------------------------------------------------------------------------------- /demo/assets/js/fastgap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | function FastClick(a){"use strict";var b,c=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=10,this.layer=a,!a||!a.nodeType)throw new TypeError("Layer must be a document node");this.onClick=function(){return FastClick.prototype.onClick.apply(c,arguments)},this.onMouse=function(){return FastClick.prototype.onMouse.apply(c,arguments)},this.onTouchStart=function(){return FastClick.prototype.onTouchStart.apply(c,arguments)},this.onTouchMove=function(){return FastClick.prototype.onTouchMove.apply(c,arguments)},this.onTouchEnd=function(){return FastClick.prototype.onTouchEnd.apply(c,arguments)},this.onTouchCancel=function(){return FastClick.prototype.onTouchCancel.apply(c,arguments)},FastClick.notNeeded(a)||(this.deviceIsAndroid&&(a.addEventListener("mouseover",this.onMouse,!0),a.addEventListener("mousedown",this.onMouse,!0),a.addEventListener("mouseup",this.onMouse,!0)),a.addEventListener("click",this.onClick,!0),a.addEventListener("touchstart",this.onTouchStart,!1),a.addEventListener("touchmove",this.onTouchMove,!1),a.addEventListener("touchend",this.onTouchEnd,!1),a.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(a.removeEventListener=function(b,c,d){var e=Node.prototype.removeEventListener;"click"===b?e.call(a,b,c.hijacked||c,d):e.call(a,b,c,d)},a.addEventListener=function(b,c,d){var e=Node.prototype.addEventListener;"click"===b?e.call(a,b,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(a,b,c,d)}),"function"==typeof a.onclick&&(b=a.onclick,a.addEventListener("click",function(a){b(a)},!1),a.onclick=null))}var AppController=function(){};AppController.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var HomeController=function(){};HomeController.prototype={self:Object,initialize:function(){},destroy:function(){FG.scroll=null,PageLoad.ajxHandle=null}};var Page1Controller=function(){};Page1Controller.prototype={onScroll:Function,self:Object,initialize:function(){self=this,FG.$scrollApp.addEventListener("scroll",self.onScroll)},onScroll:function(a){Number(FG.$scrollApp.scrollHeight-a.srcElement.scrollTop)-a.srcElement.clientHeight<=350&&(div=document.createElement("div"),div.innerHTML="

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

",preload=document.createElement("div"),preload.innerHTML="

simulando requisição server...

",FG.$scrollApp.appendChild(preload),FG.$scrollApp.removeEventListener("scroll",self.onScroll),setTimeout(function(){FG.$scrollApp.addEventListener("scroll",self.onScroll),FG.$scrollApp.removeChild(preload),FG.$scrollApp.appendChild(div),FG.$scrollApp.scrollTop+=20},2e3))},destroy:function(){FG.$scrollApp.removeEventListener("scroll",self.onScroll),PageLoad.ajxHandle=null}};var Page2Controller=function(){};Page2Controller.prototype={initialize:function(){alert("initialize Page2 Controller, create elements")},destroy:function(){alert("destroy Page2 Controller, destroy elements, scroll and ajax"),PageLoad.ajxHandle=null}};var Page3Controller=function(){};Page3Controller.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var Page4Controller=function(){};Page4Controller.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var Page5Controller=function(){};Page5Controller.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var Zepto=function(){function a(a){return null==a?String(a):U[V.call(a)]||"object"}function b(b){return"function"==a(b)}function c(a){return null!=a&&a==a.window}function d(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}function e(b){return"object"==a(b)}function f(a){return e(a)&&!c(a)&&Object.getPrototypeOf(a)==Object.prototype}function g(a){return"number"==typeof a.length}function h(a){return D.call(a,function(a){return null!=a})}function i(a){return a.length>0?x.fn.concat.apply([],a):a}function j(a){return a.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 k(a){return a in G?G[a]:G[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function l(a,b){return"number"!=typeof b||H[j(a)]?b:b+"px"}function m(a){var b,c;return F[a]||(b=E.createElement(a),E.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),F[a]=c),F[a]}function n(a){return"children"in a?C.call(a.children):x.map(a.childNodes,function(a){return 1==a.nodeType?a:void 0})}function o(a,b,c){for(w in b)c&&(f(b[w])||Z(b[w]))?(f(b[w])&&!f(a[w])&&(a[w]={}),Z(b[w])&&!Z(a[w])&&(a[w]=[]),o(a[w],b[w],c)):b[w]!==v&&(a[w]=b[w])}function p(a,b){return null==b?x(a):x(a).filter(b)}function q(a,c,d,e){return b(c)?c.call(a,d,e):c}function r(a,b,c){null==c?a.removeAttribute(b):a.setAttribute(b,c)}function s(a,b){var c=a.className,d=c&&c.baseVal!==v;return b===v?d?c.baseVal:c:void(d?c.baseVal=b:a.className=b)}function t(a){var b;try{return a?"true"==a||("false"==a?!1:"null"==a?null:/^0/.test(a)||isNaN(b=Number(a))?/^[\[\{]/.test(a)?x.parseJSON(a):a:b):a}catch(c){return a}}function u(a,b){b(a);for(var c in a.childNodes)u(a.childNodes[c],b)}var v,w,x,y,z,A,B=[],C=B.slice,D=B.filter,E=window.document,F={},G={},H={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},I=/^\s*<(\w+|!)[^>]*>/,J=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,K=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,L=/^(?:body|html)$/i,M=/([A-Z])/g,N=["val","css","html","text","data","width","height","offset"],O=["after","prepend","before","append"],P=E.createElement("table"),Q=E.createElement("tr"),R={tr:E.createElement("tbody"),tbody:P,thead:P,tfoot:P,td:Q,th:Q,"*":E.createElement("div")},S=/complete|loaded|interactive/,T=/^[\w-]*$/,U={},V=U.toString,W={},X=E.createElement("div"),Y={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Z=Array.isArray||function(a){return a instanceof Array};return W.matches=function(a,b){if(!b||!a||1!==a.nodeType)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=X).appendChild(a),d=~W.qsa(e,b).indexOf(a),f&&X.removeChild(a),d},z=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},A=function(a){return D.call(a,function(b,c){return a.indexOf(b)==c})},W.fragment=function(a,b,c){var d,e,g;return J.test(a)&&(d=x(E.createElement(RegExp.$1))),d||(a.replace&&(a=a.replace(K,"<$1>")),b===v&&(b=I.test(a)&&RegExp.$1),b in R||(b="*"),g=R[b],g.innerHTML=""+a,d=x.each(C.call(g.childNodes),function(){g.removeChild(this)})),f(c)&&(e=x(d),x.each(c,function(a,b){N.indexOf(a)>-1?e[a](b):e.attr(a,b)})),d},W.Z=function(a,b){return a=a||[],a.__proto__=x.fn,a.selector=b||"",a},W.isZ=function(a){return a instanceof W.Z},W.init=function(a,c){var d;if(!a)return W.Z();if("string"==typeof a)if(a=a.trim(),"<"==a[0]&&I.test(a))d=W.fragment(a,RegExp.$1,c),a=null;else{if(c!==v)return x(c).find(a);d=W.qsa(E,a)}else{if(b(a))return x(E).ready(a);if(W.isZ(a))return a;if(Z(a))d=h(a);else if(e(a))d=[a],a=null;else if(I.test(a))d=W.fragment(a.trim(),RegExp.$1,c),a=null;else{if(c!==v)return x(c).find(a);d=W.qsa(E,a)}}return W.Z(d,a)},x=function(a,b){return W.init(a,b)},x.extend=function(a){var b,c=C.call(arguments,1);return"boolean"==typeof a&&(b=a,a=c.shift()),c.forEach(function(c){o(a,c,b)}),a},W.qsa=function(a,b){var c,e="#"==b[0],f=!e&&"."==b[0],g=e||f?b.slice(1):b,h=T.test(g);return d(a)&&h&&e?(c=a.getElementById(g))?[c]:[]:1!==a.nodeType&&9!==a.nodeType?[]:C.call(h&&!e?f?a.getElementsByClassName(g):a.getElementsByTagName(b):a.querySelectorAll(b))},x.contains=function(a,b){return a!==b&&a.contains(b)},x.type=a,x.isFunction=b,x.isWindow=c,x.isArray=Z,x.isPlainObject=f,x.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},x.inArray=function(a,b,c){return B.indexOf.call(b,a,c)},x.camelCase=z,x.trim=function(a){return null==a?"":String.prototype.trim.call(a)},x.uuid=0,x.support={},x.expr={},x.map=function(a,b){var c,d,e,f=[];if(g(a))for(d=0;d=0?a:a+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(a){return B.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return b(a)?this.not(this.not(a)):x(D.call(this,function(b){return W.matches(b,a)}))},add:function(a,b){return x(A(this.concat(x(a,b))))},is:function(a){return this.length>0&&W.matches(this[0],a)},not:function(a){var c=[];if(b(a)&&a.call!==v)this.each(function(b){a.call(this,b)||c.push(this)});else{var d="string"==typeof a?this.filter(a):g(a)&&b(a.item)?C.call(a):x(a);this.forEach(function(a){d.indexOf(a)<0&&c.push(a)})}return x(c)},has:function(a){return this.filter(function(){return e(a)?x.contains(this,a):x(this).find(a).size()})},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!e(a)?a:x(a)},last:function(){var a=this[this.length-1];return a&&!e(a)?a:x(a)},find:function(a){var b,c=this;return b="object"==typeof a?x(a).filter(function(){var a=this;return B.some.call(c,function(b){return x.contains(b,a)})}):1==this.length?x(W.qsa(this[0],a)):this.map(function(){return W.qsa(this,a)})},closest:function(a,b){var c=this[0],e=!1;for("object"==typeof a&&(e=x(a));c&&!(e?e.indexOf(c)>=0:W.matches(c,a));)c=c!==b&&!d(c)&&c.parentNode;return x(c)},parents:function(a){for(var b=[],c=this;c.length>0;)c=x.map(c,function(a){return(a=a.parentNode)&&!d(a)&&b.indexOf(a)<0?(b.push(a),a):void 0});return p(b,a)},parent:function(a){return p(A(this.pluck("parentNode")),a)},children:function(a){return p(this.map(function(){return n(this)}),a)},contents:function(){return this.map(function(){return C.call(this.childNodes)})},siblings:function(a){return p(this.map(function(a,b){return D.call(n(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return x.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=m(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var c=b(a);if(this[0]&&!c)var d=x(a).get(0),e=d.parentNode||this.length>1;return this.each(function(b){x(this).wrapAll(c?a.call(this,b):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){x(this[0]).before(a=x(a));for(var b;(b=a.children()).length;)a=b.first();x(a).append(this)}return this},wrapInner:function(a){var c=b(a);return this.each(function(b){var d=x(this),e=d.contents(),f=c?a.call(this,b):a;e.length?e.wrapAll(f):d.append(f)})},unwrap:function(){return this.parent().each(function(){x(this).replaceWith(x(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=x(this);(a===v?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return x(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return x(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return 0===arguments.length?this.length>0?this[0].innerHTML:null:this.each(function(b){var c=this.innerHTML;x(this).empty().append(q(this,a,b,c))})},text:function(a){return 0===arguments.length?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=a===v?"":""+a})},attr:function(a,b){var c;return"string"==typeof a&&b===v?0==this.length||1!==this[0].nodeType?v:"value"==a&&"INPUT"==this[0].nodeName?this.val():!(c=this[0].getAttribute(a))&&a in this[0]?this[0][a]:c:this.each(function(c){if(1===this.nodeType)if(e(a))for(w in a)r(this,w,a[w]);else r(this,a,q(this,b,c,this.getAttribute(a)))})},removeAttr:function(a){return this.each(function(){1===this.nodeType&&r(this,a)})},prop:function(a,b){return a=Y[a]||a,b===v?this[0]&&this[0][a]:this.each(function(c){this[a]=q(this,b,c,this[a])})},data:function(a,b){var c=this.attr("data-"+a.replace(M,"-$1").toLowerCase(),b);return null!==c?t(c):v},val:function(a){return 0===arguments.length?this[0]&&(this[0].multiple?x(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(b){this.value=q(this,a,b,this.value)})},offset:function(a){if(a)return this.each(function(b){var c=x(this),d=q(this,a,b,c.offset()),e=c.offsetParent().offset(),f={top:d.top-e.top,left:d.left-e.left};"static"==c.css("position")&&(f.position="relative"),c.css(f)});if(0==this.length)return null;var b=this[0].getBoundingClientRect();return{left:b.left+window.pageXOffset,top:b.top+window.pageYOffset,width:Math.round(b.width),height:Math.round(b.height)}},css:function(b,c){if(arguments.length<2){var d=this[0],e=getComputedStyle(d,"");if(!d)return;if("string"==typeof b)return d.style[z(b)]||e.getPropertyValue(b);if(Z(b)){var f={};return x.each(Z(b)?b:[b],function(a,b){f[b]=d.style[z(b)]||e.getPropertyValue(b)}),f}}var g="";if("string"==a(b))c||0===c?g=j(b)+":"+l(b,c):this.each(function(){this.style.removeProperty(j(b))});else for(w in b)b[w]||0===b[w]?g+=j(w)+":"+l(w,b[w])+";":this.each(function(){this.style.removeProperty(j(w))});return this.each(function(){this.style.cssText+=";"+g})},index:function(a){return a?this.indexOf(x(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return a?B.some.call(this,function(a){return this.test(s(a))},k(a)):!1},addClass:function(a){return a?this.each(function(b){y=[];var c=s(this),d=q(this,a,b,c);d.split(/\s+/g).forEach(function(a){x(this).hasClass(a)||y.push(a)},this),y.length&&s(this,c+(c?" ":"")+y.join(" "))}):this},removeClass:function(a){return this.each(function(b){return a===v?s(this,""):(y=s(this),q(this,a,b,y).split(/\s+/g).forEach(function(a){y=y.replace(k(a)," ")}),void s(this,y.trim()))})},toggleClass:function(a,b){return a?this.each(function(c){var d=x(this),e=q(this,a,c,s(this));e.split(/\s+/g).forEach(function(a){(b===v?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})}):this},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===v?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a===v?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=L.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(x(a).css("margin-top"))||0,c.left-=parseFloat(x(a).css("margin-left"))||0,d.top+=parseFloat(x(b[0]).css("border-top-width"))||0,d.left+=parseFloat(x(b[0]).css("border-left-width"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||E.body;a&&!L.test(a.nodeName)&&"static"==x(a).css("position");)a=a.offsetParent;return a})}},x.fn.detach=x.fn.remove,["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});x.fn[a]=function(e){var f,g=this[0];return e===v?c(g)?g["inner"+b]:d(g)?g.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){g=x(this),g.css(a,q(this,e,b,g[a]()))})}}),O.forEach(function(b,c){var d=c%2;x.fn[b]=function(){var b,e,f=x.map(arguments,function(c){return b=a(c),"object"==b||"array"==b||null==c?c:W.fragment(c)}),g=this.length>1;return f.length<1?this:this.each(function(a,b){e=d?b:b.parentNode,b=0==c?b.nextSibling:1==c?b.firstChild:2==c?b:null,f.forEach(function(a){if(g)a=a.cloneNode(!0);else if(!e)return x(a).remove();u(e.insertBefore(a,b),function(a){null==a.nodeName||"SCRIPT"!==a.nodeName.toUpperCase()||a.type&&"text/javascript"!==a.type||a.src||window.eval.call(window,a.innerHTML)})})})},x.fn[d?b+"To":"insert"+(c?"Before":"After")]=function(a){return x(a)[b](this),this}}),W.Z.prototype=x.fn,W.uniq=A,W.deserializeValue=t,x.zepto=W,x}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(a){function b(a){return a._zid||(a._zid=m++)}function c(a,c,f,g){if(c=d(c),c.ns)var h=e(c.ns);return(q[b(a)]||[]).filter(function(a){return!(!a||c.e&&a.e!=c.e||c.ns&&!h.test(a.ns)||f&&b(a.fn)!==b(f)||g&&a.sel!=g)})}function d(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function e(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function f(a,b){return a.del&&!s&&a.e in t||!!b}function g(a){return u[a]||s&&t[a]||a}function h(c,e,h,i,k,m,n){var o=b(c),p=q[o]||(q[o]=[]);e.split(/\s/).forEach(function(b){if("ready"==b)return a(document).ready(h);var e=d(b);e.fn=h,e.sel=k,e.e in u&&(h=function(b){var c=b.relatedTarget;return!c||c!==this&&!a.contains(this,c)?e.fn.apply(this,arguments):void 0}),e.del=m;var o=m||h;e.proxy=function(a){if(a=j(a),!a.isImmediatePropagationStopped()){a.data=i;var b=o.apply(c,a._args==l?[a]:[a].concat(a._args));return b===!1&&(a.preventDefault(),a.stopPropagation()),b}},e.i=p.length,p.push(e),"addEventListener"in c&&c.addEventListener(g(e.e),e.proxy,f(e,n))})}function i(a,d,e,h,i){var j=b(a);(d||"").split(/\s/).forEach(function(b){c(a,b,e,h).forEach(function(b){delete q[j][b.i],"removeEventListener"in a&&a.removeEventListener(g(b.e),b.proxy,f(b,i))})})}function j(b,c){return(c||!b.isDefaultPrevented)&&(c||(c=b),a.each(y,function(a,d){var e=c[a];b[a]=function(){return this[d]=v,e&&e.apply(c,arguments)},b[d]=w}),(c.defaultPrevented!==l?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())&&(b.isDefaultPrevented=v)),b}function k(a){var b,c={originalEvent:a};for(b in a)x.test(b)||a[b]===l||(c[b]=a[b]);return j(c,a)}var l,m=1,n=Array.prototype.slice,o=a.isFunction,p=function(a){return"string"==typeof a},q={},r={},s="onfocusin"in window,t={focus:"focusin",blur:"focusout"},u={mouseenter:"mouseover",mouseleave:"mouseout"};r.click=r.mousedown=r.mouseup=r.mousemove="MouseEvents",a.event={add:h,remove:i},a.proxy=function(c,d){if(o(c)){var e=function(){return c.apply(d,arguments)};return e._zid=b(c),e}if(p(d))return a.proxy(c[d],c);throw new TypeError("expected function")},a.fn.bind=function(a,b,c){return this.on(a,b,c)},a.fn.unbind=function(a,b){return this.off(a,b)},a.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var v=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$)/,y={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};a.fn.delegate=function(a,b,c){return this.on(b,a,c)},a.fn.undelegate=function(a,b,c){return this.off(b,a,c)},a.fn.live=function(b,c){return a(document.body).delegate(this.selector,b,c),this},a.fn.die=function(b,c){return a(document.body).undelegate(this.selector,b,c),this},a.fn.on=function(b,c,d,e,f){var g,j,m=this;return b&&!p(b)?(a.each(b,function(a,b){m.on(a,c,d,b,f)}),m):(p(c)||o(e)||e===!1||(e=d,d=c,c=l),(o(d)||d===!1)&&(e=d,d=l),e===!1&&(e=w),m.each(function(l,m){f&&(g=function(a){return i(m,a.type,e),e.apply(this,arguments)}),c&&(j=function(b){var d,f=a(b.target).closest(c,m).get(0);return f&&f!==m?(d=a.extend(k(b),{currentTarget:f,liveFired:m}),(g||e).apply(f,[d].concat(n.call(arguments,1)))):void 0}),h(m,b,e,d,c,j||g)}))},a.fn.off=function(b,c,d){var e=this;return b&&!p(b)?(a.each(b,function(a,b){e.off(a,c,b)}),e):(p(c)||o(d)||d===!1||(d=c,c=l),d===!1&&(d=w),e.each(function(){i(this,b,d,c)}))},a.fn.trigger=function(b,c){return b=p(b)||a.isPlainObject(b)?a.Event(b):j(b),b._args=c,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(b):a(this).triggerHandler(b,c)})},a.fn.triggerHandler=function(b,d){var e,f;return this.each(function(g,h){e=k(p(b)?a.Event(b):b),e._args=d,e.target=h,a.each(c(h,b.type||b),function(a,b){return f=b.proxy(e),e.isImmediatePropagationStopped()?!1:void 0})}),f},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)}}),["focus","blur"].forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.each(function(){try{this[b]()}catch(a){}}),this}}),a.Event=function(a,b){p(a)||(b=a,a=b.type);var c=document.createEvent(r[a]||"Events"),d=!0;if(b)for(var e in b)"bubbles"==e?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),j(c)}}(Zepto),function(a){function b(b,c,d){var e=a.Event(c);return a(b).trigger(e,d),!e.isDefaultPrevented()}function c(a,c,d,e){return a.global?b(c||s,d,e):void 0}function d(b){b.global&&0===a.active++&&c(b,null,"ajaxStart")}function e(b){b.global&&!--a.active&&c(b,null,"ajaxStop")}function f(a,b){var d=b.context;return b.beforeSend.call(d,a,b)===!1||c(b,d,"ajaxBeforeSend",[a,b])===!1?!1:void c(b,d,"ajaxSend",[a,b])}function g(a,b,d,e){var f=d.context,g="success";d.success.call(f,a,g,b),e&&e.resolveWith(f,[a,g,b]),c(d,f,"ajaxSuccess",[b,d,a]),i(g,b,d)}function h(a,b,d,e,f){var g=e.context;e.error.call(g,d,b,a),f&&f.rejectWith(g,[d,b,a]),c(e,g,"ajaxError",[d,e,a||b]),i(b,d,e)}function i(a,b,d){var f=d.context;d.complete.call(f,b,a),c(d,f,"ajaxComplete",[b,d]),e(d)}function j(){}function k(a){return a&&(a=a.split(";",2)[0]),a&&(a==x?"html":a==w?"json":u.test(a)?"script":v.test(a)&&"xml")||"text"}function l(a,b){return""==b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function m(b){b.processData&&b.data&&"string"!=a.type(b.data)&&(b.data=a.param(b.data,b.traditional)),!b.data||b.type&&"GET"!=b.type.toUpperCase()||(b.url=l(b.url,b.data),b.data=void 0)}function n(b,c,d,e){return a.isFunction(c)&&(e=d,d=c,c=void 0),a.isFunction(d)||(e=d,d=void 0),{url:b,data:c,success:d,dataType:e}}function o(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,i){f=a.type(i),e&&(c=d?e:e+"["+(h||"object"==f||"array"==f?c:"")+"]"),!e&&g?b.add(i.name,i.value):"array"==f||!d&&"object"==f?o(b,i,d,c):b.add(c,i)})}var p,q,r=0,s=window.document,t=/)<[^<]*)*<\/script>/gi,u=/^(?:text|application)\/javascript/i,v=/^(?:text|application)\/xml/i,w="application/json",x="text/html",y=/^\s*$/;a.active=0,a.ajaxJSONP=function(b,c){if(!("type"in b))return a.ajax(b);var d,e,i=b.jsonpCallback,j=(a.isFunction(i)?i():i)||"jsonp"+ ++r,k=s.createElement("script"),l=window[j],m=function(b){a(k).triggerHandler("error",b||"abort")},n={abort:m};return c&&c.promise(n),a(k).on("load error",function(f,i){clearTimeout(e),a(k).off().remove(),"error"!=f.type&&d?g(d[0],n,b,c):h(null,i||"error",n,b,c),window[j]=l,d&&a.isFunction(l)&&l(d[0]),l=d=void 0}),f(n,b)===!1?(m("abort"),n):(window[j]=function(){d=arguments},k.src=b.url.replace(/\?(.+)=\?/,"?$1="+j),s.head.appendChild(k),b.timeout>0&&(e=setTimeout(function(){m("timeout")},b.timeout)),n)},a.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:w,xml:"application/xml, text/xml",html:x,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},a.ajax=function(b){var c=a.extend({},b||{}),e=a.Deferred&&a.Deferred();for(p in a.ajaxSettings)void 0===c[p]&&(c[p]=a.ajaxSettings[p]);d(c),c.crossDomain||(c.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(c.url)&&RegExp.$2!=window.location.host),c.url||(c.url=window.location.toString()),m(c),c.cache===!1&&(c.url=l(c.url,"_="+Date.now()));var i=c.dataType,n=/\?.+=\?/.test(c.url);if("jsonp"==i||n)return n||(c.url=l(c.url,c.jsonp?c.jsonp+"=?":c.jsonp===!1?"":"callback=?")),a.ajaxJSONP(c,e);var o,r=c.accepts[i],s={},t=function(a,b){s[a.toLowerCase()]=[a,b]},u=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:window.location.protocol,v=c.xhr(),w=v.setRequestHeader;if(e&&e.promise(v),c.crossDomain||t("X-Requested-With","XMLHttpRequest"),t("Accept",r||"*/*"),(r=c.mimeType||r)&&(r.indexOf(",")>-1&&(r=r.split(",",2)[0]),v.overrideMimeType&&v.overrideMimeType(r)),(c.contentType||c.contentType!==!1&&c.data&&"GET"!=c.type.toUpperCase())&&t("Content-Type",c.contentType||"application/x-www-form-urlencoded"),c.headers)for(q in c.headers)t(q,c.headers[q]);if(v.setRequestHeader=t,v.onreadystatechange=function(){if(4==v.readyState){v.onreadystatechange=j,clearTimeout(o);var b,d=!1;if(v.status>=200&&v.status<300||304==v.status||0==v.status&&"file:"==u){i=i||k(c.mimeType||v.getResponseHeader("content-type")),b=v.responseText;try{"script"==i?(1,eval)(b):"xml"==i?b=v.responseXML:"json"==i&&(b=y.test(b)?null:a.parseJSON(b))}catch(f){d=f}d?h(d,"parsererror",v,c,e):g(b,v,c,e)}else h(v.statusText||null,v.status?"error":"abort",v,c,e)}},f(v,c)===!1)return v.abort(),h(null,"abort",v,c,e),v;if(c.xhrFields)for(q in c.xhrFields)v[q]=c.xhrFields[q];var x="async"in c?c.async:!0;v.open(c.type,c.url,x,c.username,c.password);for(q in s)w.apply(v,s[q]);return c.timeout>0&&(o=setTimeout(function(){v.onreadystatechange=j,v.abort(),h(null,"timeout",v,c,e)},c.timeout)),v.send(c.data?c.data:null),v},a.get=function(){return a.ajax(n.apply(null,arguments))},a.post=function(){var b=n.apply(null,arguments);return b.type="POST",a.ajax(b)},a.getJSON=function(){var b=n.apply(null,arguments);return b.dataType="json",a.ajax(b)},a.fn.load=function(b,c,d){if(!this.length)return this;var e,f=this,g=b.split(/\s/),h=n(b,c,d),i=h.success;return g.length>1&&(h.url=g[0],e=g[1]),h.success=function(b){f.html(e?a("
").html(b.replace(t,"")).find(e):b),i&&i.apply(f,arguments)},a.ajax(h),this};var z=encodeURIComponent;a.param=function(a,b){var c=[];return c.add=function(a,b){this.push(z(a)+"="+z(b))},o(c,a,b),c.join("&").replace(/%20/g,"+")}}(Zepto),function(a){a.fn.serializeArray=function(){var b,c=[];return a([].slice.call(this.get(0).elements)).each(function(){b=a(this);var d=b.attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=d&&"reset"!=d&&"button"!=d&&("radio"!=d&&"checkbox"!=d||this.checked)&&c.push({name:b.attr("name"),value:b.val()})}),c},a.fn.serialize=function(){var a=[];return this.serializeArray().forEach(function(b){a.push(encodeURIComponent(b.name)+"="+encodeURIComponent(b.value))}),a.join("&")},a.fn.submit=function(b){if(b)this.bind("submit",b);else if(this.length){var c=a.Event("submit");this.eq(0).trigger(c),c.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(a){"__proto__"in{}||a.extend(a.zepto,{Z:function(b,c){return b=b||[],a.extend(b,a.fn),b.selector=c||"",b.__Z=!0,b},isZ:function(b){return"array"===a.type(b)&&"__Z"in b}});try{getComputedStyle(void 0)}catch(b){var c=getComputedStyle;window.getComputedStyle=function(a){try{return c(a)}catch(b){return null}}}}(Zepto),FastClick.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,FastClick.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),FastClick.prototype.deviceIsIOS4=FastClick.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),FastClick.prototype.deviceIsIOSWithBadTarget=FastClick.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),FastClick.prototype.needsClick=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(this.deviceIsIOS&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},FastClick.prototype.needsFocus=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},FastClick.prototype.sendClick=function(a,b){"use strict";var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},FastClick.prototype.determineEventType=function(a){"use strict";return this.deviceIsAndroid&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(a){"use strict";var b;this.deviceIsIOS&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},FastClick.prototype.updateScrollParent=function(a){"use strict";var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(a){"use strict";return a.nodeType===Node.TEXT_NODE?a.parentNode:a},FastClick.prototype.onTouchStart=function(a){"use strict";var b,c,d;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],this.deviceIsIOS){if(d=window.getSelection(),d.rangeCount&&!d.isCollapsed)return!0;if(!this.deviceIsIOS4){if(c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTime<200&&a.preventDefault(),!0},FastClick.prototype.touchHasMoved=function(a){"use strict";var b=a.changedTouches[0],c=this.touchBoundary;return Math.abs(b.pageX-this.touchStartX)>c||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},FastClick.prototype.onTouchMove=function(a){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0 10 | },FastClick.prototype.findControl=function(a){"use strict";return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(a){"use strict";var b,c,d,e,f,g=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime<200)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(f=a.changedTouches[0],g=document.elementFromPoint(f.pageX-window.pageXOffset,f.pageY-window.pageYOffset)||g,g.fastClickScrollParent=this.targetElement.fastClickScrollParent),d=g.tagName.toLowerCase(),"label"===d){if(b=this.findControl(g)){if(this.focus(g),this.deviceIsAndroid)return!1;g=b}}else if(this.needsFocus(g))return a.timeStamp-c>100||this.deviceIsIOS&&window.top!==window&&"input"===d?(this.targetElement=null,!1):(this.focus(g),this.sendClick(g,a),this.deviceIsIOS4&&"select"===d||(this.targetElement=null,a.preventDefault()),!1);return this.deviceIsIOS&&!this.deviceIsIOS4&&(e=g.fastClickScrollParent,e&&e.fastClickLastScrollTop!==e.scrollTop)?!0:(this.needsClick(g)||(a.preventDefault(),this.sendClick(g,a)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(a){"use strict";return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},FastClick.prototype.onClick=function(a){"use strict";var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},FastClick.prototype.destroy=function(){"use strict";var a=this.layer;this.deviceIsAndroid&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(a){"use strict";var b,c;if("undefined"==typeof window.ontouchstart)return!0;if(c=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!FastClick.prototype.deviceIsAndroid)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(c>31&&window.innerWidth<=window.screen.width)return!0}}return"none"===a.style.msTouchAction?!0:!1},FastClick.attach=function(a){"use strict";return new FastClick(a)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick,function(a){var b=a.document,c=b.documentElement,d="overthrow-enabled",e="ontouchmove"in b,f="WebkitOverflowScrolling"in c.style||"msOverflowStyle"in c.style||!e&&a.screen.width>800||function(){var b=a.navigator.userAgent,c=b.match(/AppleWebKit\/([0-9]+)/),d=c&&c[1],e=c&&d>=534;return b.match(/Android ([0-9]+)/)&&RegExp.$1>=3&&e||b.match(/ Version\/([0-9]+)/)&&RegExp.$1>=0&&a.blackberry&&e||b.indexOf("PlayBook")>-1&&e&&-1===!b.indexOf("Android 2")||b.match(/Firefox\/([0-9]+)/)&&RegExp.$1>=4||b.match(/wOSBrowser\/([0-9]+)/)&&RegExp.$1>=233&&e||b.match(/NokiaBrowser\/([0-9\.]+)/)&&7.3===parseFloat(RegExp.$1)&&c&&d>=533}();a.overthrow={},a.overthrow.enabledClassName=d,a.overthrow.addClass=function(){-1===c.className.indexOf(a.overthrow.enabledClassName)&&(c.className+=" "+a.overthrow.enabledClassName)},a.overthrow.removeClass=function(){c.className=c.className.replace(a.overthrow.enabledClassName,"")},a.overthrow.set=function(){f&&a.overthrow.addClass()},a.overthrow.canBeFilledWithPoly=e,a.overthrow.forget=function(){a.overthrow.removeClass()},a.overthrow.support=f?"native":"none"}(this),function(a,b,c){if(b!==c){b.easing=function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},b.tossing=!1;var d;b.toss=function(a,e){b.intercept();var f,g,h=0,i=a.scrollLeft,j=a.scrollTop,k={top:"+0",left:"+0",duration:50,easing:b.easing,finished:function(){}},l=!1;if(e)for(var m in k)e[m]!==c&&(k[m]=e[m]);return"string"==typeof k.left?(k.left=parseFloat(k.left),f=k.left+i):(f=k.left,k.left=k.left-i),"string"==typeof k.top?(k.top=parseFloat(k.top),g=k.top+j):(g=k.top,k.top=k.top-j),b.tossing=!0,d=setInterval(function(){h++-1&&a||b.closest(a.parentNode)};var k=!1;b.set=function(){if(h(),!k&&!f&&g){a.overthrow.addClass(),k=!0,b.support="polyfilled",b.forget=function(){i(),k=!1,d.removeEventListener&&d.removeEventListener("touchstart",u,!1)};var j,l,m,n,o=[],p=[],q=function(){o=[],l=null},r=function(){p=[],m=null},s=function(a){n=j.querySelectorAll("textarea, input");for(var b=0,c=n.length;c>b;b++)n[b].style.pointerEvents=a},t=function(a,b){if(d.createEvent){var e,f=(!b||b===c)&&j.parentNode||j.touchchild||j;f!==j&&(e=d.createEvent("HTMLEvents"),e.initEvent("touchend",!0,!0),j.dispatchEvent(e),f.touchchild=j,j=f,f.dispatchEvent(a))}},u=function(a){if(b.intercept&&b.intercept(),q(),r(),j=b.closest(a.target),j&&j!==e&&!(a.touches.length>1)){s("none");var c=a,d=j.scrollTop,f=j.scrollLeft,g=j.offsetHeight,h=j.offsetWidth,i=a.touches[0].pageY,k=a.touches[0].pageX,n=j.scrollHeight,u=j.scrollWidth,v=function(a){var b=d+i-a.touches[0].pageY,e=f+k-a.touches[0].pageX,s=b>=(o.length?o[0]:0),v=e>=(p.length?p[0]:0);b>0&&n-g>b||e>0&&u-h>e?a.preventDefault():t(c),l&&s!==l&&q(),m&&v!==m&&r(),l=s,m=v,j.scrollTop=b,j.scrollLeft=e,o.unshift(b),p.unshift(e),o.length>3&&o.pop(),p.length>3&&p.pop()},w=function(){s("auto"),setTimeout(function(){s("none")},450),j.removeEventListener("touchmove",v,!1),j.removeEventListener("touchend",w,!1)};j.addEventListener("touchmove",v,!1),j.addEventListener("touchend",w,!1)}};d.addEventListener("touchstart",u,!1)}}}}(this,this.overthrow),function(a){a.overthrow.set()}(this),function(a,b){"use strict";var c=c||function(c){var d={element:null,dragger:null,disable:"none",addBodyClasses:!0,hyperextensible:!0,resistance:.5,flickThreshold:50,transitionSpeed:.3,easing:"ease",maxPosition:266,minPosition:-266,tapToClose:!0,touchToDrag:!0,slideIntent:40,minDragDistance:5},e={simpleStates:{opening:null,towards:null,hyperExtending:null,halfway:null,flick:null,translation:{absolute:0,relative:0,sinceDirectionChange:0,percentage:0}}},f={},g={hasTouch:"ontouchstart"in b.documentElement||a.navigator.msPointerEnabled,eventType:function(a){var b={down:g.hasTouch?"touchstart":"mousedown",move:g.hasTouch?"touchmove":"mousemove",up:g.hasTouch?"touchend":"mouseup",out:g.hasTouch?"touchcancel":"mouseout"};return b[a]},page:function(a,b){return g.hasTouch&&b.touches.length&&b.touches[0]?b.touches[0]["page"+a]:b["page"+a]},klass:{has:function(a,b){return-1!==a.className.indexOf(b)},add:function(a,b){!g.klass.has(a,b)&&d.addBodyClasses&&(a.className+=" "+b)},remove:function(a,b){d.addBodyClasses&&(a.className=a.className.replace(b,"").replace(/^\s+|\s+$/g,""))}},dispatchEvent:function(a){return"function"==typeof f[a]?f[a].call():void 0},vendor:function(){var a,c=b.createElement("div"),d="webkit Moz O ms".split(" ");for(a in d)if("undefined"!=typeof c.style[d[a]+"Transition"])return d[a]},transitionCallback:function(){return"Moz"===e.vendor||"ms"===e.vendor?"transitionend":e.vendor+"TransitionEnd"},canTransform:function(){return"undefined"!=typeof d.element.style[e.vendor+"Transform"]},deepExtend:function(a,b){var c;for(c in b)b[c]&&b[c].constructor&&b[c].constructor===Object?(a[c]=a[c]||{},g.deepExtend(a[c],b[c])):a[c]=b[c];return a},angleOfDrag:function(a,b){var c,d;return d=Math.atan2(-(e.startDragY-b),e.startDragX-a),0>d&&(d+=2*Math.PI),c=Math.floor(d*(180/Math.PI)-180),0>c&&c>-180&&(c=360-Math.abs(c)),Math.abs(c)},events:{addEvent:function(a,b,c){return a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):void 0},removeEvent:function(a,b,c){return a.addEventListener?a.removeEventListener(b,c,!1):a.attachEvent?a.detachEvent("on"+b,c):void 0},prevent:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}},parentUntil:function(a,b){for(var c="string"==typeof b;a.parentNode;){if(c&&a.getAttribute&&a.getAttribute(b))return a;if(!c&&a===b)return a;a=a.parentNode}return null}},h={translate:{get:{matrix:function(b){if(g.canTransform()){var c=a.getComputedStyle(d.element)[e.vendor+"Transform"].match(/\((.*)\)/),f=8;return c?(c=c[1].split(","),16===c.length&&(b+=f),parseInt(c[b],10)):0}return parseInt(d.element.style.left,10)}},easeCallback:function(){d.element.style[e.vendor+"Transition"]="",e.translation=h.translate.get.matrix(4),e.easing=!1,clearInterval(e.animatingInterval),0===e.easingTo&&(g.klass.remove(b.body,"snapjs-right"),g.klass.remove(b.body,"snapjs-left")),g.dispatchEvent("animated"),g.events.removeEvent(d.element,g.transitionCallback(),h.translate.easeCallback)},easeTo:function(a){g.canTransform()?(e.easing=!0,e.easingTo=a,d.element.style[e.vendor+"Transition"]="all "+d.transitionSpeed+"s "+d.easing,e.animatingInterval=setInterval(function(){g.dispatchEvent("animating")},1),g.events.addEvent(d.element,g.transitionCallback(),h.translate.easeCallback),h.translate.x(a)):(e.translation=a,h.translate.x(a)),0===a&&(d.element.style[e.vendor+"Transform"]="")},x:function(c){if(!("left"===d.disable&&c>0||"right"===d.disable&&0>c))if(d.hyperextensible||(c===d.maxPosition||c>d.maxPosition?c=d.maxPosition:(c===d.minPosition||c0,n=l;if(e.intentChecked&&!e.hasIntent)return;if(d.addBodyClasses&&(k>0?(g.klass.add(b.body,"snapjs-left"),g.klass.remove(b.body,"snapjs-right")):0>k&&(g.klass.add(b.body,"snapjs-right"),g.klass.remove(b.body,"snapjs-left"))),e.hasIntent===!1||null===e.hasIntent){var o=g.angleOfDrag(f,i),p=o>=0&&o<=d.slideIntent||360>=o&&o>360-d.slideIntent,q=o>=180&&o<=180+d.slideIntent||180>=o&&o>=180-d.slideIntent;e.hasIntent=q||p?!0:!1,e.intentChecked=!0}if(d.minDragDistance>=Math.abs(f-e.startDragX)||e.hasIntent===!1)return;g.events.prevent(a),g.dispatchEvent("drag"),e.dragWatchers.current=f,e.dragWatchers.last>f?("left"!==e.dragWatchers.state&&(e.dragWatchers.state="left",e.dragWatchers.hold=f),e.dragWatchers.last=f):e.dragWatchers.lastd.maxPosition/2,flick:Math.abs(e.dragWatchers.current-e.dragWatchers.hold)>d.flickThreshold,translation:{absolute:k,relative:l,sinceDirectionChange:e.dragWatchers.current-e.dragWatchers.hold,percentage:k/d.maxPosition*100}}):(d.minPosition>k&&(c=(k-d.minPosition)*d.resistance,n=l-c),e.simpleStates={opening:"right",towards:e.dragWatchers.state,hyperExtending:d.minPosition>k,halfway:kd.flickThreshold,translation:{absolute:k,relative:l,sinceDirectionChange:e.dragWatchers.current-e.dragWatchers.hold,percentage:k/d.minPosition*100}}),h.translate.x(n+j)}},endDrag:function(a){if(e.isDragging){g.dispatchEvent("end");var b=h.translate.get.matrix(4);if(0===e.dragWatchers.current&&0!==b&&d.tapToClose)return g.dispatchEvent("close"),g.events.prevent(a),h.translate.easeTo(0),e.isDragging=!1,void(e.startDragX=0);"left"===e.simpleStates.opening?e.simpleStates.halfway||e.simpleStates.hyperExtending||e.simpleStates.flick?e.simpleStates.flick&&"left"===e.simpleStates.towards?h.translate.easeTo(0):(e.simpleStates.flick&&"right"===e.simpleStates.towards||e.simpleStates.halfway||e.simpleStates.hyperExtending)&&h.translate.easeTo(d.maxPosition):h.translate.easeTo(0):"right"===e.simpleStates.opening&&(e.simpleStates.halfway||e.simpleStates.hyperExtending||e.simpleStates.flick?e.simpleStates.flick&&"right"===e.simpleStates.towards?h.translate.easeTo(0):(e.simpleStates.flick&&"left"===e.simpleStates.towards||e.simpleStates.halfway||e.simpleStates.hyperExtending)&&h.translate.easeTo(d.minPosition):h.translate.easeTo(0)),e.isDragging=!1,e.startDragX=g.page("X",a)}}}},i=function(a){a.element&&(g.deepExtend(d,a),e.vendor=g.vendor(),h.drag.listen())};this.open=function(a){g.dispatchEvent("open"),g.klass.remove(b.body,"snapjs-expand-left"),g.klass.remove(b.body,"snapjs-expand-right"),"left"===a?(e.simpleStates.opening="left",e.simpleStates.towards="right",g.klass.add(b.body,"snapjs-left"),g.klass.remove(b.body,"snapjs-right"),h.translate.easeTo(d.maxPosition)):"right"===a&&(e.simpleStates.opening="right",e.simpleStates.towards="left",g.klass.remove(b.body,"snapjs-left"),g.klass.add(b.body,"snapjs-right"),h.translate.easeTo(d.minPosition))},this.close=function(){g.dispatchEvent("close"),h.translate.easeTo(0)},this.expand=function(c){var d=a.innerWidth||b.documentElement.clientWidth;"left"===c?(g.dispatchEvent("expandLeft"),g.klass.add(b.body,"snapjs-expand-left"),g.klass.remove(b.body,"snapjs-expand-right")):(g.dispatchEvent("expandRight"),g.klass.add(b.body,"snapjs-expand-right"),g.klass.remove(b.body,"snapjs-expand-left"),d*=-1),h.translate.easeTo(d)},this.on=function(a,b){return f[a]=b,this},this.off=function(a){f[a]&&(f[a]=!1)},this.enable=function(){g.dispatchEvent("enable"),h.drag.listen()},this.disable=function(){g.dispatchEvent("disable"),h.drag.stopListening()},this.settings=function(a){g.deepExtend(d,a)},this.state=function(){var a,b=h.translate.get.matrix(4);return a=b===d.maxPosition?"left":b===d.minPosition?"right":"closed",{state:a,info:e.simpleStates}},i(c)};"undefined"!=typeof module&&module.exports&&(module.exports=c),"undefined"==typeof ender&&(this.Snap=c),"function"==typeof define&&define.amd&&define("snap",[],function(){return c})}.call(this,window,document),function(a){var b=a.FG={scrollApp:null,currentController:null,$contentLoad:null,$menu:null,$content:null,$headerApp:null};b.init=function(){b.setDomElements(),this.addEventListeners(),this.definitions(),setTimeout(function(){Transition.control=!0,Navigator.loadPage("home.html","HomeController")},10)},b.setDomElements=function(){b.$contentLoad=$("#scroll"),b.$menu=$("#menu"),b.$content=$("#content"),b.$headerApp=$("#header-app"),b.$scrollApp=document.getElementById("scroll")},b.definitions=function(){FastClick.attach(document.body)},b.addEventListeners=function(){a.addEventListener("orientationchange",function(){$("#scroll").height(a.innerHeight-b.$headerApp.height())},!1),$("#page").on("click",".botoes-app",Navigator.loadPage),$("#page").on("click","#menu-button",Transition.toggleMenu),snapper=new Snap({element:document.getElementById("content"),maxPosition:$("menu").width(),disable:"right",transitionSpeed:.2}),$("#scroll").height(a.innerHeight-b.$headerApp.height())}}(window),function(a){var b=a.Navigator={control:!0,currentPage:"",controlers:"",isBack:!1};b.loadPage=function(a,c){"string"==typeof a?(b.currentPage=a,b.controlers=c):(b.currentPage=$(this).data("url"),b.controlers=$(this).data("controler")),Transition.start()}}(window),function(a){var b=a.Transition={control:!1,"class":"transitionApp1"};b.start=function(){firstrequestapp?(firstrequestapp=!1,b.End()):(FG.$contentLoad.addClass(b.class),setTimeout(b.End,150))},b.End=function(){b.control&&(PageLoad.load(Navigator.currentPage),b.control=!1)},b.toggleMenu=function(){"closed"==snapper.state().state?b.showMenu():b.hideMenu()},b.hideMenu=function(){snapper.close()},b.showMenu=function(){snapper.open("left")}}(window),function(a){var b=a.PageLoad={ajxHandle:null};b.load=function(a){b.ajxHandle=$.get("pages/"+a,b.success)},b.success=function(a){null!=FG.currentController&&FG.currentController.destroy(),FG.$contentLoad.html(a),FG.currentController=new this[Navigator.controlers],null!=FG.currentController&&FG.currentController.initialize(),Transition.hideMenu(),Transition.control=!0,FG.$contentLoad.removeClass(Transition.class)}}(window);var app,snapper,firstrequestapp=!0;$(document).ready(function(){FG.init(),app=new AppController,app.initialize()}); -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | FastGap Project 26 | 27 | 28 | 29 | 30 |
31 |
32 | 33 | 34 | 56 | 57 |
58 | 59 | 60 |
61 | 62 |
63 | 64 | 65 |
66 | 67 |
68 | 69 |
70 |
71 |
72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /demo/pages/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

FastGap é um template feito por brasileiros para iniciar o desenvolvimento de apps nativos para smartphones utilizando o PhoneGap.

4 |
5 |
6 |

FastGap is a template created by Brazilians to start developing native apps for smartphones using PhoneGap. 7 |
8 |
open menu for features 9 |
10 | https://github.com/FastGap/FastGap 11 |

12 |
13 |
14 |

Made with Love and with Zepto, SnapJS, FastClick, Overthrow.

15 |
16 |
17 |

Developers

18 |
19 | Gustavo Costa 20 |
@GustavoCostaW
21 |
22 |
23 | Ivan Santos 24 |
@pragmaticivan
25 |
26 |
27 | Mayron Cachina 28 |
@mayroncachina
29 |
30 |
31 | Daniel Feel Fine 32 |
@danielfeelfine
33 |
34 |
35 |
-------------------------------------------------------------------------------- /demo/pages/page1.html: -------------------------------------------------------------------------------- 1 |
2 |

Your content - 1 3 |
INFINITE SCROLL

4 |
5 |

Gustavo Costa

6 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

7 |
8 |
9 |

Mayron Cachina

10 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

11 |
12 |
13 |

Gustavo Costa

14 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

15 |
16 |
17 |

Mayron Cachina

18 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

19 |
20 |
21 |

Gustavo Costa

22 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

23 |
24 |
25 |

Mayron Cachina

26 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

27 |
28 |
29 |

Gustavo Costa

30 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

31 |
32 |
33 |

Mayron Cachina

34 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

35 |
36 |
37 |

Gustavo Costa

38 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

39 |
40 |
41 |

Mayron Cachina

42 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

43 |
44 |
45 |

Gustavo Costa

46 |

Estudante, sonha em ser programador desde os 14 anos, desenvolvedor web/mobile, é manager de desenvolvedores BlackBerry em maceió, conseguiu o 2º lugar no concurso de aplicativos do Adobe Camp Brasil.

47 |
48 |
49 |

Mayron Cachina

50 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

51 |
52 |
53 |

Gustavo Costa

54 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

55 |
56 |
57 |

Mayron Cachina

58 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

59 |
60 |
61 |

Gustavo Costa

62 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

63 |
64 |
65 |

Mayron Cachina

66 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

67 |
68 |
69 |

Gustavo Costa

70 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

71 |
72 |
73 |

Mayron Cachina

74 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

75 |
76 |
-------------------------------------------------------------------------------- /demo/pages/page2.html: -------------------------------------------------------------------------------- 1 |
2 |

Your content - 2

3 |
4 |

Gustavo Costa

5 | Gustavo Costa 6 | 7 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

8 |
9 |
10 |

Mayron Cachina

11 | Mayron Cachina 12 | 13 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/pages/page3.html: -------------------------------------------------------------------------------- 1 |
2 |

Your content - 3

3 |
4 |

Gustavo Costa

5 | Gustavo Costa 6 | 7 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

8 |
9 |
10 |

Mayron Cachina

11 | Mayron Cachina 12 | 13 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/pages/page4.html: -------------------------------------------------------------------------------- 1 |
2 |

Your content - 4

3 |
4 |

Gustavo Costa

5 | Gustavo Costa 6 | 7 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

8 |
9 |
10 |

Mayron Cachina

11 | Mayron Cachina 12 | 13 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/pages/page5.html: -------------------------------------------------------------------------------- 1 |
2 |

Your content - 5

3 |
4 |

Gustavo Costa

5 | Gustavo Costa 6 | 7 |

Estudante, 19 anos e ainda sonha em ser programador desde os 14 anos, é desenvolvedor mobile com projetos para empresas e startups multinacionais, s2 Cordova, s2 web e seus padrões, já palestrou em mais de 15 eventos pelo Brasil e nunca esquece do seu café.

8 |
9 |
10 |

Mayron Cachina

11 | Mayron Cachina 12 | 13 |

Professor de informática, trabalha como analista de sistemas e estou voltado ao desenvolvimento de aplicações mobile. Também estou a frente do grupo GDG (Google Developers Group) Natal

14 |
15 |
16 | -------------------------------------------------------------------------------- /dist/css/fastgap.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 10 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { 11 | margin: 0; 12 | padding: 0; 13 | border: 0; 14 | font-size: 100%; 15 | vertical-align: baseline; } 16 | 17 | body { 18 | line-height: 1; } 19 | 20 | ol, ul { 21 | list-style: none; } 22 | 23 | blockquote, q { 24 | quotes: none; } 25 | 26 | blockquote:before, blockquote:after, q:before, q:after { 27 | content: ''; 28 | content: none; } 29 | 30 | table { 31 | border-collapse: collapse; 32 | border-spacing: 0; } 33 | 34 | /* MENU TRANSITIONS */ 35 | menu { 36 | -webkit-transition: translate3d(0, 0, 0); 37 | transform: translate3d(0, 0, 0); } 38 | 39 | #scroll { 40 | transform: translate3d(0, 0, 0); 41 | -webkit-backface-visibility: hidden; 42 | -webkit-transition: all 0.2s ease; } 43 | 44 | .transitionApp1 { 45 | opacity: 0; } 46 | 47 | .transitionApp2 { 48 | -webkit-transform: translateX(100%); } 49 | 50 | .transitionApp3 { 51 | -webkit-transform: scale(0.1); } 52 | 53 | .transitionApp4 { 54 | -webkit-transform: rotateY(180deg); 55 | opacity: 0; } 56 | 57 | .transitionApp5 { 58 | opacity: 0; 59 | -webkit-transform: rotateX(180deg); } 60 | 61 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 62 | *:not(input):not(textarea) { 63 | -webkit-user-select: none; 64 | -webkit-touch-callout: none; } 65 | 66 | html, body { 67 | width: 100%; 68 | overflow: hidden; 69 | position: relative; 70 | -webkit-text-size-adjust: none; 71 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 72 | -webkit-tap-highlight-color: transparent; } 73 | 74 | input, textarea { 75 | user-select: text; } 76 | 77 | /* APP LOGO IMG */ 78 | header#header-app { 79 | width: 100%; 80 | top: 0; } 81 | 82 | /* BOX LOAD PAGES */ 83 | /* SCROLL */ 84 | .overthrow-enabled .overthrow { 85 | overflow-y: auto; 86 | overflow-x: hidden; 87 | -webkit-overflow-scrolling: touch; } 88 | 89 | #page { 90 | width: 100%; 91 | height: 100%; 92 | -webkit-transition: translate3d(0, 0, 0); 93 | transform: translate3d(0, 0, 0); 94 | overflow: hidden; } 95 | 96 | #content { 97 | overflow: hidden; } 98 | 99 | #content, #page, #scroll { 100 | -webkit-overflow-scrolling: touch; } 101 | 102 | /* MENU BUTTON */ 103 | #menu-button { 104 | position: absolute; 105 | z-index: 999; 106 | display: block; } 107 | 108 | /* MENU APP */ 109 | menu { 110 | position: absolute; 111 | top: 0; 112 | left: 0; 113 | height: 100%; } 114 | 115 | #menu-content { 116 | height: 100%; 117 | position: relative; } 118 | -------------------------------------------------------------------------------- /dist/css/fastgap.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}menu{-webkit-transition:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);}#scroll{transform:translate3d(0, 0, 0);-webkit-backface-visibility:hidden;-webkit-transition:all 0.2s ease;}.transitionApp1{opacity:0;}.transitionApp2{-webkit-transform:translateX(100%);}.transitionApp3{-webkit-transform:scale(0.1);}.transitionApp4{-webkit-transform:rotateY(180deg);opacity:0;}.transitionApp5{opacity:0;-webkit-transform:rotateX(180deg);}*:not(input):not(textarea){-webkit-user-select:none;-webkit-touch-callout:none;}html,body{width:100%;overflow:hidden;position:relative;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;}input,textarea{user-select:text;}header#header-app{width:100%;top:0;}.overthrow-enabled .overthrow{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;}#page{width:100%;height:100%;-webkit-transition:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);overflow:hidden;}#content{overflow:hidden;}#content,#page,#scroll{-webkit-overflow-scrolling:touch;}#menu-button{position:absolute;z-index:999;display:block;}menu{position:absolute;top:0;left:0;height:100%;}#menu-content{height:100%;position:relative;} -------------------------------------------------------------------------------- /dist/font/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/dist/font/.gitkeep -------------------------------------------------------------------------------- /dist/img/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/dist/img/back.png -------------------------------------------------------------------------------- /dist/img/fastgap_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/dist/img/fastgap_logo.jpg -------------------------------------------------------------------------------- /dist/img/gustavocostaw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/dist/img/gustavocostaw.jpg -------------------------------------------------------------------------------- /dist/img/mayron.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/dist/img/mayron.jpg -------------------------------------------------------------------------------- /dist/js/fastgap.controllers.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | /* FASTGAP https://github.com/FastGap/FastGap 10 | 11 | IMPORTANT, READ LIBRARY DOCS FOR BETTER CUSTOMIZATION 12 | 13 | http://zeptojs.com 14 | http://topcoat.io 15 | */ 16 | 17 | 18 | var AppController = function () {}; 19 | 20 | AppController.prototype = { 21 | initialize: function () { 22 | 23 | //YOUR "GLOBAL CODE" HERE. 24 | 25 | 26 | }, 27 | destroy: function () { 28 | PageLoad.ajxHandle = null; 29 | } 30 | }; 31 | var HomeController = function () {}; 32 | 33 | HomeController.prototype = { 34 | self: Object, 35 | initialize: function () { 36 | //your code here 37 | }, 38 | destroy: function () { 39 | // unset events 40 | // stop ajax 41 | // destroy components 42 | FG.scroll = null; 43 | PageLoad.ajxHandle = null; 44 | } 45 | }; 46 | var Page1Controller = function () {}; 47 | 48 | Page1Controller.prototype = { 49 | onScroll: Function, 50 | self: Object, 51 | initialize: function () { 52 | self = this; 53 | //scroll listener 54 | FG.$scrollApp.addEventListener("scroll", self.onScroll); 55 | }, 56 | onScroll: function (e) { 57 | //checkscrol 58 | 59 | //the calc 60 | if (Number(FG.$scrollApp.scrollHeight - e.srcElement.scrollTop) - e.srcElement.clientHeight <= 350) { 61 | div = document.createElement("div"); 62 | //fake content 63 | div.innerHTML = "

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

"; 64 | //preload 65 | preload = document.createElement("div"); 66 | preload.innerHTML = "

simulando requisição server...

"; 67 | //add preload 68 | FG.$scrollApp.appendChild(preload); 69 | //remove listener on scroll 70 | FG.$scrollApp.removeEventListener("scroll", self.onScroll); 71 | 72 | /* SIMULATE DELAY 2 SECONDS FROM TO SERVER AJAX REQUEST */ 73 | setTimeout(function () { 74 | //add listener 75 | FG.$scrollApp.addEventListener("scroll", self.onScroll); 76 | //remove child and add content 77 | FG.$scrollApp.removeChild(preload); 78 | FG.$scrollApp.appendChild(div); 79 | 80 | FG.$scrollApp.scrollTop += 20; 81 | }, 2000); 82 | 83 | } 84 | }, 85 | destroy: function () { 86 | // unset events 87 | // stop ajax 88 | //remove listener scroll 89 | FG.$scrollApp.removeEventListener("scroll", self.onScroll); 90 | PageLoad.ajxHandle = null; 91 | } 92 | }; 93 | var Page2Controller = function() {}; 94 | 95 | Page2Controller.prototype = { 96 | initialize: function() { 97 | alert("initialize Page2 Controller, create elements"); 98 | }, 99 | destroy: function() { 100 | alert("destroy Page2 Controller, destroy elements, scroll and ajax"); 101 | 102 | PageLoad.ajxHandle = null; 103 | } 104 | }; 105 | var Page3Controller = function() {}; 106 | 107 | Page3Controller.prototype = { 108 | initialize: function() { 109 | 110 | }, 111 | destroy: function() { 112 | // unset events 113 | // stop ajax 114 | // destroy components 115 | PageLoad.ajxHandle = null; 116 | } 117 | }; 118 | var Page4Controller = function() {}; 119 | 120 | Page4Controller.prototype = { 121 | initialize: function() { 122 | 123 | }, 124 | destroy: function() { 125 | // unset events 126 | // stop ajax 127 | // destroy components 128 | PageLoad.ajxHandle = null; 129 | } 130 | }; 131 | var Page5Controller = function() {}; 132 | 133 | Page5Controller.prototype = { 134 | initialize: function() { 135 | 136 | }, 137 | destroy: function() { 138 | // unset events 139 | // stop ajax 140 | // destroy components 141 | PageLoad.ajxHandle = null; 142 | } 143 | }; -------------------------------------------------------------------------------- /dist/js/fastgap.core.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | /* FASTGAP https://github.com/FastGap/FastGap 10 | 11 | ;(function(window,undefined){ 12 | "use strict"; 13 | 14 | // Localise Globals 15 | //var History = window.History = window.history||{}; 16 | 17 | /*History.bind = function(event, callback){ 18 | //window.addEventListener(event, callback); 19 | }; 20 | 21 | })(window);*/ 22 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 23 | 24 | 25 | (function (window) { 26 | // FastGap object 27 | var FG = window.FG = { 28 | scrollApp: null, 29 | currentController: null, 30 | $contentLoad: null, 31 | $menu: null, 32 | $content: null, 33 | $headerApp: null, 34 | }; 35 | //init project 36 | FG.init = function () { 37 | FG.setDomElements(); 38 | this.addEventListeners(); 39 | this.definitions(); 40 | /* PHONEGAP EVENT DEVICE READY LOAD HOME PAGE */ 41 | 42 | //document.addEventListener("deviceready",function(){ 43 | //prevent bug call transitionend 44 | setTimeout(function () { 45 | Transition.control = true; 46 | Navigator.loadPage('home.html','HomeController'); 47 | }, 10); 48 | //}); 49 | }; 50 | //set fg elements 51 | FG.setDomElements = function () { 52 | FG.$contentLoad = $("#scroll"); 53 | FG.$menu = $("#menu"); 54 | FG.$content = $("#content"); 55 | FG.$headerApp = $('#header-app'); 56 | FG.$scrollApp = document.getElementById("scroll"); 57 | } 58 | //set definitions project 59 | FG.definitions = function () { 60 | //fastclick, performance library of mouse events to touch events 61 | FastClick.attach(document.body); 62 | 63 | 64 | /*block drag "navegator box", this code locks the drag in the browser but it locks the scroll, BlackBerry and Android is not necessary, and to avoid this in iOS add the following code in config.xml 65 | 66 | 67 | 68 | 69 | $(document).on('touchmove', function (event) { 70 | e.preventDefault(); 71 | });*/ 72 | } 73 | //set fastgap listeners 74 | FG.addEventListeners = function () { 75 | //orientation change event 76 | window.addEventListener("orientationchange", function () { 77 | //scroll - CSS CALC() NOT WORKS IN ANDROID < 4.3 AND IOS 6.0 < 78 | $("#scroll").height(window.innerHeight - FG.$headerApp.height()); 79 | }, false); 80 | 81 | //load internal pages 82 | $("#page").on('click', '.botoes-app', Navigator.loadPage); 83 | 84 | //listener menu button 85 | $("#page").on('click', "#menu-button", Transition.toggleMenu); 86 | 87 | //SNAP JS 88 | snapper = new Snap({ 89 | element: document.getElementById('content'), //your content 90 | maxPosition: $("menu").width(), //width of the menu 91 | disable: 'right', //disable right menu 92 | transitionSpeed: 0.2 //speed transition 93 | }); 94 | 95 | //scroll - CSS CALC() NOT WORKS IN ANDROID < 4.3 AND IOS 6.0 < 96 | $("#scroll").height(window.innerHeight - FG.$headerApp.height()); 97 | 98 | }; 99 | })(window); 100 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 101 | 102 | (function (window) { 103 | //navigator object 104 | var Navigator = window.Navigator = { 105 | control: true, 106 | currentPage: '', 107 | controlers:'', 108 | isBack: false 109 | }; 110 | //load page*****************modifiquei **************** 111 | Navigator.loadPage = function (url, Dcontrolers) { 112 | //if string page is url 113 | if (typeof url == "string") { 114 | Navigator.currentPage = url; 115 | Navigator.controlers=Dcontrolers; 116 | } else { 117 | // or page is data-url attr in menu ul li element 118 | Navigator.currentPage = $(this).data("url"); 119 | Navigator.controlers=$(this).data("controler"); 120 | 121 | } 122 | 123 | //start transition 124 | Transition.start(); 125 | }; 126 | 127 | 128 | })(window); 129 | /* FASTGAP https://github.com/FastGap/FastGap */ 130 | 131 | (function (window) { 132 | 133 | // transition object 134 | var Transition = window.Transition = { 135 | control: false, 136 | class: 'transitionApp1' 137 | /* VIEW TRANSITIONS.CSS OR CREATE YOUR TRANSITION */ 138 | }; 139 | 140 | //start transition 141 | Transition.start = function () { 142 | if (!firstrequestapp) { 143 | FG.$contentLoad.addClass(Transition.class); 144 | //time for alpha 150 mileseconds 145 | setTimeout(Transition.End, 150); 146 | } else { 147 | //first request open app 148 | firstrequestapp = false; 149 | Transition.End(); 150 | } 151 | }; 152 | //end transition with listener 153 | Transition.End = function () { 154 | if (Transition.control) { 155 | PageLoad.load(Navigator.currentPage); 156 | //control load pages 157 | Transition.control = false; 158 | } 159 | }; 160 | //toggleMenu 161 | Transition.toggleMenu = function () { 162 | if (snapper.state().state == "closed") { 163 | Transition.showMenu(); 164 | } else { 165 | Transition.hideMenu(); 166 | } 167 | }; 168 | //hide panel menu 169 | Transition.hideMenu = function () { 170 | snapper.close(); 171 | }; 172 | //show panel menu 173 | Transition.showMenu = function () { 174 | snapper.open('left'); 175 | }; 176 | 177 | })(window); 178 | /* FASTGAP https://github.com/FastGap/FastGap */ 179 | 180 | (function (window) { 181 | 182 | // page load object 183 | var PageLoad = window.PageLoad = { 184 | ajxHandle: null 185 | }; 186 | 187 | //load ajax 188 | PageLoad.load = function (page) { 189 | PageLoad.ajxHandle = $.get("pages/" + page, PageLoad.success); 190 | }; 191 | //sucess load 192 | PageLoad.success = function (content) { 193 | 194 | if (FG.currentController != null) { 195 | // unset everything in the previous controller 196 | // prevent memory leaks 197 | FG.currentController.destroy(); 198 | } 199 | 200 | 201 | FG.$contentLoad.html(content); 202 | 203 | //create new controller 204 | FG.currentController = new this[Navigator.controlers](); 205 | 206 | // once new controller created, initialize it 207 | if (FG.currentController != null) { 208 | FG.currentController.initialize(); 209 | } 210 | 211 | //hide my menu 212 | Transition.hideMenu(); 213 | //remove transition in my app 214 | Transition.control = true; 215 | FG.$contentLoad.removeClass(Transition.class); 216 | }; 217 | 218 | 219 | })(window); 220 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 221 | 222 | 223 | /* GLOBAL VAR */ 224 | var app; 225 | /* SNAP JS*/ 226 | var snapper; 227 | /*FIRST REQUEST APP*/ 228 | var firstrequestapp = true; 229 | 230 | //ready app 231 | $(document).ready(function () { 232 | //create the project 233 | FG.init(); 234 | app = new AppController(); 235 | app.initialize(); 236 | }); -------------------------------------------------------------------------------- /dist/js/fastgap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FastGap v0.0.49 (http://fastgap.mobi/) 3 | * Author: Gustavo Costa 4 | * Maintainers: https://github.com/orgs/FastGap/members 5 | * Copyright (c) 2014 6 | * Licensed under MIT 7 | */ 8 | 9 | function FastClick(a){"use strict";var b,c=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=10,this.layer=a,!a||!a.nodeType)throw new TypeError("Layer must be a document node");this.onClick=function(){return FastClick.prototype.onClick.apply(c,arguments)},this.onMouse=function(){return FastClick.prototype.onMouse.apply(c,arguments)},this.onTouchStart=function(){return FastClick.prototype.onTouchStart.apply(c,arguments)},this.onTouchMove=function(){return FastClick.prototype.onTouchMove.apply(c,arguments)},this.onTouchEnd=function(){return FastClick.prototype.onTouchEnd.apply(c,arguments)},this.onTouchCancel=function(){return FastClick.prototype.onTouchCancel.apply(c,arguments)},FastClick.notNeeded(a)||(this.deviceIsAndroid&&(a.addEventListener("mouseover",this.onMouse,!0),a.addEventListener("mousedown",this.onMouse,!0),a.addEventListener("mouseup",this.onMouse,!0)),a.addEventListener("click",this.onClick,!0),a.addEventListener("touchstart",this.onTouchStart,!1),a.addEventListener("touchmove",this.onTouchMove,!1),a.addEventListener("touchend",this.onTouchEnd,!1),a.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(a.removeEventListener=function(b,c,d){var e=Node.prototype.removeEventListener;"click"===b?e.call(a,b,c.hijacked||c,d):e.call(a,b,c,d)},a.addEventListener=function(b,c,d){var e=Node.prototype.addEventListener;"click"===b?e.call(a,b,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(a,b,c,d)}),"function"==typeof a.onclick&&(b=a.onclick,a.addEventListener("click",function(a){b(a)},!1),a.onclick=null))}var AppController=function(){};AppController.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var HomeController=function(){};HomeController.prototype={self:Object,initialize:function(){},destroy:function(){FG.scroll=null,PageLoad.ajxHandle=null}};var Page1Controller=function(){};Page1Controller.prototype={onScroll:Function,self:Object,initialize:function(){self=this,FG.$scrollApp.addEventListener("scroll",self.onScroll)},onScroll:function(a){Number(FG.$scrollApp.scrollHeight-a.srcElement.scrollTop)-a.srcElement.clientHeight<=350&&(div=document.createElement("div"),div.innerHTML="

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

",preload=document.createElement("div"),preload.innerHTML="

simulando requisição server...

",FG.$scrollApp.appendChild(preload),FG.$scrollApp.removeEventListener("scroll",self.onScroll),setTimeout(function(){FG.$scrollApp.addEventListener("scroll",self.onScroll),FG.$scrollApp.removeChild(preload),FG.$scrollApp.appendChild(div),FG.$scrollApp.scrollTop+=20},2e3))},destroy:function(){FG.$scrollApp.removeEventListener("scroll",self.onScroll),PageLoad.ajxHandle=null}};var Page2Controller=function(){};Page2Controller.prototype={initialize:function(){alert("initialize Page2 Controller, create elements")},destroy:function(){alert("destroy Page2 Controller, destroy elements, scroll and ajax"),PageLoad.ajxHandle=null}};var Page3Controller=function(){};Page3Controller.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var Page4Controller=function(){};Page4Controller.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var Page5Controller=function(){};Page5Controller.prototype={initialize:function(){},destroy:function(){PageLoad.ajxHandle=null}};var Zepto=function(){function a(a){return null==a?String(a):U[V.call(a)]||"object"}function b(b){return"function"==a(b)}function c(a){return null!=a&&a==a.window}function d(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}function e(b){return"object"==a(b)}function f(a){return e(a)&&!c(a)&&Object.getPrototypeOf(a)==Object.prototype}function g(a){return"number"==typeof a.length}function h(a){return D.call(a,function(a){return null!=a})}function i(a){return a.length>0?x.fn.concat.apply([],a):a}function j(a){return a.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 k(a){return a in G?G[a]:G[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function l(a,b){return"number"!=typeof b||H[j(a)]?b:b+"px"}function m(a){var b,c;return F[a]||(b=E.createElement(a),E.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),F[a]=c),F[a]}function n(a){return"children"in a?C.call(a.children):x.map(a.childNodes,function(a){return 1==a.nodeType?a:void 0})}function o(a,b,c){for(w in b)c&&(f(b[w])||Z(b[w]))?(f(b[w])&&!f(a[w])&&(a[w]={}),Z(b[w])&&!Z(a[w])&&(a[w]=[]),o(a[w],b[w],c)):b[w]!==v&&(a[w]=b[w])}function p(a,b){return null==b?x(a):x(a).filter(b)}function q(a,c,d,e){return b(c)?c.call(a,d,e):c}function r(a,b,c){null==c?a.removeAttribute(b):a.setAttribute(b,c)}function s(a,b){var c=a.className,d=c&&c.baseVal!==v;return b===v?d?c.baseVal:c:void(d?c.baseVal=b:a.className=b)}function t(a){var b;try{return a?"true"==a||("false"==a?!1:"null"==a?null:/^0/.test(a)||isNaN(b=Number(a))?/^[\[\{]/.test(a)?x.parseJSON(a):a:b):a}catch(c){return a}}function u(a,b){b(a);for(var c in a.childNodes)u(a.childNodes[c],b)}var v,w,x,y,z,A,B=[],C=B.slice,D=B.filter,E=window.document,F={},G={},H={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},I=/^\s*<(\w+|!)[^>]*>/,J=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,K=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,L=/^(?:body|html)$/i,M=/([A-Z])/g,N=["val","css","html","text","data","width","height","offset"],O=["after","prepend","before","append"],P=E.createElement("table"),Q=E.createElement("tr"),R={tr:E.createElement("tbody"),tbody:P,thead:P,tfoot:P,td:Q,th:Q,"*":E.createElement("div")},S=/complete|loaded|interactive/,T=/^[\w-]*$/,U={},V=U.toString,W={},X=E.createElement("div"),Y={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Z=Array.isArray||function(a){return a instanceof Array};return W.matches=function(a,b){if(!b||!a||1!==a.nodeType)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=X).appendChild(a),d=~W.qsa(e,b).indexOf(a),f&&X.removeChild(a),d},z=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},A=function(a){return D.call(a,function(b,c){return a.indexOf(b)==c})},W.fragment=function(a,b,c){var d,e,g;return J.test(a)&&(d=x(E.createElement(RegExp.$1))),d||(a.replace&&(a=a.replace(K,"<$1>")),b===v&&(b=I.test(a)&&RegExp.$1),b in R||(b="*"),g=R[b],g.innerHTML=""+a,d=x.each(C.call(g.childNodes),function(){g.removeChild(this)})),f(c)&&(e=x(d),x.each(c,function(a,b){N.indexOf(a)>-1?e[a](b):e.attr(a,b)})),d},W.Z=function(a,b){return a=a||[],a.__proto__=x.fn,a.selector=b||"",a},W.isZ=function(a){return a instanceof W.Z},W.init=function(a,c){var d;if(!a)return W.Z();if("string"==typeof a)if(a=a.trim(),"<"==a[0]&&I.test(a))d=W.fragment(a,RegExp.$1,c),a=null;else{if(c!==v)return x(c).find(a);d=W.qsa(E,a)}else{if(b(a))return x(E).ready(a);if(W.isZ(a))return a;if(Z(a))d=h(a);else if(e(a))d=[a],a=null;else if(I.test(a))d=W.fragment(a.trim(),RegExp.$1,c),a=null;else{if(c!==v)return x(c).find(a);d=W.qsa(E,a)}}return W.Z(d,a)},x=function(a,b){return W.init(a,b)},x.extend=function(a){var b,c=C.call(arguments,1);return"boolean"==typeof a&&(b=a,a=c.shift()),c.forEach(function(c){o(a,c,b)}),a},W.qsa=function(a,b){var c,e="#"==b[0],f=!e&&"."==b[0],g=e||f?b.slice(1):b,h=T.test(g);return d(a)&&h&&e?(c=a.getElementById(g))?[c]:[]:1!==a.nodeType&&9!==a.nodeType?[]:C.call(h&&!e?f?a.getElementsByClassName(g):a.getElementsByTagName(b):a.querySelectorAll(b))},x.contains=function(a,b){return a!==b&&a.contains(b)},x.type=a,x.isFunction=b,x.isWindow=c,x.isArray=Z,x.isPlainObject=f,x.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},x.inArray=function(a,b,c){return B.indexOf.call(b,a,c)},x.camelCase=z,x.trim=function(a){return null==a?"":String.prototype.trim.call(a)},x.uuid=0,x.support={},x.expr={},x.map=function(a,b){var c,d,e,f=[];if(g(a))for(d=0;d=0?a:a+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(a){return B.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return b(a)?this.not(this.not(a)):x(D.call(this,function(b){return W.matches(b,a)}))},add:function(a,b){return x(A(this.concat(x(a,b))))},is:function(a){return this.length>0&&W.matches(this[0],a)},not:function(a){var c=[];if(b(a)&&a.call!==v)this.each(function(b){a.call(this,b)||c.push(this)});else{var d="string"==typeof a?this.filter(a):g(a)&&b(a.item)?C.call(a):x(a);this.forEach(function(a){d.indexOf(a)<0&&c.push(a)})}return x(c)},has:function(a){return this.filter(function(){return e(a)?x.contains(this,a):x(this).find(a).size()})},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!e(a)?a:x(a)},last:function(){var a=this[this.length-1];return a&&!e(a)?a:x(a)},find:function(a){var b,c=this;return b="object"==typeof a?x(a).filter(function(){var a=this;return B.some.call(c,function(b){return x.contains(b,a)})}):1==this.length?x(W.qsa(this[0],a)):this.map(function(){return W.qsa(this,a)})},closest:function(a,b){var c=this[0],e=!1;for("object"==typeof a&&(e=x(a));c&&!(e?e.indexOf(c)>=0:W.matches(c,a));)c=c!==b&&!d(c)&&c.parentNode;return x(c)},parents:function(a){for(var b=[],c=this;c.length>0;)c=x.map(c,function(a){return(a=a.parentNode)&&!d(a)&&b.indexOf(a)<0?(b.push(a),a):void 0});return p(b,a)},parent:function(a){return p(A(this.pluck("parentNode")),a)},children:function(a){return p(this.map(function(){return n(this)}),a)},contents:function(){return this.map(function(){return C.call(this.childNodes)})},siblings:function(a){return p(this.map(function(a,b){return D.call(n(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return x.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=m(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var c=b(a);if(this[0]&&!c)var d=x(a).get(0),e=d.parentNode||this.length>1;return this.each(function(b){x(this).wrapAll(c?a.call(this,b):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){x(this[0]).before(a=x(a));for(var b;(b=a.children()).length;)a=b.first();x(a).append(this)}return this},wrapInner:function(a){var c=b(a);return this.each(function(b){var d=x(this),e=d.contents(),f=c?a.call(this,b):a;e.length?e.wrapAll(f):d.append(f)})},unwrap:function(){return this.parent().each(function(){x(this).replaceWith(x(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=x(this);(a===v?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return x(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return x(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return 0===arguments.length?this.length>0?this[0].innerHTML:null:this.each(function(b){var c=this.innerHTML;x(this).empty().append(q(this,a,b,c))})},text:function(a){return 0===arguments.length?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=a===v?"":""+a})},attr:function(a,b){var c;return"string"==typeof a&&b===v?0==this.length||1!==this[0].nodeType?v:"value"==a&&"INPUT"==this[0].nodeName?this.val():!(c=this[0].getAttribute(a))&&a in this[0]?this[0][a]:c:this.each(function(c){if(1===this.nodeType)if(e(a))for(w in a)r(this,w,a[w]);else r(this,a,q(this,b,c,this.getAttribute(a)))})},removeAttr:function(a){return this.each(function(){1===this.nodeType&&r(this,a)})},prop:function(a,b){return a=Y[a]||a,b===v?this[0]&&this[0][a]:this.each(function(c){this[a]=q(this,b,c,this[a])})},data:function(a,b){var c=this.attr("data-"+a.replace(M,"-$1").toLowerCase(),b);return null!==c?t(c):v},val:function(a){return 0===arguments.length?this[0]&&(this[0].multiple?x(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(b){this.value=q(this,a,b,this.value)})},offset:function(a){if(a)return this.each(function(b){var c=x(this),d=q(this,a,b,c.offset()),e=c.offsetParent().offset(),f={top:d.top-e.top,left:d.left-e.left};"static"==c.css("position")&&(f.position="relative"),c.css(f)});if(0==this.length)return null;var b=this[0].getBoundingClientRect();return{left:b.left+window.pageXOffset,top:b.top+window.pageYOffset,width:Math.round(b.width),height:Math.round(b.height)}},css:function(b,c){if(arguments.length<2){var d=this[0],e=getComputedStyle(d,"");if(!d)return;if("string"==typeof b)return d.style[z(b)]||e.getPropertyValue(b);if(Z(b)){var f={};return x.each(Z(b)?b:[b],function(a,b){f[b]=d.style[z(b)]||e.getPropertyValue(b)}),f}}var g="";if("string"==a(b))c||0===c?g=j(b)+":"+l(b,c):this.each(function(){this.style.removeProperty(j(b))});else for(w in b)b[w]||0===b[w]?g+=j(w)+":"+l(w,b[w])+";":this.each(function(){this.style.removeProperty(j(w))});return this.each(function(){this.style.cssText+=";"+g})},index:function(a){return a?this.indexOf(x(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return a?B.some.call(this,function(a){return this.test(s(a))},k(a)):!1},addClass:function(a){return a?this.each(function(b){y=[];var c=s(this),d=q(this,a,b,c);d.split(/\s+/g).forEach(function(a){x(this).hasClass(a)||y.push(a)},this),y.length&&s(this,c+(c?" ":"")+y.join(" "))}):this},removeClass:function(a){return this.each(function(b){return a===v?s(this,""):(y=s(this),q(this,a,b,y).split(/\s+/g).forEach(function(a){y=y.replace(k(a)," ")}),void s(this,y.trim()))})},toggleClass:function(a,b){return a?this.each(function(c){var d=x(this),e=q(this,a,c,s(this));e.split(/\s+/g).forEach(function(a){(b===v?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})}):this},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===v?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a===v?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=L.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(x(a).css("margin-top"))||0,c.left-=parseFloat(x(a).css("margin-left"))||0,d.top+=parseFloat(x(b[0]).css("border-top-width"))||0,d.left+=parseFloat(x(b[0]).css("border-left-width"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||E.body;a&&!L.test(a.nodeName)&&"static"==x(a).css("position");)a=a.offsetParent;return a})}},x.fn.detach=x.fn.remove,["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});x.fn[a]=function(e){var f,g=this[0];return e===v?c(g)?g["inner"+b]:d(g)?g.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){g=x(this),g.css(a,q(this,e,b,g[a]()))})}}),O.forEach(function(b,c){var d=c%2;x.fn[b]=function(){var b,e,f=x.map(arguments,function(c){return b=a(c),"object"==b||"array"==b||null==c?c:W.fragment(c)}),g=this.length>1;return f.length<1?this:this.each(function(a,b){e=d?b:b.parentNode,b=0==c?b.nextSibling:1==c?b.firstChild:2==c?b:null,f.forEach(function(a){if(g)a=a.cloneNode(!0);else if(!e)return x(a).remove();u(e.insertBefore(a,b),function(a){null==a.nodeName||"SCRIPT"!==a.nodeName.toUpperCase()||a.type&&"text/javascript"!==a.type||a.src||window.eval.call(window,a.innerHTML)})})})},x.fn[d?b+"To":"insert"+(c?"Before":"After")]=function(a){return x(a)[b](this),this}}),W.Z.prototype=x.fn,W.uniq=A,W.deserializeValue=t,x.zepto=W,x}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(a){function b(a){return a._zid||(a._zid=m++)}function c(a,c,f,g){if(c=d(c),c.ns)var h=e(c.ns);return(q[b(a)]||[]).filter(function(a){return!(!a||c.e&&a.e!=c.e||c.ns&&!h.test(a.ns)||f&&b(a.fn)!==b(f)||g&&a.sel!=g)})}function d(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function e(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function f(a,b){return a.del&&!s&&a.e in t||!!b}function g(a){return u[a]||s&&t[a]||a}function h(c,e,h,i,k,m,n){var o=b(c),p=q[o]||(q[o]=[]);e.split(/\s/).forEach(function(b){if("ready"==b)return a(document).ready(h);var e=d(b);e.fn=h,e.sel=k,e.e in u&&(h=function(b){var c=b.relatedTarget;return!c||c!==this&&!a.contains(this,c)?e.fn.apply(this,arguments):void 0}),e.del=m;var o=m||h;e.proxy=function(a){if(a=j(a),!a.isImmediatePropagationStopped()){a.data=i;var b=o.apply(c,a._args==l?[a]:[a].concat(a._args));return b===!1&&(a.preventDefault(),a.stopPropagation()),b}},e.i=p.length,p.push(e),"addEventListener"in c&&c.addEventListener(g(e.e),e.proxy,f(e,n))})}function i(a,d,e,h,i){var j=b(a);(d||"").split(/\s/).forEach(function(b){c(a,b,e,h).forEach(function(b){delete q[j][b.i],"removeEventListener"in a&&a.removeEventListener(g(b.e),b.proxy,f(b,i))})})}function j(b,c){return(c||!b.isDefaultPrevented)&&(c||(c=b),a.each(y,function(a,d){var e=c[a];b[a]=function(){return this[d]=v,e&&e.apply(c,arguments)},b[d]=w}),(c.defaultPrevented!==l?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())&&(b.isDefaultPrevented=v)),b}function k(a){var b,c={originalEvent:a};for(b in a)x.test(b)||a[b]===l||(c[b]=a[b]);return j(c,a)}var l,m=1,n=Array.prototype.slice,o=a.isFunction,p=function(a){return"string"==typeof a},q={},r={},s="onfocusin"in window,t={focus:"focusin",blur:"focusout"},u={mouseenter:"mouseover",mouseleave:"mouseout"};r.click=r.mousedown=r.mouseup=r.mousemove="MouseEvents",a.event={add:h,remove:i},a.proxy=function(c,d){if(o(c)){var e=function(){return c.apply(d,arguments)};return e._zid=b(c),e}if(p(d))return a.proxy(c[d],c);throw new TypeError("expected function")},a.fn.bind=function(a,b,c){return this.on(a,b,c)},a.fn.unbind=function(a,b){return this.off(a,b)},a.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var v=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$)/,y={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};a.fn.delegate=function(a,b,c){return this.on(b,a,c)},a.fn.undelegate=function(a,b,c){return this.off(b,a,c)},a.fn.live=function(b,c){return a(document.body).delegate(this.selector,b,c),this},a.fn.die=function(b,c){return a(document.body).undelegate(this.selector,b,c),this},a.fn.on=function(b,c,d,e,f){var g,j,m=this;return b&&!p(b)?(a.each(b,function(a,b){m.on(a,c,d,b,f)}),m):(p(c)||o(e)||e===!1||(e=d,d=c,c=l),(o(d)||d===!1)&&(e=d,d=l),e===!1&&(e=w),m.each(function(l,m){f&&(g=function(a){return i(m,a.type,e),e.apply(this,arguments)}),c&&(j=function(b){var d,f=a(b.target).closest(c,m).get(0);return f&&f!==m?(d=a.extend(k(b),{currentTarget:f,liveFired:m}),(g||e).apply(f,[d].concat(n.call(arguments,1)))):void 0}),h(m,b,e,d,c,j||g)}))},a.fn.off=function(b,c,d){var e=this;return b&&!p(b)?(a.each(b,function(a,b){e.off(a,c,b)}),e):(p(c)||o(d)||d===!1||(d=c,c=l),d===!1&&(d=w),e.each(function(){i(this,b,d,c)}))},a.fn.trigger=function(b,c){return b=p(b)||a.isPlainObject(b)?a.Event(b):j(b),b._args=c,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(b):a(this).triggerHandler(b,c)})},a.fn.triggerHandler=function(b,d){var e,f;return this.each(function(g,h){e=k(p(b)?a.Event(b):b),e._args=d,e.target=h,a.each(c(h,b.type||b),function(a,b){return f=b.proxy(e),e.isImmediatePropagationStopped()?!1:void 0})}),f},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)}}),["focus","blur"].forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.each(function(){try{this[b]()}catch(a){}}),this}}),a.Event=function(a,b){p(a)||(b=a,a=b.type);var c=document.createEvent(r[a]||"Events"),d=!0;if(b)for(var e in b)"bubbles"==e?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),j(c)}}(Zepto),function(a){function b(b,c,d){var e=a.Event(c);return a(b).trigger(e,d),!e.isDefaultPrevented()}function c(a,c,d,e){return a.global?b(c||s,d,e):void 0}function d(b){b.global&&0===a.active++&&c(b,null,"ajaxStart")}function e(b){b.global&&!--a.active&&c(b,null,"ajaxStop")}function f(a,b){var d=b.context;return b.beforeSend.call(d,a,b)===!1||c(b,d,"ajaxBeforeSend",[a,b])===!1?!1:void c(b,d,"ajaxSend",[a,b])}function g(a,b,d,e){var f=d.context,g="success";d.success.call(f,a,g,b),e&&e.resolveWith(f,[a,g,b]),c(d,f,"ajaxSuccess",[b,d,a]),i(g,b,d)}function h(a,b,d,e,f){var g=e.context;e.error.call(g,d,b,a),f&&f.rejectWith(g,[d,b,a]),c(e,g,"ajaxError",[d,e,a||b]),i(b,d,e)}function i(a,b,d){var f=d.context;d.complete.call(f,b,a),c(d,f,"ajaxComplete",[b,d]),e(d)}function j(){}function k(a){return a&&(a=a.split(";",2)[0]),a&&(a==x?"html":a==w?"json":u.test(a)?"script":v.test(a)&&"xml")||"text"}function l(a,b){return""==b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function m(b){b.processData&&b.data&&"string"!=a.type(b.data)&&(b.data=a.param(b.data,b.traditional)),!b.data||b.type&&"GET"!=b.type.toUpperCase()||(b.url=l(b.url,b.data),b.data=void 0)}function n(b,c,d,e){return a.isFunction(c)&&(e=d,d=c,c=void 0),a.isFunction(d)||(e=d,d=void 0),{url:b,data:c,success:d,dataType:e}}function o(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,i){f=a.type(i),e&&(c=d?e:e+"["+(h||"object"==f||"array"==f?c:"")+"]"),!e&&g?b.add(i.name,i.value):"array"==f||!d&&"object"==f?o(b,i,d,c):b.add(c,i)})}var p,q,r=0,s=window.document,t=/)<[^<]*)*<\/script>/gi,u=/^(?:text|application)\/javascript/i,v=/^(?:text|application)\/xml/i,w="application/json",x="text/html",y=/^\s*$/;a.active=0,a.ajaxJSONP=function(b,c){if(!("type"in b))return a.ajax(b);var d,e,i=b.jsonpCallback,j=(a.isFunction(i)?i():i)||"jsonp"+ ++r,k=s.createElement("script"),l=window[j],m=function(b){a(k).triggerHandler("error",b||"abort")},n={abort:m};return c&&c.promise(n),a(k).on("load error",function(f,i){clearTimeout(e),a(k).off().remove(),"error"!=f.type&&d?g(d[0],n,b,c):h(null,i||"error",n,b,c),window[j]=l,d&&a.isFunction(l)&&l(d[0]),l=d=void 0}),f(n,b)===!1?(m("abort"),n):(window[j]=function(){d=arguments},k.src=b.url.replace(/\?(.+)=\?/,"?$1="+j),s.head.appendChild(k),b.timeout>0&&(e=setTimeout(function(){m("timeout")},b.timeout)),n)},a.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:w,xml:"application/xml, text/xml",html:x,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},a.ajax=function(b){var c=a.extend({},b||{}),e=a.Deferred&&a.Deferred();for(p in a.ajaxSettings)void 0===c[p]&&(c[p]=a.ajaxSettings[p]);d(c),c.crossDomain||(c.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(c.url)&&RegExp.$2!=window.location.host),c.url||(c.url=window.location.toString()),m(c),c.cache===!1&&(c.url=l(c.url,"_="+Date.now()));var i=c.dataType,n=/\?.+=\?/.test(c.url);if("jsonp"==i||n)return n||(c.url=l(c.url,c.jsonp?c.jsonp+"=?":c.jsonp===!1?"":"callback=?")),a.ajaxJSONP(c,e);var o,r=c.accepts[i],s={},t=function(a,b){s[a.toLowerCase()]=[a,b]},u=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:window.location.protocol,v=c.xhr(),w=v.setRequestHeader;if(e&&e.promise(v),c.crossDomain||t("X-Requested-With","XMLHttpRequest"),t("Accept",r||"*/*"),(r=c.mimeType||r)&&(r.indexOf(",")>-1&&(r=r.split(",",2)[0]),v.overrideMimeType&&v.overrideMimeType(r)),(c.contentType||c.contentType!==!1&&c.data&&"GET"!=c.type.toUpperCase())&&t("Content-Type",c.contentType||"application/x-www-form-urlencoded"),c.headers)for(q in c.headers)t(q,c.headers[q]);if(v.setRequestHeader=t,v.onreadystatechange=function(){if(4==v.readyState){v.onreadystatechange=j,clearTimeout(o);var b,d=!1;if(v.status>=200&&v.status<300||304==v.status||0==v.status&&"file:"==u){i=i||k(c.mimeType||v.getResponseHeader("content-type")),b=v.responseText;try{"script"==i?(1,eval)(b):"xml"==i?b=v.responseXML:"json"==i&&(b=y.test(b)?null:a.parseJSON(b))}catch(f){d=f}d?h(d,"parsererror",v,c,e):g(b,v,c,e)}else h(v.statusText||null,v.status?"error":"abort",v,c,e)}},f(v,c)===!1)return v.abort(),h(null,"abort",v,c,e),v;if(c.xhrFields)for(q in c.xhrFields)v[q]=c.xhrFields[q];var x="async"in c?c.async:!0;v.open(c.type,c.url,x,c.username,c.password);for(q in s)w.apply(v,s[q]);return c.timeout>0&&(o=setTimeout(function(){v.onreadystatechange=j,v.abort(),h(null,"timeout",v,c,e)},c.timeout)),v.send(c.data?c.data:null),v},a.get=function(){return a.ajax(n.apply(null,arguments))},a.post=function(){var b=n.apply(null,arguments);return b.type="POST",a.ajax(b)},a.getJSON=function(){var b=n.apply(null,arguments);return b.dataType="json",a.ajax(b)},a.fn.load=function(b,c,d){if(!this.length)return this;var e,f=this,g=b.split(/\s/),h=n(b,c,d),i=h.success;return g.length>1&&(h.url=g[0],e=g[1]),h.success=function(b){f.html(e?a("
").html(b.replace(t,"")).find(e):b),i&&i.apply(f,arguments)},a.ajax(h),this};var z=encodeURIComponent;a.param=function(a,b){var c=[];return c.add=function(a,b){this.push(z(a)+"="+z(b))},o(c,a,b),c.join("&").replace(/%20/g,"+")}}(Zepto),function(a){a.fn.serializeArray=function(){var b,c=[];return a([].slice.call(this.get(0).elements)).each(function(){b=a(this);var d=b.attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=d&&"reset"!=d&&"button"!=d&&("radio"!=d&&"checkbox"!=d||this.checked)&&c.push({name:b.attr("name"),value:b.val()})}),c},a.fn.serialize=function(){var a=[];return this.serializeArray().forEach(function(b){a.push(encodeURIComponent(b.name)+"="+encodeURIComponent(b.value))}),a.join("&")},a.fn.submit=function(b){if(b)this.bind("submit",b);else if(this.length){var c=a.Event("submit");this.eq(0).trigger(c),c.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(a){"__proto__"in{}||a.extend(a.zepto,{Z:function(b,c){return b=b||[],a.extend(b,a.fn),b.selector=c||"",b.__Z=!0,b},isZ:function(b){return"array"===a.type(b)&&"__Z"in b}});try{getComputedStyle(void 0)}catch(b){var c=getComputedStyle;window.getComputedStyle=function(a){try{return c(a)}catch(b){return null}}}}(Zepto),FastClick.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,FastClick.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),FastClick.prototype.deviceIsIOS4=FastClick.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),FastClick.prototype.deviceIsIOSWithBadTarget=FastClick.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),FastClick.prototype.needsClick=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(this.deviceIsIOS&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},FastClick.prototype.needsFocus=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},FastClick.prototype.sendClick=function(a,b){"use strict";var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},FastClick.prototype.determineEventType=function(a){"use strict";return this.deviceIsAndroid&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(a){"use strict";var b;this.deviceIsIOS&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},FastClick.prototype.updateScrollParent=function(a){"use strict";var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(a){"use strict";return a.nodeType===Node.TEXT_NODE?a.parentNode:a},FastClick.prototype.onTouchStart=function(a){"use strict";var b,c,d;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],this.deviceIsIOS){if(d=window.getSelection(),d.rangeCount&&!d.isCollapsed)return!0;if(!this.deviceIsIOS4){if(c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTime<200&&a.preventDefault(),!0},FastClick.prototype.touchHasMoved=function(a){"use strict";var b=a.changedTouches[0],c=this.touchBoundary;return Math.abs(b.pageX-this.touchStartX)>c||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},FastClick.prototype.onTouchMove=function(a){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0 10 | },FastClick.prototype.findControl=function(a){"use strict";return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(a){"use strict";var b,c,d,e,f,g=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime<200)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(f=a.changedTouches[0],g=document.elementFromPoint(f.pageX-window.pageXOffset,f.pageY-window.pageYOffset)||g,g.fastClickScrollParent=this.targetElement.fastClickScrollParent),d=g.tagName.toLowerCase(),"label"===d){if(b=this.findControl(g)){if(this.focus(g),this.deviceIsAndroid)return!1;g=b}}else if(this.needsFocus(g))return a.timeStamp-c>100||this.deviceIsIOS&&window.top!==window&&"input"===d?(this.targetElement=null,!1):(this.focus(g),this.sendClick(g,a),this.deviceIsIOS4&&"select"===d||(this.targetElement=null,a.preventDefault()),!1);return this.deviceIsIOS&&!this.deviceIsIOS4&&(e=g.fastClickScrollParent,e&&e.fastClickLastScrollTop!==e.scrollTop)?!0:(this.needsClick(g)||(a.preventDefault(),this.sendClick(g,a)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(a){"use strict";return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},FastClick.prototype.onClick=function(a){"use strict";var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},FastClick.prototype.destroy=function(){"use strict";var a=this.layer;this.deviceIsAndroid&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(a){"use strict";var b,c;if("undefined"==typeof window.ontouchstart)return!0;if(c=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!FastClick.prototype.deviceIsAndroid)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(c>31&&window.innerWidth<=window.screen.width)return!0}}return"none"===a.style.msTouchAction?!0:!1},FastClick.attach=function(a){"use strict";return new FastClick(a)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick,function(a){var b=a.document,c=b.documentElement,d="overthrow-enabled",e="ontouchmove"in b,f="WebkitOverflowScrolling"in c.style||"msOverflowStyle"in c.style||!e&&a.screen.width>800||function(){var b=a.navigator.userAgent,c=b.match(/AppleWebKit\/([0-9]+)/),d=c&&c[1],e=c&&d>=534;return b.match(/Android ([0-9]+)/)&&RegExp.$1>=3&&e||b.match(/ Version\/([0-9]+)/)&&RegExp.$1>=0&&a.blackberry&&e||b.indexOf("PlayBook")>-1&&e&&-1===!b.indexOf("Android 2")||b.match(/Firefox\/([0-9]+)/)&&RegExp.$1>=4||b.match(/wOSBrowser\/([0-9]+)/)&&RegExp.$1>=233&&e||b.match(/NokiaBrowser\/([0-9\.]+)/)&&7.3===parseFloat(RegExp.$1)&&c&&d>=533}();a.overthrow={},a.overthrow.enabledClassName=d,a.overthrow.addClass=function(){-1===c.className.indexOf(a.overthrow.enabledClassName)&&(c.className+=" "+a.overthrow.enabledClassName)},a.overthrow.removeClass=function(){c.className=c.className.replace(a.overthrow.enabledClassName,"")},a.overthrow.set=function(){f&&a.overthrow.addClass()},a.overthrow.canBeFilledWithPoly=e,a.overthrow.forget=function(){a.overthrow.removeClass()},a.overthrow.support=f?"native":"none"}(this),function(a,b,c){if(b!==c){b.easing=function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},b.tossing=!1;var d;b.toss=function(a,e){b.intercept();var f,g,h=0,i=a.scrollLeft,j=a.scrollTop,k={top:"+0",left:"+0",duration:50,easing:b.easing,finished:function(){}},l=!1;if(e)for(var m in k)e[m]!==c&&(k[m]=e[m]);return"string"==typeof k.left?(k.left=parseFloat(k.left),f=k.left+i):(f=k.left,k.left=k.left-i),"string"==typeof k.top?(k.top=parseFloat(k.top),g=k.top+j):(g=k.top,k.top=k.top-j),b.tossing=!0,d=setInterval(function(){h++-1&&a||b.closest(a.parentNode)};var k=!1;b.set=function(){if(h(),!k&&!f&&g){a.overthrow.addClass(),k=!0,b.support="polyfilled",b.forget=function(){i(),k=!1,d.removeEventListener&&d.removeEventListener("touchstart",u,!1)};var j,l,m,n,o=[],p=[],q=function(){o=[],l=null},r=function(){p=[],m=null},s=function(a){n=j.querySelectorAll("textarea, input");for(var b=0,c=n.length;c>b;b++)n[b].style.pointerEvents=a},t=function(a,b){if(d.createEvent){var e,f=(!b||b===c)&&j.parentNode||j.touchchild||j;f!==j&&(e=d.createEvent("HTMLEvents"),e.initEvent("touchend",!0,!0),j.dispatchEvent(e),f.touchchild=j,j=f,f.dispatchEvent(a))}},u=function(a){if(b.intercept&&b.intercept(),q(),r(),j=b.closest(a.target),j&&j!==e&&!(a.touches.length>1)){s("none");var c=a,d=j.scrollTop,f=j.scrollLeft,g=j.offsetHeight,h=j.offsetWidth,i=a.touches[0].pageY,k=a.touches[0].pageX,n=j.scrollHeight,u=j.scrollWidth,v=function(a){var b=d+i-a.touches[0].pageY,e=f+k-a.touches[0].pageX,s=b>=(o.length?o[0]:0),v=e>=(p.length?p[0]:0);b>0&&n-g>b||e>0&&u-h>e?a.preventDefault():t(c),l&&s!==l&&q(),m&&v!==m&&r(),l=s,m=v,j.scrollTop=b,j.scrollLeft=e,o.unshift(b),p.unshift(e),o.length>3&&o.pop(),p.length>3&&p.pop()},w=function(){s("auto"),setTimeout(function(){s("none")},450),j.removeEventListener("touchmove",v,!1),j.removeEventListener("touchend",w,!1)};j.addEventListener("touchmove",v,!1),j.addEventListener("touchend",w,!1)}};d.addEventListener("touchstart",u,!1)}}}}(this,this.overthrow),function(a){a.overthrow.set()}(this),function(a,b){"use strict";var c=c||function(c){var d={element:null,dragger:null,disable:"none",addBodyClasses:!0,hyperextensible:!0,resistance:.5,flickThreshold:50,transitionSpeed:.3,easing:"ease",maxPosition:266,minPosition:-266,tapToClose:!0,touchToDrag:!0,slideIntent:40,minDragDistance:5},e={simpleStates:{opening:null,towards:null,hyperExtending:null,halfway:null,flick:null,translation:{absolute:0,relative:0,sinceDirectionChange:0,percentage:0}}},f={},g={hasTouch:"ontouchstart"in b.documentElement||a.navigator.msPointerEnabled,eventType:function(a){var b={down:g.hasTouch?"touchstart":"mousedown",move:g.hasTouch?"touchmove":"mousemove",up:g.hasTouch?"touchend":"mouseup",out:g.hasTouch?"touchcancel":"mouseout"};return b[a]},page:function(a,b){return g.hasTouch&&b.touches.length&&b.touches[0]?b.touches[0]["page"+a]:b["page"+a]},klass:{has:function(a,b){return-1!==a.className.indexOf(b)},add:function(a,b){!g.klass.has(a,b)&&d.addBodyClasses&&(a.className+=" "+b)},remove:function(a,b){d.addBodyClasses&&(a.className=a.className.replace(b,"").replace(/^\s+|\s+$/g,""))}},dispatchEvent:function(a){return"function"==typeof f[a]?f[a].call():void 0},vendor:function(){var a,c=b.createElement("div"),d="webkit Moz O ms".split(" ");for(a in d)if("undefined"!=typeof c.style[d[a]+"Transition"])return d[a]},transitionCallback:function(){return"Moz"===e.vendor||"ms"===e.vendor?"transitionend":e.vendor+"TransitionEnd"},canTransform:function(){return"undefined"!=typeof d.element.style[e.vendor+"Transform"]},deepExtend:function(a,b){var c;for(c in b)b[c]&&b[c].constructor&&b[c].constructor===Object?(a[c]=a[c]||{},g.deepExtend(a[c],b[c])):a[c]=b[c];return a},angleOfDrag:function(a,b){var c,d;return d=Math.atan2(-(e.startDragY-b),e.startDragX-a),0>d&&(d+=2*Math.PI),c=Math.floor(d*(180/Math.PI)-180),0>c&&c>-180&&(c=360-Math.abs(c)),Math.abs(c)},events:{addEvent:function(a,b,c){return a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):void 0},removeEvent:function(a,b,c){return a.addEventListener?a.removeEventListener(b,c,!1):a.attachEvent?a.detachEvent("on"+b,c):void 0},prevent:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}},parentUntil:function(a,b){for(var c="string"==typeof b;a.parentNode;){if(c&&a.getAttribute&&a.getAttribute(b))return a;if(!c&&a===b)return a;a=a.parentNode}return null}},h={translate:{get:{matrix:function(b){if(g.canTransform()){var c=a.getComputedStyle(d.element)[e.vendor+"Transform"].match(/\((.*)\)/),f=8;return c?(c=c[1].split(","),16===c.length&&(b+=f),parseInt(c[b],10)):0}return parseInt(d.element.style.left,10)}},easeCallback:function(){d.element.style[e.vendor+"Transition"]="",e.translation=h.translate.get.matrix(4),e.easing=!1,clearInterval(e.animatingInterval),0===e.easingTo&&(g.klass.remove(b.body,"snapjs-right"),g.klass.remove(b.body,"snapjs-left")),g.dispatchEvent("animated"),g.events.removeEvent(d.element,g.transitionCallback(),h.translate.easeCallback)},easeTo:function(a){g.canTransform()?(e.easing=!0,e.easingTo=a,d.element.style[e.vendor+"Transition"]="all "+d.transitionSpeed+"s "+d.easing,e.animatingInterval=setInterval(function(){g.dispatchEvent("animating")},1),g.events.addEvent(d.element,g.transitionCallback(),h.translate.easeCallback),h.translate.x(a)):(e.translation=a,h.translate.x(a)),0===a&&(d.element.style[e.vendor+"Transform"]="")},x:function(c){if(!("left"===d.disable&&c>0||"right"===d.disable&&0>c))if(d.hyperextensible||(c===d.maxPosition||c>d.maxPosition?c=d.maxPosition:(c===d.minPosition||c0,n=l;if(e.intentChecked&&!e.hasIntent)return;if(d.addBodyClasses&&(k>0?(g.klass.add(b.body,"snapjs-left"),g.klass.remove(b.body,"snapjs-right")):0>k&&(g.klass.add(b.body,"snapjs-right"),g.klass.remove(b.body,"snapjs-left"))),e.hasIntent===!1||null===e.hasIntent){var o=g.angleOfDrag(f,i),p=o>=0&&o<=d.slideIntent||360>=o&&o>360-d.slideIntent,q=o>=180&&o<=180+d.slideIntent||180>=o&&o>=180-d.slideIntent;e.hasIntent=q||p?!0:!1,e.intentChecked=!0}if(d.minDragDistance>=Math.abs(f-e.startDragX)||e.hasIntent===!1)return;g.events.prevent(a),g.dispatchEvent("drag"),e.dragWatchers.current=f,e.dragWatchers.last>f?("left"!==e.dragWatchers.state&&(e.dragWatchers.state="left",e.dragWatchers.hold=f),e.dragWatchers.last=f):e.dragWatchers.lastd.maxPosition/2,flick:Math.abs(e.dragWatchers.current-e.dragWatchers.hold)>d.flickThreshold,translation:{absolute:k,relative:l,sinceDirectionChange:e.dragWatchers.current-e.dragWatchers.hold,percentage:k/d.maxPosition*100}}):(d.minPosition>k&&(c=(k-d.minPosition)*d.resistance,n=l-c),e.simpleStates={opening:"right",towards:e.dragWatchers.state,hyperExtending:d.minPosition>k,halfway:kd.flickThreshold,translation:{absolute:k,relative:l,sinceDirectionChange:e.dragWatchers.current-e.dragWatchers.hold,percentage:k/d.minPosition*100}}),h.translate.x(n+j)}},endDrag:function(a){if(e.isDragging){g.dispatchEvent("end");var b=h.translate.get.matrix(4);if(0===e.dragWatchers.current&&0!==b&&d.tapToClose)return g.dispatchEvent("close"),g.events.prevent(a),h.translate.easeTo(0),e.isDragging=!1,void(e.startDragX=0);"left"===e.simpleStates.opening?e.simpleStates.halfway||e.simpleStates.hyperExtending||e.simpleStates.flick?e.simpleStates.flick&&"left"===e.simpleStates.towards?h.translate.easeTo(0):(e.simpleStates.flick&&"right"===e.simpleStates.towards||e.simpleStates.halfway||e.simpleStates.hyperExtending)&&h.translate.easeTo(d.maxPosition):h.translate.easeTo(0):"right"===e.simpleStates.opening&&(e.simpleStates.halfway||e.simpleStates.hyperExtending||e.simpleStates.flick?e.simpleStates.flick&&"right"===e.simpleStates.towards?h.translate.easeTo(0):(e.simpleStates.flick&&"left"===e.simpleStates.towards||e.simpleStates.halfway||e.simpleStates.hyperExtending)&&h.translate.easeTo(d.minPosition):h.translate.easeTo(0)),e.isDragging=!1,e.startDragX=g.page("X",a)}}}},i=function(a){a.element&&(g.deepExtend(d,a),e.vendor=g.vendor(),h.drag.listen())};this.open=function(a){g.dispatchEvent("open"),g.klass.remove(b.body,"snapjs-expand-left"),g.klass.remove(b.body,"snapjs-expand-right"),"left"===a?(e.simpleStates.opening="left",e.simpleStates.towards="right",g.klass.add(b.body,"snapjs-left"),g.klass.remove(b.body,"snapjs-right"),h.translate.easeTo(d.maxPosition)):"right"===a&&(e.simpleStates.opening="right",e.simpleStates.towards="left",g.klass.remove(b.body,"snapjs-left"),g.klass.add(b.body,"snapjs-right"),h.translate.easeTo(d.minPosition))},this.close=function(){g.dispatchEvent("close"),h.translate.easeTo(0)},this.expand=function(c){var d=a.innerWidth||b.documentElement.clientWidth;"left"===c?(g.dispatchEvent("expandLeft"),g.klass.add(b.body,"snapjs-expand-left"),g.klass.remove(b.body,"snapjs-expand-right")):(g.dispatchEvent("expandRight"),g.klass.add(b.body,"snapjs-expand-right"),g.klass.remove(b.body,"snapjs-expand-left"),d*=-1),h.translate.easeTo(d)},this.on=function(a,b){return f[a]=b,this},this.off=function(a){f[a]&&(f[a]=!1)},this.enable=function(){g.dispatchEvent("enable"),h.drag.listen()},this.disable=function(){g.dispatchEvent("disable"),h.drag.stopListening()},this.settings=function(a){g.deepExtend(d,a)},this.state=function(){var a,b=h.translate.get.matrix(4);return a=b===d.maxPosition?"left":b===d.minPosition?"right":"closed",{state:a,info:e.simpleStates}},i(c)};"undefined"!=typeof module&&module.exports&&(module.exports=c),"undefined"==typeof ender&&(this.Snap=c),"function"==typeof define&&define.amd&&define("snap",[],function(){return c})}.call(this,window,document),function(a){var b=a.FG={scrollApp:null,currentController:null,$contentLoad:null,$menu:null,$content:null,$headerApp:null};b.init=function(){b.setDomElements(),this.addEventListeners(),this.definitions(),setTimeout(function(){Transition.control=!0,Navigator.loadPage("home.html","HomeController")},10)},b.setDomElements=function(){b.$contentLoad=$("#scroll"),b.$menu=$("#menu"),b.$content=$("#content"),b.$headerApp=$("#header-app"),b.$scrollApp=document.getElementById("scroll")},b.definitions=function(){FastClick.attach(document.body)},b.addEventListeners=function(){a.addEventListener("orientationchange",function(){$("#scroll").height(a.innerHeight-b.$headerApp.height())},!1),$("#page").on("click",".botoes-app",Navigator.loadPage),$("#page").on("click","#menu-button",Transition.toggleMenu),snapper=new Snap({element:document.getElementById("content"),maxPosition:$("menu").width(),disable:"right",transitionSpeed:.2}),$("#scroll").height(a.innerHeight-b.$headerApp.height())}}(window),function(a){var b=a.Navigator={control:!0,currentPage:"",controlers:"",isBack:!1};b.loadPage=function(a,c){"string"==typeof a?(b.currentPage=a,b.controlers=c):(b.currentPage=$(this).data("url"),b.controlers=$(this).data("controler")),Transition.start()}}(window),function(a){var b=a.Transition={control:!1,"class":"transitionApp1"};b.start=function(){firstrequestapp?(firstrequestapp=!1,b.End()):(FG.$contentLoad.addClass(b.class),setTimeout(b.End,150))},b.End=function(){b.control&&(PageLoad.load(Navigator.currentPage),b.control=!1)},b.toggleMenu=function(){"closed"==snapper.state().state?b.showMenu():b.hideMenu()},b.hideMenu=function(){snapper.close()},b.showMenu=function(){snapper.open("left")}}(window),function(a){var b=a.PageLoad={ajxHandle:null};b.load=function(a){b.ajxHandle=$.get("pages/"+a,b.success)},b.success=function(a){null!=FG.currentController&&FG.currentController.destroy(),FG.$contentLoad.html(a),FG.currentController=new this[Navigator.controlers],null!=FG.currentController&&FG.currentController.initialize(),Transition.hideMenu(),Transition.control=!0,FG.$contentLoad.removeClass(Transition.class)}}(window);var app,snapper,firstrequestapp=!0;$(document).ready(function(){FG.init(),app=new AppController,app.initialize()}); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fastgap", 3 | "version": "0.0.49", 4 | "description": "FastGap is a template created by Brazilians to start developing native apps for smartphones using PhoneGap.", 5 | "private": true, 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/FastGap/fastgap.git" 9 | }, 10 | "homepage": "http://fastgap.mobi/", 11 | "keywords": [ 12 | "fastgap", 13 | "zepto", 14 | "cordova", 15 | "phonegap" 16 | ], 17 | "author": { 18 | "name": "Gustavo Costa", 19 | "email": "gustavo.costa.w@gmail.com", 20 | "url": "https://github.com/GustavoCostaW" 21 | }, 22 | "license": "MIT", 23 | "maintainers": [ 24 | { 25 | "name": "Gustavo Costa", 26 | "email": "gustavo.costa.w@gmail.com", 27 | "url": "https://github.com/GustavoCostaW" 28 | }, 29 | { 30 | "name": "Ivan Santos", 31 | "email": "pragmaticivan@gmail.com", 32 | "url": "https://github.com/pragmaticivan" 33 | }, 34 | { 35 | "name": "Mayron Cachina", 36 | "email": "mayroncachina@gmail.com", 37 | "url": "https://github.com/mayroncachina" 38 | }, 39 | { 40 | "name": "Daniel Torres", 41 | "email": "danielfeelfine@gmail.com", 42 | "url": "https://github.com/danielfeelfine" 43 | } 44 | ], 45 | "bugs": { 46 | "url": "https://github.com/FastGap/fastgap/issues" 47 | }, 48 | "devDependencies": { 49 | "grunt": "~0.4.4", 50 | "grunt-contrib-uglify": "~0.4.0", 51 | "grunt-contrib-watch": "~0.6.1", 52 | "grunt-contrib-jshint": "~0.10.0", 53 | "grunt-contrib-imagemin": "^0.7.0", 54 | "grunt-contrib-concat": "~0.4.0", 55 | "grunt-contrib-copy": "~0.5.0", 56 | "grunt-notify": "~0.3.0", 57 | "grunt-contrib-connect": "^0.7.1", 58 | "grunt-bower-install": "~1.4.1", 59 | "grunt-bump": "0.0.13", 60 | "load-grunt-tasks": "^0.4.0", 61 | "grunt-banner": "^0.2.2", 62 | "grunt-sass": "^0.12.1", 63 | "grunt-contrib-clean": "^0.5.0", 64 | "time-grunt": "^0.3.1" 65 | }, 66 | "engines": { 67 | "node": ">=0.8.0", 68 | "npm": ">=1.1.0" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/img/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/src/img/back.png -------------------------------------------------------------------------------- /src/img/fastgap_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/src/img/fastgap_logo.jpg -------------------------------------------------------------------------------- /src/img/gustavocostaw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/src/img/gustavocostaw.jpg -------------------------------------------------------------------------------- /src/img/mayron.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/src/img/mayron.jpg -------------------------------------------------------------------------------- /src/js/FG.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 2 | 3 | 4 | (function (window) { 5 | // FastGap object 6 | var FG = window.FG = { 7 | scrollApp: null, 8 | currentController: null, 9 | $contentLoad: null, 10 | $menu: null, 11 | $content: null, 12 | $headerApp: null, 13 | }; 14 | //init project 15 | FG.init = function () { 16 | FG.setDomElements(); 17 | this.addEventListeners(); 18 | this.definitions(); 19 | /* PHONEGAP EVENT DEVICE READY LOAD HOME PAGE */ 20 | 21 | //document.addEventListener("deviceready",function(){ 22 | //prevent bug call transitionend 23 | setTimeout(function () { 24 | Transition.control = true; 25 | Navigator.loadPage('home.html','HomeController'); 26 | }, 10); 27 | //}); 28 | }; 29 | //set fg elements 30 | FG.setDomElements = function () { 31 | FG.$contentLoad = $("#scroll"); 32 | FG.$menu = $("#menu"); 33 | FG.$content = $("#content"); 34 | FG.$headerApp = $('#header-app'); 35 | FG.$scrollApp = document.getElementById("scroll"); 36 | } 37 | //set definitions project 38 | FG.definitions = function () { 39 | //fastclick, performance library of mouse events to touch events 40 | FastClick.attach(document.body); 41 | 42 | 43 | /*block drag "navegator box", this code locks the drag in the browser but it locks the scroll, BlackBerry and Android is not necessary, and to avoid this in iOS add the following code in config.xml 44 | 45 | 46 | 47 | 48 | $(document).on('touchmove', function (event) { 49 | e.preventDefault(); 50 | });*/ 51 | } 52 | //set fastgap listeners 53 | FG.addEventListeners = function () { 54 | //orientation change event 55 | window.addEventListener("orientationchange", function () { 56 | //scroll - CSS CALC() NOT WORKS IN ANDROID < 4.3 AND IOS 6.0 < 57 | $("#scroll").height(window.innerHeight - FG.$headerApp.height()); 58 | }, false); 59 | 60 | //load internal pages 61 | $("#page").on('click', '.botoes-app', Navigator.loadPage); 62 | 63 | //listener menu button 64 | $("#page").on('click', "#menu-button", Transition.toggleMenu); 65 | 66 | //SNAP JS 67 | snapper = new Snap({ 68 | element: document.getElementById('content'), //your content 69 | maxPosition: $("menu").width(), //width of the menu 70 | disable: 'right', //disable right menu 71 | transitionSpeed: 0.2 //speed transition 72 | }); 73 | 74 | //scroll - CSS CALC() NOT WORKS IN ANDROID < 4.3 AND IOS 6.0 < 75 | $("#scroll").height(window.innerHeight - FG.$headerApp.height()); 76 | 77 | }; 78 | })(window); -------------------------------------------------------------------------------- /src/js/History.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/FastGap/FastGap 2 | 3 | ;(function(window,undefined){ 4 | "use strict"; 5 | 6 | // Localise Globals 7 | //var History = window.History = window.history||{}; 8 | 9 | /*History.bind = function(event, callback){ 10 | //window.addEventListener(event, callback); 11 | }; 12 | 13 | })(window);*/ -------------------------------------------------------------------------------- /src/js/Navigator.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 2 | 3 | (function (window) { 4 | //navigator object 5 | var Navigator = window.Navigator = { 6 | control: true, 7 | currentPage: '', 8 | controlers:'', 9 | isBack: false 10 | }; 11 | //load page*****************modifiquei **************** 12 | Navigator.loadPage = function (url, Dcontrolers) { 13 | //if string page is url 14 | if (typeof url == "string") { 15 | Navigator.currentPage = url; 16 | Navigator.controlers=Dcontrolers; 17 | } else { 18 | // or page is data-url attr in menu ul li element 19 | Navigator.currentPage = $(this).data("url"); 20 | Navigator.controlers=$(this).data("controler"); 21 | 22 | } 23 | 24 | //start transition 25 | Transition.start(); 26 | }; 27 | 28 | 29 | })(window); -------------------------------------------------------------------------------- /src/js/PageLoad.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/FastGap/FastGap */ 2 | 3 | (function (window) { 4 | 5 | // page load object 6 | var PageLoad = window.PageLoad = { 7 | ajxHandle: null 8 | }; 9 | 10 | //load ajax 11 | PageLoad.load = function (page) { 12 | PageLoad.ajxHandle = $.get("pages/" + page, PageLoad.success); 13 | }; 14 | //sucess load 15 | PageLoad.success = function (content) { 16 | 17 | if (FG.currentController != null) { 18 | // unset everything in the previous controller 19 | // prevent memory leaks 20 | FG.currentController.destroy(); 21 | } 22 | 23 | 24 | FG.$contentLoad.html(content); 25 | 26 | //create new controller 27 | FG.currentController = new this[Navigator.controlers](); 28 | 29 | // once new controller created, initialize it 30 | if (FG.currentController != null) { 31 | FG.currentController.initialize(); 32 | } 33 | 34 | //hide my menu 35 | Transition.hideMenu(); 36 | //remove transition in my app 37 | Transition.control = true; 38 | FG.$contentLoad.removeClass(Transition.class); 39 | }; 40 | 41 | 42 | })(window); -------------------------------------------------------------------------------- /src/js/Transition.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/FastGap/FastGap */ 2 | 3 | (function (window) { 4 | 5 | // transition object 6 | var Transition = window.Transition = { 7 | control: false, 8 | class: 'transitionApp1' 9 | /* VIEW TRANSITIONS.CSS OR CREATE YOUR TRANSITION */ 10 | }; 11 | 12 | //start transition 13 | Transition.start = function () { 14 | if (!firstrequestapp) { 15 | FG.$contentLoad.addClass(Transition.class); 16 | //time for alpha 150 mileseconds 17 | setTimeout(Transition.End, 150); 18 | } else { 19 | //first request open app 20 | firstrequestapp = false; 21 | Transition.End(); 22 | } 23 | }; 24 | //end transition with listener 25 | Transition.End = function () { 26 | if (Transition.control) { 27 | PageLoad.load(Navigator.currentPage); 28 | //control load pages 29 | Transition.control = false; 30 | } 31 | }; 32 | //toggleMenu 33 | Transition.toggleMenu = function () { 34 | if (snapper.state().state == "closed") { 35 | Transition.showMenu(); 36 | } else { 37 | Transition.hideMenu(); 38 | } 39 | }; 40 | //hide panel menu 41 | Transition.hideMenu = function () { 42 | snapper.close(); 43 | }; 44 | //show panel menu 45 | Transition.showMenu = function () { 46 | snapper.open('left'); 47 | }; 48 | 49 | })(window); -------------------------------------------------------------------------------- /src/js/controllers/AppController.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/FastGap/FastGap 2 | 3 | IMPORTANT, READ LIBRARY DOCS FOR BETTER CUSTOMIZATION 4 | 5 | http://zeptojs.com 6 | http://topcoat.io 7 | */ 8 | 9 | 10 | var AppController = function () {}; 11 | 12 | AppController.prototype = { 13 | initialize: function () { 14 | 15 | //YOUR "GLOBAL CODE" HERE. 16 | 17 | 18 | }, 19 | destroy: function () { 20 | PageLoad.ajxHandle = null; 21 | } 22 | }; -------------------------------------------------------------------------------- /src/js/controllers/HomeController.js: -------------------------------------------------------------------------------- 1 | var HomeController = function () {}; 2 | 3 | HomeController.prototype = { 4 | self: Object, 5 | initialize: function () { 6 | //your code here 7 | }, 8 | destroy: function () { 9 | // unset events 10 | // stop ajax 11 | // destroy components 12 | FG.scroll = null; 13 | PageLoad.ajxHandle = null; 14 | } 15 | }; -------------------------------------------------------------------------------- /src/js/controllers/Page1Controller.js: -------------------------------------------------------------------------------- 1 | var Page1Controller = function () {}; 2 | 3 | Page1Controller.prototype = { 4 | onScroll: Function, 5 | self: Object, 6 | initialize: function () { 7 | self = this; 8 | //scroll listener 9 | FG.$scrollApp.addEventListener("scroll", self.onScroll); 10 | }, 11 | onScroll: function (e) { 12 | //checkscrol 13 | 14 | //the calc 15 | if (Number(FG.$scrollApp.scrollHeight - e.srcElement.scrollTop) - e.srcElement.clientHeight <= 350) { 16 | div = document.createElement("div"); 17 | //fake content 18 | div.innerHTML = "

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

Hey, vamos testar a performance do Cordova?!? :-)

"; 19 | //preload 20 | preload = document.createElement("div"); 21 | preload.innerHTML = "

simulando requisição server...

"; 22 | //add preload 23 | FG.$scrollApp.appendChild(preload); 24 | //remove listener on scroll 25 | FG.$scrollApp.removeEventListener("scroll", self.onScroll); 26 | 27 | /* SIMULATE DELAY 2 SECONDS FROM TO SERVER AJAX REQUEST */ 28 | setTimeout(function () { 29 | //add listener 30 | FG.$scrollApp.addEventListener("scroll", self.onScroll); 31 | //remove child and add content 32 | FG.$scrollApp.removeChild(preload); 33 | FG.$scrollApp.appendChild(div); 34 | 35 | FG.$scrollApp.scrollTop += 20; 36 | }, 2000); 37 | 38 | } 39 | }, 40 | destroy: function () { 41 | // unset events 42 | // stop ajax 43 | //remove listener scroll 44 | FG.$scrollApp.removeEventListener("scroll", self.onScroll); 45 | PageLoad.ajxHandle = null; 46 | } 47 | }; -------------------------------------------------------------------------------- /src/js/controllers/Page2Controller.js: -------------------------------------------------------------------------------- 1 | var Page2Controller = function() {}; 2 | 3 | Page2Controller.prototype = { 4 | initialize: function() { 5 | alert("initialize Page2 Controller, create elements"); 6 | }, 7 | destroy: function() { 8 | alert("destroy Page2 Controller, destroy elements, scroll and ajax"); 9 | 10 | PageLoad.ajxHandle = null; 11 | } 12 | }; -------------------------------------------------------------------------------- /src/js/controllers/Page3Controller.js: -------------------------------------------------------------------------------- 1 | var Page3Controller = function() {}; 2 | 3 | Page3Controller.prototype = { 4 | initialize: function() { 5 | 6 | }, 7 | destroy: function() { 8 | // unset events 9 | // stop ajax 10 | // destroy components 11 | PageLoad.ajxHandle = null; 12 | } 13 | }; -------------------------------------------------------------------------------- /src/js/controllers/Page4Controller.js: -------------------------------------------------------------------------------- 1 | var Page4Controller = function() {}; 2 | 3 | Page4Controller.prototype = { 4 | initialize: function() { 5 | 6 | }, 7 | destroy: function() { 8 | // unset events 9 | // stop ajax 10 | // destroy components 11 | PageLoad.ajxHandle = null; 12 | } 13 | }; -------------------------------------------------------------------------------- /src/js/controllers/Page5Controller.js: -------------------------------------------------------------------------------- 1 | var Page5Controller = function() {}; 2 | 3 | Page5Controller.prototype = { 4 | initialize: function() { 5 | 6 | }, 7 | destroy: function() { 8 | // unset events 9 | // stop ajax 10 | // destroy components 11 | PageLoad.ajxHandle = null; 12 | } 13 | }; -------------------------------------------------------------------------------- /src/js/controllers/ViewController.js: -------------------------------------------------------------------------------- 1 | var ViewController = function(){}; 2 | ViewController.prototype = { 3 | initialize:function(){ 4 | // set events 5 | console.log('ViewController initialized. Override this method in your class.'); 6 | }, 7 | destroy: function(){ 8 | // unset events 9 | console.log('ViewController destroyed. Override this method in your class.'); 10 | } 11 | }; -------------------------------------------------------------------------------- /src/js/index.js: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 2 | 3 | 4 | /* GLOBAL VAR */ 5 | var app; 6 | /* SNAP JS*/ 7 | var snapper; 8 | /*FIRST REQUEST APP*/ 9 | var firstrequestapp = true; 10 | 11 | //ready app 12 | $(document).ready(function () { 13 | //create the project 14 | FG.init(); 15 | app = new AppController(); 16 | app.initialize(); 17 | }); -------------------------------------------------------------------------------- /src/scss/base/_fastgap.scss: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 2 | 3 | *:not(input):not(textarea) { 4 | -webkit-user-select: none; 5 | -webkit-touch-callout: none; 6 | } 7 | html, 8 | body { 9 | width: 100%; 10 | overflow: hidden; 11 | position: relative; 12 | -webkit-text-size-adjust: none; 13 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 14 | -webkit-tap-highlight-color: transparent; 15 | } 16 | input, 17 | textarea { 18 | user-select: text; 19 | } 20 | /* APP LOGO IMG */ 21 | 22 | header#header-app { 23 | width: 100%; 24 | top: 0; 25 | } 26 | /* BOX LOAD PAGES */ 27 | 28 | /* SCROLL */ 29 | 30 | .overthrow-enabled .overthrow { 31 | overflow-y: auto; 32 | overflow-x: hidden; 33 | -webkit-overflow-scrolling: touch; 34 | } 35 | #page { 36 | width: 100%; 37 | height: 100%; 38 | -webkit-transition: translate3d(0, 0, 0); 39 | transform: translate3d(0, 0, 0); 40 | overflow: hidden; 41 | } 42 | #content { 43 | overflow: hidden; 44 | } 45 | #content, 46 | #page, 47 | #scroll { 48 | -webkit-overflow-scrolling: touch; 49 | } 50 | /* MENU BUTTON */ 51 | 52 | #menu-button { 53 | position: absolute; 54 | z-index: 999; 55 | display: block; 56 | } 57 | /* MENU APP */ 58 | 59 | menu { 60 | position: absolute; 61 | top: 0; 62 | left: 0; 63 | height: 100%; 64 | } 65 | #menu-content { 66 | height: 100%; 67 | position: relative; 68 | } 69 | -------------------------------------------------------------------------------- /src/scss/base/_fonts.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/src/scss/base/_fonts.scss -------------------------------------------------------------------------------- /src/scss/base/_reset.scss: -------------------------------------------------------------------------------- 1 | /* FASTGAP https://github.com/GustavoCostaW/FastGap */ 2 | 3 | html, 4 | body, 5 | div, 6 | span, 7 | applet, 8 | object, 9 | iframe, 10 | h1, 11 | h2, 12 | h3, 13 | h4, 14 | h5, 15 | h6, 16 | p, 17 | blockquote, 18 | pre, 19 | a, 20 | abbr, 21 | acronym, 22 | address, 23 | big, 24 | cite, 25 | code, 26 | del, 27 | dfn, 28 | em, 29 | img, 30 | ins, 31 | kbd, 32 | q, 33 | s, 34 | samp, 35 | small, 36 | strike, 37 | strong, 38 | sub, 39 | sup, 40 | tt, 41 | var, 42 | b, 43 | u, 44 | i, 45 | center, 46 | dl, 47 | dt, 48 | dd, 49 | ol, 50 | ul, 51 | li, 52 | fieldset, 53 | form, 54 | label, 55 | legend, 56 | table, 57 | caption, 58 | tbody, 59 | tfoot, 60 | thead, 61 | tr, 62 | th, 63 | td, 64 | article, 65 | aside, 66 | canvas, 67 | details, 68 | embed, 69 | figure, 70 | figcaption, 71 | footer, 72 | header, 73 | hgroup, 74 | menu, 75 | nav, 76 | output, 77 | ruby, 78 | section, 79 | summary, 80 | time, 81 | mark, 82 | audio, 83 | video { 84 | margin: 0; 85 | padding: 0; 86 | border: 0; 87 | font-size: 100%; 88 | vertical-align: baseline; 89 | } 90 | body { 91 | line-height: 1; 92 | } 93 | ol, 94 | ul { 95 | list-style: none; 96 | } 97 | blockquote, 98 | q { 99 | quotes: none; 100 | } 101 | blockquote:before, 102 | blockquote:after, 103 | q:before, 104 | q:after { 105 | content: ''; 106 | content: none; 107 | } 108 | table { 109 | border-collapse: collapse; 110 | border-spacing: 0; 111 | } 112 | -------------------------------------------------------------------------------- /src/scss/base/_transitions.scss: -------------------------------------------------------------------------------- 1 | 2 | /* MENU TRANSITIONS */ 3 | 4 | menu { 5 | 6 | -webkit-transition: translate3d(0, 0, 0); 7 | 8 | transform: translate3d(0, 0, 0); 9 | 10 | } 11 | 12 | #scroll { 13 | 14 | transform: translate3d(0, 0, 0); 15 | 16 | -webkit-backface-visibility: hidden; 17 | 18 | -webkit-transition: all 0.2s ease; 19 | 20 | } 21 | 22 | 23 | 24 | .transitionApp1 { 25 | 26 | opacity: 0; 27 | 28 | } 29 | 30 | .transitionApp2 { 31 | 32 | -webkit-transform: translateX(100%); 33 | 34 | } 35 | 36 | .transitionApp3 { 37 | 38 | -webkit-transform: scale(0.1); 39 | 40 | } 41 | 42 | .transitionApp4 { 43 | 44 | -webkit-transform: rotateY(180deg); 45 | 46 | opacity: 0; 47 | 48 | } 49 | 50 | .transitionApp5 { 51 | 52 | opacity: 0; 53 | 54 | -webkit-transform: rotateX(180deg); 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/scss/base/_variables.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FastGap/fastgap/ce16b09c3895c3189f86243cdfd8788f334c7d63/src/scss/base/_variables.scss -------------------------------------------------------------------------------- /src/scss/build.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | // Base 4 | @import "base/fonts"; 5 | @import "base/variables"; 6 | @import "base/reset"; 7 | @import "base/transitions"; 8 | @import "base/fastgap"; 9 | 10 | --------------------------------------------------------------------------------