├── .gitignore ├── README.md ├── assets ├── screenshot-1.jpg ├── screenshot-2.jpg └── screenshot-3.png ├── ionic ├── .bowerrc ├── .gitignore ├── README.md ├── bower.json ├── config.xml ├── gulpfile.js ├── hooks │ ├── README.md │ └── after_prepare │ │ └── 010_add_platform_class.js ├── ionic.project ├── package.json ├── resources │ ├── android │ │ ├── icon │ │ │ ├── drawable-hdpi-icon.png │ │ │ ├── drawable-ldpi-icon.png │ │ │ ├── drawable-mdpi-icon.png │ │ │ ├── drawable-xhdpi-icon.png │ │ │ ├── drawable-xxhdpi-icon.png │ │ │ └── drawable-xxxhdpi-icon.png │ │ └── splash │ │ │ ├── drawable-land-hdpi-screen.png │ │ │ ├── drawable-land-ldpi-screen.png │ │ │ ├── drawable-land-mdpi-screen.png │ │ │ ├── drawable-land-xhdpi-screen.png │ │ │ ├── drawable-land-xxhdpi-screen.png │ │ │ ├── drawable-land-xxxhdpi-screen.png │ │ │ ├── drawable-port-hdpi-screen.png │ │ │ ├── drawable-port-ldpi-screen.png │ │ │ ├── drawable-port-mdpi-screen.png │ │ │ ├── drawable-port-xhdpi-screen.png │ │ │ ├── drawable-port-xxhdpi-screen.png │ │ │ └── drawable-port-xxxhdpi-screen.png │ ├── icon.png │ ├── ios │ │ ├── icon │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-50.png │ │ │ ├── icon-50@2x.png │ │ │ ├── icon-60.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-72.png │ │ │ ├── icon-72@2x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon-small.png │ │ │ ├── icon-small@2x.png │ │ │ ├── icon-small@3x.png │ │ │ ├── icon.png │ │ │ └── icon@2x.png │ │ └── splash │ │ │ ├── Default-568h@2x~iphone.png │ │ │ ├── Default-667h.png │ │ │ ├── Default-736h.png │ │ │ ├── Default-Landscape-736h.png │ │ │ ├── Default-Landscape@2x~ipad.png │ │ │ ├── Default-Landscape~ipad.png │ │ │ ├── Default-Portrait@2x~ipad.png │ │ │ ├── Default-Portrait~ipad.png │ │ │ ├── Default@2x~iphone.png │ │ │ └── Default~iphone.png │ └── splash.png ├── scss │ └── ionic.app.scss └── www │ ├── css │ └── style.css │ ├── img │ ├── res1.jpg │ ├── res1thumb.png │ ├── res2.jpg │ ├── res2.png │ ├── res3.jpg │ ├── res4.jpg │ ├── res5.jpg │ ├── res5thumb.png │ ├── res6.gif │ ├── res6thumb.png │ └── res7.jpg │ ├── index.html │ ├── js │ ├── app.js │ ├── controllers.js │ └── share.js │ ├── lib │ └── ionic │ │ ├── css │ │ ├── ionic.css │ │ └── ionic.min.css │ │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ │ ├── js │ │ ├── angular-ui │ │ │ ├── angular-ui-router.js │ │ │ └── angular-ui-router.min.js │ │ ├── angular │ │ │ ├── angular-animate.js │ │ │ ├── angular-animate.min.js │ │ │ ├── angular-resource.js │ │ │ ├── angular-resource.min.js │ │ │ ├── angular-sanitize.js │ │ │ ├── angular-sanitize.min.js │ │ │ ├── angular.js │ │ │ └── angular.min.js │ │ ├── ionic-angular.js │ │ ├── ionic-angular.min.js │ │ ├── ionic.bundle.js │ │ ├── ionic.bundle.min.js │ │ ├── ionic.js │ │ └── ionic.min.js │ │ ├── scss │ │ ├── _action-sheet.scss │ │ ├── _animations.scss │ │ ├── _backdrop.scss │ │ ├── _badge.scss │ │ ├── _bar.scss │ │ ├── _button-bar.scss │ │ ├── _button.scss │ │ ├── _checkbox.scss │ │ ├── _form.scss │ │ ├── _grid.scss │ │ ├── _items.scss │ │ ├── _list.scss │ │ ├── _loading.scss │ │ ├── _menu.scss │ │ ├── _mixins.scss │ │ ├── _modal.scss │ │ ├── _platform.scss │ │ ├── _popover.scss │ │ ├── _popup.scss │ │ ├── _progress.scss │ │ ├── _radio.scss │ │ ├── _range.scss │ │ ├── _refresher.scss │ │ ├── _reset.scss │ │ ├── _scaffolding.scss │ │ ├── _select.scss │ │ ├── _slide-box.scss │ │ ├── _spinner.scss │ │ ├── _tabs.scss │ │ ├── _toggle.scss │ │ ├── _transitions.scss │ │ ├── _type.scss │ │ ├── _util.scss │ │ ├── _variables.scss │ │ ├── ionic.scss │ │ └── ionicons │ │ │ ├── _ionicons-font.scss │ │ │ ├── _ionicons-icons.scss │ │ │ ├── _ionicons-variables.scss │ │ │ └── ionicons.scss │ │ └── version.json │ └── templates │ ├── tab-about.html │ ├── tab-demo.html │ └── tabs.html ├── ionic2 ├── .editorconfig ├── .gitignore ├── README.md ├── config.xml ├── ionic.config.json ├── package-lock.json ├── package.json ├── resources │ ├── android │ │ ├── icon │ │ │ ├── drawable-hdpi-icon.png │ │ │ ├── drawable-ldpi-icon.png │ │ │ ├── drawable-mdpi-icon.png │ │ │ ├── drawable-xhdpi-icon.png │ │ │ ├── drawable-xxhdpi-icon.png │ │ │ └── drawable-xxxhdpi-icon.png │ │ └── splash │ │ │ ├── drawable-land-hdpi-screen.png │ │ │ ├── drawable-land-ldpi-screen.png │ │ │ ├── drawable-land-mdpi-screen.png │ │ │ ├── drawable-land-xhdpi-screen.png │ │ │ ├── drawable-land-xxhdpi-screen.png │ │ │ ├── drawable-land-xxxhdpi-screen.png │ │ │ ├── drawable-port-hdpi-screen.png │ │ │ ├── drawable-port-ldpi-screen.png │ │ │ ├── drawable-port-mdpi-screen.png │ │ │ ├── drawable-port-xhdpi-screen.png │ │ │ ├── drawable-port-xxhdpi-screen.png │ │ │ └── drawable-port-xxxhdpi-screen.png │ ├── icon.png │ ├── ios │ │ ├── icon │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-50.png │ │ │ ├── icon-50@2x.png │ │ │ ├── icon-60.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-72.png │ │ │ ├── icon-72@2x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon-83.5@2x.png │ │ │ ├── icon-small.png │ │ │ ├── icon-small@2x.png │ │ │ ├── icon-small@3x.png │ │ │ ├── icon.png │ │ │ └── icon@2x.png │ │ └── splash │ │ │ ├── Default-568h@2x~iphone.png │ │ │ ├── Default-667h.png │ │ │ ├── Default-736h.png │ │ │ ├── Default-Landscape-736h.png │ │ │ ├── Default-Landscape@2x~ipad.png │ │ │ ├── Default-Landscape@~ipadpro.png │ │ │ ├── Default-Landscape~ipad.png │ │ │ ├── Default-Portrait@2x~ipad.png │ │ │ ├── Default-Portrait@~ipadpro.png │ │ │ ├── Default-Portrait~ipad.png │ │ │ ├── Default@2x~iphone.png │ │ │ └── Default~iphone.png │ └── splash.png ├── src │ ├── app │ │ ├── app.component.ts │ │ ├── app.definition.ts │ │ ├── app.html │ │ ├── app.module.ts │ │ ├── app.scss │ │ ├── main.ts │ │ └── services │ │ │ ├── data.service.ts │ │ │ └── wechat.service.ts │ ├── assets │ │ └── icon │ │ │ └── favicon.ico │ ├── index.html │ ├── manifest.json │ ├── pages │ │ ├── about │ │ │ ├── about.html │ │ │ ├── about.scss │ │ │ └── about.ts │ │ ├── home │ │ │ ├── home.html │ │ │ ├── home.scss │ │ │ └── home.ts │ │ └── tabs │ │ │ ├── tabs.html │ │ │ └── tabs.ts │ ├── service-worker.js │ └── theme │ │ └── variables.scss ├── tsconfig.json └── tslint.json └── server └── payment_demo.php /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Thumbnails 5 | ._* 6 | 7 | # Xcode 8 | build/ 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata 18 | *.xccheckout 19 | profile 20 | *.moved-aside 21 | DerivedData 22 | *.hmap 23 | *.ipa 24 | 25 | # CocoaPods 26 | Pods 27 | 28 | # Text editors 29 | [._]*.s[a-w][a-z] 30 | [._]s[a-w][a-z] 31 | *.un~ 32 | Session.vim 33 | .netrwhist 34 | *~ 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEMO for cordova-plugin-wechat 2 | 3 | ## Ionic Demo 4 | 5 | See https://github.com/xu-li/cordova-plugin-wechat-example/tree/master/ionic 6 | -------------------------------------------------------------------------------- /assets/screenshot-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/assets/screenshot-1.jpg -------------------------------------------------------------------------------- /assets/screenshot-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/assets/screenshot-2.jpg -------------------------------------------------------------------------------- /assets/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/assets/screenshot-3.png -------------------------------------------------------------------------------- /ionic/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "www/lib" 3 | } 4 | -------------------------------------------------------------------------------- /ionic/.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | node_modules/ 5 | platforms/ 6 | plugins/ 7 | -------------------------------------------------------------------------------- /ionic/README.md: -------------------------------------------------------------------------------- 1 | # A demo application built on Ionic 2 | 3 | See [cordova-plugin-wechat](https://github.com/xu-li/cordova-plugin-wechat) 4 | 5 | ![APP Screenshot](https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/master/assets/screenshot-3.png) 6 | 7 | ## How to run 8 | 9 | 1. ```ionic plugin add cordova-plugin-wechat --variable wechatappid=wx4a525790c75c494f``` 10 | 2. ```ionic platform add ios```/```ionic platform add android``` 11 | 3. ```ionic run ios```/```ionic run android``` 12 | -------------------------------------------------------------------------------- /ionic/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HelloIonic", 3 | "private": "true", 4 | "devDependencies": { 5 | "ionic": "driftyco/ionic-bower#1.0.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ionic/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Wechat DEMO for cordova.plugin.wechat 4 | 5 | An Ionic Framework and Cordova project. 6 | 7 | 8 | Ionic Framework Team 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /ionic/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var gutil = require('gulp-util'); 3 | var bower = require('bower'); 4 | var concat = require('gulp-concat'); 5 | var sass = require('gulp-sass'); 6 | var minifyCss = require('gulp-minify-css'); 7 | var rename = require('gulp-rename'); 8 | var sh = require('shelljs'); 9 | 10 | var paths = { 11 | sass: ['./scss/**/*.scss'] 12 | }; 13 | 14 | gulp.task('default', ['sass']); 15 | 16 | gulp.task('sass', function(done) { 17 | gulp.src('./scss/ionic.app.scss') 18 | .pipe(sass({ 19 | errLogToConsole: true 20 | })) 21 | .pipe(gulp.dest('./www/css/')) 22 | .pipe(minifyCss({ 23 | keepSpecialComments: 0 24 | })) 25 | .pipe(rename({ extname: '.min.css' })) 26 | .pipe(gulp.dest('./www/css/')) 27 | .on('end', done); 28 | }); 29 | 30 | gulp.task('watch', function() { 31 | gulp.watch(paths.sass, ['sass']); 32 | }); 33 | 34 | gulp.task('install', ['git-check'], function() { 35 | return bower.commands.install() 36 | .on('log', function(data) { 37 | gutil.log('bower', gutil.colors.cyan(data.id), data.message); 38 | }); 39 | }); 40 | 41 | gulp.task('git-check', function(done) { 42 | if (!sh.which('git')) { 43 | console.log( 44 | ' ' + gutil.colors.red('Git is not installed.'), 45 | '\n Git, the version control system, is required to download Ionic.', 46 | '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', 47 | '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' 48 | ); 49 | process.exit(1); 50 | } 51 | done(); 52 | }); 53 | -------------------------------------------------------------------------------- /ionic/hooks/README.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | This directory may contain scripts used to customize cordova commands. This 24 | directory used to exist at `.cordova/hooks`, but has now been moved to the 25 | project root. Any scripts you add to these directories will be executed before 26 | and after the commands corresponding to the directory name. Useful for 27 | integrating your own build systems or integrating with version control systems. 28 | 29 | __Remember__: Make your scripts executable. 30 | 31 | ## Hook Directories 32 | The following subdirectories will be used for hooks: 33 | 34 | after_build/ 35 | after_compile/ 36 | after_docs/ 37 | after_emulate/ 38 | after_platform_add/ 39 | after_platform_rm/ 40 | after_platform_ls/ 41 | after_plugin_add/ 42 | after_plugin_ls/ 43 | after_plugin_rm/ 44 | after_plugin_search/ 45 | after_prepare/ 46 | after_run/ 47 | after_serve/ 48 | before_build/ 49 | before_compile/ 50 | before_docs/ 51 | before_emulate/ 52 | before_platform_add/ 53 | before_platform_rm/ 54 | before_platform_ls/ 55 | before_plugin_add/ 56 | before_plugin_ls/ 57 | before_plugin_rm/ 58 | before_plugin_search/ 59 | before_prepare/ 60 | before_run/ 61 | before_serve/ 62 | pre_package/ <-- Windows 8 and Windows Phone only. 63 | 64 | ## Script Interface 65 | 66 | All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables: 67 | 68 | * CORDOVA_VERSION - The version of the Cordova-CLI. 69 | * CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios). 70 | * CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer) 71 | * CORDOVA_HOOK - Path to the hook that is being executed. 72 | * CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate) 73 | 74 | If a script returns a non-zero exit code, then the parent cordova command will be aborted. 75 | 76 | 77 | ## Writing hooks 78 | 79 | We highly recommend writting your hooks using Node.js so that they are 80 | cross-platform. Some good examples are shown here: 81 | 82 | [http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) 83 | 84 | -------------------------------------------------------------------------------- /ionic/hooks/after_prepare/010_add_platform_class.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Add Platform Class 4 | // v1.0 5 | // Automatically adds the platform class to the body tag 6 | // after the `prepare` command. By placing the platform CSS classes 7 | // directly in the HTML built for the platform, it speeds up 8 | // rendering the correct layout/style for the specific platform 9 | // instead of waiting for the JS to figure out the correct classes. 10 | 11 | var fs = require('fs'); 12 | var path = require('path'); 13 | 14 | var rootdir = process.argv[2]; 15 | 16 | function addPlatformBodyTag(indexPath, platform) { 17 | // add the platform class to the body tag 18 | try { 19 | var platformClass = 'platform-' + platform; 20 | var cordovaClass = 'platform-cordova platform-webview'; 21 | 22 | var html = fs.readFileSync(indexPath, 'utf8'); 23 | 24 | var bodyTag = findBodyTag(html); 25 | if(!bodyTag) return; // no opening body tag, something's wrong 26 | 27 | if(bodyTag.indexOf(platformClass) > -1) return; // already added 28 | 29 | var newBodyTag = bodyTag; 30 | 31 | var classAttr = findClassAttr(bodyTag); 32 | if(classAttr) { 33 | // body tag has existing class attribute, add the classname 34 | var endingQuote = classAttr.substring(classAttr.length-1); 35 | var newClassAttr = classAttr.substring(0, classAttr.length-1); 36 | newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote; 37 | newBodyTag = bodyTag.replace(classAttr, newClassAttr); 38 | 39 | } else { 40 | // add class attribute to the body tag 41 | newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">'); 42 | } 43 | 44 | html = html.replace(bodyTag, newBodyTag); 45 | 46 | fs.writeFileSync(indexPath, html, 'utf8'); 47 | 48 | process.stdout.write('add to body class: ' + platformClass + '\n'); 49 | } catch(e) { 50 | process.stdout.write(e); 51 | } 52 | } 53 | 54 | function findBodyTag(html) { 55 | // get the body tag 56 | try{ 57 | return html.match(/])(.*?)>/gi)[0]; 58 | }catch(e){} 59 | } 60 | 61 | function findClassAttr(bodyTag) { 62 | // get the body tag's class attribute 63 | try{ 64 | return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0]; 65 | }catch(e){} 66 | } 67 | 68 | if (rootdir) { 69 | 70 | // go through each of the platform directories that have been prepared 71 | var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []); 72 | 73 | for(var x=0; x 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ionic/www/js/app.js: -------------------------------------------------------------------------------- 1 | // Ionic Starter App 2 | 3 | // angular.module is a global place for creating, registering and retrieving Angular modules 4 | // 'starter' is the name of this angular module example (also set in a attribute in index.html) 5 | // the 2nd parameter is an array of 'requires' 6 | // 'starter.services' is found in services.js 7 | // 'starter.controllers' is found in controllers.js 8 | angular.module('starter', ['ionic', 'starter.controllers']) 9 | 10 | .run(function($ionicPlatform) { 11 | $ionicPlatform.ready(function() { 12 | // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard 13 | // for form inputs) 14 | if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) { 15 | cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); 16 | } 17 | if (window.StatusBar) { 18 | // org.apache.cordova.statusbar required 19 | StatusBar.styleLightContent(); 20 | } 21 | }); 22 | }) 23 | 24 | .config(function($stateProvider, $urlRouterProvider) { 25 | 26 | // Ionic uses AngularUI Router which uses the concept of states 27 | // Learn more here: https://github.com/angular-ui/ui-router 28 | // Set up the various states which the app can be in. 29 | // Each state's controller can be found in controllers.js 30 | $stateProvider 31 | 32 | // setup an abstract state for the tabs directive 33 | .state('tab', { 34 | url: "/tab", 35 | abstract: true, 36 | templateUrl: "templates/tabs.html" 37 | }) 38 | 39 | // Each tab has its own nav history stack: 40 | 41 | .state('tab.demo', { 42 | url: '/demo', 43 | views: { 44 | 'tab-demo': { 45 | templateUrl: 'templates/tab-demo.html', 46 | controller: 'DemoCtrl' 47 | } 48 | } 49 | }) 50 | 51 | .state('tab.about', { 52 | url: '/about', 53 | views: { 54 | 'tab-about': { 55 | templateUrl: 'templates/tab-about.html', 56 | controller: 'AboutCtrl' 57 | } 58 | } 59 | }); 60 | 61 | // if none of the above states are matched, use this as the fallback 62 | $urlRouterProvider.otherwise('/tab/demo'); 63 | 64 | }); 65 | -------------------------------------------------------------------------------- /ionic/www/js/controllers.js: -------------------------------------------------------------------------------- 1 | angular.module('starter.controllers', []) 2 | 3 | .controller('DemoCtrl', function ($scope, $ionicPopup) { 4 | 5 | $scope.data = { 6 | selectedScene: 0, 7 | selectedSceneLabel: "会话" 8 | }; 9 | 10 | $scope.scenes = [ 11 | { 12 | label: "会话", 13 | value: 0 14 | }, 15 | { 16 | label: "朋友圈", 17 | value: 1 18 | }, 19 | { 20 | label: "收藏", 21 | value: 2 22 | } 23 | ]; 24 | 25 | $scope.buttons = [ 26 | { 27 | id: "check-installed", 28 | label: "是否安装了微信" 29 | }, 30 | { 31 | id: "send-text", 32 | label: "发送Text消息给微信" 33 | }, 34 | { 35 | id: "send-photo-local", 36 | label: "发送Photo消息给微信(本地图片)" 37 | }, 38 | { 39 | id: "send-photo-remote", 40 | label: "发送Photo消息给微信(远程图片)" 41 | }, 42 | { 43 | id: "send-link-thumb-local", 44 | label: "发送Link消息给微信(本地缩略图)" 45 | }, 46 | { 47 | id: "send-link-thumb-remote", 48 | label: "发送Link消息给微信(远程缩略图)" 49 | }, 50 | { 51 | id: "send-music", 52 | label: "发送Music消息给微信" 53 | }, 54 | { 55 | id: "send-video", 56 | label: "发送Video消息给微信" 57 | }, 58 | { 59 | id: "send-app", 60 | label: "发送App消息给微信" 61 | }, 62 | { 63 | id: "send-nongif", 64 | label: "发送非gif消息给微信" 65 | }, 66 | { 67 | id: "send-gif", 68 | label: "发送gif消息给微信" 69 | }, 70 | { 71 | id: "send-file", 72 | label: "发送文件消息给微信" 73 | }, 74 | { 75 | id: "auth", 76 | label: "微信授权登录" 77 | }, 78 | { 79 | id: "test-url", 80 | label: "测试URL长度" 81 | }, 82 | { 83 | id: "open-profile", 84 | label: "打开Profile" 85 | }, 86 | 87 | { 88 | id: "open-mp", 89 | label: "打开mp网页" 90 | }, 91 | { 92 | id: "add-card", 93 | label: "添加单张卡券至卡包" 94 | }, 95 | { 96 | id: "add-cards", 97 | label: "添加多张卡券至卡包" 98 | } 99 | ]; 100 | 101 | $scope.$watch('data.selectedScene', function () { 102 | $scope.scenes.forEach(function (item) { 103 | if (item.value == $scope.data.selectedScene) { 104 | $scope.data.selectedSceneLabel = item.label; 105 | } 106 | }); 107 | }, true); 108 | 109 | $scope.handle = function (id) { 110 | share($scope.data.selectedScene, id); 111 | }; 112 | }) 113 | 114 | .controller('AboutCtrl', function($scope) {}); 115 | -------------------------------------------------------------------------------- /ionic/www/js/share.js: -------------------------------------------------------------------------------- 1 | (function (window, document) { 2 | window.share = function (scene, id) { 3 | if (typeof Wechat === "undefined") { 4 | alert("Wechat plugin is not installed."); 5 | return false; 6 | } 7 | 8 | var params = { 9 | scene: scene 10 | }; 11 | 12 | if (id == 'send-text') { 13 | params.text = "人文的东西并不是体现在你看得到的方面,它更多的体现在你看不到的那些方面,它会影响每一个功能,这才是最本质的。但是,对这点可能很多人没有思考过,以为人文的东西就是我们搞一个很小清新的图片什么的。”综合来看,人文的东西其实是贯穿整个产品的脉络,或者说是它的灵魂所在。"; 14 | } else { 15 | params.message = { 16 | title: "[TEST]" + id, 17 | description: "[TEST]Sending from test application", 18 | mediaTagName: "TEST-TAG-001", 19 | messageExt: "这是第三方带的测试字段", 20 | messageAction: "dotalist", 21 | media: {} 22 | }; 23 | 24 | switch (id) { 25 | case 'check-installed': 26 | Wechat.isInstalled(function (installed) { 27 | alert("Wechat installed: " + (installed ? "Yes" : "No")); 28 | }); 29 | return true; 30 | 31 | case 'send-photo-local': 32 | params.message.media.type = Wechat.Type.IMAGE; 33 | params.message.media.image = "www/img/res1.jpg"; 34 | break; 35 | 36 | case 'send-photo-remote': 37 | params.message.media.type = Wechat.Type.IMAGE; 38 | params.message.media.image = "https://cordova.apache.org/images/cordova_256.png"; 39 | break; 40 | 41 | case 'send-link-thumb-local': 42 | params.message.title = "专访张小龙:产品之上的世界观"; 43 | params.message.description = "微信的平台化发展方向是否真的会让这个原本简洁的产品变得臃肿?在国际化发展方向上,微信面临的问题真的是文化差异壁垒吗?腾讯高级副总裁、微信产品负责人张小龙给出了自己的回复。"; 44 | params.message.thumb = "www/img/res2.png"; 45 | params.message.media.type = Wechat.Type.LINK; 46 | params.message.media.webpageUrl = "http://tech.qq.com/"; 47 | break; 48 | 49 | case 'send-link-thumb-remote': 50 | params.message.title = "专访张小龙:产品之上的世界观"; 51 | params.message.description = "微信的平台化发展方向是否真的会让这个原本简洁的产品变得臃肿?在国际化发展方向上,微信面临的问题真的是文化差异壁垒吗?腾讯高级副总裁、微信产品负责人张小龙给出了自己的回复。"; 52 | params.message.thumb = "https://cordova.apache.org/images/cordova_256.png"; 53 | params.message.media.type = Wechat.Type.LINK; 54 | params.message.media.webpageUrl = "http://tech.qq.com/"; 55 | break; 56 | 57 | case 'send-music': 58 | params.message.title = "一无所有"; 59 | params.message.description = "崔健"; 60 | params.message.thumb = "www/img/res3.jpg"; 61 | params.message.media.type = Wechat.Type.MUSIC; 62 | params.message.media.musicUrl = "http://y.qq.com/i/song.html#p=7B22736F6E675F4E616D65223A22E4B880E697A0E68980E69C89222C22736F6E675F5761704C69766555524C223A22687474703A2F2F74736D7573696334382E74632E71712E636F6D2F586B30305156342F4141414130414141414E5430577532394D7A59344D7A63774D4C6735586A4C517747335A50676F47443864704151526643473444442F4E653765776B617A733D2F31303130333334372E6D34613F7569643D3233343734363930373526616D703B63743D3026616D703B636869643D30222C22736F6E675F5769666955524C223A22687474703A2F2F73747265616D31342E71716D757369632E71712E636F6D2F33303130333334372E6D7033222C226E657454797065223A2277696669222C22736F6E675F416C62756D223A22E4B880E697A0E68980E69C89222C22736F6E675F4944223A3130333334372C22736F6E675F54797065223A312C22736F6E675F53696E676572223A22E5B494E581A5222C22736F6E675F576170446F776E4C6F616455524C223A22687474703A2F2F74736D757369633132382E74632E71712E636F6D2F586C464E4D313574414141416A41414141477A4C36445039536A457A525467304E7A38774E446E752B6473483833344843756B5041576B6D48316C4A434E626F4D34394E4E7A754450444A647A7A45304F513D3D2F33303130333334372E6D70333F7569643D3233343734363930373526616D703B63743D3026616D703B636869643D3026616D703B73747265616D5F706F733D35227D"; 63 | params.message.media.musicDataUrl = "http://stream20.qqmusic.qq.com/32464723.mp3"; 64 | break; 65 | 66 | case 'send-video': 67 | params.message.title = "乔布斯访谈"; 68 | params.message.description = "饿着肚皮,傻逼着。"; 69 | params.message.thumb = "www/img/res7.png"; 70 | params.message.media.type = Wechat.Type.VIDEO; 71 | params.message.media.videoUrl = "http://v.youku.com/v_show/id_XNTUxNDY1NDY4.html"; 72 | break; 73 | 74 | case 'send-app': 75 | params.message.title = "App消息"; 76 | params.message.description = "这种消息只有App自己才能理解,由App指定打开方式!"; 77 | params.message.thumb = "www/img/res2.jpg"; 78 | params.message.media.type = Wechat.Type.APP; 79 | params.message.media.extInfo = "extend info"; 80 | params.message.media.url = "http://weixin.qq.com"; 81 | break; 82 | 83 | case 'send-nongif': 84 | params.message.thumb = "www/img/res5thumb.png"; 85 | params.message.media.type = Wechat.Type.EMOTION; 86 | params.message.media.emotion = "www/img/res5.jpg"; 87 | break; 88 | 89 | case 'send-gif': 90 | params.message.thumb = "www/img/res6thumb.png"; 91 | params.message.media.type = Wechat.Type.EMOTION; 92 | params.message.media.emotion = "www/img/res6.gif"; 93 | break; 94 | 95 | case 'send-file': 96 | params.message.title = "iphone4.pdf"; 97 | params.message.description = "Pro CoreData"; 98 | params.message.thumb = "www/img/res2.jpg"; 99 | params.message.media.type = Wechat.Type.FILE; 100 | params.message.media.file = "www/resources/iphone4.pdf"; 101 | break; 102 | 103 | case 'auth': 104 | Wechat.auth("snsapi_userinfo", function (response) { 105 | // you may use response.code to get the access token. 106 | alert(JSON.stringify(response)); 107 | }, function (reason) { 108 | alert("Failed: " + reason); 109 | }); 110 | return true; 111 | 112 | default: 113 | alert(id + " can not be recognized!"); 114 | return false; 115 | } 116 | } 117 | 118 | Wechat.share(params, function () { 119 | alert("Success"); 120 | }, function (reason) { 121 | alert("Failed: " + reason); 122 | }); 123 | return true; 124 | }; 125 | 126 | })(window, document); 127 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic/www/lib/ionic/fonts/ionicons.eot -------------------------------------------------------------------------------- /ionic/www/lib/ionic/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic/www/lib/ionic/fonts/ionicons.ttf -------------------------------------------------------------------------------- /ionic/www/lib/ionic/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic/www/lib/ionic/fonts/ionicons.woff -------------------------------------------------------------------------------- /ionic/www/lib/ionic/js/angular/angular-resource.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.3.13 3 | (c) 2010-2014 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(I,d,B){'use strict';function D(f,q){q=q||{};d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var w=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}}; 7 | this.$get=["$http","$q",function(q,h){function t(d,g){this.template=d;this.defaults=s({},f.defaults,g);this.urlParams={}}function v(x,g,l,m){function c(b,k){var c={};k=s({},g,k);r(k,function(a,k){u(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw w("badmember",e);for(var e=e.split("."),n=0,g=e.length;n=c;e--)d.end&&d.end(f[e]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,f=[],m=a,l;for(f.last=function(){return f[f.length-1]};a;){l="";k=!0;if(f.last()&&x[f.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");d.chars&&d.chars(r(b));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(d.comment&& 8 | d.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(y.test(a)){if(b=a.match(y))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,e),k=!1}else K.test(a)&&((b=a.match(A))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(A,c)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),d.chars&&d.chars(r(l)))}if(a==m)throw L("badparse",a);m=a}e()}function r(a){if(!a)return"";var d=M.exec(a);a=d[1]; 9 | var c=d[3];if(d=d[2])q.innerHTML=d.replace(//g,">")}function s(a,d){var c=!1,e=h.bind(a,a.push);return{start:function(a,k,f){a=h.lowercase(a);!c&&x[a]&&(c=a);c||!0!==C[a]||(e("<"),e(a), 10 | h.forEach(k,function(c,f){var k=h.lowercase(f),g="img"===a&&"src"===k||"background"===k;!0!==P[k]||!0===D[k]&&!d(c,g)||(e(" "),e(f),e('="'),e(B(c)),e('"'))}),e(f?"/>":">"))},end:function(a){a=h.lowercase(a);c||!0!==C[a]||(e(""));a==c&&(c=!1)},chars:function(a){c||e(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,z=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, 11 | K=/^]*?)>/i,I=/"\u201d\u2019]/,c=/^mailto:/;return function(e,b){function k(a){a&&g.push(E(a))} 15 | function f(a,c){g.push("');k(c);g.push("")}if(!e)return e;for(var m,l=e,g=[],n,p;m=l.match(d);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),f(n,m[0].replace(c,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular); 16 | //# sourceMappingURL=angular-sanitize.min.js.map 17 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_action-sheet.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Action Sheets 3 | * -------------------------------------------------- 4 | */ 5 | 6 | .action-sheet-backdrop { 7 | @include transition(background-color 150ms ease-in-out); 8 | position: fixed; 9 | top: 0; 10 | left: 0; 11 | z-index: $z-index-action-sheet; 12 | width: 100%; 13 | height: 100%; 14 | background-color: rgba(0,0,0,0); 15 | 16 | &.active { 17 | background-color: rgba(0,0,0,0.4); 18 | } 19 | } 20 | 21 | .action-sheet-wrapper { 22 | @include translate3d(0, 100%, 0); 23 | @include transition(all cubic-bezier(.36, .66, .04, 1) 500ms); 24 | position: absolute; 25 | bottom: 0; 26 | left: 0; 27 | right: 0; 28 | width: 100%; 29 | max-width: 500px; 30 | margin: auto; 31 | } 32 | 33 | .action-sheet-up { 34 | @include translate3d(0, 0, 0); 35 | } 36 | 37 | .action-sheet { 38 | margin-left: $sheet-margin; 39 | margin-right: $sheet-margin; 40 | width: auto; 41 | z-index: $z-index-action-sheet; 42 | overflow: hidden; 43 | 44 | .button { 45 | display: block; 46 | padding: 1px; 47 | width: 100%; 48 | border-radius: 0; 49 | border-color: $sheet-options-border-color; 50 | background-color: transparent; 51 | 52 | color: $sheet-options-text-color; 53 | font-size: 21px; 54 | 55 | &:hover { 56 | color: $sheet-options-text-color; 57 | } 58 | &.destructive { 59 | color: #ff3b30; 60 | &:hover { 61 | color: #ff3b30; 62 | } 63 | } 64 | } 65 | 66 | .button.active, .button.activated { 67 | box-shadow: none; 68 | border-color: $sheet-options-border-color; 69 | color: $sheet-options-text-color; 70 | background: $sheet-options-bg-active-color; 71 | } 72 | } 73 | 74 | .action-sheet-has-icons .icon { 75 | position: absolute; 76 | left: 16px; 77 | } 78 | 79 | .action-sheet-title { 80 | padding: $sheet-margin * 2; 81 | color: #8f8f8f; 82 | text-align: center; 83 | font-size: 13px; 84 | } 85 | 86 | .action-sheet-group { 87 | margin-bottom: $sheet-margin; 88 | border-radius: $sheet-border-radius; 89 | background-color: #fff; 90 | overflow: hidden; 91 | 92 | .button { 93 | border-width: 1px 0px 0px 0px; 94 | } 95 | .button:first-child:last-child { 96 | border-width: 0; 97 | } 98 | } 99 | 100 | .action-sheet-options { 101 | background: $sheet-options-bg-color; 102 | } 103 | 104 | .action-sheet-cancel { 105 | .button { 106 | font-weight: 500; 107 | } 108 | } 109 | 110 | .action-sheet-open { 111 | pointer-events: none; 112 | 113 | &.modal-open .modal { 114 | pointer-events: none; 115 | } 116 | 117 | .action-sheet-backdrop { 118 | pointer-events: auto; 119 | } 120 | } 121 | 122 | 123 | .platform-android { 124 | 125 | .action-sheet-backdrop.active { 126 | background-color: rgba(0,0,0,0.2); 127 | } 128 | 129 | .action-sheet { 130 | margin: 0; 131 | 132 | .action-sheet-title, 133 | .button { 134 | text-align: left; 135 | border-color: transparent; 136 | font-size: 16px; 137 | color: inherit; 138 | } 139 | 140 | .action-sheet-title { 141 | font-size: 14px; 142 | padding: 16px; 143 | color: #666; 144 | } 145 | 146 | .button.active, 147 | .button.activated { 148 | background: #e8e8e8; 149 | } 150 | } 151 | 152 | .action-sheet-group { 153 | margin: 0; 154 | border-radius: 0; 155 | background-color: #fafafa; 156 | } 157 | 158 | .action-sheet-cancel { 159 | display: none; 160 | } 161 | 162 | .action-sheet-has-icons { 163 | 164 | .button { 165 | padding-left: 56px; 166 | } 167 | 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_animations.scss: -------------------------------------------------------------------------------- 1 | 2 | // Slide up from the bottom, used for modals 3 | // ------------------------------- 4 | 5 | .slide-in-up { 6 | @include translate3d(0, 100%, 0); 7 | } 8 | .slide-in-up.ng-enter, 9 | .slide-in-up > .ng-enter { 10 | @include transition(all cubic-bezier(.1, .7, .1, 1) 400ms); 11 | } 12 | .slide-in-up.ng-enter-active, 13 | .slide-in-up > .ng-enter-active { 14 | @include translate3d(0, 0, 0); 15 | } 16 | 17 | .slide-in-up.ng-leave, 18 | .slide-in-up > .ng-leave { 19 | @include transition(all ease-in-out 250ms); 20 | } 21 | 22 | 23 | // Scale Out 24 | // Scale from hero (1 in this case) to zero 25 | // ------------------------------- 26 | 27 | @-webkit-keyframes scaleOut { 28 | from { -webkit-transform: scale(1); opacity: 1; } 29 | to { -webkit-transform: scale(0.8); opacity: 0; } 30 | } 31 | @keyframes scaleOut { 32 | from { transform: scale(1); opacity: 1; } 33 | to { transform: scale(0.8); opacity: 0; } 34 | } 35 | 36 | 37 | // Super Scale In 38 | // Scale from super (1.x) to duper (1 in this case) 39 | // ------------------------------- 40 | 41 | @-webkit-keyframes superScaleIn { 42 | from { -webkit-transform: scale(1.2); opacity: 0; } 43 | to { -webkit-transform: scale(1); opacity: 1 } 44 | } 45 | @keyframes superScaleIn { 46 | from { transform: scale(1.2); opacity: 0; } 47 | to { transform: scale(1); opacity: 1; } 48 | } 49 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_backdrop.scss: -------------------------------------------------------------------------------- 1 | 2 | .backdrop { 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | z-index: $z-index-backdrop; 7 | 8 | width: 100%; 9 | height: 100%; 10 | 11 | background-color: $loading-backdrop-bg-color; 12 | 13 | visibility: hidden; 14 | opacity: 0; 15 | 16 | &.visible { 17 | visibility: visible; 18 | } 19 | &.active { 20 | opacity: 1; 21 | } 22 | 23 | @include transition($loading-backdrop-fadein-duration opacity linear); 24 | } 25 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Badges 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .badge { 8 | @include badge-style($badge-default-bg, $badge-default-text); 9 | z-index: $z-index-badge; 10 | display: inline-block; 11 | padding: 3px 8px; 12 | min-width: 10px; 13 | border-radius: $badge-border-radius; 14 | vertical-align: baseline; 15 | text-align: center; 16 | white-space: nowrap; 17 | font-weight: $badge-font-weight; 18 | font-size: $badge-font-size; 19 | line-height: $badge-line-height; 20 | 21 | &:empty { 22 | display: none; 23 | } 24 | } 25 | 26 | //Be sure to override specificity of rule that 'badge color matches tab color by default' 27 | .tabs .tab-item .badge, 28 | .badge { 29 | &.badge-light { 30 | @include badge-style($badge-light-bg, $badge-light-text); 31 | } 32 | &.badge-stable { 33 | @include badge-style($badge-stable-bg, $badge-stable-text); 34 | } 35 | &.badge-positive { 36 | @include badge-style($badge-positive-bg, $badge-positive-text); 37 | } 38 | &.badge-calm { 39 | @include badge-style($badge-calm-bg, $badge-calm-text); 40 | } 41 | &.badge-assertive { 42 | @include badge-style($badge-assertive-bg, $badge-assertive-text); 43 | } 44 | &.badge-balanced { 45 | @include badge-style($badge-balanced-bg, $badge-balanced-text); 46 | } 47 | &.badge-energized { 48 | @include badge-style($badge-energized-bg, $badge-energized-text); 49 | } 50 | &.badge-royal { 51 | @include badge-style($badge-royal-bg, $badge-royal-text); 52 | } 53 | &.badge-dark { 54 | @include badge-style($badge-dark-bg, $badge-dark-text); 55 | } 56 | } 57 | 58 | // Quick fix for labels/badges in buttons 59 | .button .badge { 60 | position: relative; 61 | top: -1px; 62 | } 63 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_button-bar.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Button Bar 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .button-bar { 8 | @include display-flex(); 9 | @include flex(1); 10 | width: 100%; 11 | 12 | &.button-bar-inline { 13 | display: block; 14 | width: auto; 15 | 16 | @include clearfix(); 17 | 18 | > .button { 19 | width: auto; 20 | display: inline-block; 21 | float: left; 22 | } 23 | } 24 | } 25 | 26 | .button-bar > .button { 27 | @include flex(1); 28 | display: block; 29 | 30 | overflow: hidden; 31 | 32 | padding: 0 16px; 33 | 34 | width: 0; 35 | 36 | border-width: 1px 0px 1px 1px; 37 | border-radius: 0; 38 | text-align: center; 39 | text-overflow: ellipsis; 40 | white-space: nowrap; 41 | 42 | &:before, 43 | .icon:before { 44 | line-height: 44px; 45 | } 46 | 47 | &:first-child { 48 | border-radius: $button-border-radius 0px 0px $button-border-radius; 49 | } 50 | &:last-child { 51 | border-right-width: 1px; 52 | border-radius: 0px $button-border-radius $button-border-radius 0px; 53 | } 54 | } 55 | 56 | .button-bar > .button-small { 57 | &:before, 58 | .icon:before { 59 | line-height: 28px; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_button.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Buttons 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .button { 8 | // set the color defaults 9 | @include button-style($button-default-bg, $button-default-border, $button-default-active-bg, $button-default-active-border, $button-default-text); 10 | 11 | position: relative; 12 | display: inline-block; 13 | margin: 0; 14 | padding: 0 $button-padding; 15 | 16 | min-width: ($button-padding * 3) + $button-font-size; 17 | min-height: $button-height + 5px; 18 | 19 | border-width: $button-border-width; 20 | border-style: solid; 21 | border-radius: $button-border-radius; 22 | 23 | vertical-align: top; 24 | text-align: center; 25 | 26 | text-overflow: ellipsis; 27 | font-size: $button-font-size; 28 | line-height: $button-height - $button-border-width + 1px; 29 | 30 | cursor: pointer; 31 | 32 | &:after { 33 | // used to create a larger button "hit" area 34 | position: absolute; 35 | top: -6px; 36 | right: -6px; 37 | bottom: -6px; 38 | left: -6px; 39 | content: ' '; 40 | } 41 | 42 | .icon { 43 | vertical-align: top; 44 | pointer-events: none; 45 | } 46 | 47 | .icon:before, 48 | &.icon:before, 49 | &.icon-left:before, 50 | &.icon-right:before { 51 | display: inline-block; 52 | padding: 0 0 $button-border-width 0; 53 | vertical-align: inherit; 54 | font-size: $button-icon-size; 55 | line-height: $button-height - $button-border-width; 56 | pointer-events: none; 57 | } 58 | &.icon-left:before { 59 | float: left; 60 | padding-right: .2em; 61 | padding-left: 0; 62 | } 63 | &.icon-right:before { 64 | float: right; 65 | padding-right: 0; 66 | padding-left: .2em; 67 | } 68 | 69 | &.button-block, &.button-full { 70 | margin-top: $button-block-margin; 71 | margin-bottom: $button-block-margin; 72 | } 73 | 74 | &.button-light { 75 | @include button-style($button-light-bg, $button-light-border, $button-light-active-bg, $button-light-active-border, $button-light-text); 76 | @include button-clear($button-light-border); 77 | @include button-outline($button-light-border); 78 | } 79 | 80 | &.button-stable { 81 | @include button-style($button-stable-bg, $button-stable-border, $button-stable-active-bg, $button-stable-active-border, $button-stable-text); 82 | @include button-clear($button-stable-border); 83 | @include button-outline($button-stable-border); 84 | } 85 | 86 | &.button-positive { 87 | @include button-style($button-positive-bg, $button-positive-border, $button-positive-active-bg, $button-positive-active-border, $button-positive-text); 88 | @include button-clear($button-positive-bg); 89 | @include button-outline($button-positive-bg); 90 | } 91 | 92 | &.button-calm { 93 | @include button-style($button-calm-bg, $button-calm-border, $button-calm-active-bg, $button-calm-active-border, $button-calm-text); 94 | @include button-clear($button-calm-bg); 95 | @include button-outline($button-calm-bg); 96 | } 97 | 98 | &.button-assertive { 99 | @include button-style($button-assertive-bg, $button-assertive-border, $button-assertive-active-bg, $button-assertive-active-border, $button-assertive-text); 100 | @include button-clear($button-assertive-bg); 101 | @include button-outline($button-assertive-bg); 102 | } 103 | 104 | &.button-balanced { 105 | @include button-style($button-balanced-bg, $button-balanced-border, $button-balanced-active-bg, $button-balanced-active-border, $button-balanced-text); 106 | @include button-clear($button-balanced-bg); 107 | @include button-outline($button-balanced-bg); 108 | } 109 | 110 | &.button-energized { 111 | @include button-style($button-energized-bg, $button-energized-border, $button-energized-active-bg, $button-energized-active-border, $button-energized-text); 112 | @include button-clear($button-energized-bg); 113 | @include button-outline($button-energized-bg); 114 | } 115 | 116 | &.button-royal { 117 | @include button-style($button-royal-bg, $button-royal-border, $button-royal-active-bg, $button-royal-active-border, $button-royal-text); 118 | @include button-clear($button-royal-bg); 119 | @include button-outline($button-royal-bg); 120 | } 121 | 122 | &.button-dark { 123 | @include button-style($button-dark-bg, $button-dark-border, $button-dark-active-bg, $button-dark-active-border, $button-dark-text); 124 | @include button-clear($button-dark-bg); 125 | @include button-outline($button-dark-bg); 126 | } 127 | } 128 | 129 | .button-small { 130 | padding: 2px $button-small-padding 1px; 131 | min-width: $button-small-height; 132 | min-height: $button-small-height + 2; 133 | font-size: $button-small-font-size; 134 | line-height: $button-small-height - $button-border-width - 1; 135 | 136 | .icon:before, 137 | &.icon:before, 138 | &.icon-left:before, 139 | &.icon-right:before { 140 | font-size: $button-small-icon-size; 141 | line-height: $button-small-icon-size + 3; 142 | margin-top: 3px; 143 | } 144 | } 145 | 146 | .button-large { 147 | padding: 0 $button-large-padding; 148 | min-width: ($button-large-padding * 3) + $button-large-font-size; 149 | min-height: $button-large-height + 5; 150 | font-size: $button-large-font-size; 151 | line-height: $button-large-height - $button-border-width; 152 | 153 | .icon:before, 154 | &.icon:before, 155 | &.icon-left:before, 156 | &.icon-right:before { 157 | padding-bottom: ($button-border-width * 2); 158 | font-size: $button-large-icon-size; 159 | line-height: $button-large-height - ($button-border-width * 2) - 1; 160 | } 161 | } 162 | 163 | .button-icon { 164 | @include transition(opacity .1s); 165 | padding: 0 6px; 166 | min-width: initial; 167 | border-color: transparent; 168 | background: none; 169 | 170 | &.button.active, 171 | &.button.activated { 172 | border-color: transparent; 173 | background: none; 174 | box-shadow: none; 175 | opacity: 0.3; 176 | } 177 | 178 | .icon:before, 179 | &.icon:before { 180 | font-size: $button-large-icon-size; 181 | } 182 | } 183 | 184 | .button-clear { 185 | @include button-clear($button-default-border); 186 | @include transition(opacity .1s); 187 | padding: 0 $button-clear-padding; 188 | max-height: $button-height; 189 | border-color: transparent; 190 | background: none; 191 | box-shadow: none; 192 | 193 | &.active, 194 | &.activated { 195 | opacity: 0.3; 196 | } 197 | } 198 | 199 | .button-outline { 200 | @include button-outline($button-default-border); 201 | @include transition(opacity .1s); 202 | background: none; 203 | box-shadow: none; 204 | } 205 | 206 | .padding > .button.button-block:first-child { 207 | margin-top: 0; 208 | } 209 | 210 | .button-block { 211 | display: block; 212 | clear: both; 213 | 214 | &:after { 215 | clear: both; 216 | } 217 | } 218 | 219 | .button-full, 220 | .button-full > .button { 221 | display: block; 222 | margin-right: 0; 223 | margin-left: 0; 224 | border-right-width: 0; 225 | border-left-width: 0; 226 | border-radius: 0; 227 | } 228 | 229 | button.button-block, 230 | button.button-full, 231 | .button-full > button.button, 232 | input.button.button-block { 233 | width: 100%; 234 | } 235 | 236 | a.button { 237 | text-decoration: none; 238 | 239 | .icon:before, 240 | &.icon:before, 241 | &.icon-left:before, 242 | &.icon-right:before { 243 | margin-top: 2px; 244 | } 245 | } 246 | 247 | .button.disabled, 248 | .button[disabled] { 249 | opacity: .4; 250 | cursor: default !important; 251 | pointer-events: none; 252 | } 253 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_checkbox.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Checkbox 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .checkbox { 8 | // set the color defaults 9 | @include checkbox-style($checkbox-off-border-default, $checkbox-on-bg-default, $checkbox-on-border-default); 10 | 11 | position: relative; 12 | display: inline-block; 13 | padding: ($checkbox-height / 4) ($checkbox-width / 4); 14 | cursor: pointer; 15 | } 16 | .checkbox-light { 17 | @include checkbox-style($checkbox-off-border-light, $checkbox-on-bg-light, $checkbox-off-border-light); 18 | } 19 | .checkbox-stable { 20 | @include checkbox-style($checkbox-off-border-stable, $checkbox-on-bg-stable, $checkbox-off-border-stable); 21 | } 22 | .checkbox-positive { 23 | @include checkbox-style($checkbox-off-border-positive, $checkbox-on-bg-positive, $checkbox-off-border-positive); 24 | } 25 | .checkbox-calm { 26 | @include checkbox-style($checkbox-off-border-calm, $checkbox-on-bg-calm, $checkbox-off-border-calm); 27 | } 28 | .checkbox-assertive { 29 | @include checkbox-style($checkbox-off-border-assertive, $checkbox-on-bg-assertive, $checkbox-off-border-assertive); 30 | } 31 | .checkbox-balanced { 32 | @include checkbox-style($checkbox-off-border-balanced, $checkbox-on-bg-balanced, $checkbox-off-border-balanced); 33 | } 34 | .checkbox-energized{ 35 | @include checkbox-style($checkbox-off-border-energized, $checkbox-on-bg-energized, $checkbox-off-border-energized); 36 | } 37 | .checkbox-royal { 38 | @include checkbox-style($checkbox-off-border-royal, $checkbox-on-bg-royal, $checkbox-off-border-royal); 39 | } 40 | .checkbox-dark { 41 | @include checkbox-style($checkbox-off-border-dark, $checkbox-on-bg-dark, $checkbox-off-border-dark); 42 | } 43 | 44 | .checkbox input:disabled:before, 45 | .checkbox input:disabled + .checkbox-icon:before { 46 | border-color: $checkbox-off-border-light; 47 | } 48 | 49 | .checkbox input:disabled:checked:before, 50 | .checkbox input:disabled:checked + .checkbox-icon:before { 51 | background: $checkbox-on-bg-light; 52 | } 53 | 54 | 55 | .checkbox.checkbox-input-hidden input { 56 | display: none !important; 57 | } 58 | 59 | .checkbox input, 60 | .checkbox-icon { 61 | position: relative; 62 | width: $checkbox-width; 63 | height: $checkbox-height; 64 | display: block; 65 | border: 0; 66 | background: transparent; 67 | cursor: pointer; 68 | -webkit-appearance: none; 69 | 70 | &:before { 71 | // what the checkbox looks like when its not checked 72 | display: table; 73 | width: 100%; 74 | height: 100%; 75 | border-width: $checkbox-border-width; 76 | border-style: solid; 77 | border-radius: $checkbox-border-radius; 78 | background: $checkbox-off-bg-color; 79 | content: ' '; 80 | @include transition(background-color 20ms ease-in-out); 81 | } 82 | } 83 | 84 | .checkbox input:checked:before, 85 | input:checked + .checkbox-icon:before { 86 | border-width: $checkbox-border-width + 1; 87 | } 88 | 89 | // the checkmark within the box 90 | .checkbox input:after, 91 | .checkbox-icon:after { 92 | @include transition(opacity .05s ease-in-out); 93 | @include rotate(-45deg); 94 | position: absolute; 95 | top: 33%; 96 | left: 25%; 97 | display: table; 98 | width: ($checkbox-width / 2); 99 | height: ($checkbox-width / 4) - 1; 100 | border: $checkbox-check-width solid $checkbox-check-color; 101 | border-top: 0; 102 | border-right: 0; 103 | content: ' '; 104 | opacity: 0; 105 | } 106 | 107 | .platform-android .checkbox-platform input:before, 108 | .platform-android .checkbox-platform .checkbox-icon:before, 109 | .checkbox-square input:before, 110 | .checkbox-square .checkbox-icon:before { 111 | border-radius: 2px; 112 | width: 72%; 113 | height: 72%; 114 | margin-top: 14%; 115 | margin-left: 14%; 116 | border-width: 2px; 117 | } 118 | 119 | .platform-android .checkbox-platform input:after, 120 | .platform-android .checkbox-platform .checkbox-icon:after, 121 | .checkbox-square input:after, 122 | .checkbox-square .checkbox-icon:after { 123 | border-width: 2px; 124 | top: 19%; 125 | left: 25%; 126 | width: ($checkbox-width / 2) - 1; 127 | height: 7px; 128 | } 129 | 130 | .grade-c .checkbox input:after, 131 | .grade-c .checkbox-icon:after { 132 | @include rotate(0); 133 | top: 3px; 134 | left: 4px; 135 | border: none; 136 | color: $checkbox-check-color; 137 | content: '\2713'; 138 | font-weight: bold; 139 | font-size: 20px; 140 | } 141 | 142 | // what the checkmark looks like when its checked 143 | .checkbox input:checked:after, 144 | input:checked + .checkbox-icon:after { 145 | opacity: 1; 146 | } 147 | 148 | // make sure item content have enough padding on left to fit the checkbox 149 | .item-checkbox { 150 | padding-left: ($item-padding * 2) + $checkbox-width; 151 | 152 | &.active { 153 | box-shadow: none; 154 | } 155 | } 156 | 157 | // position the checkbox to the left within an item 158 | .item-checkbox .checkbox { 159 | position: absolute; 160 | top: 50%; 161 | right: $item-padding / 2; 162 | left: $item-padding / 2; 163 | z-index: $z-index-item-checkbox; 164 | margin-top: (($checkbox-height + ($checkbox-height / 2)) / 2) * -1; 165 | } 166 | 167 | 168 | .item-checkbox.item-checkbox-right { 169 | padding-right: ($item-padding * 2) + $checkbox-width; 170 | padding-left: $item-padding; 171 | } 172 | 173 | .item-checkbox-right .checkbox input, 174 | .item-checkbox-right .checkbox-icon { 175 | float: right; 176 | } 177 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_form.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Forms 3 | * -------------------------------------------------- 4 | */ 5 | 6 | // Make all forms have space below them 7 | form { 8 | margin: 0 0 $line-height-base; 9 | } 10 | 11 | // Groups of fields with labels on top (legends) 12 | legend { 13 | display: block; 14 | margin-bottom: $line-height-base; 15 | padding: 0; 16 | width: 100%; 17 | border: $input-border-width solid $input-border; 18 | color: $dark; 19 | font-size: $font-size-base * 1.5; 20 | line-height: $line-height-base * 2; 21 | 22 | small { 23 | color: $stable; 24 | font-size: $line-height-base * .75; 25 | } 26 | } 27 | 28 | // Set font for forms 29 | label, 30 | input, 31 | button, 32 | select, 33 | textarea { 34 | @include font-shorthand($font-size-base, normal, $line-height-base); // Set size, weight, line-height here 35 | } 36 | input, 37 | button, 38 | select, 39 | textarea { 40 | font-family: $font-family-base; // And only set font-family here for those that need it (note the missing label element) 41 | } 42 | 43 | 44 | // Input List 45 | // ------------------------------- 46 | 47 | .item-input { 48 | @include display-flex(); 49 | @include align-items(center); 50 | position: relative; 51 | overflow: hidden; 52 | padding: 6px 0 5px 16px; 53 | 54 | input { 55 | @include border-radius(0); 56 | @include flex(1, 220px); 57 | @include appearance(none); 58 | margin: 0; 59 | padding-right: 24px; 60 | background-color: transparent; 61 | } 62 | 63 | .button .icon { 64 | @include flex(0, 0, 24px); 65 | position: static; 66 | display: inline-block; 67 | height: auto; 68 | text-align: center; 69 | font-size: 16px; 70 | } 71 | 72 | .button-bar { 73 | @include border-radius(0); 74 | @include flex(1, 0, 220px); 75 | @include appearance(none); 76 | } 77 | 78 | .icon { 79 | min-width: 14px; 80 | } 81 | } 82 | // prevent flex-shrink on WP 83 | .platform-windowsphone .item-input input{ 84 | flex-shrink: 1; 85 | } 86 | 87 | .item-input-inset { 88 | @include display-flex(); 89 | @include align-items(center); 90 | position: relative; 91 | overflow: hidden; 92 | padding: ($item-padding / 3) * 2; 93 | } 94 | 95 | .item-input-wrapper { 96 | @include display-flex(); 97 | @include flex(1, 0); 98 | @include align-items(center); 99 | @include border-radius(4px); 100 | padding-right: 8px; 101 | padding-left: 8px; 102 | background: #eee; 103 | } 104 | 105 | .item-input-inset .item-input-wrapper input { 106 | padding-left: 4px; 107 | height: 29px; 108 | background: transparent; 109 | line-height: 18px; 110 | } 111 | 112 | .item-input-wrapper ~ .button { 113 | margin-left: ($item-padding / 3) * 2; 114 | } 115 | 116 | .input-label { 117 | display: table; 118 | padding: 7px 10px 7px 0px; 119 | max-width: 200px; 120 | width: 35%; 121 | color: $input-label-color; 122 | font-size: 16px; 123 | } 124 | 125 | .placeholder-icon { 126 | color: #aaa; 127 | &:first-child { 128 | padding-right: 6px; 129 | } 130 | &:last-child { 131 | padding-left: 6px; 132 | } 133 | } 134 | 135 | .item-stacked-label { 136 | display: block; 137 | background-color: transparent; 138 | box-shadow: none; 139 | 140 | .input-label, .icon { 141 | display: inline-block; 142 | padding: 4px 0 0 0px; 143 | vertical-align: middle; 144 | } 145 | } 146 | 147 | .item-stacked-label input, 148 | .item-stacked-label textarea { 149 | @include border-radius(2px); 150 | padding: 4px 8px 3px 0; 151 | border: none; 152 | background-color: $input-bg; 153 | } 154 | .item-stacked-label input { 155 | overflow: hidden; 156 | height: $line-height-computed + $font-size-base + 12px; 157 | } 158 | 159 | .item-floating-label { 160 | display: block; 161 | background-color: transparent; 162 | box-shadow: none; 163 | 164 | .input-label { 165 | position: relative; 166 | padding: 5px 0 0 0; 167 | opacity: 0; 168 | top: 10px; 169 | @include transition(opacity .15s ease-in, top .2s linear); 170 | 171 | &.has-input { 172 | opacity: 1; 173 | top: 0; 174 | @include transition(opacity .15s ease-in, top .2s linear); 175 | } 176 | } 177 | } 178 | 179 | 180 | // Form Controls 181 | // ------------------------------- 182 | 183 | // Shared size and type resets 184 | textarea, 185 | input[type="text"], 186 | input[type="password"], 187 | input[type="datetime"], 188 | input[type="datetime-local"], 189 | input[type="date"], 190 | input[type="month"], 191 | input[type="time"], 192 | input[type="week"], 193 | input[type="number"], 194 | input[type="email"], 195 | input[type="url"], 196 | input[type="search"], 197 | input[type="tel"], 198 | input[type="color"] { 199 | display: block; 200 | padding-top: 2px; 201 | padding-left: 0; 202 | height: $line-height-computed + $font-size-base; 203 | color: $input-color; 204 | vertical-align: middle; 205 | font-size: $font-size-base; 206 | line-height: $font-size-base + 2; 207 | } 208 | 209 | .platform-ios, 210 | .platform-android { 211 | input[type="datetime-local"], 212 | input[type="date"], 213 | input[type="month"], 214 | input[type="time"], 215 | input[type="week"] { 216 | padding-top: 8px; 217 | } 218 | } 219 | 220 | .item-input { 221 | input, 222 | textarea { 223 | width: 100%; 224 | } 225 | } 226 | 227 | textarea { 228 | padding-left: 0; 229 | @include placeholder($input-color-placeholder, -3px); 230 | } 231 | 232 | // Reset height since textareas have rows 233 | textarea { 234 | height: auto; 235 | } 236 | 237 | // Everything else 238 | textarea, 239 | input[type="text"], 240 | input[type="password"], 241 | input[type="datetime"], 242 | input[type="datetime-local"], 243 | input[type="date"], 244 | input[type="month"], 245 | input[type="time"], 246 | input[type="week"], 247 | input[type="number"], 248 | input[type="email"], 249 | input[type="url"], 250 | input[type="search"], 251 | input[type="tel"], 252 | input[type="color"] { 253 | border: 0; 254 | } 255 | 256 | // Position radios and checkboxes better 257 | input[type="radio"], 258 | input[type="checkbox"] { 259 | margin: 0; 260 | line-height: normal; 261 | } 262 | 263 | // Reset width of input images, buttons, radios, checkboxes 264 | .item-input { 265 | input[type="file"], 266 | input[type="image"], 267 | input[type="submit"], 268 | input[type="reset"], 269 | input[type="button"], 270 | input[type="radio"], 271 | input[type="checkbox"] { 272 | width: auto; // Override of generic input selector 273 | } 274 | } 275 | 276 | // Set the height of file to match text inputs 277 | input[type="file"] { 278 | line-height: $input-height-base; 279 | } 280 | 281 | // Text input classes to hide text caret during scroll 282 | .previous-input-focus, 283 | .cloned-text-input + input, 284 | .cloned-text-input + textarea { 285 | position: absolute !important; 286 | left: -9999px; 287 | width: 200px; 288 | } 289 | 290 | 291 | // Placeholder 292 | // ------------------------------- 293 | input, 294 | textarea { 295 | @include placeholder(); 296 | } 297 | 298 | 299 | // DISABLED STATE 300 | // ------------------------------- 301 | 302 | // Disabled and read-only inputs 303 | input[disabled], 304 | select[disabled], 305 | textarea[disabled], 306 | input[readonly]:not(.cloned-text-input), 307 | textarea[readonly]:not(.cloned-text-input), 308 | select[readonly] { 309 | background-color: $input-bg-disabled; 310 | cursor: not-allowed; 311 | } 312 | // Explicitly reset the colors here 313 | input[type="radio"][disabled], 314 | input[type="checkbox"][disabled], 315 | input[type="radio"][readonly], 316 | input[type="checkbox"][readonly] { 317 | background-color: transparent; 318 | } 319 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Grid 3 | * -------------------------------------------------- 4 | * Using flexbox for the grid, inspired by Philip Walton: 5 | * http://philipwalton.github.io/solved-by-flexbox/demos/grids/ 6 | * By default each .col within a .row will evenly take up 7 | * available width, and the height of each .col with take 8 | * up the height of the tallest .col in the same .row. 9 | */ 10 | 11 | .row { 12 | @include display-flex(); 13 | padding: ($grid-padding-width / 2); 14 | width: 100%; 15 | } 16 | 17 | .row-wrap { 18 | @include flex-wrap(wrap); 19 | } 20 | 21 | .row-no-padding { 22 | padding: 0; 23 | 24 | > .col { 25 | padding: 0; 26 | } 27 | } 28 | 29 | .row + .row { 30 | margin-top: ($grid-padding-width / 2) * -1; 31 | padding-top: 0; 32 | } 33 | 34 | .col { 35 | @include flex(1); 36 | display: block; 37 | padding: ($grid-padding-width / 2); 38 | width: 100%; 39 | } 40 | 41 | 42 | /* Vertically Align Columns */ 43 | /* .row-* vertically aligns every .col in the .row */ 44 | .row-top { 45 | @include align-items(flex-start); 46 | } 47 | .row-bottom { 48 | @include align-items(flex-end); 49 | } 50 | .row-center { 51 | @include align-items(center); 52 | } 53 | .row-stretch { 54 | @include align-items(stretch); 55 | } 56 | .row-baseline { 57 | @include align-items(baseline); 58 | } 59 | 60 | /* .col-* vertically aligns an individual .col */ 61 | .col-top { 62 | @include align-self(flex-start); 63 | } 64 | .col-bottom { 65 | @include align-self(flex-end); 66 | } 67 | .col-center { 68 | @include align-self(center); 69 | } 70 | 71 | /* Column Offsets */ 72 | .col-offset-10 { 73 | margin-left: 10%; 74 | } 75 | .col-offset-20 { 76 | margin-left: 20%; 77 | } 78 | .col-offset-25 { 79 | margin-left: 25%; 80 | } 81 | .col-offset-33, .col-offset-34 { 82 | margin-left: 33.3333%; 83 | } 84 | .col-offset-50 { 85 | margin-left: 50%; 86 | } 87 | .col-offset-66, .col-offset-67 { 88 | margin-left: 66.6666%; 89 | } 90 | .col-offset-75 { 91 | margin-left: 75%; 92 | } 93 | .col-offset-80 { 94 | margin-left: 80%; 95 | } 96 | .col-offset-90 { 97 | margin-left: 90%; 98 | } 99 | 100 | 101 | /* Explicit Column Percent Sizes */ 102 | /* By default each grid column will evenly distribute */ 103 | /* across the grid. However, you can specify individual */ 104 | /* columns to take up a certain size of the available area */ 105 | .col-10 { 106 | @include flex(0, 0, 10%); 107 | max-width: 10%; 108 | } 109 | .col-20 { 110 | @include flex(0, 0, 20%); 111 | max-width: 20%; 112 | } 113 | .col-25 { 114 | @include flex(0, 0, 25%); 115 | max-width: 25%; 116 | } 117 | .col-33, .col-34 { 118 | @include flex(0, 0, 33.3333%); 119 | max-width: 33.3333%; 120 | } 121 | .col-50 { 122 | @include flex(0, 0, 50%); 123 | max-width: 50%; 124 | } 125 | .col-66, .col-67 { 126 | @include flex(0, 0, 66.6666%); 127 | max-width: 66.6666%; 128 | } 129 | .col-75 { 130 | @include flex(0, 0, 75%); 131 | max-width: 75%; 132 | } 133 | .col-80 { 134 | @include flex(0, 0, 80%); 135 | max-width: 80%; 136 | } 137 | .col-90 { 138 | @include flex(0, 0, 90%); 139 | max-width: 90%; 140 | } 141 | 142 | 143 | /* Responsive Grid Classes */ 144 | /* Adding a class of responsive-X to a row */ 145 | /* will trigger the flex-direction to */ 146 | /* change to column and add some margin */ 147 | /* to any columns in the row for clearity */ 148 | 149 | @include responsive-grid-break('.responsive-sm', $grid-responsive-sm-break); 150 | @include responsive-grid-break('.responsive-md', $grid-responsive-md-break); 151 | @include responsive-grid-break('.responsive-lg', $grid-responsive-lg-break); 152 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_list.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Lists 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .list { 8 | position: relative; 9 | padding-top: $item-border-width; 10 | padding-bottom: $item-border-width; 11 | padding-left: 0; // reset padding because ul and ol 12 | margin-bottom: 20px; 13 | } 14 | .list:last-child { 15 | margin-bottom: 0px; 16 | &.card{ 17 | margin-bottom:40px; 18 | } 19 | } 20 | 21 | 22 | /** 23 | * List Header 24 | * -------------------------------------------------- 25 | */ 26 | 27 | .list-header { 28 | margin-top: $list-header-margin-top; 29 | padding: $list-header-padding; 30 | background-color: $list-header-bg; 31 | color: $list-header-color; 32 | font-weight: bold; 33 | } 34 | 35 | // when its a card make sure it doesn't duplicate top and bottom borders 36 | .card.list .list-item { 37 | padding-right: 1px; 38 | padding-left: 1px; 39 | } 40 | 41 | 42 | /** 43 | * Cards and Inset Lists 44 | * -------------------------------------------------- 45 | * A card and list-inset are close to the same thing, except a card as a box shadow. 46 | */ 47 | 48 | .card, 49 | .list-inset { 50 | overflow: hidden; 51 | margin: ($content-padding * 2) $content-padding; 52 | border-radius: $card-border-radius; 53 | background-color: $card-body-bg; 54 | } 55 | 56 | .card { 57 | padding-top: $item-border-width; 58 | padding-bottom: $item-border-width; 59 | box-shadow: $card-box-shadow; 60 | 61 | .item { 62 | border-left: 0; 63 | border-right: 0; 64 | } 65 | .item:first-child { 66 | border-top: 0; 67 | } 68 | .item:last-child { 69 | border-bottom: 0; 70 | } 71 | } 72 | 73 | .padding { 74 | .card, .list-inset { 75 | margin-left: 0; 76 | margin-right: 0; 77 | } 78 | } 79 | 80 | .card .item, 81 | .list-inset .item, 82 | .padding > .list .item 83 | { 84 | &:first-child { 85 | border-top-left-radius: $card-border-radius; 86 | border-top-right-radius: $card-border-radius; 87 | 88 | .item-content { 89 | border-top-left-radius: $card-border-radius; 90 | border-top-right-radius: $card-border-radius; 91 | } 92 | } 93 | &:last-child { 94 | border-bottom-right-radius: $card-border-radius; 95 | border-bottom-left-radius: $card-border-radius; 96 | 97 | .item-content { 98 | border-bottom-right-radius: $card-border-radius; 99 | border-bottom-left-radius: $card-border-radius; 100 | } 101 | } 102 | } 103 | 104 | .card .item:last-child, 105 | .list-inset .item:last-child { 106 | margin-bottom: $item-border-width * -1; 107 | } 108 | 109 | .card .item, 110 | .list-inset .item, 111 | .padding > .list .item, 112 | .padding-horizontal > .list .item { 113 | margin-right: 0; 114 | margin-left: 0; 115 | 116 | &.item-input input { 117 | padding-right: 44px; 118 | } 119 | } 120 | .padding-left > .list .item { 121 | margin-left: 0; 122 | } 123 | .padding-right > .list .item { 124 | margin-right: 0; 125 | } 126 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_loading.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Loading 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .loading-container { 8 | position: absolute; 9 | left: 0; 10 | top: 0; 11 | right: 0; 12 | bottom: 0; 13 | 14 | z-index: $z-index-loading; 15 | 16 | @include display-flex(); 17 | @include justify-content(center); 18 | @include align-items(center); 19 | 20 | @include transition(0.2s opacity linear); 21 | visibility: hidden; 22 | opacity: 0; 23 | 24 | &:not(.visible) .icon, 25 | &:not(.visible) .spinner{ 26 | display: none; 27 | } 28 | &.visible { 29 | visibility: visible; 30 | } 31 | &.active { 32 | opacity: 1; 33 | } 34 | 35 | .loading { 36 | padding: $loading-padding; 37 | 38 | border-radius: $loading-border-radius; 39 | background-color: $loading-bg-color; 40 | 41 | color: $loading-text-color; 42 | 43 | text-align: center; 44 | text-overflow: ellipsis; 45 | font-size: $loading-font-size; 46 | 47 | h1, h2, h3, h4, h5, h6 { 48 | color: $loading-text-color; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_menu.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Menus 4 | * -------------------------------------------------- 5 | * Side panel structure 6 | */ 7 | 8 | .menu { 9 | position: absolute; 10 | top: 0; 11 | bottom: 0; 12 | z-index: $z-index-menu; 13 | overflow: hidden; 14 | 15 | min-height: 100%; 16 | max-height: 100%; 17 | width: $menu-width; 18 | 19 | background-color: $menu-bg; 20 | 21 | .scroll-content { 22 | z-index: $z-index-menu-scroll-content; 23 | } 24 | 25 | .bar-header { 26 | z-index: $z-index-menu-bar-header; 27 | } 28 | } 29 | 30 | .menu-content { 31 | @include transform(none); 32 | box-shadow: $menu-side-shadow; 33 | } 34 | 35 | .menu-open .menu-content .pane, 36 | .menu-open .menu-content .scroll-content { 37 | pointer-events: none; 38 | } 39 | 40 | .grade-b .menu-content, 41 | .grade-c .menu-content { 42 | @include box-sizing(content-box); 43 | right: -1px; 44 | left: -1px; 45 | border-right: 1px solid #ccc; 46 | border-left: 1px solid #ccc; 47 | box-shadow: none; 48 | } 49 | 50 | .menu-left { 51 | left: 0; 52 | } 53 | 54 | .menu-right { 55 | right: 0; 56 | } 57 | 58 | .aside-open.aside-resizing .menu-right { 59 | display: none; 60 | } 61 | 62 | .menu-animated { 63 | @include transition-transform($menu-animation-speed ease); 64 | } 65 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_modal.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Modals 4 | * -------------------------------------------------- 5 | * Modals are independent windows that slide in from off-screen. 6 | */ 7 | 8 | .modal-backdrop, 9 | .modal-backdrop-bg { 10 | position: fixed; 11 | top: 0; 12 | left: 0; 13 | z-index: $z-index-modal; 14 | width: 100%; 15 | height: 100%; 16 | } 17 | 18 | .modal-backdrop-bg { 19 | pointer-events: none; 20 | } 21 | 22 | .modal { 23 | display: block; 24 | position: absolute; 25 | top: 0; 26 | z-index: $z-index-modal; 27 | overflow: hidden; 28 | min-height: 100%; 29 | width: 100%; 30 | background-color: $modal-bg-color; 31 | } 32 | 33 | @media (min-width: $modal-inset-mode-break-point) { 34 | // inset mode is when the modal doesn't fill the entire 35 | // display but instead is centered within a large display 36 | .modal { 37 | top: $modal-inset-mode-top; 38 | right: $modal-inset-mode-right; 39 | bottom: $modal-inset-mode-bottom; 40 | left: $modal-inset-mode-left; 41 | min-height: $modal-inset-mode-min-height; 42 | width: (100% - $modal-inset-mode-left - $modal-inset-mode-right); 43 | } 44 | 45 | .modal.ng-leave-active { 46 | bottom: 0; 47 | } 48 | 49 | // remove ios header padding from inset header 50 | .platform-ios.platform-cordova .modal-wrapper .modal { 51 | .bar-header:not(.bar-subheader) { 52 | height: $bar-height; 53 | > * { 54 | margin-top: 0; 55 | } 56 | } 57 | .tabs-top > .tabs, 58 | .tabs.tabs-top { 59 | top: $bar-height; 60 | } 61 | .has-header, 62 | .bar-subheader { 63 | top: $bar-height; 64 | } 65 | .has-subheader { 66 | top: $bar-height + $bar-subheader-height; 67 | } 68 | .has-header.has-tabs-top { 69 | top: $bar-height + $tabs-height; 70 | } 71 | .has-header.has-subheader.has-tabs-top { 72 | top: $bar-height + $bar-subheader-height + $tabs-height; 73 | } 74 | } 75 | 76 | .modal-backdrop-bg { 77 | @include transition(opacity 300ms ease-in-out); 78 | background-color: $modal-backdrop-bg-active; 79 | opacity: 0; 80 | } 81 | 82 | .active .modal-backdrop-bg { 83 | opacity: 0.5; 84 | } 85 | } 86 | 87 | // disable clicks on all but the modal 88 | .modal-open { 89 | pointer-events: none; 90 | 91 | .modal, 92 | .modal-backdrop { 93 | pointer-events: auto; 94 | } 95 | // prevent clicks on modal when loading overlay is active though 96 | &.loading-active { 97 | .modal, 98 | .modal-backdrop { 99 | pointer-events: none; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_platform.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Platform 4 | * -------------------------------------------------- 5 | * Platform specific tweaks 6 | */ 7 | 8 | .platform-ios.platform-cordova { 9 | // iOS has a status bar which sits on top of the header. 10 | // Bump down everything to make room for it. However, if 11 | // if its in Cordova, and set to fullscreen, then disregard the bump. 12 | &:not(.fullscreen) { 13 | .bar-header:not(.bar-subheader) { 14 | height: $bar-height + $ios-statusbar-height; 15 | 16 | &.item-input-inset .item-input-wrapper { 17 | margin-top: 19px !important; 18 | } 19 | 20 | > * { 21 | margin-top: $ios-statusbar-height; 22 | } 23 | } 24 | .tabs-top > .tabs, 25 | .tabs.tabs-top { 26 | top: $bar-height + $ios-statusbar-height; 27 | } 28 | 29 | .has-header, 30 | .bar-subheader { 31 | top: $bar-height + $ios-statusbar-height; 32 | } 33 | .has-subheader { 34 | top: $bar-height + $bar-subheader-height + $ios-statusbar-height; 35 | } 36 | .has-header.has-tabs-top { 37 | top: $bar-height + $tabs-height + $ios-statusbar-height; 38 | } 39 | .has-header.has-subheader.has-tabs-top { 40 | top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height; 41 | } 42 | } 43 | .popover{ 44 | .bar-header:not(.bar-subheader) { 45 | height: $bar-height; 46 | &.item-input-inset .item-input-wrapper { 47 | margin-top: -1px; 48 | } 49 | > * { 50 | margin-top: 0; 51 | } 52 | } 53 | .has-header, 54 | .bar-subheader { 55 | top: $bar-height; 56 | } 57 | .has-subheader { 58 | top: $bar-height + $bar-subheader-height; 59 | } 60 | } 61 | &.status-bar-hide { 62 | // Cordova doesn't adjust the body height correctly, this makes up for it 63 | margin-bottom: 20px; 64 | } 65 | } 66 | 67 | @media (orientation:landscape) { 68 | .platform-ios.platform-browser.platform-ipad { 69 | position: fixed; // required for iPad 7 Safari 70 | } 71 | } 72 | 73 | .platform-c:not(.enable-transitions) * { 74 | // disable transitions on grade-c devices (Android 2) 75 | -webkit-transition: none !important; 76 | transition: none !important; 77 | } 78 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_popover.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Popovers 4 | * -------------------------------------------------- 5 | * Popovers are independent views which float over content 6 | */ 7 | 8 | .popover-backdrop { 9 | position: fixed; 10 | top: 0; 11 | left: 0; 12 | z-index: $z-index-popover; 13 | width: 100%; 14 | height: 100%; 15 | background-color: $popover-backdrop-bg-inactive; 16 | 17 | &.active { 18 | background-color: $popover-backdrop-bg-active; 19 | } 20 | } 21 | 22 | .popover { 23 | position: absolute; 24 | top: 25%; 25 | left: 50%; 26 | z-index: $z-index-popover; 27 | display: block; 28 | margin-top: 12px; 29 | margin-left: -$popover-width / 2; 30 | height: $popover-height; 31 | width: $popover-width; 32 | background-color: $popover-bg-color; 33 | box-shadow: $popover-box-shadow; 34 | opacity: 0; 35 | 36 | .item:first-child { 37 | border-top: 0; 38 | } 39 | 40 | .item:last-child { 41 | border-bottom: 0; 42 | } 43 | 44 | &.popover-bottom { 45 | margin-top: -12px; 46 | } 47 | } 48 | 49 | 50 | // Set popover border-radius 51 | .popover, 52 | .popover .bar-header { 53 | border-radius: $popover-border-radius; 54 | } 55 | .popover .scroll-content { 56 | z-index: 1; 57 | margin: 2px 0; 58 | } 59 | .popover .bar-header { 60 | border-bottom-right-radius: 0; 61 | border-bottom-left-radius: 0; 62 | } 63 | .popover .has-header { 64 | border-top-right-radius: 0; 65 | border-top-left-radius: 0; 66 | } 67 | .popover-arrow { 68 | display: none; 69 | } 70 | 71 | 72 | // iOS Popover 73 | .platform-ios { 74 | 75 | .popover { 76 | box-shadow: $popover-box-shadow-ios; 77 | border-radius: $popover-border-radius-ios; 78 | } 79 | .popover .bar-header { 80 | @include border-top-radius($popover-border-radius-ios); 81 | } 82 | .popover .scroll-content { 83 | margin: 8px 0; 84 | border-radius: $popover-border-radius-ios; 85 | } 86 | .popover .scroll-content.has-header { 87 | margin-top: 0; 88 | } 89 | .popover-arrow { 90 | position: absolute; 91 | display: block; 92 | top: -17px; 93 | width: 30px; 94 | height: 19px; 95 | overflow: hidden; 96 | 97 | &:after { 98 | position: absolute; 99 | top: 12px; 100 | left: 5px; 101 | width: 20px; 102 | height: 20px; 103 | background-color: $popover-bg-color; 104 | border-radius: 3px; 105 | content: ''; 106 | @include rotate(-45deg); 107 | } 108 | } 109 | .popover-bottom .popover-arrow { 110 | top: auto; 111 | bottom: -10px; 112 | &:after { 113 | top: -6px; 114 | } 115 | } 116 | } 117 | 118 | 119 | // Android Popover 120 | .platform-android { 121 | 122 | .popover { 123 | margin-top: -32px; 124 | background-color: $popover-bg-color-android; 125 | box-shadow: $popover-box-shadow-android; 126 | 127 | .item { 128 | border-color: $popover-bg-color-android; 129 | background-color: $popover-bg-color-android; 130 | color: #4d4d4d; 131 | } 132 | &.popover-bottom { 133 | margin-top: 32px; 134 | } 135 | } 136 | 137 | .popover-backdrop, 138 | .popover-backdrop.active { 139 | background-color: transparent; 140 | } 141 | } 142 | 143 | 144 | // disable clicks on all but the popover 145 | .popover-open { 146 | pointer-events: none; 147 | 148 | .popover, 149 | .popover-backdrop { 150 | pointer-events: auto; 151 | } 152 | // prevent clicks on popover when loading overlay is active though 153 | &.loading-active { 154 | .popover, 155 | .popover-backdrop { 156 | pointer-events: none; 157 | } 158 | } 159 | } 160 | 161 | 162 | // wider popover on larger viewports 163 | @media (min-width: $popover-large-break-point) { 164 | .popover { 165 | width: $popover-large-width; 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_popup.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Popups 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .popup-container { 8 | position: absolute; 9 | top: 0; 10 | left: 0; 11 | bottom: 0; 12 | right: 0; 13 | background: rgba(0,0,0,0); 14 | 15 | @include display-flex(); 16 | @include justify-content(center); 17 | @include align-items(center); 18 | 19 | z-index: $z-index-popup; 20 | 21 | // Start hidden 22 | visibility: hidden; 23 | &.popup-showing { 24 | visibility: visible; 25 | } 26 | 27 | &.popup-hidden .popup { 28 | @include animation-name(scaleOut); 29 | @include animation-duration($popup-leave-animation-duration); 30 | @include animation-timing-function(ease-in-out); 31 | @include animation-fill-mode(both); 32 | } 33 | 34 | &.active .popup { 35 | @include animation-name(superScaleIn); 36 | @include animation-duration($popup-enter-animation-duration); 37 | @include animation-timing-function(ease-in-out); 38 | @include animation-fill-mode(both); 39 | } 40 | 41 | .popup { 42 | width: $popup-width; 43 | max-width: 100%; 44 | max-height: 90%; 45 | 46 | border-radius: $popup-border-radius; 47 | background-color: $popup-background-color; 48 | 49 | @include display-flex(); 50 | @include flex-direction(column); 51 | } 52 | 53 | input, 54 | textarea { 55 | width: 100%; 56 | } 57 | } 58 | 59 | .popup-head { 60 | padding: 15px 10px; 61 | border-bottom: 1px solid #eee; 62 | text-align: center; 63 | } 64 | .popup-title { 65 | margin: 0; 66 | padding: 0; 67 | font-size: 15px; 68 | } 69 | .popup-sub-title { 70 | margin: 5px 0 0 0; 71 | padding: 0; 72 | font-weight: normal; 73 | font-size: 11px; 74 | } 75 | .popup-body { 76 | padding: 10px; 77 | overflow: auto; 78 | } 79 | 80 | .popup-buttons { 81 | @include display-flex(); 82 | @include flex-direction(row); 83 | padding: 10px; 84 | min-height: $popup-button-min-height + 20; 85 | 86 | .button { 87 | @include flex(1); 88 | display: block; 89 | min-height: $popup-button-min-height; 90 | border-radius: $popup-button-border-radius; 91 | line-height: $popup-button-line-height; 92 | 93 | margin-right: 5px; 94 | &:last-child { 95 | margin-right: 0px; 96 | } 97 | } 98 | } 99 | 100 | .popup-open { 101 | pointer-events: none; 102 | 103 | &.modal-open .modal { 104 | pointer-events: none; 105 | } 106 | 107 | .popup-backdrop, .popup { 108 | pointer-events: auto; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_progress.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Progress 4 | * -------------------------------------------------- 5 | */ 6 | 7 | progress { 8 | display: block; 9 | margin: $progress-margin; 10 | width: $progress-width; 11 | } 12 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_radio.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Radio Button Inputs 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-radio { 8 | padding: 0; 9 | 10 | &:hover { 11 | cursor: pointer; 12 | } 13 | } 14 | 15 | .item-radio .item-content { 16 | /* give some room to the right for the checkmark icon */ 17 | padding-right: $item-padding * 4; 18 | } 19 | 20 | .item-radio .radio-icon { 21 | /* checkmark icon will be hidden by default */ 22 | position: absolute; 23 | top: 0; 24 | right: 0; 25 | z-index: $z-index-item-radio; 26 | visibility: hidden; 27 | padding: $item-padding - 2; 28 | height: 100%; 29 | font-size: 24px; 30 | } 31 | 32 | .item-radio input { 33 | /* hide any radio button inputs elements (the ugly circles) */ 34 | position: absolute; 35 | left: -9999px; 36 | 37 | &:checked ~ .item-content { 38 | /* style the item content when its checked */ 39 | background: #f7f7f7; 40 | } 41 | 42 | &:checked ~ .radio-icon { 43 | /* show the checkmark icon when its checked */ 44 | visibility: visible; 45 | } 46 | } 47 | 48 | // Hack for Android to correctly display the checked item 49 | // http://timpietrusky.com/advanced-checkbox-hack 50 | .platform-android.grade-b .item-radio, 51 | .platform-android.grade-c .item-radio { 52 | -webkit-animation: androidCheckedbugfix infinite 1s; 53 | } 54 | @-webkit-keyframes androidCheckedbugfix { 55 | from { padding: 0; } 56 | to { padding: 0; } 57 | } 58 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_range.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Range 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .range input{ 8 | display: inline-block; 9 | overflow: hidden; 10 | margin-top: 5px; 11 | margin-bottom: 5px; 12 | padding-right: 2px; 13 | padding-left: 1px; 14 | width: auto; 15 | height: $range-slider-height + 15; 16 | outline: none; 17 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $range-default-track-bg), color-stop(100%, $range-default-track-bg)); 18 | background: linear-gradient(to right, $range-default-track-bg 0%, $range-default-track-bg 100%); 19 | background-position: center; 20 | background-size: 99% $range-track-height; 21 | background-repeat: no-repeat; 22 | -webkit-appearance: none; 23 | 24 | &::-webkit-slider-thumb { 25 | position: relative; 26 | width: $range-slider-width; 27 | height: $range-slider-height; 28 | border-radius: $range-slider-border-radius; 29 | background-color: $toggle-handle-off-bg-color; 30 | box-shadow: $range-slider-box-shadow; 31 | cursor: pointer; 32 | -webkit-appearance: none; 33 | border: 0; 34 | } 35 | 36 | &::-webkit-slider-thumb:before{ 37 | /* what creates the colorful line on the left side of the slider */ 38 | position: absolute; 39 | top: ($range-slider-height / 2) - ($range-track-height / 2); 40 | left: -2001px; 41 | width: 2000px; 42 | height: $range-track-height; 43 | background: $dark; 44 | content: ' '; 45 | } 46 | 47 | &::-webkit-slider-thumb:after { 48 | /* create a larger (but hidden) hit area */ 49 | position: absolute; 50 | top: -15px; 51 | left: -15px; 52 | padding: 30px; 53 | content: ' '; 54 | //background: red; 55 | //opacity: .5; 56 | } 57 | &::-ms-track{ 58 | background: transparent; 59 | border-color: transparent; 60 | border-width: 11px 0 16px; 61 | color:transparent; 62 | margin-top:20px; 63 | } 64 | &::-ms-thumb { 65 | width: $range-slider-width; 66 | height: $range-slider-height; 67 | border-radius: $range-slider-border-radius; 68 | background-color: $toggle-handle-off-bg-color; 69 | border-color:$toggle-handle-off-bg-color; 70 | box-shadow: $range-slider-box-shadow; 71 | margin-left:1px; 72 | margin-right:1px; 73 | outline:none; 74 | } 75 | &::-ms-fill-lower{ 76 | height: $range-track-height; 77 | background:$dark; 78 | } 79 | &::-ms-fill-upper { 80 | height: $range-track-height; 81 | background:$range-default-track-bg; 82 | } 83 | } 84 | 85 | .range { 86 | @include display-flex(); 87 | @include align-items(center); 88 | padding: 2px 11px; 89 | 90 | &.range-light { 91 | input { @include range-style($range-light-track-bg); } 92 | } 93 | &.range-stable { 94 | input { @include range-style($range-stable-track-bg); } 95 | } 96 | &.range-positive { 97 | input { @include range-style($range-positive-track-bg); } 98 | } 99 | &.range-calm { 100 | input { @include range-style($range-calm-track-bg); } 101 | } 102 | &.range-balanced { 103 | input { @include range-style($range-balanced-track-bg); } 104 | } 105 | &.range-assertive { 106 | input { @include range-style($range-assertive-track-bg); } 107 | } 108 | &.range-energized { 109 | input { @include range-style($range-energized-track-bg); } 110 | } 111 | &.range-royal { 112 | input { @include range-style($range-royal-track-bg); } 113 | } 114 | &.range-dark { 115 | input { @include range-style($range-dark-track-bg); } 116 | } 117 | } 118 | 119 | .range .icon { 120 | @include flex(0); 121 | display: block; 122 | min-width: $range-icon-size; 123 | text-align: center; 124 | font-size: $range-icon-size; 125 | } 126 | 127 | .range input { 128 | @include flex(1); 129 | display: block; 130 | margin-right: 10px; 131 | margin-left: 10px; 132 | } 133 | 134 | .range-label { 135 | @include flex(0, 0, auto); 136 | display: block; 137 | white-space: nowrap; 138 | } 139 | 140 | .range-label:first-child { 141 | padding-left: 5px; 142 | } 143 | .range input + .range-label { 144 | padding-right: 5px; 145 | padding-left: 0; 146 | } 147 | 148 | // WP range height must be auto 149 | .platform-windowsphone{ 150 | .range input{ 151 | height:auto; 152 | } 153 | } -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_refresher.scss: -------------------------------------------------------------------------------- 1 | 2 | // Scroll refresher (for pull to refresh) 3 | .scroll-refresher { 4 | position: absolute; 5 | top: -60px; 6 | right: 0; 7 | left: 0; 8 | overflow: hidden; 9 | margin: auto; 10 | height: 60px; 11 | .ionic-refresher-content { 12 | position: absolute; 13 | bottom: 15px; 14 | left: 0; 15 | width: 100%; 16 | color: $scroll-refresh-icon-color; 17 | text-align: center; 18 | 19 | font-size: 30px; 20 | 21 | .text-refreshing, 22 | .text-pulling { 23 | font-size: 16px; 24 | line-height: 16px; 25 | } 26 | &.ionic-refresher-with-text { 27 | bottom: 10px; 28 | } 29 | } 30 | 31 | .icon-refreshing, 32 | .icon-pulling { 33 | width: 100%; 34 | -webkit-backface-visibility: hidden; 35 | backface-visibility: hidden; 36 | -webkit-transform-style: preserve-3d; 37 | transform-style: preserve-3d; 38 | } 39 | .icon-pulling { 40 | @include animation-name(refresh-spin-back); 41 | @include animation-duration(200ms); 42 | @include animation-timing-function(linear); 43 | @include animation-fill-mode(none); 44 | -webkit-transform: translate3d(0,0,0) rotate(0deg); 45 | transform: translate3d(0,0,0) rotate(0deg); 46 | } 47 | .icon-refreshing, 48 | .text-refreshing { 49 | display: none; 50 | } 51 | .icon-refreshing { 52 | @include animation-duration(1.5s); 53 | } 54 | 55 | &.active { 56 | .icon-pulling:not(.pulling-rotation-disabled) { 57 | @include animation-name(refresh-spin); 58 | -webkit-transform: translate3d(0,0,0) rotate(-180deg); 59 | transform: translate3d(0,0,0) rotate(-180deg); 60 | } 61 | &.refreshing { 62 | @include transition(-webkit-transform .2s); 63 | @include transition(transform .2s); 64 | -webkit-transform: scale(1,1); 65 | transform: scale(1,1); 66 | 67 | .icon-pulling, 68 | .text-pulling { 69 | display: none; 70 | } 71 | .icon-refreshing, 72 | .text-refreshing { 73 | display: block; 74 | } 75 | &.refreshing-tail { 76 | -webkit-transform: scale(0,0); 77 | transform: scale(0,0); 78 | } 79 | } 80 | } 81 | } 82 | .overflow-scroll > .scroll{ 83 | &.overscroll{ 84 | position:fixed; 85 | } 86 | -webkit-overflow-scrolling:touch; 87 | width:100%; 88 | } 89 | 90 | @-webkit-keyframes refresh-spin { 91 | 0% { -webkit-transform: translate3d(0,0,0) rotate(0); } 92 | 100% { -webkit-transform: translate3d(0,0,0) rotate(180deg); } 93 | } 94 | 95 | @keyframes refresh-spin { 96 | 0% { transform: translate3d(0,0,0) rotate(0); } 97 | 100% { transform: translate3d(0,0,0) rotate(180deg); } 98 | } 99 | 100 | @-webkit-keyframes refresh-spin-back { 101 | 0% { -webkit-transform: translate3d(0,0,0) rotate(180deg); } 102 | 100% { -webkit-transform: translate3d(0,0,0) rotate(0); } 103 | } 104 | 105 | @keyframes refresh-spin-back { 106 | 0% { transform: translate3d(0,0,0) rotate(180deg); } 107 | 100% { transform: translate3d(0,0,0) rotate(0); } 108 | } 109 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_reset.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Resets 4 | * -------------------------------------------------- 5 | * Adapted from normalize.css and some reset.css. We don't care even one 6 | * bit about old IE, so we don't need any hacks for that in here. 7 | * 8 | * There are probably other things we could remove here, as well. 9 | * 10 | * normalize.css v2.1.2 | MIT License | git.io/normalize 11 | 12 | * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) 13 | * http://cssreset.com 14 | */ 15 | 16 | html, body, div, span, applet, object, iframe, 17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 18 | a, abbr, acronym, address, big, cite, code, 19 | del, dfn, em, img, ins, kbd, q, s, samp, 20 | small, strike, strong, sub, sup, tt, var, 21 | b, i, u, center, 22 | dl, dt, dd, ol, ul, li, 23 | fieldset, form, label, legend, 24 | table, caption, tbody, tfoot, thead, tr, th, td, 25 | article, aside, canvas, details, embed, fieldset, 26 | figure, figcaption, footer, header, hgroup, 27 | menu, nav, output, ruby, section, summary, 28 | time, mark, audio, video { 29 | margin: 0; 30 | padding: 0; 31 | border: 0; 32 | vertical-align: baseline; 33 | font: inherit; 34 | font-size: 100%; 35 | } 36 | 37 | ol, ul { 38 | list-style: none; 39 | } 40 | blockquote, q { 41 | quotes: none; 42 | } 43 | blockquote:before, blockquote:after, 44 | q:before, q:after { 45 | content: ''; 46 | content: none; 47 | } 48 | 49 | /** 50 | * Prevent modern browsers from displaying `audio` without controls. 51 | * Remove excess height in iOS 5 devices. 52 | */ 53 | 54 | audio:not([controls]) { 55 | display: none; 56 | height: 0; 57 | } 58 | 59 | /** 60 | * Hide the `template` element in IE, Safari, and Firefox < 22. 61 | */ 62 | 63 | [hidden], 64 | template { 65 | display: none; 66 | } 67 | 68 | script { 69 | display: none !important; 70 | } 71 | 72 | /* ========================================================================== 73 | Base 74 | ========================================================================== */ 75 | 76 | /** 77 | * 1. Set default font family to sans-serif. 78 | * 2. Prevent iOS text size adjust after orientation change, without disabling 79 | * user zoom. 80 | */ 81 | 82 | html { 83 | @include user-select(none); 84 | font-family: sans-serif; /* 1 */ 85 | -webkit-text-size-adjust: 100%; 86 | -ms-text-size-adjust: 100%; /* 2 */ 87 | -webkit-text-size-adjust: 100%; /* 2 */ 88 | } 89 | 90 | /** 91 | * Remove default margin. 92 | */ 93 | 94 | body { 95 | margin: 0; 96 | line-height: 1; 97 | } 98 | 99 | 100 | /** 101 | * Remove default outlines. 102 | */ 103 | a, 104 | button, 105 | :focus, 106 | a:focus, 107 | button:focus, 108 | a:active, 109 | a:hover { 110 | outline: 0; 111 | } 112 | 113 | /* * 114 | * Remove tap highlight color 115 | */ 116 | 117 | a { 118 | -webkit-user-drag: none; 119 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 120 | -webkit-tap-highlight-color: transparent; 121 | 122 | &[href]:hover { 123 | cursor: pointer; 124 | } 125 | } 126 | 127 | /* ========================================================================== 128 | Typography 129 | ========================================================================== */ 130 | 131 | 132 | /** 133 | * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. 134 | */ 135 | 136 | b, 137 | strong { 138 | font-weight: bold; 139 | } 140 | 141 | /** 142 | * Address styling not present in Safari 5 and Chrome. 143 | */ 144 | 145 | dfn { 146 | font-style: italic; 147 | } 148 | 149 | /** 150 | * Address differences between Firefox and other browsers. 151 | */ 152 | 153 | hr { 154 | -moz-box-sizing: content-box; 155 | box-sizing: content-box; 156 | height: 0; 157 | } 158 | 159 | 160 | /** 161 | * Correct font family set oddly in Safari 5 and Chrome. 162 | */ 163 | 164 | code, 165 | kbd, 166 | pre, 167 | samp { 168 | font-size: 1em; 169 | font-family: monospace, serif; 170 | } 171 | 172 | /** 173 | * Improve readability of pre-formatted text in all browsers. 174 | */ 175 | 176 | pre { 177 | white-space: pre-wrap; 178 | } 179 | 180 | /** 181 | * Set consistent quote types. 182 | */ 183 | 184 | q { 185 | quotes: "\201C" "\201D" "\2018" "\2019"; 186 | } 187 | 188 | /** 189 | * Address inconsistent and variable font size in all browsers. 190 | */ 191 | 192 | small { 193 | font-size: 80%; 194 | } 195 | 196 | /** 197 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 198 | */ 199 | 200 | sub, 201 | sup { 202 | position: relative; 203 | vertical-align: baseline; 204 | font-size: 75%; 205 | line-height: 0; 206 | } 207 | 208 | sup { 209 | top: -0.5em; 210 | } 211 | 212 | sub { 213 | bottom: -0.25em; 214 | } 215 | 216 | /** 217 | * Define consistent border, margin, and padding. 218 | */ 219 | 220 | fieldset { 221 | margin: 0 2px; 222 | padding: 0.35em 0.625em 0.75em; 223 | border: 1px solid #c0c0c0; 224 | } 225 | 226 | /** 227 | * 1. Correct `color` not being inherited in IE 8/9. 228 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 229 | */ 230 | 231 | legend { 232 | padding: 0; /* 2 */ 233 | border: 0; /* 1 */ 234 | } 235 | 236 | /** 237 | * 1. Correct font family not being inherited in all browsers. 238 | * 2. Correct font size not being inherited in all browsers. 239 | * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. 240 | * 4. Remove any default :focus styles 241 | * 5. Make sure webkit font smoothing is being inherited 242 | * 6. Remove default gradient in Android Firefox / FirefoxOS 243 | */ 244 | 245 | button, 246 | input, 247 | select, 248 | textarea { 249 | margin: 0; /* 3 */ 250 | font-size: 100%; /* 2 */ 251 | font-family: inherit; /* 1 */ 252 | outline-offset: 0; /* 4 */ 253 | outline-style: none; /* 4 */ 254 | outline-width: 0; /* 4 */ 255 | -webkit-font-smoothing: inherit; /* 5 */ 256 | background-image: none; /* 6 */ 257 | } 258 | 259 | /** 260 | * Address Firefox 4+ setting `line-height` on `input` using `importnt` in 261 | * the UA stylesheet. 262 | */ 263 | 264 | button, 265 | input { 266 | line-height: normal; 267 | } 268 | 269 | /** 270 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 271 | * All other form control elements do not inherit `text-transform` values. 272 | * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. 273 | * Correct `select` style inheritance in Firefox 4+ and Opera. 274 | */ 275 | 276 | button, 277 | select { 278 | text-transform: none; 279 | } 280 | 281 | /** 282 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 283 | * and `video` controls. 284 | * 2. Correct inability to style clickable `input` types in iOS. 285 | * 3. Improve usability and consistency of cursor style between image-type 286 | * `input` and others. 287 | */ 288 | 289 | button, 290 | html input[type="button"], /* 1 */ 291 | input[type="reset"], 292 | input[type="submit"] { 293 | cursor: pointer; /* 3 */ 294 | -webkit-appearance: button; /* 2 */ 295 | } 296 | 297 | /** 298 | * Re-set default cursor for disabled elements. 299 | */ 300 | 301 | button[disabled], 302 | html input[disabled] { 303 | cursor: default; 304 | } 305 | 306 | /** 307 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 308 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 309 | * (include `-moz` to future-proof). 310 | */ 311 | 312 | input[type="search"] { 313 | -webkit-box-sizing: content-box; /* 2 */ 314 | -moz-box-sizing: content-box; 315 | box-sizing: content-box; 316 | -webkit-appearance: textfield; /* 1 */ 317 | } 318 | 319 | /** 320 | * Remove inner padding and search cancel button in Safari 5 and Chrome 321 | * on OS X. 322 | */ 323 | 324 | input[type="search"]::-webkit-search-cancel-button, 325 | input[type="search"]::-webkit-search-decoration { 326 | -webkit-appearance: none; 327 | } 328 | 329 | /** 330 | * Remove inner padding and border in Firefox 4+. 331 | */ 332 | 333 | button::-moz-focus-inner, 334 | input::-moz-focus-inner { 335 | padding: 0; 336 | border: 0; 337 | } 338 | 339 | /** 340 | * 1. Remove default vertical scrollbar in IE 8/9. 341 | * 2. Improve readability and alignment in all browsers. 342 | */ 343 | 344 | textarea { 345 | overflow: auto; /* 1 */ 346 | vertical-align: top; /* 2 */ 347 | } 348 | 349 | 350 | img { 351 | -webkit-user-drag: none; 352 | } 353 | 354 | /* ========================================================================== 355 | Tables 356 | ========================================================================== */ 357 | 358 | /** 359 | * Remove most spacing between table cells. 360 | */ 361 | 362 | table { 363 | border-spacing: 0; 364 | border-collapse: collapse; 365 | } 366 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_scaffolding.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Scaffolding 4 | * -------------------------------------------------- 5 | */ 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | @include box-sizing(border-box); 11 | } 12 | 13 | html { 14 | overflow: hidden; 15 | -ms-touch-action: pan-y; 16 | touch-action: pan-y; 17 | } 18 | 19 | body, 20 | .ionic-body { 21 | @include touch-callout(none); 22 | @include font-smoothing(antialiased); 23 | @include text-size-adjust(none); 24 | @include tap-highlight-transparent(); 25 | @include user-select(none); 26 | 27 | top: 0; 28 | right: 0; 29 | bottom: 0; 30 | left: 0; 31 | overflow: hidden; 32 | 33 | margin: 0; 34 | padding: 0; 35 | 36 | color: $base-color; 37 | word-wrap: break-word; 38 | font-size: $font-size-base; 39 | font-family: $font-family-base; 40 | line-height: $line-height-computed; 41 | text-rendering: optimizeLegibility; 42 | -webkit-backface-visibility: hidden; 43 | -webkit-user-drag: none; 44 | -ms-content-zooming: none; 45 | } 46 | 47 | body.grade-b, 48 | body.grade-c { 49 | // disable optimizeLegibility for low end devices 50 | text-rendering: auto; 51 | } 52 | 53 | .content { 54 | // used for content areas not using the content directive 55 | position: relative; 56 | } 57 | 58 | .scroll-content { 59 | position: absolute; 60 | top: 0; 61 | right: 0; 62 | bottom: 0; 63 | left: 0; 64 | overflow: hidden; 65 | 66 | // Hide the top border if any 67 | margin-top: -1px; 68 | 69 | // Prevents any distortion of lines 70 | padding-top: 1px; 71 | margin-bottom: -1px; 72 | 73 | width: auto; 74 | height: auto; 75 | } 76 | 77 | .menu .scroll-content.scroll-content-false{ 78 | z-index: $z-index-scroll-content-false; 79 | } 80 | 81 | .scroll-view { 82 | position: relative; 83 | display: block; 84 | overflow: hidden; 85 | 86 | // Hide the top border if any 87 | margin-top: -1px; 88 | } 89 | 90 | /** 91 | * Scroll is the scroll view component available for complex and custom 92 | * scroll view functionality. 93 | */ 94 | .scroll { 95 | @include user-select(none); 96 | @include touch-callout(none); 97 | @include text-size-adjust(none); 98 | @include transform-origin(left, top); 99 | } 100 | /** 101 | * Set ms-viewport to prevent MS "page squish" and allow fluid scrolling 102 | * https://msdn.microsoft.com/en-us/library/ie/hh869615(v=vs.85).aspx 103 | */ 104 | @-ms-viewport { width: device-width; } 105 | 106 | // Scroll bar styles 107 | .scroll-bar { 108 | position: absolute; 109 | z-index: $z-index-scroll-bar; 110 | } 111 | // hide the scroll-bar during animations 112 | .ng-animate .scroll-bar { 113 | visibility: hidden; 114 | } 115 | .scroll-bar-h { 116 | right: 2px; 117 | bottom: 3px; 118 | left: 2px; 119 | height: 3px; 120 | 121 | .scroll-bar-indicator { 122 | height: 100%; 123 | } 124 | } 125 | 126 | .scroll-bar-v { 127 | top: 2px; 128 | right: 3px; 129 | bottom: 2px; 130 | width: 3px; 131 | 132 | .scroll-bar-indicator { 133 | width: 100%; 134 | } 135 | } 136 | .scroll-bar-indicator { 137 | position: absolute; 138 | border-radius: 4px; 139 | background: rgba(0,0,0,0.3); 140 | opacity: 1; 141 | @include transition(opacity .3s linear); 142 | 143 | &.scroll-bar-fade-out { 144 | opacity: 0; 145 | } 146 | } 147 | .platform-android .scroll-bar-indicator { 148 | // android doesn't have rounded ends on scrollbar 149 | border-radius: 0; 150 | } 151 | .grade-b .scroll-bar-indicator, 152 | .grade-c .scroll-bar-indicator { 153 | // disable rgba background and border radius for low end devices 154 | background: #aaa; 155 | 156 | &.scroll-bar-fade-out { 157 | @include transition(none); 158 | } 159 | } 160 | 161 | ion-infinite-scroll { 162 | height: 60px; 163 | width: 100%; 164 | display: block; 165 | 166 | @include display-flex(); 167 | @include flex-direction(row); 168 | @include justify-content(center); 169 | @include align-items(center); 170 | 171 | .icon { 172 | color: #666666; 173 | font-size: 30px; 174 | color: $scroll-refresh-icon-color; 175 | } 176 | &:not(.active){ 177 | .spinner, 178 | .icon:before{ 179 | display:none; 180 | } 181 | } 182 | } 183 | 184 | .overflow-scroll { 185 | overflow-x: hidden; 186 | overflow-y: scroll; 187 | -webkit-overflow-scrolling: touch; 188 | top: 0; 189 | right: 0; 190 | bottom: 0; 191 | left: 0; 192 | position: absolute; 193 | 194 | .scroll { 195 | position: static; 196 | height: 100%; 197 | -webkit-transform: translate3d(0, 0, 0); // fix iOS bug where relative children of scroller disapear while scrolling. see: http://stackoverflow.com/questions/9807620/ipad-safari-scrolling-causes-html-elements-to-disappear-and-reappear-with-a-dela 198 | } 199 | } 200 | 201 | 202 | // Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab. 203 | // Note: For these to work, content must come after both bars in the markup 204 | /* If you change these, change platform.scss as well */ 205 | .has-header { 206 | top: $bar-height; 207 | } 208 | // Force no header 209 | .no-header { 210 | top: 0; 211 | } 212 | 213 | .has-subheader { 214 | top: $bar-height + $bar-subheader-height; 215 | } 216 | .has-tabs-top { 217 | top: $bar-height + $tabs-height; 218 | } 219 | .has-header.has-subheader.has-tabs-top { 220 | top: $bar-height + $bar-subheader-height + $tabs-height; 221 | } 222 | 223 | .has-footer { 224 | bottom: $bar-footer-height; 225 | } 226 | .has-subfooter { 227 | bottom: $bar-footer-height + $bar-subfooter-height; 228 | } 229 | 230 | .has-tabs, 231 | .bar-footer.has-tabs { 232 | bottom: $tabs-height; 233 | &.pane{ 234 | bottom: $tabs-height; 235 | height:auto; 236 | } 237 | } 238 | 239 | .has-footer.has-tabs { 240 | bottom: $tabs-height + $bar-footer-height; 241 | } 242 | 243 | // A full screen section with a solid background 244 | .pane { 245 | @include translate3d(0,0,0); 246 | @include transition-duration(0); 247 | z-index: $z-index-pane; 248 | } 249 | .view { 250 | z-index: $z-index-view; 251 | } 252 | .pane, 253 | .view { 254 | position: absolute; 255 | top: 0; 256 | right: 0; 257 | bottom: 0; 258 | left: 0; 259 | width: 100%; 260 | height: 100%; 261 | background-color: $base-background-color; 262 | overflow: hidden; 263 | } 264 | .view-container { 265 | position: absolute; 266 | display: block; 267 | width: 100%; 268 | height: 100%; 269 | } 270 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_select.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Select 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-select { 8 | position: relative; 9 | 10 | select { 11 | @include appearance(none); 12 | position: absolute; 13 | top: 0; 14 | bottom: 0; 15 | right: 0; 16 | padding: ($item-padding - 2) ($item-padding * 3) ($item-padding) $item-padding; 17 | max-width: 65%; 18 | 19 | border: none; 20 | background: $item-default-bg; 21 | color: #333; 22 | 23 | // hack to hide default dropdown arrow in FF 24 | text-indent: .01px; 25 | text-overflow: ''; 26 | 27 | white-space: nowrap; 28 | font-size: $font-size-base; 29 | 30 | cursor: pointer; 31 | direction: rtl; // right align the select text 32 | } 33 | 34 | select::-ms-expand { 35 | // hide default dropdown arrow in IE 36 | display: none; 37 | } 38 | 39 | option { 40 | direction: ltr; 41 | } 42 | 43 | &:after { 44 | position: absolute; 45 | top: 50%; 46 | right: $item-padding; 47 | margin-top: -3px; 48 | width: 0; 49 | height: 0; 50 | border-top: 5px solid; 51 | border-right: 5px solid rgba(0, 0, 0, 0); 52 | border-left: 5px solid rgba(0, 0, 0, 0); 53 | color: #999; 54 | content: ""; 55 | pointer-events: none; 56 | } 57 | &.item-light { 58 | select{ 59 | background:$item-light-bg; 60 | color:$item-light-text; 61 | } 62 | } 63 | &.item-stable { 64 | select{ 65 | background:$item-stable-bg; 66 | color:$item-stable-text; 67 | } 68 | &:after, .input-label{ 69 | color:darken($item-stable-border,30%); 70 | } 71 | } 72 | &.item-positive { 73 | select{ 74 | background:$item-positive-bg; 75 | color:$item-positive-text; 76 | } 77 | &:after, .input-label{ 78 | color:$item-positive-text; 79 | } 80 | } 81 | &.item-calm { 82 | select{ 83 | background:$item-calm-bg; 84 | color:$item-calm-text; 85 | } 86 | &:after, .input-label{ 87 | color:$item-calm-text; 88 | } 89 | } 90 | &.item-assertive { 91 | select{ 92 | background:$item-assertive-bg; 93 | color:$item-assertive-text; 94 | } 95 | &:after, .input-label{ 96 | color:$item-assertive-text; 97 | } 98 | } 99 | &.item-balanced { 100 | select{ 101 | background:$item-balanced-bg; 102 | color:$item-balanced-text; 103 | } 104 | &:after, .input-label{ 105 | color:$item-balanced-text; 106 | } 107 | } 108 | &.item-energized { 109 | select{ 110 | background:$item-energized-bg; 111 | color:$item-energized-text; 112 | } 113 | &:after, .input-label{ 114 | color:$item-energized-text; 115 | } 116 | } 117 | &.item-royal { 118 | select{ 119 | background:$item-royal-bg; 120 | color:$item-royal-text; 121 | } 122 | &:after, .input-label{ 123 | color:$item-royal-text; 124 | } 125 | } 126 | &.item-dark { 127 | select{ 128 | background:$item-dark-bg; 129 | color:$item-dark-text; 130 | } 131 | &:after, .input-label{ 132 | color:$item-dark-text; 133 | } 134 | } 135 | } 136 | 137 | select { 138 | &[multiple], 139 | &[size] { 140 | height: auto; 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_slide-box.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Slide Box 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .slider { 8 | position: relative; 9 | visibility: hidden; 10 | // Make sure items don't scroll over ever 11 | overflow: hidden; 12 | } 13 | 14 | .slider-slides { 15 | position: relative; 16 | height: 100%; 17 | } 18 | 19 | .slider-slide { 20 | position: relative; 21 | display: block; 22 | float: left; 23 | width: 100%; 24 | height: 100%; 25 | vertical-align: top; 26 | } 27 | 28 | .slider-slide-image { 29 | > img { 30 | width: 100%; 31 | } 32 | } 33 | 34 | .slider-pager { 35 | position: absolute; 36 | bottom: 20px; 37 | z-index: $z-index-slider-pager; 38 | width: 100%; 39 | height: 15px; 40 | text-align: center; 41 | 42 | .slider-pager-page { 43 | display: inline-block; 44 | margin: 0px 3px; 45 | width: 15px; 46 | color: #000; 47 | text-decoration: none; 48 | 49 | opacity: 0.3; 50 | 51 | &.active { 52 | @include transition(opacity 0.4s ease-in); 53 | opacity: 1; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_spinner.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Spinners 3 | * -------------------------------------------------- 4 | */ 5 | 6 | .spinner { 7 | svg { 8 | width: $spinner-width; 9 | height: $spinner-height; 10 | } 11 | 12 | stroke: $spinner-default-stroke; 13 | fill: $spinner-default-fill; 14 | 15 | &.spinner-light { 16 | stroke: $spinner-light-stroke; 17 | fill: $spinner-light-fill; 18 | } 19 | &.spinner-stable { 20 | stroke: $spinner-stable-stroke; 21 | fill: $spinner-stable-fill; 22 | } 23 | &.spinner-positive { 24 | stroke: $spinner-positive-stroke; 25 | fill: $spinner-positive-fill; 26 | } 27 | &.spinner-calm { 28 | stroke: $spinner-calm-stroke; 29 | fill: $spinner-calm-fill; 30 | } 31 | &.spinner-balanced { 32 | stroke: $spinner-balanced-stroke; 33 | fill: $spinner-balanced-fill; 34 | } 35 | &.spinner-assertive { 36 | stroke: $spinner-assertive-stroke; 37 | fill: $spinner-assertive-fill; 38 | } 39 | &.spinner-energized { 40 | stroke: $spinner-energized-stroke; 41 | fill: $spinner-energized-fill; 42 | } 43 | &.spinner-royal { 44 | stroke: $spinner-royal-stroke; 45 | fill: $spinner-royal-fill; 46 | } 47 | &.spinner-dark { 48 | stroke: $spinner-dark-stroke; 49 | fill: $spinner-dark-fill; 50 | } 51 | } 52 | 53 | .spinner-android { 54 | stroke: #4b8bf4; 55 | } 56 | 57 | .spinner-ios, 58 | .spinner-ios-small { 59 | stroke: #69717d; 60 | } 61 | 62 | .spinner-spiral { 63 | .stop1 { 64 | stop-color: $spinner-light-fill; 65 | stop-opacity: 0; 66 | } 67 | 68 | &.spinner-light { 69 | .stop1 { 70 | stop-color: $spinner-default-fill; 71 | } 72 | .stop2 { 73 | stop-color: $spinner-light-fill; 74 | } 75 | } 76 | &.spinner-stable .stop2 { 77 | stop-color: $spinner-stable-fill; 78 | } 79 | &.spinner-positive .stop2 { 80 | stop-color: $spinner-positive-fill; 81 | } 82 | &.spinner-calm .stop2 { 83 | stop-color: $spinner-calm-fill; 84 | } 85 | &.spinner-balanced .stop2 { 86 | stop-color: $spinner-balanced-fill; 87 | } 88 | &.spinner-assertive .stop2 { 89 | stop-color: $spinner-assertive-fill; 90 | } 91 | &.spinner-energized .stop2 { 92 | stop-color: $spinner-energized-fill; 93 | } 94 | &.spinner-royal .stop2 { 95 | stop-color: $spinner-royal-fill; 96 | } 97 | &.spinner-dark .stop2 { 98 | stop-color: $spinner-dark-fill; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_toggle.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Toggle 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-toggle { 8 | pointer-events: none; 9 | } 10 | 11 | .toggle { 12 | // set the color defaults 13 | @include toggle-style($toggle-on-default-border, $toggle-on-default-bg); 14 | 15 | position: relative; 16 | display: inline-block; 17 | pointer-events: auto; 18 | margin: -$toggle-hit-area-expansion; 19 | padding: $toggle-hit-area-expansion; 20 | 21 | &.dragging { 22 | .handle { 23 | background-color: $toggle-handle-dragging-bg-color !important; 24 | } 25 | } 26 | 27 | } 28 | 29 | .toggle { 30 | &.toggle-light { 31 | @include toggle-style($toggle-on-light-border, $toggle-on-light-bg); 32 | } 33 | &.toggle-stable { 34 | @include toggle-style($toggle-on-stable-border, $toggle-on-stable-bg); 35 | } 36 | &.toggle-positive { 37 | @include toggle-style($toggle-on-positive-border, $toggle-on-positive-bg); 38 | } 39 | &.toggle-calm { 40 | @include toggle-style($toggle-on-calm-border, $toggle-on-calm-bg); 41 | } 42 | &.toggle-assertive { 43 | @include toggle-style($toggle-on-assertive-border, $toggle-on-assertive-bg); 44 | } 45 | &.toggle-balanced { 46 | @include toggle-style($toggle-on-balanced-border, $toggle-on-balanced-bg); 47 | } 48 | &.toggle-energized { 49 | @include toggle-style($toggle-on-energized-border, $toggle-on-energized-bg); 50 | } 51 | &.toggle-royal { 52 | @include toggle-style($toggle-on-royal-border, $toggle-on-royal-bg); 53 | } 54 | &.toggle-dark { 55 | @include toggle-style($toggle-on-dark-border, $toggle-on-dark-bg); 56 | } 57 | } 58 | 59 | .toggle input { 60 | // hide the actual input checkbox 61 | display: none; 62 | } 63 | 64 | /* the track appearance when the toggle is "off" */ 65 | .toggle .track { 66 | @include transition-timing-function(ease-in-out); 67 | @include transition-duration($toggle-transition-duration); 68 | @include transition-property((background-color, border)); 69 | 70 | display: inline-block; 71 | box-sizing: border-box; 72 | width: $toggle-width; 73 | height: $toggle-height; 74 | border: solid $toggle-border-width $toggle-off-border-color; 75 | border-radius: $toggle-border-radius; 76 | background-color: $toggle-off-bg-color; 77 | content: ' '; 78 | cursor: pointer; 79 | pointer-events: none; 80 | } 81 | 82 | /* Fix to avoid background color bleeding */ 83 | /* (occured on (at least) Android 4.2, Asus MeMO Pad HD7 ME173X) */ 84 | .platform-android4_2 .toggle .track { 85 | -webkit-background-clip: padding-box; 86 | } 87 | 88 | /* the handle (circle) thats inside the toggle's track area */ 89 | /* also the handle's appearance when it is "off" */ 90 | .toggle .handle { 91 | @include transition($toggle-transition-duration cubic-bezier(0, 1.1, 1, 1.1)); 92 | @include transition-property((background-color, transform)); 93 | position: absolute; 94 | display: block; 95 | width: $toggle-handle-width; 96 | height: $toggle-handle-height; 97 | border-radius: $toggle-handle-radius; 98 | background-color: $toggle-handle-off-bg-color; 99 | top: $toggle-border-width + $toggle-hit-area-expansion; 100 | left: $toggle-border-width + $toggle-hit-area-expansion; 101 | box-shadow: 0 2px 7px rgba(0,0,0,.35), 0 1px 1px rgba(0,0,0,.15); 102 | 103 | &:before { 104 | // used to create a larger (but hidden) hit area to slide the handle 105 | position: absolute; 106 | top: -4px; 107 | left: ( ($toggle-handle-width / 2) * -1) - 8; 108 | padding: ($toggle-handle-height / 2) + 5 ($toggle-handle-width + 7); 109 | content: " "; 110 | } 111 | } 112 | 113 | .toggle input:checked + .track .handle { 114 | // the handle when the toggle is "on" 115 | @include translate3d($toggle-width - $toggle-handle-width - ($toggle-border-width * 2), 0, 0); 116 | background-color: $toggle-handle-on-bg-color; 117 | } 118 | 119 | .item-toggle.active { 120 | box-shadow: none; 121 | } 122 | 123 | .item-toggle, 124 | .item-toggle.item-complex .item-content { 125 | // make sure list item content have enough padding on right to fit the toggle 126 | padding-right: ($item-padding * 3) + $toggle-width; 127 | } 128 | 129 | .item-toggle.item-complex { 130 | padding-right: 0; 131 | } 132 | 133 | .item-toggle .toggle { 134 | // position the toggle to the right within a list item 135 | position: absolute; 136 | top: ($item-padding / 2) + 2; 137 | right: $item-padding; 138 | z-index: $z-index-item-toggle; 139 | } 140 | 141 | .toggle input:disabled + .track { 142 | opacity: .6; 143 | } 144 | 145 | .toggle-small { 146 | 147 | .track { 148 | border: 0; 149 | width: 34px; 150 | height: 15px; 151 | background: #9e9e9e; 152 | } 153 | input:checked + .track { 154 | background: rgba(0,150,137,.5); 155 | } 156 | .handle { 157 | top: 2px; 158 | left: 4px; 159 | width: 21px; 160 | height: 21px; 161 | box-shadow: 0 2px 5px rgba(0,0,0,.25); 162 | } 163 | input:checked + .track .handle { 164 | @include translate3d(16px, 0, 0); 165 | background: rgb(0,150,137); 166 | } 167 | &.item-toggle .toggle { 168 | top: 19px; 169 | } 170 | 171 | .toggle-light { 172 | @include toggle-small-style($toggle-on-light-bg); 173 | } 174 | .toggle-stable { 175 | @include toggle-small-style($toggle-on-stable-bg); 176 | } 177 | .toggle-positive { 178 | @include toggle-small-style($toggle-on-positive-bg); 179 | } 180 | .toggle-calm { 181 | @include toggle-small-style($toggle-on-calm-bg); 182 | } 183 | .toggle-assertive { 184 | @include toggle-small-style($toggle-on-assertive-bg); 185 | } 186 | .toggle-balanced { 187 | @include toggle-small-style($toggle-on-balanced-bg); 188 | } 189 | .toggle-energized { 190 | @include toggle-small-style($toggle-on-energized-bg); 191 | } 192 | .toggle-royal { 193 | @include toggle-small-style($toggle-on-royal-bg); 194 | } 195 | .toggle-dark { 196 | @include toggle-small-style($toggle-on-dark-bg); 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_transitions.scss: -------------------------------------------------------------------------------- 1 | 2 | // iOS View Transitions 3 | // ------------------------------- 4 | 5 | $ios-transition-duration: 500ms !default; 6 | $ios-transition-timing-function: cubic-bezier(.36, .66, .04, 1) !default; 7 | $ios-transition-container-bg-color: #000 !default; 8 | 9 | 10 | [nav-view-transition="ios"] { 11 | 12 | [nav-view="entering"], 13 | [nav-view="leaving"] { 14 | @include transition-duration( $ios-transition-duration ); 15 | @include transition-timing-function( $ios-transition-timing-function ); 16 | -webkit-transition-property: opacity, -webkit-transform, box-shadow; 17 | transition-property: opacity, transform, box-shadow; 18 | } 19 | 20 | &[nav-view-direction="forward"], 21 | &[nav-view-direction="back"] { 22 | background-color: $ios-transition-container-bg-color; 23 | } 24 | 25 | [nav-view="active"], 26 | &[nav-view-direction="forward"] [nav-view="entering"], 27 | &[nav-view-direction="back"] [nav-view="leaving"] { 28 | z-index: $z-index-view-above; 29 | } 30 | 31 | &[nav-view-direction="back"] [nav-view="entering"], 32 | &[nav-view-direction="forward"] [nav-view="leaving"] { 33 | z-index: $z-index-view-below; 34 | } 35 | 36 | } 37 | 38 | 39 | 40 | // iOS Nav Bar Transitions 41 | // ------------------------------- 42 | 43 | [nav-bar-transition="ios"] { 44 | 45 | .title, 46 | .buttons, 47 | .back-text { 48 | @include transition-duration( $ios-transition-duration ); 49 | @include transition-timing-function( $ios-transition-timing-function ); 50 | -webkit-transition-property: opacity, -webkit-transform; 51 | transition-property: opacity, transform; 52 | } 53 | 54 | [nav-bar="active"], 55 | [nav-bar="entering"] { 56 | z-index: $z-index-bar-above; 57 | 58 | .bar { 59 | background: transparent; 60 | } 61 | } 62 | 63 | [nav-bar="cached"] { 64 | display: block; 65 | 66 | .header-item { 67 | display: none; 68 | } 69 | } 70 | 71 | } 72 | 73 | 74 | 75 | // Android View Transitions 76 | // ------------------------------- 77 | 78 | $android-transition-duration: 200ms !default; 79 | $android-transition-timing-function: cubic-bezier(0.4, 0.6, 0.2, 1) !default; 80 | 81 | 82 | [nav-view-transition="android"] { 83 | 84 | [nav-view="entering"], 85 | [nav-view="leaving"] { 86 | @include transition-duration( $android-transition-duration ); 87 | @include transition-timing-function( $android-transition-timing-function ); 88 | -webkit-transition-property: -webkit-transform; 89 | transition-property: transform; 90 | } 91 | 92 | [nav-view="active"], 93 | &[nav-view-direction="forward"] [nav-view="entering"], 94 | &[nav-view-direction="back"] [nav-view="leaving"] { 95 | z-index: $z-index-view-above; 96 | } 97 | 98 | &[nav-view-direction="back"] [nav-view="entering"], 99 | &[nav-view-direction="forward"] [nav-view="leaving"] { 100 | z-index: $z-index-view-below; 101 | } 102 | 103 | } 104 | 105 | 106 | 107 | // Android Nav Bar Transitions 108 | // ------------------------------- 109 | 110 | [nav-bar-transition="android"] { 111 | 112 | .title, 113 | .buttons { 114 | @include transition-duration( $android-transition-duration ); 115 | @include transition-timing-function( $android-transition-timing-function ); 116 | -webkit-transition-property: opacity; 117 | transition-property: opacity; 118 | } 119 | 120 | [nav-bar="active"], 121 | [nav-bar="entering"] { 122 | z-index: $z-index-bar-above; 123 | 124 | .bar { 125 | background: transparent; 126 | } 127 | } 128 | 129 | [nav-bar="cached"] { 130 | display: block; 131 | 132 | .header-item { 133 | display: none; 134 | } 135 | } 136 | 137 | } 138 | 139 | 140 | 141 | // Nav Swipe 142 | // ------------------------------- 143 | 144 | [nav-swipe="fast"] { 145 | [nav-view], 146 | .title, 147 | .buttons, 148 | .back-text { 149 | @include transition-duration(50ms); 150 | @include transition-timing-function(linear); 151 | } 152 | } 153 | 154 | [nav-swipe="slow"] { 155 | [nav-view], 156 | .title, 157 | .buttons, 158 | .back-text { 159 | @include transition-duration(160ms); 160 | @include transition-timing-function(linear); 161 | } 162 | } 163 | 164 | 165 | 166 | // Transition Settings 167 | // ------------------------------- 168 | 169 | [nav-view="cached"], 170 | [nav-bar="cached"] { 171 | display: none; 172 | } 173 | 174 | [nav-view="stage"] { 175 | opacity: 0; 176 | @include transition-duration( 0 ); 177 | } 178 | 179 | [nav-bar="stage"] { 180 | .title, 181 | .buttons, 182 | .back-text { 183 | position: absolute; 184 | opacity: 0; 185 | @include transition-duration(0s); 186 | } 187 | } 188 | 189 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_type.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Typography 4 | * -------------------------------------------------- 5 | */ 6 | 7 | 8 | // Body text 9 | // ------------------------- 10 | 11 | p { 12 | margin: 0 0 ($line-height-computed / 2); 13 | } 14 | 15 | 16 | // Emphasis & misc 17 | // ------------------------- 18 | 19 | small { font-size: 85%; } 20 | cite { font-style: normal; } 21 | 22 | 23 | // Alignment 24 | // ------------------------- 25 | 26 | .text-left { text-align: left; } 27 | .text-right { text-align: right; } 28 | .text-center { text-align: center; } 29 | 30 | 31 | // Headings 32 | // ------------------------- 33 | 34 | h1, h2, h3, h4, h5, h6, 35 | .h1, .h2, .h3, .h4, .h5, .h6 { 36 | color: $base-color; 37 | font-weight: $headings-font-weight; 38 | font-family: $headings-font-family; 39 | line-height: $headings-line-height; 40 | 41 | small { 42 | font-weight: normal; 43 | line-height: 1; 44 | } 45 | } 46 | 47 | h1, .h1, 48 | h2, .h2, 49 | h3, .h3 { 50 | margin-top: $line-height-computed; 51 | margin-bottom: ($line-height-computed / 2); 52 | 53 | &:first-child { 54 | margin-top: 0; 55 | } 56 | 57 | + h1, + .h1, 58 | + h2, + .h2, 59 | + h3, + .h3 { 60 | margin-top: ($line-height-computed / 2); 61 | } 62 | } 63 | 64 | h4, .h4, 65 | h5, .h5, 66 | h6, .h6 { 67 | margin-top: ($line-height-computed / 2); 68 | margin-bottom: ($line-height-computed / 2); 69 | } 70 | 71 | h1, .h1 { font-size: floor($font-size-base * 2.60); } // ~36px 72 | h2, .h2 { font-size: floor($font-size-base * 2.15); } // ~30px 73 | h3, .h3 { font-size: ceil($font-size-base * 1.70); } // ~24px 74 | h4, .h4 { font-size: ceil($font-size-base * 1.25); } // ~18px 75 | h5, .h5 { font-size: $font-size-base; } 76 | h6, .h6 { font-size: ceil($font-size-base * 0.85); } // ~12px 77 | 78 | h1 small, .h1 small { font-size: ceil($font-size-base * 1.70); } // ~24px 79 | h2 small, .h2 small { font-size: ceil($font-size-base * 1.25); } // ~18px 80 | h3 small, .h3 small, 81 | h4 small, .h4 small { font-size: $font-size-base; } 82 | 83 | 84 | // Description Lists 85 | // ------------------------- 86 | 87 | dl { 88 | margin-bottom: $line-height-computed; 89 | } 90 | dt, 91 | dd { 92 | line-height: $line-height-base; 93 | } 94 | dt { 95 | font-weight: bold; 96 | } 97 | 98 | 99 | // Blockquotes 100 | // ------------------------- 101 | 102 | blockquote { 103 | margin: 0 0 $line-height-computed; 104 | padding: ($line-height-computed / 2) $line-height-computed; 105 | border-left: 5px solid gray; 106 | 107 | p { 108 | font-weight: 300; 109 | font-size: ($font-size-base * 1.25); 110 | line-height: 1.25; 111 | } 112 | 113 | p:last-child { 114 | margin-bottom: 0; 115 | } 116 | 117 | small { 118 | display: block; 119 | line-height: $line-height-base; 120 | &:before { 121 | content: '\2014 \00A0';// EM DASH, NBSP; 122 | } 123 | } 124 | } 125 | 126 | 127 | // Quotes 128 | // ------------------------- 129 | 130 | q:before, 131 | q:after, 132 | blockquote:before, 133 | blockquote:after { 134 | content: ""; 135 | } 136 | 137 | 138 | // Addresses 139 | // ------------------------- 140 | 141 | address { 142 | display: block; 143 | margin-bottom: $line-height-computed; 144 | font-style: normal; 145 | line-height: $line-height-base; 146 | } 147 | 148 | 149 | // Links 150 | // ------------------------- 151 | 152 | a.subdued { 153 | padding-right: 10px; 154 | color: #888; 155 | text-decoration: none; 156 | 157 | &:hover { 158 | text-decoration: none; 159 | } 160 | &:last-child { 161 | padding-right: 0; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/_util.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Utility Classes 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .hide { 8 | display: none; 9 | } 10 | .opacity-hide { 11 | opacity: 0; 12 | } 13 | .grade-b .opacity-hide, 14 | .grade-c .opacity-hide { 15 | opacity: 1; 16 | display: none; 17 | } 18 | .show { 19 | display: block; 20 | } 21 | .opacity-show { 22 | opacity: 1; 23 | } 24 | .invisible { 25 | visibility: hidden; 26 | } 27 | 28 | .keyboard-open .hide-on-keyboard-open { 29 | display: none; 30 | } 31 | 32 | .keyboard-open .tabs.hide-on-keyboard-open + .pane .has-tabs, 33 | .keyboard-open .bar-footer.hide-on-keyboard-open + .pane .has-footer { 34 | bottom: 0; 35 | } 36 | 37 | .inline { 38 | display: inline-block; 39 | } 40 | 41 | .disable-pointer-events { 42 | pointer-events: none; 43 | } 44 | 45 | .enable-pointer-events { 46 | pointer-events: auto; 47 | } 48 | 49 | .disable-user-behavior { 50 | // used to prevent the browser from doing its native behavior. this doesnt 51 | // prevent the scrolling, but cancels the contextmenu, tap highlighting, etc 52 | 53 | @include user-select(none); 54 | @include touch-callout(none); 55 | @include tap-highlight-transparent(); 56 | 57 | -webkit-user-drag: none; 58 | 59 | -ms-touch-action: none; 60 | -ms-content-zooming: none; 61 | } 62 | 63 | // Fill the screen to block clicks (a better pointer-events: none) for the body 64 | // to avoid full-page reflows and paints which can cause flickers 65 | .click-block { 66 | position: absolute; 67 | top: 0; 68 | right: 0; 69 | bottom: 0; 70 | left: 0; 71 | opacity: 0; 72 | z-index: $z-index-click-block; 73 | @include translate3d(0, 0, 0); 74 | overflow: hidden; 75 | } 76 | .click-block-hide { 77 | @include translate3d(-9999px, 0, 0); 78 | } 79 | 80 | .no-resize { 81 | resize: none; 82 | } 83 | 84 | .block { 85 | display: block; 86 | clear: both; 87 | &:after { 88 | display: block; 89 | visibility: hidden; 90 | clear: both; 91 | height: 0; 92 | content: "."; 93 | } 94 | } 95 | 96 | .full-image { 97 | width: 100%; 98 | } 99 | 100 | .clearfix { 101 | *zoom: 1; 102 | &:before, 103 | &:after { 104 | display: table; 105 | content: ""; 106 | // Fixes Opera/contenteditable bug: 107 | // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952 108 | line-height: 0; 109 | } 110 | &:after { 111 | clear: both; 112 | } 113 | } 114 | 115 | /** 116 | * Content Padding 117 | * -------------------------------------------------- 118 | */ 119 | 120 | .padding { 121 | padding: $content-padding; 122 | } 123 | 124 | .padding-top, 125 | .padding-vertical { 126 | padding-top: $content-padding; 127 | } 128 | 129 | .padding-right, 130 | .padding-horizontal { 131 | padding-right: $content-padding; 132 | } 133 | 134 | .padding-bottom, 135 | .padding-vertical { 136 | padding-bottom: $content-padding; 137 | } 138 | 139 | .padding-left, 140 | .padding-horizontal { 141 | padding-left: $content-padding; 142 | } 143 | 144 | 145 | /** 146 | * Scrollable iFrames 147 | * -------------------------------------------------- 148 | */ 149 | 150 | .iframe-wrapper { 151 | position: fixed; 152 | -webkit-overflow-scrolling: touch; 153 | overflow: scroll; 154 | 155 | iframe { 156 | height: 100%; 157 | width: 100%; 158 | } 159 | } 160 | 161 | 162 | /** 163 | * Rounded 164 | * -------------------------------------------------- 165 | */ 166 | 167 | .rounded { 168 | border-radius: $border-radius-base; 169 | } 170 | 171 | 172 | /** 173 | * Utility Colors 174 | * -------------------------------------------------- 175 | * Utility colors are added to help set a naming convention. You'll 176 | * notice we purposely do not use words like "red" or "blue", but 177 | * instead have colors which represent an emotion or generic theme. 178 | */ 179 | 180 | .light, a.light { 181 | color: $light; 182 | } 183 | .light-bg { 184 | background-color: $light; 185 | } 186 | .light-border { 187 | border-color: $button-light-border; 188 | } 189 | 190 | .stable, a.stable { 191 | color: $stable; 192 | } 193 | .stable-bg { 194 | background-color: $stable; 195 | } 196 | .stable-border { 197 | border-color: $button-stable-border; 198 | } 199 | 200 | .positive, a.positive { 201 | color: $positive; 202 | } 203 | .positive-bg { 204 | background-color: $positive; 205 | } 206 | .positive-border { 207 | border-color: $button-positive-border; 208 | } 209 | 210 | .calm, a.calm { 211 | color: $calm; 212 | } 213 | .calm-bg { 214 | background-color: $calm; 215 | } 216 | .calm-border { 217 | border-color: $button-calm-border; 218 | } 219 | 220 | .assertive, a.assertive { 221 | color: $assertive; 222 | } 223 | .assertive-bg { 224 | background-color: $assertive; 225 | } 226 | .assertive-border { 227 | border-color: $button-assertive-border; 228 | } 229 | 230 | .balanced, a.balanced { 231 | color: $balanced; 232 | } 233 | .balanced-bg { 234 | background-color: $balanced; 235 | } 236 | .balanced-border { 237 | border-color: $button-balanced-border; 238 | } 239 | 240 | .energized, a.energized { 241 | color: $energized; 242 | } 243 | .energized-bg { 244 | background-color: $energized; 245 | } 246 | .energized-border { 247 | border-color: $button-energized-border; 248 | } 249 | 250 | .royal, a.royal { 251 | color: $royal; 252 | } 253 | .royal-bg { 254 | background-color: $royal; 255 | } 256 | .royal-border { 257 | border-color: $button-royal-border; 258 | } 259 | 260 | .dark, a.dark { 261 | color: $dark; 262 | } 263 | .dark-bg { 264 | background-color: $dark; 265 | } 266 | .dark-border { 267 | border-color: $button-dark-border; 268 | } 269 | 270 | [collection-repeat] { 271 | /* Position is set by transforms */ 272 | left: 0 !important; 273 | top: 0 !important; 274 | position: absolute !important; 275 | z-index: 1; 276 | } 277 | .collection-repeat-container { 278 | position: relative; 279 | z-index: 1; //make sure it's above the after-container 280 | } 281 | .collection-repeat-after-container { 282 | z-index: 0; 283 | display: block; 284 | 285 | /* when scrolling horizontally, make sure the after container doesn't take up 100% width */ 286 | &.horizontal { 287 | display: inline-block; 288 | } 289 | } 290 | 291 | // ng-show fix for windows phone 292 | // https://www.hoessl.eu/2014/12/on-using-the-ionic-framework-for-windows-phone-8-1-apps/ 293 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, 294 | .x-ng-cloak, .ng-hide:not(.ng-hide-animate) { 295 | display: none !important; 296 | } -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/ionic.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @import 4 | // Ionicons 5 | "ionicons/ionicons.scss", 6 | 7 | // Variables 8 | "mixins", 9 | "variables", 10 | 11 | // Base 12 | "reset", 13 | "scaffolding", 14 | "type", 15 | 16 | // Components 17 | "action-sheet", 18 | "backdrop", 19 | "bar", 20 | "tabs", 21 | "menu", 22 | "modal", 23 | "popover", 24 | "popup", 25 | "loading", 26 | "items", 27 | "list", 28 | "badge", 29 | "slide-box", 30 | "refresher", 31 | "spinner", 32 | 33 | // Forms 34 | "form", 35 | "checkbox", 36 | "toggle", 37 | "radio", 38 | "range", 39 | "select", 40 | "progress", 41 | 42 | // Buttons 43 | "button", 44 | "button-bar", 45 | 46 | // Util 47 | "grid", 48 | "util", 49 | "platform", 50 | 51 | // Animations 52 | "animations", 53 | "transitions"; 54 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/ionicons/_ionicons-font.scss: -------------------------------------------------------------------------------- 1 | // Ionicons Font Path 2 | // -------------------------- 3 | 4 | @font-face { 5 | font-family: $ionicons-font-family; 6 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}"); 7 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix") format("embedded-opentype"), 8 | url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"), 9 | url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"), 10 | url("#{$ionicons-font-path}/ionicons.woff") format("woff"), /* for WP8 */ 11 | url("#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons") format("svg"); 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | 16 | .ion { 17 | display: inline-block; 18 | font-family: $ionicons-font-family; 19 | speak: none; 20 | font-style: normal; 21 | font-weight: normal; 22 | font-variant: normal; 23 | text-transform: none; 24 | text-rendering: auto; 25 | line-height: 1; 26 | -webkit-font-smoothing: antialiased; 27 | -moz-osx-font-smoothing: grayscale; 28 | } 29 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/scss/ionicons/ionicons.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "ionicons-variables"; 3 | /*! 4 | Ionicons, v2.0.1 5 | Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ 6 | https://twitter.com/benjsperry https://twitter.com/ionicframework 7 | MIT License: https://github.com/driftyco/ionicons 8 | 9 | Android-style icons originally built by Google’s 10 | Material Design Icons: https://github.com/google/material-design-icons 11 | used under CC BY http://creativecommons.org/licenses/by/4.0/ 12 | Modified icons to fit ionicon’s grid from original. 13 | */ 14 | 15 | @import "ionicons-font"; 16 | @import "ionicons-icons"; 17 | -------------------------------------------------------------------------------- /ionic/www/lib/ionic/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.1", 3 | "codename": "vanadium-vaquita", 4 | "date": "2015-06-30", 5 | "time": "16:26:56" 6 | } 7 | -------------------------------------------------------------------------------- /ionic/www/templates/tab-about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

cordova-plugin-wechat

4 |

5 | See cordova-plugin-wechat 6 |

7 |
8 |
9 | -------------------------------------------------------------------------------- /ionic/www/templates/tab-demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 分享场景: {{data.selectedSceneLabel}} 7 |
8 | 9 | 10 | {{scene.label}} 11 | 12 | 13 |
功能
14 | 15 |
16 | {{button.label}} 17 |
18 |
19 | 20 |
21 |
22 | -------------------------------------------------------------------------------- /ionic/www/templates/tabs.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ionic2/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /ionic2/.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | 15 | .idea/ 16 | .sass-cache/ 17 | .tmp/ 18 | .versions/ 19 | coverage/ 20 | dist/ 21 | node_modules/ 22 | tmp/ 23 | temp/ 24 | hooks/ 25 | platforms/ 26 | plugins/ 27 | plugins/android.json 28 | plugins/ios.json 29 | www/ 30 | $RECYCLE.BIN/ 31 | 32 | .DS_Store 33 | Thumbs.db 34 | UserInterfaceState.xcuserstate 35 | -------------------------------------------------------------------------------- /ionic2/README.md: -------------------------------------------------------------------------------- 1 | # A demo application built on Ionic2 2 | 3 | See [cordova-plugin-wechat](https://github.com/xu-li/cordova-plugin-wechat) 4 | 5 | ![APP Screenshot](https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/master/assets/screenshot-3.png) 6 | 7 | ## How to run 8 | 9 | 1. ```ionic cordova plugin add cordova-plugin-wechat --variable wechatappid=wx4a525790c75c494f``` 10 | 2. ```ionic cordova platform add ios```/```ionic cordova platform add android``` 11 | 3. ```ionic cordova run ios```/```ionic cordova run android``` 12 | 13 | -------------------------------------------------------------------------------- /ionic2/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Cordova Wechat Plugin Demo 4 | A simple Ionic project to demostrate how to use cordova.plugin.wechat plugin. 5 | Xu Li 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ionic2/ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Cordova Wechat Plugin Demo", 3 | "app_id": "xu.li.test.cordova.plugin.wechat", 4 | "type": "ionic-angular" 5 | } 6 | -------------------------------------------------------------------------------- /ionic2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Cordova Wechat Plugin Demo", 3 | "version": "2.0.0", 4 | "author": "xu.li", 5 | "homepage": "https://github.com/xu-li/cordova-plugin-wechat", 6 | "private": true, 7 | "scripts": { 8 | "clean": "ionic-app-scripts clean", 9 | "build": "ionic-app-scripts build", 10 | "lint": "ionic-app-scripts lint", 11 | "ionic:build": "ionic-app-scripts build", 12 | "ionic:serve": "ionic-app-scripts serve" 13 | }, 14 | "dependencies": { 15 | "@angular/common": "4.1.3", 16 | "@angular/compiler": "4.1.3", 17 | "@angular/compiler-cli": "4.1.3", 18 | "@angular/core": "4.1.3", 19 | "@angular/forms": "4.1.3", 20 | "@angular/http": "4.1.3", 21 | "@angular/platform-browser": "4.1.3", 22 | "@angular/platform-browser-dynamic": "4.1.3", 23 | "@ionic-native/core": "3.12.1", 24 | "@ionic-native/splash-screen": "3.12.1", 25 | "@ionic-native/status-bar": "3.12.1", 26 | "@ionic/storage": "2.0.1", 27 | "cordova-plugin-console": "^1.0.5", 28 | "cordova-plugin-device": "^1.1.4", 29 | "cordova-plugin-splashscreen": "^4.0.3", 30 | "cordova-plugin-statusbar": "^2.2.2", 31 | "cordova-plugin-whitelist": "^1.3.1", 32 | "ionic-angular": "3.5.0", 33 | "ionic-plugin-keyboard": "^2.2.1", 34 | "ionicons": "3.0.0", 35 | "rxjs": "5.4.0", 36 | "sw-toolbox": "3.6.0", 37 | "zone.js": "0.8.12" 38 | }, 39 | "devDependencies": { 40 | "@ionic/app-scripts": "1.3.12", 41 | "@ionic/cli-plugin-cordova": "1.4.0", 42 | "@ionic/cli-plugin-ionic-angular": "1.3.1", 43 | "typescript": "2.3.4" 44 | }, 45 | "description": "A simple Ionic project to demostrate how to use cordova.plugin.wechat plugin.", 46 | "cordova": { 47 | "plugins": { 48 | "cordova-plugin-console": {}, 49 | "cordova-plugin-device": {}, 50 | "cordova-plugin-splashscreen": {}, 51 | "cordova-plugin-statusbar": {}, 52 | "cordova-plugin-whitelist": {}, 53 | "ionic-plugin-keyboard": {} 54 | }, 55 | "platforms": [] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ionic2/resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /ionic2/resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /ionic2/resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /ionic2/resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /ionic2/resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /ionic2/resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /ionic2/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/icon.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-40@3x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /ionic2/resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Landscape@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Landscape@~ipadpro.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Portrait@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Portrait@~ipadpro.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /ionic2/resources/ios/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/ios/splash/Default~iphone.png -------------------------------------------------------------------------------- /ionic2/resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/resources/splash.png -------------------------------------------------------------------------------- /ionic2/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Platform } from 'ionic-angular'; 3 | import { StatusBar } from '@ionic-native/status-bar'; 4 | import { SplashScreen } from '@ionic-native/splash-screen'; 5 | 6 | import { TabsPage } from '../pages/tabs/tabs'; 7 | 8 | @Component({ 9 | templateUrl: 'app.html' 10 | }) 11 | export class MyApp { 12 | rootPage:any = TabsPage; 13 | 14 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 15 | platform.ready().then(() => { 16 | // Okay, so the platform is ready and our plugins are available. 17 | // Here you can do any higher level native things you might need. 18 | statusBar.styleDefault(); 19 | splashScreen.hide(); 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ionic2/src/app/app.definition.ts: -------------------------------------------------------------------------------- 1 | interface Window { 2 | Wechat: any 3 | } -------------------------------------------------------------------------------- /ionic2/src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ionic2/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, ErrorHandler } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; 4 | import { MyApp } from './app.component'; 5 | 6 | import { AboutPage } from '../pages/about/about'; 7 | import { HomePage } from '../pages/home/home'; 8 | import { TabsPage } from '../pages/tabs/tabs'; 9 | 10 | import { DataService } from './services/data.service'; 11 | import { WechatService } from './services/wechat.service'; 12 | 13 | import { StatusBar } from '@ionic-native/status-bar'; 14 | import { SplashScreen } from '@ionic-native/splash-screen'; 15 | 16 | @NgModule({ 17 | declarations: [ 18 | MyApp, 19 | AboutPage, 20 | HomePage, 21 | TabsPage 22 | ], 23 | imports: [ 24 | BrowserModule, 25 | IonicModule.forRoot(MyApp) 26 | ], 27 | bootstrap: [IonicApp], 28 | entryComponents: [ 29 | MyApp, 30 | AboutPage, 31 | HomePage, 32 | TabsPage 33 | ], 34 | providers: [ 35 | StatusBar, 36 | SplashScreen, 37 | {provide: ErrorHandler, useClass: IonicErrorHandler}, 38 | DataService, 39 | WechatService 40 | ] 41 | }) 42 | export class AppModule {} 43 | -------------------------------------------------------------------------------- /ionic2/src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/v2/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | -------------------------------------------------------------------------------- /ionic2/src/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /ionic2/src/app/services/data.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | const Scenes = [ 4 | { 5 | label: "会话", 6 | value: 0 7 | }, 8 | { 9 | label: "朋友圈", 10 | value: 1 11 | }, 12 | { 13 | label: "收藏", 14 | value: 2 15 | } 16 | ]; 17 | 18 | const Buttons = [ 19 | { 20 | id: "check-installed", 21 | label: "是否安装了微信" 22 | }, 23 | { 24 | id: "send-text", 25 | label: "发送Text消息给微信" 26 | }, 27 | { 28 | id: "send-photo-local", 29 | label: "发送Photo消息给微信(本地图片)" 30 | }, 31 | { 32 | id: "send-photo-remote", 33 | label: "发送Photo消息给微信(远程图片)" 34 | }, 35 | { 36 | id: "send-link-thumb-local", 37 | label: "发送Link消息给微信(本地缩略图)" 38 | }, 39 | { 40 | id: "send-link-thumb-remote", 41 | label: "发送Link消息给微信(远程缩略图)" 42 | }, 43 | { 44 | id: "send-music", 45 | label: "发送Music消息给微信" 46 | }, 47 | { 48 | id: "send-video", 49 | label: "发送Video消息给微信" 50 | }, 51 | { 52 | id: "send-app", 53 | label: "发送App消息给微信" 54 | }, 55 | { 56 | id: "send-nongif", 57 | label: "发送非gif消息给微信" 58 | }, 59 | { 60 | id: "send-gif", 61 | label: "发送gif消息给微信" 62 | }, 63 | { 64 | id: "send-file", 65 | label: "发送文件消息给微信" 66 | }, 67 | { 68 | id: "auth", 69 | label: "微信授权登录" 70 | }, 71 | { 72 | id: "test-url", 73 | label: "测试URL长度" 74 | }, 75 | { 76 | id: "open-profile", 77 | label: "打开Profile" 78 | }, 79 | 80 | { 81 | id: "open-mp", 82 | label: "打开mp网页" 83 | }, 84 | { 85 | id: "add-card", 86 | label: "添加单张卡券至卡包" 87 | }, 88 | { 89 | id: "add-cards", 90 | label: "添加多张卡券至卡包" 91 | } 92 | ]; 93 | 94 | @Injectable() 95 | export class DataService { 96 | 97 | getScenes() { 98 | return Scenes; 99 | } 100 | 101 | getButtons() { 102 | return Buttons; 103 | } 104 | 105 | } 106 | 107 | -------------------------------------------------------------------------------- /ionic2/src/app/services/wechat.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class WechatService { 5 | 6 | share(scene, id) { 7 | if (typeof window.Wechat === "undefined") { 8 | alert("Wechat plugin is not installed."); 9 | return false; 10 | } 11 | 12 | let params:any = { 13 | scene: scene 14 | }; 15 | 16 | if (id == 'send-text') { 17 | params.text = "人文的东西并不是体现在你看得到的方面,它更多的体现在你看不到的那些方面,它会影响每一个功能,这才是最本质的。但是,对这点可能很多人没有思考过,以为人文的东西就是我们搞一个很小清新的图片什么的。”综合来看,人文的东西其实是贯穿整个产品的脉络,或者说是它的灵魂所在。"; 18 | } else { 19 | params.message = { 20 | title: "[TEST]" + id, 21 | description: "[TEST]Sending from test application", 22 | mediaTagName: "TEST-TAG-001", 23 | messageExt: "这是第三方带的测试字段", 24 | messageAction: "dotalist", 25 | media: {} 26 | }; 27 | 28 | switch (id) { 29 | case 'check-installed': 30 | window.Wechat.isInstalled(function (installed) { 31 | alert("Wechat installed: " + (installed ? "Yes" : "No")); 32 | }); 33 | return true; 34 | 35 | case 'send-photo-local': 36 | params.message.media.type = window.Wechat.Type.IMAGE; 37 | params.message.media.image = "www/assets/img/res1.jpg"; 38 | break; 39 | 40 | case 'send-photo-remote': 41 | params.message.media.type = window.Wechat.Type.IMAGE; 42 | params.message.media.image = "https://cordova.apache.org/images/cordova_256.png"; 43 | break; 44 | 45 | case 'send-link-thumb-local': 46 | params.message.title = "专访张小龙:产品之上的世界观"; 47 | params.message.description = "微信的平台化发展方向是否真的会让这个原本简洁的产品变得臃肿?在国际化发展方向上,微信面临的问题真的是文化差异壁垒吗?腾讯高级副总裁、微信产品负责人张小龙给出了自己的回复。"; 48 | params.message.thumb = "www/assets/img/res2.png"; 49 | params.message.media.type = window.Wechat.Type.LINK; 50 | params.message.media.webpageUrl = "http://tech.qq.com/"; 51 | break; 52 | 53 | case 'send-link-thumb-remote': 54 | params.message.title = "专访张小龙:产品之上的世界观"; 55 | params.message.description = "微信的平台化发展方向是否真的会让这个原本简洁的产品变得臃肿?在国际化发展方向上,微信面临的问题真的是文化差异壁垒吗?腾讯高级副总裁、微信产品负责人张小龙给出了自己的回复。"; 56 | params.message.thumb = "https://cordova.apache.org/images/cordova_256.png"; 57 | params.message.media.type = window.Wechat.Type.LINK; 58 | params.message.media.webpageUrl = "http://tech.qq.com/"; 59 | break; 60 | 61 | case 'send-music': 62 | params.message.title = "一无所有"; 63 | params.message.description = "崔健"; 64 | params.message.thumb = "www/assets/img/res3.jpg"; 65 | params.message.media.type = window.Wechat.Type.MUSIC; 66 | params.message.media.musicUrl = "http://y.qq.com/i/song.html#p=7B22736F6E675F4E616D65223A22E4B880E697A0E68980E69C89222C22736F6E675F5761704C69766555524C223A22687474703A2F2F74736D7573696334382E74632E71712E636F6D2F586B30305156342F4141414130414141414E5430577532394D7A59344D7A63774D4C6735586A4C517747335A50676F47443864704151526643473444442F4E653765776B617A733D2F31303130333334372E6D34613F7569643D3233343734363930373526616D703B63743D3026616D703B636869643D30222C22736F6E675F5769666955524C223A22687474703A2F2F73747265616D31342E71716D757369632E71712E636F6D2F33303130333334372E6D7033222C226E657454797065223A2277696669222C22736F6E675F416C62756D223A22E4B880E697A0E68980E69C89222C22736F6E675F4944223A3130333334372C22736F6E675F54797065223A312C22736F6E675F53696E676572223A22E5B494E581A5222C22736F6E675F576170446F776E4C6F616455524C223A22687474703A2F2F74736D757369633132382E74632E71712E636F6D2F586C464E4D313574414141416A41414141477A4C36445039536A457A525467304E7A38774E446E752B6473483833344843756B5041576B6D48316C4A434E626F4D34394E4E7A754450444A647A7A45304F513D3D2F33303130333334372E6D70333F7569643D3233343734363930373526616D703B63743D3026616D703B636869643D3026616D703B73747265616D5F706F733D35227D"; 67 | params.message.media.musicDataUrl = "http://stream20.qqmusic.qq.com/32464723.mp3"; 68 | break; 69 | 70 | case 'send-video': 71 | params.message.title = "乔布斯访谈"; 72 | params.message.description = "饿着肚皮,傻逼着。"; 73 | params.message.thumb = "www/assets/img/res7.png"; 74 | params.message.media.type = window.Wechat.Type.VIDEO; 75 | params.message.media.videoUrl = "http://v.youku.com/v_show/id_XNTUxNDY1NDY4.html"; 76 | break; 77 | 78 | case 'send-app': 79 | params.message.title = "App消息"; 80 | params.message.description = "这种消息只有App自己才能理解,由App指定打开方式!"; 81 | params.message.thumb = "www/assets/img/res2.jpg"; 82 | params.message.media.type = window.Wechat.Type.APP; 83 | params.message.media.extInfo = "extend info"; 84 | params.message.media.url = "http://weixin.qq.com"; 85 | break; 86 | 87 | case 'send-nongif': 88 | params.message.thumb = "www/assets/img/res5thumb.png"; 89 | params.message.media.type = window.Wechat.Type.EMOTION; 90 | params.message.media.emotion = "www/assets/img/res5.jpg"; 91 | break; 92 | 93 | case 'send-gif': 94 | params.message.thumb = "www/assets/img/res6thumb.png"; 95 | params.message.media.type = window.Wechat.Type.EMOTION; 96 | params.message.media.emotion = "www/assets/img/res6.gif"; 97 | break; 98 | 99 | case 'send-file': 100 | params.message.title = "iphone4.pdf"; 101 | params.message.description = "Pro CoreData"; 102 | params.message.thumb = "www/assets/img/res2.jpg"; 103 | params.message.media.type = window.Wechat.Type.FILE; 104 | params.message.media.file = "www/assets/resources/iphone4.pdf"; 105 | break; 106 | 107 | case 'auth': 108 | window.Wechat.auth("snsapi_userinfo", function (response) { 109 | // you may use response.code to get the access token. 110 | alert(JSON.stringify(response)); 111 | }, function (reason) { 112 | alert("Failed: " + reason); 113 | }); 114 | return true; 115 | 116 | default: 117 | alert(id + " can not be recognized!"); 118 | return false; 119 | } 120 | } 121 | 122 | window.Wechat.share(params, function () { 123 | alert("Success"); 124 | }, function (reason) { 125 | alert("Failed: " + reason); 126 | }); 127 | 128 | return true; 129 | } 130 | } -------------------------------------------------------------------------------- /ionic2/src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xu-li/cordova-plugin-wechat-example/dddc3f6b5c3456e1d2d2321fd75149fb018c14b0/ionic2/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /ionic2/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ionic App 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ionic2/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ionic", 3 | "short_name": "Ionic", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /ionic2/src/pages/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | About 5 | 6 | 7 | 8 | 9 | 10 |

cordova-plugin-wechat

11 |

12 | See cordova-plugin-wechat 13 |

14 |
15 | -------------------------------------------------------------------------------- /ionic2/src/pages/about/about.scss: -------------------------------------------------------------------------------- 1 | page-about { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ionic2/src/pages/about/about.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-about', 6 | templateUrl: 'about.html' 7 | }) 8 | export class AboutPage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ionic2/src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Home 4 | 5 | 6 | 7 | 8 | 9 | 10 | 分享场景: {{ selectedScene.label }} 11 | 12 | {{ scene.label }} 13 | 14 | 15 | 功能 16 | 17 | {{ button.label }} 18 | 19 | -------------------------------------------------------------------------------- /ionic2/src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | page-home { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ionic2/src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | import { DataService } from '../../app/services/data.service'; 5 | import { WechatService } from '../../app/services/wechat.service'; 6 | 7 | 8 | @Component({ 9 | selector: 'page-home', 10 | templateUrl: 'home.html' 11 | }) 12 | export class HomePage { 13 | 14 | scenes = []; 15 | buttons = []; 16 | 17 | selectedScene = null; 18 | 19 | constructor( 20 | public navCtrl: NavController, 21 | public dataService: DataService, 22 | public wechatService: WechatService) { 23 | 24 | this.scenes = dataService.getScenes(); 25 | this.buttons = dataService.getButtons(); 26 | 27 | this.selectedScene = this.scenes[0]; 28 | } 29 | 30 | sceneSelected(scene) { 31 | this.selectedScene = scene; 32 | } 33 | 34 | buttonClicked(button) { 35 | this.wechatService.share(this.selectedScene.value, button.id); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ionic2/src/pages/tabs/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ionic2/src/pages/tabs/tabs.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { AboutPage } from '../about/about'; 4 | import { HomePage } from '../home/home'; 5 | 6 | @Component({ 7 | templateUrl: 'tabs.html' 8 | }) 9 | export class TabsPage { 10 | 11 | tab1Root = HomePage; 12 | tab2Root = AboutPage; 13 | 14 | constructor() { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ionic2/src/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check out https://googlechrome.github.io/sw-toolbox/ for 3 | * more info on how to use sw-toolbox to custom configure your service worker. 4 | */ 5 | 6 | 7 | 'use strict'; 8 | importScripts('./build/sw-toolbox.js'); 9 | 10 | self.toolbox.options.cache = { 11 | name: 'ionic-cache' 12 | }; 13 | 14 | // pre-cache our key assets 15 | self.toolbox.precache( 16 | [ 17 | './build/main.js', 18 | './build/main.css', 19 | './build/polyfills.js', 20 | 'index.html', 21 | 'manifest.json' 22 | ] 23 | ); 24 | 25 | // dynamically cache any other local assets 26 | self.toolbox.router.any('/*', self.toolbox.cacheFirst); 27 | 28 | // for any other requests go to the network, cache, 29 | // and then only use that cached resource if your user goes offline 30 | self.toolbox.router.default = self.toolbox.networkFirst; 31 | -------------------------------------------------------------------------------- /ionic2/src/theme/variables.scss: -------------------------------------------------------------------------------- 1 | // Ionic Variables and Theming. For more info, please see: 2 | // http://ionicframework.com/docs/v2/theming/ 3 | 4 | // Font path is used to include ionicons, 5 | // roboto, and noto sans fonts 6 | $font-path: "../assets/fonts"; 7 | 8 | 9 | // The app direction is used to include 10 | // rtl styles in your app. For more info, please see: 11 | // http://ionicframework.com/docs/theming/rtl-support/ 12 | $app-direction: ltr; 13 | 14 | 15 | @import "ionic.globals"; 16 | 17 | 18 | // Shared Variables 19 | // -------------------------------------------------- 20 | // To customize the look and feel of this app, you can override 21 | // the Sass variables found in Ionic's source scss files. 22 | // To view all the possible Ionic variables, see: 23 | // http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/ 24 | 25 | 26 | 27 | 28 | // Named Color Variables 29 | // -------------------------------------------------- 30 | // Named colors makes it easy to reuse colors on various components. 31 | // It's highly recommended to change the default colors 32 | // to match your app's branding. Ionic uses a Sass map of 33 | // colors so you can add, rename and remove colors as needed. 34 | // The "primary" color is the only required color in the map. 35 | 36 | $colors: ( 37 | primary: #488aff, 38 | secondary: #32db64, 39 | danger: #f53d3d, 40 | light: #f4f4f4, 41 | dark: #222 42 | ); 43 | 44 | 45 | // App iOS Variables 46 | // -------------------------------------------------- 47 | // iOS only Sass variables can go here 48 | 49 | 50 | 51 | 52 | // App Material Design Variables 53 | // -------------------------------------------------- 54 | // Material Design only Sass variables can go here 55 | 56 | 57 | 58 | 59 | // App Windows Variables 60 | // -------------------------------------------------- 61 | // Windows only Sass variables can go here 62 | 63 | 64 | 65 | 66 | // App Theme 67 | // -------------------------------------------------- 68 | // Ionic apps can have different themes applied, which can 69 | // then be future customized. This import comes last 70 | // so that the above variables are used and Ionic's 71 | // default are overridden. 72 | 73 | @import "ionic.theme.default"; 74 | 75 | 76 | // Ionicons 77 | // -------------------------------------------------- 78 | // The premium icon font for Ionic. For more info, please see: 79 | // http://ionicframework.com/docs/v2/ionicons/ 80 | 81 | @import "ionic.ionicons"; 82 | 83 | 84 | // Fonts 85 | // -------------------------------------------------- 86 | 87 | @import "roboto"; 88 | @import "noto-sans"; 89 | -------------------------------------------------------------------------------- /ionic2/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5" 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "node_modules" 21 | ], 22 | "compileOnSave": false, 23 | "atom": { 24 | "rewriteTsconfig": false 25 | } 26 | } -------------------------------------------------------------------------------- /ionic2/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true, 4 | "no-unused-variable": [ 5 | true 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/tslint-eslint-rules/dist/rules" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /server/payment_demo.php: -------------------------------------------------------------------------------- 1 | APP_ID, 17 | 'partnerid' => MCH_ID, 18 | 'prepayid' => $prepay_id, 19 | 'package' => 'Sign=WXPay', 20 | 'noncestr' => generateNonce(), 21 | 'timestamp' => time(), 22 | ); 23 | $response['sign'] = calculateSign($response, APP_KEY); 24 | 25 | // send it to APP 26 | echo json_encode($response); 27 | 28 | /** 29 | * Generate a nonce string 30 | * 31 | * @link https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=4_3 32 | */ 33 | function generateNonce() 34 | { 35 | return md5(uniqid('', true)); 36 | } 37 | 38 | /** 39 | * Get a sign string from array using app key 40 | * 41 | * @link https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=4_3 42 | */ 43 | function calculateSign($arr, $key) 44 | { 45 | ksort($arr); 46 | 47 | $buff = ""; 48 | foreach ($arr as $k => $v) { 49 | if ($k != "sign" && $k != "key" && $v != "" && !is_array($v)){ 50 | $buff .= $k . "=" . $v . "&"; 51 | } 52 | } 53 | 54 | $buff = trim($buff, "&"); 55 | 56 | return strtoupper(md5($buff . "&key=" . $key)); 57 | } 58 | 59 | /** 60 | * Get xml from array 61 | */ 62 | function getXMLFromArray($arr) 63 | { 64 | $xml = ""; 65 | foreach ($arr as $key => $val) { 66 | if (is_numeric($val)) { 67 | $xml .= sprintf("<%s>%s", $key, $val, $key); 68 | } else { 69 | $xml .= sprintf("<%s>", $key, $val, $key); 70 | } 71 | } 72 | 73 | $xml .= ""; 74 | 75 | return $xml; 76 | } 77 | 78 | /** 79 | * Generate a prepay id 80 | * 81 | * @link https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=9_1 82 | */ 83 | function generatePrepayId($app_id, $mch_id) 84 | { 85 | $params = array( 86 | 'appid' => $app_id, 87 | 'mch_id' => $mch_id, 88 | 'nonce_str' => generateNonce(), 89 | 'body' => 'Test product name', 90 | 'out_trade_no' => time(), 91 | 'total_fee' => 1, 92 | 'spbill_create_ip' => '8.8.8.8', 93 | 'notify_url' => 'http://localhost', 94 | 'trade_type' => 'APP', 95 | ); 96 | 97 | // add sign 98 | $params['sign'] = calculateSign($params, APP_KEY); 99 | 100 | // create xml 101 | $xml = getXMLFromArray($params); 102 | 103 | // send request 104 | $ch = curl_init(); 105 | 106 | curl_setopt_array($ch, array( 107 | CURLOPT_URL => "https://api.mch.weixin.qq.com/pay/unifiedorder", 108 | CURLOPT_POST => true, 109 | CURLOPT_RETURNTRANSFER => true, 110 | CURLOPT_HTTPHEADER => array('Content-Type: text/xml'), 111 | CURLOPT_POSTFIELDS => $xml, 112 | )); 113 | 114 | $result = curl_exec($ch); 115 | curl_close($ch); 116 | 117 | // get the prepay id from response 118 | $xml = simplexml_load_string($result); 119 | return (string)$xml->prepay_id; 120 | } 121 | --------------------------------------------------------------------------------