├── demo ├── client_demo.html └── server_demo.html ├── socketio └── server │ ├── view │ └── home │ │ ├── index_index.html │ │ ├── socketio_test.html │ │ └── socketio_index.html │ ├── src │ ├── common │ │ ├── config │ │ │ ├── env │ │ │ │ ├── testing.js │ │ │ │ ├── development.js │ │ │ │ └── production.js │ │ │ ├── locale │ │ │ │ └── en.js │ │ │ ├── config.js │ │ │ ├── view.js │ │ │ ├── db.js │ │ │ └── websocket.js │ │ ├── bootstrap │ │ │ └── start.js │ │ └── controller │ │ │ └── error.js │ └── home │ │ ├── config │ │ └── config.js │ │ ├── model │ │ └── index.js │ │ ├── controller │ │ ├── base.js │ │ ├── index.js │ │ └── socketio.js │ │ └── logic │ │ └── index.js │ ├── .thinkjsrc │ ├── www │ ├── static │ │ └── demo │ │ │ ├── race │ │ │ ├── README.md │ │ │ ├── images │ │ │ │ ├── car.png │ │ │ │ ├── blank.gif │ │ │ │ ├── cloud.jpg │ │ │ │ ├── hill.gif │ │ │ │ ├── mask.png │ │ │ │ ├── pause.png │ │ │ │ ├── speed-bg.gif │ │ │ │ ├── background.png │ │ │ │ ├── paddle-bar.gif │ │ │ │ ├── covers │ │ │ │ │ ├── tree1.png │ │ │ │ │ ├── tree2.png │ │ │ │ │ ├── tree3.png │ │ │ │ │ ├── tree4.png │ │ │ │ │ ├── tree5.png │ │ │ │ │ └── tree6.png │ │ │ │ ├── paddle-rods.png │ │ │ │ ├── paddle-scene.gif │ │ │ │ ├── speed-pointer.gif │ │ │ │ ├── common.css │ │ │ │ ├── loading.css │ │ │ │ ├── reset.css │ │ │ │ ├── page.css │ │ │ │ └── base.css │ │ │ ├── scripts │ │ │ │ ├── loader.js │ │ │ │ └── main.js │ │ │ └── index.html │ │ │ └── reveal │ │ │ ├── lib │ │ │ ├── font │ │ │ │ ├── league-gothic │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── league-gothic.eot │ │ │ │ │ ├── league-gothic.ttf │ │ │ │ │ ├── league-gothic.woff │ │ │ │ │ └── league-gothic.css │ │ │ │ └── source-sans-pro │ │ │ │ │ ├── source-sans-pro-italic.eot │ │ │ │ │ ├── source-sans-pro-italic.ttf │ │ │ │ │ ├── source-sans-pro-italic.woff │ │ │ │ │ ├── source-sans-pro-regular.eot │ │ │ │ │ ├── source-sans-pro-regular.ttf │ │ │ │ │ ├── source-sans-pro-regular.woff │ │ │ │ │ ├── source-sans-pro-semibold.eot │ │ │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ │ │ ├── source-sans-pro-semibold.woff │ │ │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ │ │ ├── source-sans-pro.css │ │ │ │ │ └── LICENSE │ │ │ ├── js │ │ │ │ ├── html5shiv.js │ │ │ │ ├── classList.js │ │ │ │ └── head.min.js │ │ │ └── css │ │ │ │ └── zenburn.css │ │ │ ├── plugin │ │ │ ├── markdown │ │ │ │ ├── example.md │ │ │ │ └── example.html │ │ │ ├── multiplex │ │ │ │ ├── client.js │ │ │ │ ├── master.js │ │ │ │ └── index.js │ │ │ ├── print-pdf │ │ │ │ └── print-pdf.js │ │ │ ├── remotes │ │ │ │ └── remotes.js │ │ │ ├── math │ │ │ │ └── math.js │ │ │ ├── notes-server │ │ │ │ ├── client.js │ │ │ │ └── index.js │ │ │ └── notes │ │ │ │ └── notes.js │ │ │ ├── css │ │ │ ├── theme │ │ │ │ ├── source │ │ │ │ │ ├── night.scss │ │ │ │ │ ├── serif.scss │ │ │ │ │ ├── league.scss │ │ │ │ │ ├── simple.scss │ │ │ │ │ ├── sky.scss │ │ │ │ │ ├── beige.scss │ │ │ │ │ ├── black.scss │ │ │ │ │ ├── white.scss │ │ │ │ │ ├── moon.scss │ │ │ │ │ ├── solarized.scss │ │ │ │ │ └── blood.scss │ │ │ │ ├── template │ │ │ │ │ ├── settings.scss │ │ │ │ │ ├── mixins.scss │ │ │ │ │ └── theme.scss │ │ │ │ ├── README.md │ │ │ │ ├── night.css │ │ │ │ ├── serif.css │ │ │ │ ├── moon.css │ │ │ │ ├── solarized.css │ │ │ │ ├── simple.css │ │ │ │ ├── white.css │ │ │ │ └── black.css │ │ │ └── print │ │ │ │ ├── pdf.css │ │ │ │ └── paper.css │ │ │ ├── LICENSE │ │ │ ├── CONTRIBUTING.md │ │ │ ├── package.json │ │ │ └── Gruntfile.js │ ├── testing.js │ ├── index.js │ ├── production.js │ └── README.md │ ├── pm2.json │ ├── README.md │ ├── package.json │ ├── .gitignore │ └── nginx.conf ├── webpack.config.js ├── .gitignore ├── LICENSE ├── README_cn.md ├── README.md └── src ├── remote-client.js └── remote-server.js /demo/client_demo.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/server_demo.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /socketio/server/view/home/index_index.html: -------------------------------------------------------------------------------- 1 | hello thinkjs! -------------------------------------------------------------------------------- /socketio/server/src/common/config/env/testing.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | export default { 4 | 5 | }; -------------------------------------------------------------------------------- /socketio/server/src/common/config/locale/en.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | export default { 4 | 5 | }; -------------------------------------------------------------------------------- /socketio/server/src/common/config/env/development.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | export default { 4 | 5 | }; -------------------------------------------------------------------------------- /socketio/server/src/common/config/env/production.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | export default { 4 | 5 | }; -------------------------------------------------------------------------------- /socketio/server/.thinkjsrc: -------------------------------------------------------------------------------- 1 | { 2 | "createAt": "2015-10-15 15:09:37", 3 | "mode": "module", 4 | "es6": true 5 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/README.md: -------------------------------------------------------------------------------- 1 | racing 2 | ====== 3 | 4 | JavaScript 实现的赛车 邀请您关注我们的微博:http://weibo.com/baidujs -------------------------------------------------------------------------------- /socketio/server/src/home/config/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * config 4 | */ 5 | export default { 6 | //key: value 7 | }; -------------------------------------------------------------------------------- /socketio/server/src/home/model/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * model 4 | */ 5 | export default class extends think.model.base { 6 | 7 | } -------------------------------------------------------------------------------- /socketio/server/src/common/config/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * config 4 | */ 5 | export default { 6 | //key: value 7 | port: 9699, 8 | }; -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/car.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/blank.gif -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/cloud.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/cloud.jpg -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/hill.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/hill.gif -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/mask.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/pause.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/speed-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/speed-bg.gif -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/background.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/paddle-bar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/paddle-bar.gif -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/covers/tree1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/covers/tree1.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/covers/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/covers/tree2.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/covers/tree3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/covers/tree3.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/covers/tree4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/covers/tree4.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/covers/tree5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/covers/tree5.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/covers/tree6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/covers/tree6.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/paddle-rods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/paddle-rods.png -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/paddle-scene.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/paddle-scene.gif -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/speed-pointer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/race/images/speed-pointer.gif -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /socketio/server/src/home/controller/base.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | export default class extends think.controller.base { 4 | /** 5 | * some base method in here 6 | */ 7 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akira-cn/remote/HEAD/socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /socketio/server/src/home/logic/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * logic 4 | * @param {} [] 5 | * @return {} [] 6 | */ 7 | export default class extends think.logic.base { 8 | /** 9 | * index action logic 10 | * @return {} [] 11 | */ 12 | indexAction(){ 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /socketio/server/src/common/config/view.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * template config 4 | */ 5 | export default { 6 | content_type: 'text/html', 7 | file_ext: '.html', 8 | file_depr: '_', 9 | root_path: think.ROOT_PATH + '/view', 10 | theme: '', 11 | type: 'ejs', 12 | options: {} 13 | }; -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: { 3 | "remote-server": "./src/remote-server.js", 4 | "remote-client": "./src/remote-client.js", 5 | }, 6 | output: { 7 | library: '', 8 | libraryTarget: "umd", 9 | path: "./dist", 10 | filename: "[name].umd.js" 11 | } 12 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | document.createElement('header'); 2 | document.createElement('nav'); 3 | document.createElement('section'); 4 | document.createElement('article'); 5 | document.createElement('aside'); 6 | document.createElement('footer'); 7 | document.createElement('hgroup'); -------------------------------------------------------------------------------- /socketio/server/src/common/bootstrap/start.js: -------------------------------------------------------------------------------- 1 | /** 2 | * this file will be loaded before server started 3 | * you can define global functions used in controllers, models, templates 4 | */ 5 | 6 | /** 7 | * use global.xxx to define global functions 8 | * 9 | * global.fn1 = function(){ 10 | * 11 | * } 12 | */ -------------------------------------------------------------------------------- /socketio/server/src/home/controller/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import Base from './base.js'; 4 | 5 | export default class extends Base { 6 | /** 7 | * index action 8 | * @return {Promise} [] 9 | */ 10 | indexAction(){ 11 | //auto render template file index_index.html 12 | this.display(); 13 | } 14 | } -------------------------------------------------------------------------------- /socketio/server/www/testing.js: -------------------------------------------------------------------------------- 1 | var thinkjs = require('thinkjs'); 2 | var path = require('path'); 3 | 4 | var rootPath = path.dirname(__dirname); 5 | 6 | var instance = new thinkjs({ 7 | APP_PATH: rootPath + '/app', 8 | ROOT_PATH: rootPath, 9 | RESOURCE_PATH: __dirname, 10 | env: 'testing' 11 | }); 12 | 13 | instance.run(); -------------------------------------------------------------------------------- /socketio/server/pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps": [{ 3 | "name": "demo2.0", 4 | "script": "production.js", 5 | "cwd": "/Users/akira_cn/Workspace/thinkjs/demo2.0/www", 6 | "max_memory_restart": "1G", 7 | "autorestart": true, 8 | "node_args": [], 9 | "args": [], 10 | "env": { 11 | 12 | } 13 | }] 14 | } -------------------------------------------------------------------------------- /socketio/server/www/index.js: -------------------------------------------------------------------------------- 1 | var thinkjs = require('thinkjs'); 2 | var path = require('path'); 3 | 4 | var rootPath = path.dirname(__dirname); 5 | 6 | var instance = new thinkjs({ 7 | APP_PATH: rootPath + '/app', 8 | ROOT_PATH: rootPath, 9 | RESOURCE_PATH: __dirname, 10 | env: 'production' 11 | }); 12 | 13 | instance.run(); -------------------------------------------------------------------------------- /socketio/server/www/production.js: -------------------------------------------------------------------------------- 1 | var thinkjs = require('thinkjs'); 2 | var path = require('path'); 3 | 4 | var rootPath = path.dirname(__dirname); 5 | 6 | var instance = new thinkjs({ 7 | APP_PATH: rootPath + '/app', 8 | ROOT_PATH: rootPath, 9 | RESOURCE_PATH: __dirname, 10 | env: 'production' 11 | }); 12 | 13 | instance.run(); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .git 2 | .idea 3 | .project 4 | nohup.out 5 | .settings 6 | .DS_Store 7 | sftp-config.json 8 | 9 | *~ 10 | *.diff 11 | *.patch 12 | *.log 13 | *.swp 14 | bower_components/ 15 | /App/Runtime/ 16 | output/ 17 | test_output/ 18 | test/ 19 | www/app/ 20 | output.tar.gz 21 | www/app/ 22 | output.tar.gz 23 | test/ 24 | Test/ 25 | node_modules/ 26 | -------------------------------------------------------------------------------- /socketio/server/README.md: -------------------------------------------------------------------------------- 1 | ## README 2 | 3 | application created by [ThinkJS](http://www.thinkjs.org) 4 | 5 | ## install dependencies 6 | 7 | ``` 8 | npm install 9 | ``` 10 | 11 | ## watch-compile 12 | 13 | ``` 14 | npm run watch-compile 15 | ``` 16 | 17 | ## start server 18 | 19 | ``` 20 | npm start 21 | ``` 22 | 23 | ## deploy with pm2 24 | 25 | ``` 26 | pm2 startOrGracefulReload pm2.json 27 | ``` -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/common.css: -------------------------------------------------------------------------------- 1 | html, body{ 2 | font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; 3 | width: 100%; 4 | height: 100%; 5 | } 6 | 7 | .clearfix:after{ 8 | content: "."; 9 | display: block; 10 | height: 0; 11 | clear: both; 12 | visibility: hidden; 13 | zoom: 1; 14 | _height: 1px; 15 | } 16 | 17 | *html .clearfix{ 18 | height: 1%; 19 | } 20 | 21 | *+html .clearfix{ 22 | height: 1%; 23 | } -------------------------------------------------------------------------------- /socketio/server/src/common/config/db.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * db config 4 | * @type {Object} 5 | */ 6 | export default { 7 | type: 'mysql', 8 | host: '127.0.0.1', 9 | port: '', 10 | name: '', 11 | user: '', 12 | pwd: '', 13 | prefix: 'think_', 14 | encoding: 'utf8', 15 | nums_per_page: 10, 16 | log_sql: true, 17 | log_connect: true, 18 | cache: { 19 | on: true, 20 | type: '', 21 | timeout: 3600 22 | } 23 | }; -------------------------------------------------------------------------------- /socketio/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "thinkjs-project", 3 | "description": "project created by thinkjs", 4 | "version": "1.0.0", 5 | "scripts": { 6 | "start": "node www/index.js", 7 | "compile": "babel --loose all --optional runtime --stage 0 --modules common src/ --out-dir app/", 8 | "watch-compile": "npm run compile -- --watch" 9 | }, 10 | "dependencies": { 11 | "thinkjs": ">=2.0.5", 12 | "babel": "5.8.21", 13 | "babel-runtime": "5.6.17", 14 | "qs": "*" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.slide(data.indexh, data.indexv, data.indexf, 'remote'); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /socketio/server/src/common/config/websocket.js: -------------------------------------------------------------------------------- 1 | export default { 2 | on: true, //是否开启 WebSocket 3 | type: "socket.io", //使用的 WebSocket 库类型,默认为 socket.io 4 | allow_origin: "", //允许的 origin 5 | adapter: undefined, // socket 存储的 adapter,socket.io 下使用 6 | path: "", //url path for websocket 7 | messages: { 8 | open: "home/socketio/open", // WebSocket 建立连接时处理的 Action 9 | close: "home/socketio/close", // WebSocket 关闭时处理的 Action 10 | event: "home/socketio/event", 11 | notify: "home/socketio/notify", 12 | } 13 | }; -------------------------------------------------------------------------------- /socketio/server/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage/ 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Dependency directory 23 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 24 | node_modules/ 25 | 26 | # IDE config 27 | .idea 28 | 29 | # output 30 | output/ 31 | output.tar.gz 32 | 33 | #compiled 34 | app/ -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/loading.css: -------------------------------------------------------------------------------- 1 | #loading{ 2 | position: absolute; 3 | left: 0; 4 | top: 0; 5 | width: 100%; 6 | height: 100%; 7 | background-color: #fff; 8 | text-align: center; 9 | } 10 | 11 | #loading .text{ 12 | position: relative; 13 | width: 676px; 14 | height: 20px; 15 | top: 119px; 16 | text-align: center; 17 | font-size: 14px; 18 | margin: auto; 19 | } 20 | 21 | #loading .bar{ 22 | position: relative; 23 | width: 676px; 24 | height: 18px; 25 | top: 139px; 26 | left: 0; 27 | border-width: 2px; 28 | border-color: #606060 #e9e7e3 #e9e7e3 #606060; 29 | border-style: solid; 30 | background-color: #fff; 31 | text-align: left; 32 | margin: auto; 33 | } 34 | 35 | #loaded{ 36 | width: 0px; 37 | height: 18px; 38 | overflow: hidden; 39 | background-color: #0a246a; 40 | } -------------------------------------------------------------------------------- /socketio/server/www/README.md: -------------------------------------------------------------------------------- 1 | ## application 2 | 3 | ### start server 4 | 5 | *development* 6 | 7 | ```js 8 | node www/index.js 9 | ``` 10 | 11 | *testing* 12 | 13 | ```js 14 | node www/testing.js 15 | ``` 16 | 17 | *production* 18 | 19 | ```js 20 | node www/production.js 21 | ``` 22 | 23 | or use pm2 to manage node: 24 | 25 | ``` 26 | pm2 start www/production.js 27 | ``` 28 | 29 | ### compile es6 code 30 | 31 | ``` 32 | npm run compile 33 | ``` 34 | 35 | watch file change: 36 | 37 | ``` 38 | npm run wacth-compile 39 | ``` 40 | 41 | ### how to link resource 42 | 43 | *in template file* 44 | 45 | ```html 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | ``` 54 | 55 | *link image in css* 56 | 57 | ```css 58 | .a{ 59 | background: url(../img/a.png) no-repeat; 60 | } 61 | ``` -------------------------------------------------------------------------------- /socketio/server/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name remote.baomitu.com; 4 | root /home/work/remote/socketio/server; 5 | set $node_port 9699; 6 | 7 | index index.js index.html index.htm; 8 | if ( -f $request_filename/index.html ){ 9 | rewrite (.*) $1/index.html break; 10 | } 11 | if ( !-f $request_filename ){ 12 | rewrite (.*) /index.js; 13 | } 14 | location = /index.js { 15 | #proxy_http_version 1.1; 16 | proxy_set_header Connection ""; 17 | proxy_set_header X-Real-IP $remote_addr; 18 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 19 | proxy_set_header Host $http_host; 20 | proxy_set_header X-NginX-Proxy true; 21 | proxy_pass http://127.0.0.1:$node_port$request_uri; 22 | proxy_redirect off; 23 | } 24 | location ~ /static/ { 25 | etag on; 26 | expires max; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/reset.css: -------------------------------------------------------------------------------- 1 | html{ 2 | color:#000; 3 | background:#FFF; 4 | } 5 | body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td{ 6 | margin:0; 7 | padding:0; 8 | } 9 | table{ 10 | border-collapse: collapse; 11 | border-spacing: 0; 12 | } 13 | fieldset, img{ 14 | border: 0; 15 | } 16 | address, caption, cite, code, dfn, em, strong, th, var{ 17 | font-style: normal; 18 | font-weight: normal; 19 | } 20 | li{ 21 | list-style:none; 22 | } 23 | caption, th{ 24 | text-align:left; 25 | } 26 | h1, h2, h3, h4, h5, h6{ 27 | font-size: 100%; 28 | font-weight: normal; 29 | } 30 | q:before, q:after{ 31 | content: ''; 32 | } 33 | abbr, acronym{ 34 | border: 0; 35 | font-variant: normal; 36 | } 37 | sup{ 38 | vertical-align: text-top; 39 | } 40 | sub{ 41 | vertical-align: text-bottom; 42 | } 43 | input, textarea, select{ 44 | font-family: inherit; 45 | font-size: inherit; 46 | font-weight: inherit; 47 | } 48 | input, textarea, select{ 49 | *font-size: 100%; 50 | } 51 | legend{ 52 | color: #000; 53 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 akira-cn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | $mainFontSize: 30px; 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015 Hakim El Hattab, http://hakim.se 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. 4 | 5 | 6 | ### Personal Support 7 | If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js). 8 | 9 | 10 | ### Bug Reports 11 | When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested. 12 | 13 | 14 | ### Pull Requests 15 | - Should follow the coding style of the file you work in, most importantly: 16 | - Tabs to indent 17 | - Single-quoted strings 18 | - Should be made towards the **dev branch** 19 | - Should be submitted from a feature/topic branch (not your master) 20 | 21 | 22 | ### Plugins 23 | Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines 24 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /socketio/server/view/home/socketio_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | socketio test 6 | 7 | 8 |
9 | Test 10 | 11 | 12 | 13 | 50 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 36px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | 35 | 36 | // Theme template ------------------------------ 37 | @import "../template/theme"; 38 | // --------------------------------------------- -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /socketio/server/src/common/controller/error.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /** 3 | * error controller 4 | */ 5 | export default class extends think.controller.base { 6 | /** 7 | * display error page 8 | * @param {Number} status [] 9 | * @return {Promise} [] 10 | */ 11 | displayErrorPage(status){ 12 | let module = 'common'; 13 | if(think.mode !== think.mode_module){ 14 | module = this.config('default_module'); 15 | } 16 | let file = `${module}/error/${status}.html`; 17 | let options = this.config('tpl'); 18 | options = think.extend({}, options, {type: 'ejs'}); 19 | return this.display(file, options); 20 | } 21 | /** 22 | * Bad Request 23 | * @return {Promise} [] 24 | */ 25 | _400Action(){ 26 | return this.displayErrorPage(400); 27 | } 28 | /** 29 | * Forbidden 30 | * @return {Promise} [] 31 | */ 32 | _403Action(){ 33 | return this.displayErrorPage(403); 34 | } 35 | /** 36 | * Not Found 37 | * @return {Promise} [] 38 | */ 39 | _404Action(){ 40 | return this.displayErrorPage(404); 41 | } 42 | /** 43 | * Internal Server Error 44 | * @return {Promise} [] 45 | */ 46 | _500Action(){ 47 | return this.displayErrorPage(500); 48 | } 49 | /** 50 | * Service Unavailable 51 | * @return {Promise} [] 52 | */ 53 | _503Action(){ 54 | return this.displayErrorPage(503); 55 | } 56 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.1.0", 4 | "description": "The HTML Presentation Framework", 5 | "homepage": "http://lab.hakim.se/reveal-js", 6 | "subdomain": "revealjs", 7 | "main": "js/reveal.js", 8 | "scripts": { 9 | "test": "grunt test", 10 | "start": "" 11 | }, 12 | "author": { 13 | "name": "Hakim El Hattab", 14 | "email": "hakim.elhattab@gmail.com", 15 | "web": "http://hakim.se" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/hakimel/reveal.js.git" 20 | }, 21 | "engines": { 22 | "node": "~0.10.0" 23 | }, 24 | "dependencies": { 25 | "underscore": "~1.5.1", 26 | "express": "~2.5.9", 27 | "mustache": "~0.7.2", 28 | "socket.io": "~0.9.16" 29 | }, 30 | "devDependencies": { 31 | "grunt-contrib-qunit": "~0.5.2", 32 | "grunt-contrib-jshint": "~0.6.4", 33 | "grunt-contrib-cssmin": "~0.12.2", 34 | "grunt-contrib-uglify": "~0.2.4", 35 | "grunt-contrib-watch": "~0.5.3", 36 | "grunt-sass": "~0.14.0", 37 | "grunt-contrib-connect": "~0.8.0", 38 | "grunt-autoprefixer": "~1.0.1", 39 | "grunt-zip": "~0.7.0", 40 | "grunt": "~0.4.0", 41 | "node-sass": "~0.9.3" 42 | }, 43 | "licenses": [ 44 | { 45 | "type": "MIT", 46 | "url": "https://github.com/hakimel/reveal.js/blob/master/LICENSE" 47 | } 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #222; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * By Manuel Bieh (https://github.com/manuelbieh) 8 | */ 9 | 10 | // html2pdf.js 11 | var page = new WebPage(); 12 | var system = require( 'system' ); 13 | 14 | var slideWidth = system.args[3] ? system.args[3].split( 'x' )[0] : 960; 15 | var slideHeight = system.args[3] ? system.args[3].split( 'x' )[1] : 700; 16 | 17 | page.viewportSize = { 18 | width: slideWidth, 19 | height: slideHeight 20 | }; 21 | 22 | // TODO 23 | // Something is wrong with these config values. An input 24 | // paper width of 1920px actually results in a 756px wide 25 | // PDF. 26 | page.paperSize = { 27 | width: Math.round( slideWidth * 2 ), 28 | height: Math.round( slideHeight * 2 ), 29 | border: 0 30 | }; 31 | 32 | var inputFile = system.args[1] || 'index.html?print-pdf'; 33 | var outputFile = system.args[2] || 'slides.pdf'; 34 | 35 | if( outputFile.match( /\.pdf$/gi ) === null ) { 36 | outputFile += '.pdf'; 37 | } 38 | 39 | console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.paperSize.height +')' ); 40 | 41 | page.open( inputFile, function( status ) { 42 | window.setTimeout( function() { 43 | console.log( 'Printed succesfully' ); 44 | page.render( outputFile ); 45 | phantom.exit(); 46 | }, 1000 ); 47 | } ); 48 | 49 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-tag, 16 | .css .hljs-class, 17 | .css .hljs-id, 18 | .lisp .hljs-title, 19 | .nginx .hljs-title, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #E3CEAB; 24 | } 25 | 26 | .django .hljs-template_tag, 27 | .django .hljs-variable, 28 | .django .hljs-filter .hljs-argument { 29 | color: #DCDCDC; 30 | } 31 | 32 | .hljs-number, 33 | .hljs-date { 34 | color: #8CD0D3; 35 | } 36 | 37 | .dos .hljs-envvar, 38 | .dos .hljs-stream, 39 | .hljs-variable, 40 | .apache .hljs-sqbracket { 41 | color: #EFDCBC; 42 | } 43 | 44 | .dos .hljs-flow, 45 | .diff .hljs-change, 46 | .python .exception, 47 | .python .hljs-built_in, 48 | .hljs-literal, 49 | .tex .hljs-special { 50 | color: #EFEFAF; 51 | } 52 | 53 | .diff .hljs-chunk, 54 | .hljs-subst { 55 | color: #8F8F8F; 56 | } 57 | 58 | .dos .hljs-keyword, 59 | .python .hljs-decorator, 60 | .hljs-title, 61 | .haskell .hljs-type, 62 | .diff .hljs-header, 63 | .ruby .hljs-class .hljs-parent, 64 | .apache .hljs-tag, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .hljs-prompt { 68 | color: #efef8f; 69 | } 70 | 71 | .dos .hljs-winutils, 72 | .ruby .hljs-symbol, 73 | .ruby .hljs-symbol .hljs-string, 74 | .ruby .hljs-string { 75 | color: #DCA3A3; 76 | } 77 | 78 | .diff .hljs-deletion, 79 | .hljs-string, 80 | .hljs-tag .hljs-value, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .hljs-built_in, 84 | .sql .hljs-aggregate, 85 | .hljs-javadoc, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rules .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #CC9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .java .hljs-annotation, 102 | .hljs-template_comment, 103 | .hljs-pi, 104 | .hljs-doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 赛车游戏 | undefined队 7 | 8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 3 21 |
22 |
23 |
24 |
25 |
26 | 27 | 28 |
29 |
30 |
31 |
32 | 上键 启动/加速,下键 刹车,左右键 控制方向,P 键暂停/继续。 33 |
34 |
35 | TAB 键呼出二维码开启遥控模式,横置手机(屏幕朝自己)当方向盘进行操作~ 36 |
37 |
38 | 目前还是半成品状态:自由模式,只有一车,没有终点,没有油耗,撞不了树。我们的微博 39 |
40 | 43 |
44 |
45 |
正在加载中,如果是首次打开,可能比较慢,请您耐心等待...
46 |
47 |
48 |
49 |
50 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/js/head.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | Head JS The only script in your 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c', data); 103 | 104 | var tid = data.target; 105 | var io = this.http.io, 106 | socket = this.http.socket; 107 | var connected = io.sockets.connected; 108 | for(var i in connected){ 109 | var s = connected[i]; 110 | if(s._tid === socket.id && (!tid || tid === s.id)){ 111 | s.emit('notify', data); 112 | } 113 | } 114 | } 115 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/page.css: -------------------------------------------------------------------------------- 1 | html, body{ 2 | width: auto; 3 | height: 100%; 4 | } 5 | 6 | body{ 7 | background-color: #333; 8 | } 9 | 10 | #page{ 11 | width: auto; 12 | text-align: center; 13 | } 14 | 15 | #screen{ 16 | width: 680px; 17 | height: 300px; 18 | margin: auto; 19 | margin-top: 30px; 20 | background-image: url(background.png); 21 | position: relative; 22 | } 23 | 24 | #screen .cloud{ 25 | position: absolute; 26 | width: 676px; 27 | height: 196px; 28 | left: 2px; 29 | top: 2px; 30 | background-image: url(cloud.jpg); 31 | display: none; 32 | } 33 | 34 | #screen .hill{ 35 | position: absolute; 36 | width: 676px; 37 | height: 36px; 38 | left: 2px; 39 | top: 162px; 40 | background-image: url(hill.gif); 41 | display: none; 42 | } 43 | 44 | #screen .road, 45 | #screen .cover{ 46 | position: absolute; 47 | left: 2px; 48 | top: 198px; 49 | width: 676px; 50 | height: 100px; 51 | overflow: hidden; 52 | } 53 | 54 | #screen .cover{ 55 | top: -2px; 56 | height: 300px; 57 | } 58 | 59 | #screen .cover img{ 60 | position: absolute; 61 | border: 0; 62 | } 63 | 64 | #screen .cover .point{ 65 | position: absolute; 66 | background-color: red; 67 | width: 1px; 68 | height: 1px; 69 | overflow: hidden; 70 | } 71 | 72 | #screen .mask{ 73 | position: absolute; 74 | left: 2px; 75 | top: 198px; 76 | width: 676px; 77 | height: 99px; 78 | background-image: url(mask.png); 79 | _background-image: none; 80 | _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/mask.png',sizingMethod='scale'); 81 | } 82 | 83 | #screen .car{ 84 | position: absolute; 85 | width: 100px; 86 | height: 100px; 87 | left: 290px; 88 | top: 208px; 89 | } 90 | 91 | #buttons{ 92 | margin: 10px auto; 93 | width: 680px; 94 | height: 30px; 95 | } 96 | 97 | #buttons button{ 98 | float: left; 99 | height: 100%; 100 | border-width: 1px; 101 | } 102 | 103 | #copyright{ 104 | color: #999; 105 | margin: auto; 106 | width: 680px; 107 | line-height: 20px; 108 | font-size: 12px; 109 | text-align: center; 110 | } 111 | 112 | #page .line{ 113 | margin: auto; 114 | color: #ccc; 115 | width: 600px; 116 | line-height: 30px; 117 | font-size: 14px; 118 | text-align: left; 119 | } 120 | 121 | #page .line strong{ 122 | font-size: 24px; 123 | font-weight: 700; 124 | color: yellow; 125 | } 126 | 127 | #page .line em{ 128 | color: #0ff; 129 | } 130 | 131 | #pause{ 132 | position: absolute; 133 | width: 333px; 134 | height: 78px; 135 | left: 174px; 136 | top: 111px; 137 | background-image: url(pause.png); 138 | _background-image: none; 139 | _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/pause.png',sizingMethod='scale'); 140 | display: none; 141 | } 142 | 143 | #info{ 144 | width: 680px; 145 | height: 145px; 146 | margin: auto; 147 | position: relative; 148 | background-color: #080703; 149 | } 150 | 151 | #info .speedInfo{ 152 | width: 256px; 153 | height: 145px; 154 | left: 212px; 155 | top: 0px; 156 | position: absolute; 157 | background-image: url(speed-bg.gif); 158 | } 159 | 160 | #paddle-option{ 161 | position: absolute; 162 | line-height: 20px; 163 | text-indent: 2px; 164 | left: 10px; 165 | top: 110px; 166 | } 167 | 168 | #paddle-option label{ 169 | font-size: 14px; 170 | color: #ccc; 171 | } 172 | 173 | /* basicslippage */ 174 | .ucrenlite-basicslippage-layer{ 175 | overflow: hidden; 176 | line-height: 0; 177 | } 178 | .ucrenlite-basicslippage-inner{ 179 | text-decoration: none; 180 | text-align: center; 181 | font-size: 14px; 182 | display: block; 183 | } 184 | 185 | #paddle{ 186 | position: absolute; 187 | left: -146px; 188 | top: 11px; 189 | display: none; 190 | } 191 | 192 | /* paddle */ 193 | .paddle-scene{ 194 | position: relative; 195 | } 196 | 197 | .paddle-item{ 198 | position: absolute; 199 | -moz-user-select: none; 200 | -webkit-user-select: none; 201 | } -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* global module:false */ 2 | module.exports = function(grunt) { 3 | var port = grunt.option('port') || 8000; 4 | // Project configuration 5 | grunt.initConfig({ 6 | pkg: grunt.file.readJSON('package.json'), 7 | meta: { 8 | banner: 9 | '/*!\n' + 10 | ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + 11 | ' * http://lab.hakim.se/reveal-js\n' + 12 | ' * MIT licensed\n' + 13 | ' *\n' + 14 | ' * Copyright (C) 2015 Hakim El Hattab, http://hakim.se\n' + 15 | ' */' 16 | }, 17 | 18 | qunit: { 19 | files: [ 'test/*.html' ] 20 | }, 21 | 22 | uglify: { 23 | options: { 24 | banner: '<%= meta.banner %>\n' 25 | }, 26 | build: { 27 | src: 'js/reveal.js', 28 | dest: 'js/reveal.min.js' 29 | } 30 | }, 31 | 32 | sass: { 33 | core: { 34 | files: { 35 | 'css/reveal.css': 'css/reveal.scss', 36 | } 37 | }, 38 | themes: { 39 | files: [ 40 | { 41 | expand: true, 42 | cwd: 'css/theme/source', 43 | src: ['*.scss'], 44 | dest: 'css/theme', 45 | ext: '.css' 46 | } 47 | ] 48 | } 49 | }, 50 | 51 | autoprefixer: { 52 | dist: { 53 | src: 'css/reveal.css' 54 | } 55 | }, 56 | 57 | cssmin: { 58 | compress: { 59 | files: { 60 | 'css/reveal.min.css': [ 'css/reveal.css' ] 61 | } 62 | } 63 | }, 64 | 65 | jshint: { 66 | options: { 67 | curly: false, 68 | eqeqeq: true, 69 | immed: true, 70 | latedef: true, 71 | newcap: true, 72 | noarg: true, 73 | sub: true, 74 | undef: true, 75 | eqnull: true, 76 | browser: true, 77 | expr: true, 78 | globals: { 79 | head: false, 80 | module: false, 81 | console: false, 82 | unescape: false, 83 | define: false, 84 | exports: false 85 | } 86 | }, 87 | files: [ 'Gruntfile.js', 'js/reveal.js' ] 88 | }, 89 | 90 | connect: { 91 | server: { 92 | options: { 93 | port: port, 94 | base: '.', 95 | livereload: true, 96 | open: true 97 | } 98 | } 99 | }, 100 | 101 | zip: { 102 | 'reveal-js-presentation.zip': [ 103 | 'index.html', 104 | 'css/**', 105 | 'js/**', 106 | 'lib/**', 107 | 'images/**', 108 | 'plugin/**' 109 | ] 110 | }, 111 | 112 | watch: { 113 | options: { 114 | livereload: true 115 | }, 116 | js: { 117 | files: [ 'Gruntfile.js', 'js/reveal.js' ], 118 | tasks: 'js' 119 | }, 120 | theme: { 121 | files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ], 122 | tasks: 'css-themes' 123 | }, 124 | css: { 125 | files: [ 'css/reveal.scss' ], 126 | tasks: 'css-core' 127 | }, 128 | html: { 129 | files: [ 'index.html'] 130 | } 131 | } 132 | 133 | }); 134 | 135 | // Dependencies 136 | grunt.loadNpmTasks( 'grunt-contrib-qunit' ); 137 | grunt.loadNpmTasks( 'grunt-contrib-jshint' ); 138 | grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); 139 | grunt.loadNpmTasks( 'grunt-contrib-uglify' ); 140 | grunt.loadNpmTasks( 'grunt-contrib-watch' ); 141 | grunt.loadNpmTasks( 'grunt-sass' ); 142 | grunt.loadNpmTasks( 'grunt-contrib-connect' ); 143 | grunt.loadNpmTasks( 'grunt-autoprefixer' ); 144 | grunt.loadNpmTasks( 'grunt-zip' ); 145 | 146 | // Default task 147 | grunt.registerTask( 'default', [ 'css', 'js' ] ); 148 | 149 | // JS task 150 | grunt.registerTask( 'js', [ 'jshint', 'uglify', 'qunit' ] ); 151 | 152 | // Theme CSS 153 | grunt.registerTask( 'css-themes', [ 'sass:themes' ] ); 154 | 155 | // Core framework CSS 156 | grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] ); 157 | 158 | // All CSS 159 | grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] ); 160 | 161 | // Package presentation to archive 162 | grunt.registerTask( 'package', [ 'default', 'zip' ] ); 163 | 164 | // Serve presentation locally 165 | grunt.registerTask( 'serve', [ 'connect', 'watch' ] ); 166 | 167 | // Run tests 168 | grunt.registerTask( 'test', [ 'jshint', 'qunit' ] ); 169 | 170 | }; 171 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | /* SECTION 1: Set default width, margin, float, and 10 | background. This prevents elements from extending 11 | beyond the edge of the printed page, and prevents 12 | unnecessary background images from printing */ 13 | 14 | * { 15 | -webkit-print-color-adjust: exact; 16 | } 17 | 18 | body { 19 | margin: 0 auto !important; 20 | border: 0; 21 | padding: 0; 22 | float: none !important; 23 | overflow: visible; 24 | } 25 | 26 | html { 27 | width: 100%; 28 | height: 100%; 29 | overflow: visible; 30 | } 31 | 32 | /* SECTION 2: Remove any elements not needed in print. 33 | This would include navigation, ads, sidebars, etc. */ 34 | .nestedarrow, 35 | .reveal .controls, 36 | .reveal .progress, 37 | .reveal .slide-number, 38 | .reveal .playback, 39 | .reveal.overview, 40 | .fork-reveal, 41 | .share-reveal, 42 | .state-background { 43 | display: none !important; 44 | } 45 | 46 | /* SECTION 3: Set body font face, size, and color. 47 | Consider using a serif font for readability. */ 48 | body, p, td, li, div { 49 | 50 | } 51 | 52 | /* SECTION 4: Set heading font face, sizes, and color. 53 | Differentiate your headings from your body text. 54 | Perhaps use a large sans-serif for distinction. */ 55 | h1,h2,h3,h4,h5,h6 { 56 | text-shadow: 0 0 0 #000 !important; 57 | } 58 | 59 | .reveal pre code { 60 | overflow: hidden !important; 61 | font-family: Courier, 'Courier New', monospace !important; 62 | } 63 | 64 | 65 | /* SECTION 5: more reveal.js specific additions by @skypanther */ 66 | ul, ol, div, p { 67 | visibility: visible; 68 | position: static; 69 | width: auto; 70 | height: auto; 71 | display: block; 72 | overflow: visible; 73 | margin: auto; 74 | } 75 | .reveal { 76 | width: auto !important; 77 | height: auto !important; 78 | overflow: hidden !important; 79 | } 80 | .reveal .slides { 81 | position: static; 82 | width: 100%; 83 | height: auto; 84 | 85 | left: auto; 86 | top: auto; 87 | margin: 0 !important; 88 | padding: 0 !important; 89 | 90 | overflow: visible; 91 | display: block; 92 | 93 | -webkit-perspective: none; 94 | -moz-perspective: none; 95 | -ms-perspective: none; 96 | perspective: none; 97 | 98 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 99 | -moz-perspective-origin: 50% 50%; 100 | -ms-perspective-origin: 50% 50%; 101 | perspective-origin: 50% 50%; 102 | } 103 | .reveal .slides section { 104 | page-break-after: always !important; 105 | 106 | visibility: visible !important; 107 | position: relative !important; 108 | display: block !important; 109 | position: relative !important; 110 | 111 | margin: 0 !important; 112 | padding: 0 !important; 113 | box-sizing: border-box !important; 114 | min-height: 1px; 115 | 116 | opacity: 1 !important; 117 | 118 | -webkit-transform-style: flat !important; 119 | -moz-transform-style: flat !important; 120 | -ms-transform-style: flat !important; 121 | transform-style: flat !important; 122 | 123 | -webkit-transform: none !important; 124 | -moz-transform: none !important; 125 | -ms-transform: none !important; 126 | transform: none !important; 127 | } 128 | .reveal section.stack { 129 | margin: 0 !important; 130 | padding: 0 !important; 131 | page-break-after: avoid !important; 132 | height: auto !important; 133 | min-height: auto !important; 134 | } 135 | .reveal img { 136 | box-shadow: none; 137 | } 138 | .reveal .roll { 139 | overflow: visible; 140 | line-height: 1em; 141 | } 142 | 143 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 144 | .reveal section .slide-background { 145 | display: block !important; 146 | position: absolute; 147 | top: 0; 148 | left: 0; 149 | width: 100%; 150 | z-index: -1; 151 | } 152 | /* All elements should be above the slide-background */ 153 | .reveal section>* { 154 | position: relative; 155 | z-index: 1; 156 | } 157 | 158 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | * 5 | * Handshake process: 6 | * 1. This window posts 'connect' to notes window 7 | * - Includes URL of presentation to show 8 | * 2. Notes window responds with 'connected' when it is available 9 | * 3. This window proceeds to send the current presentation state 10 | * to the notes window 11 | */ 12 | var RevealNotes = (function() { 13 | 14 | function openNotes() { 15 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 16 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 17 | var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1100,height=700' ); 18 | 19 | /** 20 | * Connect to the notes window through a postmessage handshake. 21 | * Using postmessage enables us to work in situations where the 22 | * origins differ, such as a presentation being opened from the 23 | * file system. 24 | */ 25 | function connect() { 26 | // Keep trying to connect until we get a 'connected' message back 27 | var connectInterval = setInterval( function() { 28 | notesPopup.postMessage( JSON.stringify( { 29 | namespace: 'reveal-notes', 30 | type: 'connect', 31 | url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, 32 | state: Reveal.getState() 33 | } ), '*' ); 34 | }, 500 ); 35 | 36 | window.addEventListener( 'message', function( event ) { 37 | var data = JSON.parse( event.data ); 38 | if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) { 39 | clearInterval( connectInterval ); 40 | onConnected(); 41 | } 42 | } ); 43 | } 44 | 45 | /** 46 | * Posts the current slide data to the notes window 47 | */ 48 | function post() { 49 | 50 | var slideElement = Reveal.getCurrentSlide(), 51 | notesElement = slideElement.querySelector( 'aside.notes' ); 52 | 53 | var messageData = { 54 | namespace: 'reveal-notes', 55 | type: 'state', 56 | notes: '', 57 | markdown: false, 58 | state: Reveal.getState() 59 | }; 60 | 61 | // Look for notes defined in a slide attribute 62 | if( slideElement.hasAttribute( 'data-notes' ) ) { 63 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 64 | } 65 | 66 | // Look for notes defined in an aside element 67 | if( notesElement ) { 68 | messageData.notes = notesElement.innerHTML; 69 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 70 | } 71 | 72 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 73 | 74 | } 75 | 76 | /** 77 | * Called once we have established a connection to the notes 78 | * window. 79 | */ 80 | function onConnected() { 81 | 82 | // Monitor events that trigger a change in state 83 | Reveal.addEventListener( 'slidechanged', post ); 84 | Reveal.addEventListener( 'fragmentshown', post ); 85 | Reveal.addEventListener( 'fragmenthidden', post ); 86 | Reveal.addEventListener( 'overviewhidden', post ); 87 | Reveal.addEventListener( 'overviewshown', post ); 88 | Reveal.addEventListener( 'paused', post ); 89 | Reveal.addEventListener( 'resumed', post ); 90 | 91 | // Post the initial state 92 | post(); 93 | 94 | } 95 | 96 | connect(); 97 | } 98 | 99 | if( !/receiver/i.test( window.location.search ) ) { 100 | 101 | // If the there's a 'notes' query set, open directly 102 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 103 | openNotes(); 104 | } 105 | 106 | // Open the notes when the 's' key is hit 107 | document.addEventListener( 'keydown', function( event ) { 108 | // Disregard the event if the target is editable or a 109 | // modifier is present 110 | if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; 111 | 112 | if( event.keyCode === 83 ) { 113 | event.preventDefault(); 114 | openNotes(); 115 | } 116 | }, false ); 117 | 118 | } 119 | 120 | return { open: openNotes }; 121 | 122 | })(); 123 | -------------------------------------------------------------------------------- /socketio/server/view/home/socketio_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Control Panel 11 | 110 | 111 | 112 |
113 |
114 |
115 | R 116 |
117 |
118 | Up 119 |
120 |
121 | S 122 |
123 |
124 | Left 125 |
126 |
127 | C 128 |
129 | 132 |
133 | A 134 |
135 |
136 | Down 137 |
138 |
139 | B 140 |
141 |
142 |
143 | 144 | 145 | 146 | 147 | 155 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/plugin/markdown/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 36 |
37 | 38 | 39 |
40 | 54 |
55 | 56 | 57 |
58 | 69 |
70 | 71 | 72 |
73 | 77 |
78 | 79 | 80 |
81 | 86 |
87 | 88 | 89 |
90 | 100 |
101 | 102 |
103 |
104 | 105 | 106 | 107 | 108 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /README_cn.md: -------------------------------------------------------------------------------- 1 | # Remote 远程控制SDK 2 | 3 | 基于socket.io的远程控制SDK,允许你的PC网页被手机终端远程控制 4 | 5 | ## 快速上手 6 | 7 | ```html 8 | 9 | 10 | 28 | ``` 29 | 30 | 1. 在你要控制的网页上加上socket.io和remote-server.js 31 | 32 | 2. 创建RemoteServer()对象,注册要处理的事件方法 33 | 34 | 3. 调用drawQRCode()绘制二维码,二维码默认用TAB键唤起 35 | 36 | 4. 在网页打开后**按TAB键**唤出二维码,手机扫描二维码绑定控制器 37 | 38 | 5. 用控制器对远程网页进行控制。 39 | 40 | ## 示例 41 | 42 | [reveal slide](http://s.h5jun.com/slide/welcome_to_fe_world/) 43 | 44 | [赛车游戏](http://remote.baomitu.com/static/demo/race/index.html) 45 | 46 | ![扫二维码开启遥控](http://p4.qhimg.com/d/inn/59991f4e/race.jpg) 47 | 48 | ## 基础事件 49 | 50 | * 基础键盘事件 51 | keydown, keyup, keypress 52 | 53 | ```js 54 | var rs = new RemoteServer(); 55 | rs.on('keypress', function(ev){ 56 | console.log('You pressed:' + ev.data.key); 57 | }); 58 | ``` 59 | 60 | * 基础滑动手势(在C键上支持手势) 61 | swipestart, swipeend, swiping 62 | 63 | ```js 64 | var rs = new RemoteServer(); 65 | rs.on('swipeend', function(ev){ 66 | console.log('Swiped:' + ev.data.direction); 67 | }); 68 | ``` 69 | 70 | * 基础缩放手势 71 | pinchstart, pinchend, pinch 72 | 73 | ```js 74 | var rs = new RemoteServer(); 75 | rs.on('pinchend', function(ev){ 76 | console.log('Scale:' + ev.data.scale); 77 | }); 78 | ``` 79 | 80 | * 基础旋转手势 81 | rotate 82 | 83 | ```js 84 | var rs = new RemoteServer(); 85 | rs.on('rotate', function(ev){ 86 | console.log('Rotation:' + ev.data.rotation); 87 | console.log('Direction:' + ev.data.direction); 88 | }); 89 | ``` 90 | 91 | * 高级键盘事件 92 | A, B, C, R, S 93 | 94 | ```js 95 | var rs = new RemoteServer(); 96 | rs.on('R', function(){ 97 | console.log('R key pressed'); 98 | }); 99 | ``` 100 | 101 | * 高级滑动手势 102 | swipeup, swipedown, swipeleft, swiperight 103 | 104 | ```js 105 | var rs = new RemoteServer(); 106 | rs.on('swipeleft', function(){ 107 | Reveal.left(); 108 | }); 109 | ``` 110 | 111 | * 高级缩放手势 112 | pinchin, pinchout 113 | 114 | ```js 115 | var rs = new RemoteServer(); 116 | rs.on('pinchin', function(ev){ 117 | $(myEl).css('transform', 118 | 'scale(' + ev.data.scale +')'); 119 | }); 120 | ``` 121 | 122 | * 高级旋转手势 123 | rotateleft, rotateright 124 | 125 | ```js 126 | var rs = new RemoteServer(); 127 | rs.on('rotateleft', function(ev){ 128 | ... 129 | }); 130 | ``` 131 | 132 | **基础事件基于百度 [TOUCH.JS](http://touch.code.baidu.com/),更详细的可以参考相关说明** 133 | 134 | ## 其他事件 135 | 136 | * 加速度和方向 137 | orientationchange, motionchange 138 | 139 | ```js 140 | var rs = new RemoteServer(); 141 | rs.on('orientationchange', function(ev){ 142 | //console.log(ev); 143 | var d = ev.data.newValue; 144 | if(d.beta * (d.gamma > 0 ? 1 : -1) > 20){ 145 | isDirKeyDown = true; 146 | System.fireEvent("LeftKey"); 147 | }else if(d.beta * (d.gamma > 0 ? 1 : -1) < -20){ 148 | isDirKeyDown = true; 149 | System.fireEvent("RightKey"); 150 | } 151 | }); 152 | ``` 153 | 154 | ## 开发者高级功能 155 | 156 | **修改二维码展现方式** 157 | 158 | 默认的二维码展现方式是**按TAB键**显示出来,通过给drawQRCode传参的方式可以自定义二维码展现方式。 159 | 160 | ```js 161 | var qrcodeEl = document.getElementById('qrcode'); 162 | rs.drawQRCode(qrcodeEl); 163 | ``` 164 | 165 | **配置遥控器事件列表** 166 | 167 | 有时候,我们为了节省流量和提升速度,不希望大量不用处理的事件被发送给socket.io中转服务器,在RomoteServer上可以通过构造参数来指定需要发送的事件,这个参数指定的事件列表会在控制端RemoteClient连接建立时**反向推送**到遥控器,这样的话遥控器就可以只发送白名单中的事件(比如在不需要加速度移和方向移的应用中过滤掉这些可能被频繁发送的事件) 168 | 169 | ```js 170 | var rs = new RemoteServer({ 171 | //让遥控器只发送keypress和swipeend事件 172 | //其他事件将不会被发送 173 | eventList: ['keypress', 'swipeend'] 174 | }); 175 | ``` 176 | 177 | **修改服务SDK** 178 | 179 | ```bash 180 | git clone https://github.com/akira-cn/remote.git 181 | ``` 182 | 183 | 1. 获取项目到本地 184 | 185 | 2. 编辑 src/remote-server.js 186 | 187 | 3. 使用 [webpack](https://webpack.github.io) 构建项目 188 | 189 | 4. 发布 dist/remote-server.umd.js 190 | 191 | **自定义遥控器** 192 | 193 | 1. 获取项目到本地 194 | 195 | 2. 编辑 src/remote-client.js 196 | 197 | 3. 使用 [webpack](https://webpack.github.io) 构建项目 198 | 199 | 4. 发布 dist/remote-client.umd.js 200 | 201 | 5. 在使用服务SDK的时候,修改drawQRCode的参数使得二维码指向新的遥控器路径 202 | 203 | ```js 204 | rs.drawQRCode(null, "http://my.server/pathname/?sid=?"); //URL必须要带上参数sid 205 | ``` 206 | 207 | **修改或自己部署 socket.io 中转服务** 208 | 209 | remote远程控制是基于socket.io的,socket服务基本上只做配对和转发消息的功能,所以一般情况下不需要修改,如果希望消息服务走自己的服务器,可以自己部署。 210 | 211 | socket服务在 socketio/server 下,是基于 [thinkJS 2.0](http://new.thinkjs.org/) 的服务,可以参考 thinkJS 文档进行部署。 212 | 213 | ## Thanks 214 | 215 | [code.baidu](https://github.com/Clouda-team/touch.code.baidu.com) 216 | 217 | [qrcodejs](https://github.com/davidshimjs/qrcodejs) 218 | 219 | [mobvii](https://github.com/75team/mobvii/) 220 | 221 | [thinkjs](https://github.com/75team/thinkjs/) 222 | 223 | ## LICENSE 224 | [MIT](LICENSE) 225 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Remote SDK 2 | 3 | Allowing your PC web page to be remote controlled by mobile device 4 | 5 | ## Quick start 6 | 7 | ```html 8 | 9 | 10 | 26 | ``` 27 | 28 | 1. Add [socket.io](https://github.com/socketio/socket.io) and [remote-server.js](http://s0.qhimg.com/!a4b912de/remote-server.js) to the web page you want to control. 29 | 30 | 2. Create a RemoteServer object, registered the events to handle. 31 | 32 | 3. Call drawQRCode function to draw two-dimensional code, two-dimensional code will be displayed by press **TAB** key on your web page. 33 | 34 | 4. Scan two-dimensional code on your web page with your mobile device. 35 | 36 | 5. Control your web page through your device. 37 | 38 | ## Demo 39 | 40 | [reveal slide](http://remote.baomitu.com/static/demo/reveal/index.html) 41 | 42 | ## Basic Events 43 | 44 | * keydown, keyup, keypress 45 | 46 | ```js 47 | var rs = new RemoteServer(); 48 | rs.on('keypress', function(ev){ 49 | console.log('You pressed:' + ev.data.key); 50 | }); 51 | ``` 52 | 53 | * swipestart, swipeend, swiping (on `C` key) 54 | 55 | ```js 56 | var rs = new RemoteServer(); 57 | rs.on('swipeend', function(ev){ 58 | console.log('Swiped:' + ev.data.direction); 59 | }); 60 | ``` 61 | 62 | * pinchstart, pinchend, pinch (on `C` key) 63 | 64 | ```js 65 | var rs = new RemoteServer(); 66 | rs.on('pinchend', function(ev){ 67 | console.log('Scale:' + ev.data.scale); 68 | }); 69 | ``` 70 | 71 | * rotate (on `C` key) 72 | 73 | ```js 74 | var rs = new RemoteServer(); 75 | rs.on('rotate', function(ev){ 76 | console.log('Rotation:' + ev.data.rotation); 77 | console.log('Direction:' + ev.data.direction); 78 | }); 79 | ``` 80 | 81 | * A, B, C, R, S (named key events) 82 | 83 | ```js 84 | var rs = new RemoteServer(); 85 | rs.on('R', function(){ 86 | console.log('R key pressed'); 87 | }); 88 | ``` 89 | 90 | * swipeup, swipedown, swipeleft, swiperight (on `C` key) 91 | 92 | ```js 93 | var rs = new RemoteServer(); 94 | rs.on('swipeleft', function(){ 95 | Reveal.left(); 96 | }); 97 | ``` 98 | 99 | * pinchin, pinchout (on `C` key) 100 | 101 | ```js 102 | var rs = new RemoteServer(); 103 | rs.on('pinchin', function(ev){ 104 | $(myEl).css('transform', 105 | 'scale(' + ev.data.scale +')'); 106 | }); 107 | ``` 108 | 109 | * rotateleft, rotateright (on `C` key) 110 | 111 | ```js 112 | var rs = new RemoteServer(); 113 | rs.on('rotateleft', function(ev){ 114 | ... 115 | }); 116 | ``` 117 | 118 | * orientationchange, motionchange 119 | 120 | ```js 121 | var rs = new RemoteServer(); 122 | rs.on('orientationchange', function(ev){ 123 | var d = ev.data.newValue; 124 | if(d.beta * (d.gamma > 0 ? 1 : -1) > 20){ 125 | isDirKeyDown = true; 126 | System.fireEvent("LeftKey"); 127 | }else if(d.beta * (d.gamma > 0 ? 1 : -1) < -20){ 128 | isDirKeyDown = true; 129 | System.fireEvent("RightKey"); 130 | } 131 | }); 132 | ``` 133 | 134 | ## For developers 135 | 136 | **Change displaying mode fo QRCode** 137 | 138 | The default two-dimensional code displaying mode is press `TAB` key, pass a html element to the drawQRCode function can be customized to show the code. 139 | 140 | ```js 141 | var qrcodeEl = document.getElementById('qrcode'); 142 | rs.drawQRCode(qrcodeEl); 143 | ``` 144 | 145 | **Filter Events** 146 | 147 | ```js 148 | var rs = new RemoteServer({ 149 | //Make the remote controller only send keypress and swipeend events 150 | eventList: ['keypress', 'swipeend'] 151 | }); 152 | ``` 153 | 154 | **Customize SDK** 155 | 156 | ```bash 157 | git clone https://github.com/akira-cn/remote.git 158 | ``` 159 | 160 | 1. Get latest code from github. 161 | 162 | 2. Edit src/remote-server.js 163 | 164 | 3. Use [webpack](https://webpack.github.io) to build. 165 | 166 | 4. Deploy dist/remote-server.umd.js 167 | 168 | **Customize Remote Controller** 169 | 170 | 1. Get laster code from github. 171 | 172 | 2. Edit src/remote-client.js 173 | 174 | 3. Use [webpack](https://webpack.github.io) to build. 175 | 176 | 4. Deploy dist/remote-client.umd.js 177 | 178 | 5. When calling drawQRCode, passing a new parameter to specify a new url. 179 | 180 | ```js 181 | rs.drawQRCode(null, "http://my.remote-service/pathname/?sid=?"); //URL必须要带上参数sid 182 | ``` 183 | 184 | **Customize socket.io service** 185 | 186 | Remote control is based on socket, socket.io services basically only do the pairing and forwarding message function, so the code of socket.io service does not need to be modified, if you want the message service to run on your own server, you can get and deploy it. 187 | 188 | Socket service is based on the [ThinkJS] (http://new.thinkjs.com/) framework, you can refer to the ThinkJS document. 189 | 190 | ## Thanks 191 | 192 | [code.baidu](https://github.com/Clouda-team/touch.code.baidu.com) 193 | 194 | [qrcodejs](https://github.com/davidshimjs/qrcodejs) 195 | 196 | [mobvii](https://github.com/75team/mobvii/) 197 | 198 | [thinkjs](https://github.com/75team/thinkjs/) 199 | 200 | ## LICENSE 201 | [MIT](LICENSE) 202 | 203 | ## Chinese README 204 | 205 | [中文版](README_cn.md) 206 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .nestedarrow, 36 | .controls, 37 | .fork-reveal, 38 | .share-reveal, 39 | .state-background, 40 | .reveal .progress, 41 | .reveal .backgrounds { 42 | display: none !important; 43 | } 44 | 45 | /* SECTION 3: Set body font face, size, and color. 46 | Consider using a serif font for readability. */ 47 | body, p, td, li, div { 48 | font-size: 20pt!important; 49 | font-family: Georgia, "Times New Roman", Times, serif !important; 50 | color: #000; 51 | } 52 | 53 | /* SECTION 4: Set heading font face, sizes, and color. 54 | Differentiate your headings from your body text. 55 | Perhaps use a large sans-serif for distinction. */ 56 | h1,h2,h3,h4,h5,h6 { 57 | color: #000!important; 58 | height: auto; 59 | line-height: normal; 60 | font-family: Georgia, "Times New Roman", Times, serif !important; 61 | text-shadow: 0 0 0 #000 !important; 62 | text-align: left; 63 | letter-spacing: normal; 64 | } 65 | /* Need to reduce the size of the fonts for printing */ 66 | h1 { font-size: 28pt !important; } 67 | h2 { font-size: 24pt !important; } 68 | h3 { font-size: 22pt !important; } 69 | h4 { font-size: 22pt !important; font-variant: small-caps; } 70 | h5 { font-size: 21pt !important; } 71 | h6 { font-size: 20pt !important; font-style: italic; } 72 | 73 | /* SECTION 5: Make hyperlinks more usable. 74 | Ensure links are underlined, and consider appending 75 | the URL to the end of the link for usability. */ 76 | a:link, 77 | a:visited { 78 | color: #000 !important; 79 | font-weight: bold; 80 | text-decoration: underline; 81 | } 82 | /* 83 | .reveal a:link:after, 84 | .reveal a:visited:after { 85 | content: " (" attr(href) ") "; 86 | color: #222 !important; 87 | font-size: 90%; 88 | } 89 | */ 90 | 91 | 92 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 93 | ul, ol, div, p { 94 | visibility: visible; 95 | position: static; 96 | width: auto; 97 | height: auto; 98 | display: block; 99 | overflow: visible; 100 | margin: 0; 101 | text-align: left !important; 102 | } 103 | .reveal pre, 104 | .reveal table { 105 | margin-left: 0; 106 | margin-right: 0; 107 | } 108 | .reveal pre code { 109 | padding: 20px; 110 | border: 1px solid #ddd; 111 | } 112 | .reveal blockquote { 113 | margin: 20px 0; 114 | } 115 | .reveal .slides { 116 | position: static !important; 117 | width: auto !important; 118 | height: auto !important; 119 | 120 | left: 0 !important; 121 | top: 0 !important; 122 | margin-left: 0 !important; 123 | margin-top: 0 !important; 124 | padding: 0 !important; 125 | zoom: 1 !important; 126 | 127 | overflow: visible !important; 128 | display: block !important; 129 | 130 | text-align: left !important; 131 | -webkit-perspective: none; 132 | -moz-perspective: none; 133 | -ms-perspective: none; 134 | perspective: none; 135 | 136 | -webkit-perspective-origin: 50% 50%; 137 | -moz-perspective-origin: 50% 50%; 138 | -ms-perspective-origin: 50% 50%; 139 | perspective-origin: 50% 50%; 140 | } 141 | .reveal .slides section { 142 | visibility: visible !important; 143 | position: static !important; 144 | width: 100% !important; 145 | height: auto !important; 146 | display: block !important; 147 | overflow: visible !important; 148 | 149 | left: 0 !important; 150 | top: 0 !important; 151 | margin-left: 0 !important; 152 | margin-top: 0 !important; 153 | padding: 60px 20px !important; 154 | z-index: auto !important; 155 | 156 | opacity: 1 !important; 157 | 158 | page-break-after: always !important; 159 | 160 | -webkit-transform-style: flat !important; 161 | -moz-transform-style: flat !important; 162 | -ms-transform-style: flat !important; 163 | transform-style: flat !important; 164 | 165 | -webkit-transform: none !important; 166 | -moz-transform: none !important; 167 | -ms-transform: none !important; 168 | transform: none !important; 169 | 170 | -webkit-transition: none !important; 171 | -moz-transition: none !important; 172 | -ms-transition: none !important; 173 | transition: none !important; 174 | } 175 | .reveal .slides section.stack { 176 | padding: 0 !important; 177 | } 178 | .reveal section:last-of-type { 179 | page-break-after: avoid !important; 180 | } 181 | .reveal section .fragment { 182 | opacity: 1 !important; 183 | visibility: visible !important; 184 | 185 | -webkit-transform: none !important; 186 | -moz-transform: none !important; 187 | -ms-transform: none !important; 188 | transform: none !important; 189 | } 190 | .reveal section img { 191 | display: block; 192 | margin: 15px 0px; 193 | background: rgba(255,255,255,1); 194 | border: 1px solid #666; 195 | box-shadow: none; 196 | } 197 | 198 | .reveal section small { 199 | font-size: 0.8em; 200 | } 201 | 202 | } -------------------------------------------------------------------------------- /src/remote-client.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 5 | var client = new RemoteClient({ 6 | socket: 'http://myhost/pathname:port', 7 | connected: function(err){ 8 | if(!err){ 9 | ... 10 | client.trigger(...); 11 | }else{ 12 | console.log('server error'); 13 | } 14 | } 15 | }); 16 | */ 17 | 18 | var touch = require('../lib/touch.js'); 19 | var defaultConfig = { 20 | socket: 'http://remote.baomitu.com:9699', 21 | eventList: null, //Array or null: event allow to send, set null to send all events. 22 | orientationThredshold: 5, 23 | motionThreshold: 0.5 24 | }; 25 | 26 | function Client(config){ 27 | config = config || {}; 28 | for(var i in defaultConfig){ 29 | if(!(i in config)){ 30 | config[i] = defaultConfig[i]; 31 | } 32 | } 33 | this.config = config; 34 | 35 | var socket = io(config.socket); 36 | var self = this; 37 | 38 | socket.on("connected", function(data){ 39 | 40 | self.src = data.sid; 41 | self.target = data.tid; 42 | 43 | config.connected && config.connected(ev.err, socket); 44 | 45 | self.trigger('client_connected', data); 46 | }); 47 | 48 | touch.config.swipeMinDistance = 50; 49 | 50 | touch.on('.panel', 'touchstart', function(ev){ 51 | var target = ev.target.parentNode; 52 | var id = target.id; 53 | 54 | $(target).css('opacity', 0.5); 55 | self.trigger('keydown', {key: id, timeStamp: ev.timeStamp}); 56 | }); 57 | 58 | touch.on('.panel', 'touchend', function(ev){ 59 | var target = ev.target.parentNode; 60 | var id = target.id; 61 | 62 | $(target).css('opacity', 1.0); 63 | self.trigger('keyup', {key: id, timeStamp: ev.timeStamp}); 64 | }); 65 | 66 | touch.on('.panel', 'tap', function(ev){ 67 | var target = ev.target.parentNode; 68 | var id = target.id; 69 | 70 | self.trigger('keypress', {key: id, timeStamp: ev.timeStamp}); 71 | }); 72 | 73 | touch.on('#C', 'swipestart swipeend swiping', function(ev){ 74 | var target = ev.target.parentNode; 75 | 76 | self.trigger(ev.type, { 77 | timeStamp: ev.timeStamp, 78 | position: ev.position, 79 | direction: ev.direction, 80 | distance: ev.distance, 81 | distanceX : ev.distanceX, 82 | distanceY : ev.distanceY, 83 | x : ev.x, 84 | y : ev.y, 85 | angle: ev.angle, 86 | duration: ev.duration, 87 | fingersCount: ev.fingersCount, 88 | factor: ev.factor 89 | }); 90 | }); 91 | 92 | touch.on('#C', 'pinchstart pinchend pinch', function(ev){ 93 | var target = ev.target.parentNode; 94 | 95 | self.trigger(ev.type, { 96 | timeStamp: ev.timeStamp, 97 | direction: ev.direction, 98 | rotation: ev.rotation, 99 | scale: ev.scale, 100 | fingersCount: ev.fingersCount, 101 | factor: ev.factor 102 | }); 103 | }); 104 | 105 | touch.on('#C', 'rotate', function(ev){ 106 | var target = ev.target.parentNode; 107 | self.trigger('rotate', { 108 | timeStamp: ev.timeStamp, 109 | direction: ev.direction, 110 | rotation: ev.rotation, 111 | }); 112 | }); 113 | 114 | if(window.DeviceOrientationEvent){ 115 | var alpha = 0, beta = 0, gamma = 0; 116 | window.addEventListener("deviceorientation", function(ev){ 117 | var _alpha = ev.alpha; 118 | var _beta = ev.beta; 119 | var _gamma = ev.gamma; 120 | 121 | var threshold = config.orientationThredshold; 122 | var da = Math.abs(_alpha - alpha), 123 | db = Math.abs(_beta - beta), 124 | dg = Math.abs(_gamma - gamma); 125 | 126 | if(da > threshold && Math.abs(da - 360) > threshold 127 | || db > threshold && Math.abs(db - 360) > threshold 128 | || dg > threshold && Math.abs(dg - 360) > threshold){ 129 | self.trigger('orientationchange', { 130 | oldValue: { 131 | alpha: alpha, 132 | beta: beta, 133 | gamma: gamma, 134 | }, 135 | newValue: { 136 | alpha: _alpha, 137 | beta: _beta, 138 | gamma: _gamma, 139 | }, 140 | timeStamp: Date.now() 141 | }); 142 | alpha = _alpha; 143 | beta = _beta; 144 | gamma = _gamma; 145 | } 146 | }); 147 | var accelerationX = 0, accelerationY = 0, accelerationZ = -10; 148 | window.addEventListener("devicemotion", function(ev){ 149 | var x = event.accelerationIncludingGravity.x; 150 | var y = event.accelerationIncludingGravity.y; 151 | var z = event.accelerationIncludingGravity.z; 152 | 153 | var threshold = config.motionThreshold; 154 | 155 | if(Math.abs(x - accelerationX) > threshold 156 | || Math.abs(y - accelerationY) > threshold 157 | || Math.abs(z - accelerationZ) > threshold){ 158 | self.trigger('motionchange', { 159 | oldValue: { 160 | x: accelerationX, 161 | y: accelerationY, 162 | z: accelerationZ, 163 | }, 164 | newValue: { 165 | x: x, 166 | y: y, 167 | z: z, 168 | }, 169 | timeStamp: Date.now() 170 | }); 171 | accelerationX = x; 172 | accelerationY = y; 173 | accelerationZ = z; 174 | } 175 | }); 176 | } 177 | 178 | this.socket = socket; 179 | 180 | socket.on('notify', function(ev){ 181 | if(ev && ev.data && ev.data.config){ 182 | 183 | var config = ev.data.config; 184 | for(var i in config){ 185 | self.config[i] = config[i]; 186 | } 187 | } 188 | }); 189 | } 190 | 191 | Client.prototype.trigger = function(event, data){ 192 | var config = this.config; 193 | if(config.eventList == null || config.eventList.indexOf(event) >= 0){ 194 | var socket = this.socket; 195 | socket && 196 | socket.emit("event", {type: event, src: this.src, data: data}); 197 | } 198 | } 199 | 200 | module.exports = { 201 | RemoteClient: Client 202 | }; 203 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/scripts/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview main基础程序 3 | * @author dron 4 | * @date 2010-09-08 5 | */ 6 | 7 | void function(){ 8 | /** 9 | * configs 10 | */ 11 | var roadChangeCurveCoefficientRandomTimeoutMin = GlobalData.roadChangeCurveCoefficientRandomTimeoutMin; 12 | var roadChangeCurveCoefficientRandomTimeoutMax = GlobalData.roadChangeCurveCoefficientRandomTimeoutMax; 13 | var roadChangeCurveCoefficientRandomTimeoutDiff = roadChangeCurveCoefficientRandomTimeoutMax - 14 | roadChangeCurveCoefficientRandomTimeoutMin; 15 | var maxCurveCoefficient = GlobalData.maxCurveCoefficient; 16 | 17 | var smallCurveCoefficient = 150; // 小弯道界限 18 | var smallCurveCoefficientRandomNumber = 0.25; // 小弯道机率 19 | 20 | /** 21 | * local variables 22 | */ 23 | var road = System.nameSpace("{systemName}.modules.road"); 24 | var pathCacher = System.nameSpace("{systemName}.modules.pathCacher"); 25 | var background = System.nameSpace("{systemName}.modules.background"); 26 | var cover = System.nameSpace("{systemName}.modules.cover"); 27 | var timer = System.nameSpace("{systemName}.modules.timer"); 28 | var keymap = System.nameSpace("{systemName}.modules.keymap"); 29 | var car = System.nameSpace("{systemName}.modules.car"); 30 | var dashboard = System.nameSpace("{systemName}.modules.dashboard"); 31 | var speed = System.nameSpace("{systemName}.modules.speed"); 32 | var pause = System.nameSpace("{systemName}.modules.pause"); 33 | var paddle = System.nameSpace("{systemName}.modules.paddle"); 34 | 35 | /** 36 | * module interface 37 | */ 38 | var module = System.nameSpace("{systemName}.modules.main", { 39 | 40 | initialize: function(){ 41 | background.initialize(); 42 | car.initialize(); 43 | road.initialize(); 44 | cover.initialize(); 45 | dashboard.initialize(); 46 | speed.initialize(); 47 | pause.initialize(); 48 | timer.initialize(); 49 | 50 | loaderBar.done(); 51 | // “树”的资源是给 vml 使用的,这里延迟,避免出现瞬间的红叉 52 | cover.showTree.defer(cover, 500); 53 | 54 | this.initPaddle(); 55 | 56 | }, 57 | 58 | // 加载摇杆 59 | initPaddle: function(){ 60 | var container = System.getModuleContainer("paddle"); 61 | container = Ucren.Element(container); 62 | 63 | var scene = new paddle.scene({ 64 | container: container, 65 | width: 120, 66 | height: 120, 67 | pic: "images/paddle-scene.gif" 68 | }); 69 | scene.render(); 70 | 71 | var group = new paddle.dragGroup({ limit: 40, itemGlobalConf: { scene: scene } }); 72 | // group.createItem({ width: 44, height: 44, left: 38, top: 38, moveMultiples: 0, pic: "images/paddle-rods.png" }); // 这个不动的,也不用写 73 | group.createItem({ width: 44, height: 44, left: 38, top: 38, moveMultiples: 1 / 5, pic: "images/paddle-rods.png" }); 74 | group.createItem({ width: 44, height: 44, left: 38, top: 38, moveMultiples: 2 / 5, pic: "images/paddle-rods.png" }); 75 | group.createItem({ width: 44, height: 44, left: 38, top: 38, moveMultiples: 3 / 5, pic: "images/paddle-rods.png" }); 76 | // group.createItem({ width: 44, height: 44, left: 38, top: 38, moveMultiples: 4 / 5, pic: "images/paddle-rods.png" }); // 这个看不到 77 | group.createItem({ width: 78, height: 78, left: 21, top: 21, moveMultiples: 1, pic: "images/paddle-bar.gif", primary: true }); 78 | 79 | keymap.initPaddle(group); // 将 group 挂到 keymap 上,在 keymap 上处理事件 80 | 81 | var paddleOption = Ucren.Element("paddle-option"); 82 | 83 | var checkbox = Ucren.queryElement("input", paddleOption.dom)[0]; 84 | checkbox = Ucren.Element(checkbox); 85 | 86 | var label = Ucren.queryElement("label", paddleOption.dom)[0]; 87 | label = Ucren.Element(label); 88 | 89 | label.addEvents({ 90 | click: function(){ 91 | checkbox.dom.checked = !checkbox.dom.checked; 92 | container.display(checkbox.dom.checked); 93 | } 94 | }); 95 | 96 | checkbox.addEvents({ 97 | click: function(){ 98 | container.display(checkbox.dom.checked); 99 | } 100 | }); 101 | 102 | Ucren.loadImage([ 103 | "images/paddle-bar.gif", 104 | "images/paddle-rods.png", 105 | "images/paddle-scene.gif" 106 | ]); 107 | }, 108 | 109 | // 自由模式 110 | freeMode: function(){ 111 | keymap.initialize(); 112 | cover.start(); 113 | timer.start(); 114 | 115 | /** 116 | * 策略说明,备忘: 117 | * 118 | * + 小弯道指系数小于 smallCurveCoefficient 的弯道 119 | * + 小弯道出现机率为 smallCurveCoefficientRandomNumber 120 | * + 切换到小弯道完成后,等待 0 秒,进入下一次切换 121 | * + 切换到大弯道或直道完成后,等待 randomTimeout 时间,进入下一次切换 122 | * + 弯道、直道交替出现 123 | * 124 | */ 125 | var randomCurveCoefficient; 126 | void function(){ 127 | // randomCurveCoefficient = -200; 128 | if(randomCurveCoefficient){ 129 | randomCurveCoefficient = 0; 130 | }else if(Math.random() > smallCurveCoefficientRandomNumber){ // 大弯道 131 | randomCurveCoefficient = (Ucren.randomNumber(maxCurveCoefficient - smallCurveCoefficient) + smallCurveCoefficient) * (Ucren.randomNumber(200) < 100 ? 1 : -1); 132 | }else{ // 小弯道 133 | randomCurveCoefficient = Ucren.randomNumber(smallCurveCoefficient) * (Ucren.randomNumber(200) < 100 ? 1 : -1); 134 | } 135 | 136 | var randomTimeout = Ucren.randomNumber(roadChangeCurveCoefficientRandomTimeoutDiff) + roadChangeCurveCoefficientRandomTimeoutMin; 137 | road.setTargetCurveCoefficient(randomCurveCoefficient, function(){ 138 | setTimeout(this, randomCurveCoefficient < smallCurveCoefficientRandomNumber && 139 | randomCurveCoefficient != 0 ? 0 : randomTimeout); 140 | }.bind(arguments.callee)); 141 | }(); 142 | 143 | GlobalData.started = true; 144 | } 145 | 146 | // test: function(){ // 路径缓存系统测试程序 147 | // road.draw(230); 148 | // 149 | // var div = ["
"]; 150 | // for(var i = 0; i < 100; i ++){ 151 | // var x = pathCacher.getRoadXByY(i); 152 | // div.push("
"); 155 | // } 156 | // div.push("
"); 157 | // setTimeout(function(){ 158 | // document.body.innerHTML = div.join(""); 159 | // }, 1000); 160 | // } 161 | 162 | }); 163 | 164 | if(Ucren.isIe) 165 | document.execCommand("BackgroundImageCache", false, true); 166 | 167 | module.initialize(); 168 | module.freeMode(); 169 | 170 | }(); -------------------------------------------------------------------------------- /socketio/server/www/static/demo/race/images/base.css: -------------------------------------------------------------------------------- 1 | /** 2 | * reset.css 3 | */ 4 | html{ 5 | color:#000; 6 | background:#FFF; 7 | } 8 | body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td{ 9 | margin:0; 10 | padding:0; 11 | } 12 | table{ 13 | border-collapse: collapse; 14 | border-spacing: 0; 15 | } 16 | fieldset, img{ 17 | border: 0; 18 | } 19 | address, caption, cite, code, dfn, em, strong, th, var{ 20 | font-style: normal; 21 | font-weight: normal; 22 | } 23 | li{ 24 | list-style:none; 25 | } 26 | caption, th{ 27 | text-align:left; 28 | } 29 | h1, h2, h3, h4, h5, h6{ 30 | font-size: 100%; 31 | font-weight: normal; 32 | } 33 | q:before, q:after{ 34 | content: ''; 35 | } 36 | abbr, acronym{ 37 | border: 0; 38 | font-variant: normal; 39 | } 40 | sup{ 41 | vertical-align: text-top; 42 | } 43 | sub{ 44 | vertical-align: text-bottom; 45 | } 46 | input, textarea, select{ 47 | font-family: inherit; 48 | font-size: inherit; 49 | font-weight: inherit; 50 | } 51 | input, textarea, select{ 52 | *font-size: 100%; 53 | } 54 | legend{ 55 | color: #000; 56 | } 57 | 58 | /** 59 | * common.css 60 | */ 61 | html, body{ 62 | font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; 63 | width: 100%; 64 | height: 100%; 65 | } 66 | 67 | .clearfix:after{ 68 | content: "."; 69 | display: block; 70 | height: 0; 71 | clear: both; 72 | visibility: hidden; 73 | zoom: 1; 74 | _height: 1px; 75 | } 76 | 77 | *html .clearfix{ 78 | height: 1%; 79 | } 80 | 81 | *+html .clearfix{ 82 | height: 1%; 83 | } 84 | 85 | /** 86 | * loading.css 87 | */ 88 | #loading{ 89 | position: absolute; 90 | left: 0; 91 | top: 0; 92 | width: 100%; 93 | height: 100%; 94 | background-color: #fff; 95 | text-align: center; 96 | } 97 | 98 | #loading .text{ 99 | position: relative; 100 | width: 676px; 101 | height: 20px; 102 | top: 119px; 103 | text-align: center; 104 | font-size: 14px; 105 | margin: auto; 106 | } 107 | 108 | #loading .bar{ 109 | position: relative; 110 | width: 676px; 111 | height: 18px; 112 | top: 139px; 113 | left: 0; 114 | border-width: 2px; 115 | border-color: #606060 #e9e7e3 #e9e7e3 #606060; 116 | border-style: solid; 117 | background-color: #fff; 118 | text-align: left; 119 | margin: auto; 120 | } 121 | 122 | #loaded{ 123 | width: 0px; 124 | height: 18px; 125 | overflow: hidden; 126 | background-color: #0a246a; 127 | } 128 | 129 | /** 130 | * page.css 131 | */ 132 | html, body{ 133 | width: auto; 134 | height: 100%; 135 | } 136 | 137 | body{ 138 | background-color: #333; 139 | } 140 | 141 | #page{ 142 | width: auto; 143 | text-align: center; 144 | } 145 | 146 | #screen{ 147 | width: 680px; 148 | height: 300px; 149 | margin: auto; 150 | margin-top: 30px; 151 | background-image: url(background.png); 152 | position: relative; 153 | } 154 | 155 | #screen .cloud{ 156 | position: absolute; 157 | width: 676px; 158 | height: 196px; 159 | left: 2px; 160 | top: 2px; 161 | background-image: url(cloud.jpg); 162 | display: none; 163 | } 164 | 165 | #screen .hill{ 166 | position: absolute; 167 | width: 676px; 168 | height: 36px; 169 | left: 2px; 170 | top: 162px; 171 | background-image: url(hill.gif); 172 | display: none; 173 | } 174 | 175 | #screen .road, 176 | #screen .cover{ 177 | position: absolute; 178 | left: 2px; 179 | top: 198px; 180 | width: 676px; 181 | height: 100px; 182 | overflow: hidden; 183 | } 184 | 185 | #screen .cover{ 186 | top: -2px; 187 | height: 300px; 188 | } 189 | 190 | #screen .cover img{ 191 | position: absolute; 192 | border: 0; 193 | } 194 | 195 | #screen .cover .point{ 196 | position: absolute; 197 | background-color: red; 198 | width: 1px; 199 | height: 1px; 200 | overflow: hidden; 201 | } 202 | 203 | #screen .mask{ 204 | position: absolute; 205 | left: 2px; 206 | top: 198px; 207 | width: 676px; 208 | height: 99px; 209 | background-image: url(mask.png); 210 | _background-image: none; 211 | _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/mask.png',sizingMethod='scale'); 212 | } 213 | 214 | #screen .car{ 215 | position: absolute; 216 | width: 100px; 217 | height: 100px; 218 | left: 290px; 219 | top: 208px; 220 | } 221 | 222 | #buttons{ 223 | margin: 10px auto; 224 | width: 680px; 225 | height: 30px; 226 | } 227 | 228 | #buttons button{ 229 | float: left; 230 | height: 100%; 231 | border-width: 1px; 232 | } 233 | 234 | #copyright{ 235 | color: #999; 236 | margin: auto; 237 | width: 680px; 238 | line-height: 20px; 239 | font-size: 12px; 240 | text-align: center; 241 | } 242 | 243 | #page .line{ 244 | margin: auto; 245 | color: #ccc; 246 | width: 600px; 247 | line-height: 30px; 248 | font-size: 14px; 249 | text-align: left; 250 | } 251 | 252 | #page .line strong{ 253 | font-size: 24px; 254 | font-weight: 700; 255 | color: yellow; 256 | } 257 | 258 | #page .line em{ 259 | color: #0ff; 260 | } 261 | 262 | #pause{ 263 | position: absolute; 264 | width: 333px; 265 | height: 78px; 266 | left: 174px; 267 | top: 111px; 268 | background-image: url(pause.png); 269 | _background-image: none; 270 | _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/pause.png',sizingMethod='scale'); 271 | display: none; 272 | } 273 | 274 | #info{ 275 | width: 680px; 276 | height: 145px; 277 | margin: auto; 278 | position: relative; 279 | background-color: #080703; 280 | } 281 | 282 | #info .speedInfo{ 283 | width: 256px; 284 | height: 145px; 285 | left: 212px; 286 | top: 0px; 287 | position: absolute; 288 | background-image: url(speed-bg.gif); 289 | } 290 | 291 | #paddle-option{ 292 | position: absolute; 293 | line-height: 20px; 294 | text-indent: 2px; 295 | left: 10px; 296 | top: 110px; 297 | } 298 | 299 | #paddle-option label{ 300 | font-size: 14px; 301 | color: #ccc; 302 | } 303 | 304 | /* basicslippage */ 305 | .ucrenlite-basicslippage-layer{ 306 | overflow: hidden; 307 | line-height: 0; 308 | } 309 | .ucrenlite-basicslippage-inner{ 310 | text-decoration: none; 311 | text-align: center; 312 | font-size: 14px; 313 | display: block; 314 | } 315 | 316 | #paddle{ 317 | position: absolute; 318 | left: -146px; 319 | top: 11px; 320 | display: none; 321 | } 322 | 323 | /* paddle */ 324 | .paddle-scene{ 325 | position: relative; 326 | } 327 | 328 | .paddle-item{ 329 | position: absolute; 330 | -moz-user-select: none; 331 | -webkit-user-select: none; 332 | } 333 | 334 | #countdown{ 335 | left: 50%; 336 | top: 50%; 337 | position: absolute; 338 | margin-left: -24px; 339 | margin-top: -24px; 340 | color: #ff0; 341 | font-size: 48px; 342 | display: none; 343 | } 344 | -------------------------------------------------------------------------------- /src/remote-server.js: -------------------------------------------------------------------------------- 1 | var QRCode = require('../lib/qrcode.js'); 2 | 3 | /** 4 | * 5 | var server = new RemoteServer({ 6 | socket: 'http://myhost/pathname:port', 7 | eventList: [], 8 | connected: function(err){ 9 | if(!err){ 10 | ... 11 | client.trigger(...); 12 | }else{ 13 | console.log('server error'); 14 | } 15 | } 16 | }); 17 | server.drawQRCode(); 18 | */ 19 | var handlers = {}; 20 | var defaultConfig = { 21 | socket: 'http://remote.baomitu.com:9699', 22 | client: 'http://remote.baomitu.com/socketio/?sid=?', 23 | QRCodeKey: 9, //press 'TAB' key to show qrcode 24 | eventList: null, //Array or null: events to listen, set null to listen all events. 25 | }; 26 | 27 | function Server(config){ 28 | config = config || {}; 29 | for(var i in defaultConfig){ 30 | if(!(i in config)){ 31 | config[i] = defaultConfig[i]; 32 | } 33 | } 34 | this.config = config; 35 | 36 | var socket = io(config.socket); 37 | var self = this; 38 | 39 | socket.on("connected", function(ev){ 40 | self.src = ev.sid; 41 | config.connected && config.connected(ev.err, socket); 42 | }); 43 | 44 | this.socket = socket; 45 | 46 | function definedEventKey(type, ev){ 47 | if(ev.type === 'keypress'){ 48 | var data = ev.data; 49 | if(data.key === type){ 50 | ev.realType = type; 51 | return true; 52 | } 53 | } 54 | } 55 | 56 | function definedEventRotate(type, ev){ 57 | if(ev.type === 'rotate'){ 58 | var data = ev.data; 59 | if(data.direction === type.slice(6)){ 60 | ev.realType = type; 61 | return true; 62 | } 63 | } 64 | } 65 | 66 | function definedEventSwipe(type, ev){ 67 | if(ev.type === 'swipeend'){ 68 | var data = ev.data; 69 | if(data.direction === type.slice(5)){ 70 | ev.realType = type; 71 | return true; 72 | } 73 | } 74 | } 75 | 76 | //default event filters 77 | this.filters = { 78 | up: definedEventKey, 79 | down: definedEventKey, 80 | left: definedEventKey, 81 | right: definedEventKey, 82 | A: definedEventKey, 83 | B: definedEventKey, 84 | R: definedEventKey, 85 | S: definedEventKey, 86 | 87 | rotateleft: definedEventRotate, 88 | rotateright: definedEventRotate, 89 | 90 | pinchout: function(type, ev){ 91 | if(ev.type === 'pinchend'){ 92 | var data = ev.data; 93 | if(data.scale > 1.0){ 94 | ev.realType = type; 95 | return true; 96 | } 97 | } 98 | }, 99 | pinchin: function(type, ev){ 100 | if(ev.type === 'pinchend'){ 101 | var data = ev.data; 102 | if(data.scale < 1.0){ 103 | ev.realType = type; 104 | return true; 105 | } 106 | } 107 | }, 108 | 109 | swipeup: definedEventSwipe, 110 | swipedown: definedEventSwipe, 111 | swipeleft: definedEventSwipe, 112 | swiperight: definedEventSwipe, 113 | 114 | 'default': function(type, ev){ 115 | ev.realType = type; 116 | return type === ev.type; 117 | } 118 | }; 119 | 120 | var eventListMaps = { 121 | 'up': 'keypress', 122 | 'down': 'keypress', 123 | 'left': 'keypress', 124 | 'right': 'keypress', 125 | 'A': 'keypress', 126 | 'B': 'keypress', 127 | 'C': 'keypress', 128 | 'R': 'keypress', 129 | 'S': 'keypress', 130 | 131 | 'rotateleft': 'rotate', 132 | 'rotateright': 'rotate', 133 | 134 | 'pinchin': 'pinchend', 135 | 'pinchout': 'pinchend', 136 | 137 | 'swipeup': 'swipeend', 138 | 'swipedown': 'swipeend', 139 | 'swipeleft': 'swipeend', 140 | 'swiperight': 'swipeend', 141 | }; 142 | 143 | if(config.eventList != null){ 144 | this.on('client_connected', function(ev){ 145 | var eventList = config.eventList; 146 | var realEventList = []; 147 | 148 | for(var i = 0; i < eventList.length; i++){ 149 | var event = eventList[i]; 150 | event = eventListMaps[event] || event; 151 | 152 | if(realEventList.indexOf(event) < 0){ 153 | realEventList.push(event); 154 | } 155 | } 156 | 157 | var data = ev.data; 158 | self.notify(data.sid, { 159 | config: { 160 | eventList: realEventList 161 | } 162 | }); 163 | }); 164 | } 165 | } 166 | 167 | Server.prototype.on = function(type, func){ 168 | var filters = this.filters; 169 | 170 | var handler = function(ev){ 171 | var filter = filters[type] || filters['default']; 172 | if(filter.call(this, type, ev)){ 173 | func.call(this, ev); 174 | } 175 | } 176 | 177 | this.socket.on('event', handler); 178 | 179 | handlers[type] = handlers[type] || []; 180 | handlers[type].push({handler:handler, func: func}); 181 | } 182 | 183 | Server.prototype.off = function(type, func){ 184 | var funcs = handlers[type]; 185 | var funcsLeft = []; 186 | 187 | for(var i = 0; i < funcs.length; i++){ 188 | var f = funcs[i]; 189 | if(!func || f.func === func){ 190 | this.socket.off('event', f.handler); 191 | }else{ 192 | funcsLeft.push(f); 193 | } 194 | } 195 | handlers[type] = funcsLeft; 196 | } 197 | 198 | Server.prototype.drawQRCode = function(el, client){ 199 | var config = this.config; 200 | client = client || config.client; 201 | 202 | if(typeof el === 'string'){ 203 | el = document.getElementById(el); 204 | } 205 | if(el == null || typeof el === 'boolean'){ 206 | var mask = document.createElement('div'); 207 | mask.style.cssText = 'position:absolute;width:100%;height:100%;left:0;top:0;background:rgba(0,0,0,0.618);z-index:99999999'; 208 | mask.style.display = el ? 'block' : 'none'; 209 | 210 | el = document.createElement('div'); 211 | el.style.cssText = 'position:absolute;display:inline-block;top:50%;left:50%;margin-top:-128px;margin-left:-128px;' 212 | mask.appendChild(el); 213 | document.body.appendChild(mask); 214 | var QRCodeKey = config.QRCodeKey; 215 | document.body.onkeydown = function(ev){ 216 | if(ev.keyCode === QRCodeKey){ 217 | mask.style.display = mask.style.display === 'none'?'block':'none'; 218 | ev.preventDefault(); 219 | } 220 | } 221 | this.on('client_connected', function(){ 222 | mask.style.display = 'none'; 223 | }); 224 | } 225 | var self = this; 226 | if(this.src){ 227 | new QRCode(el, client.replace('=?', '='+this.src)); 228 | }else{ 229 | this.socket.on('connected', function(){ 230 | new QRCode(el, client.replace('=?', '='+self.src)); 231 | }); 232 | } 233 | } 234 | 235 | Server.prototype.notify = function(target, data){ 236 | if(typeof target !== 'string'){ 237 | data = target; 238 | target = undefined; 239 | } 240 | 241 | var socket = this.socket; 242 | socket && 243 | socket.emit("notify", {type: "notify", src: this.src, data: data, target: target}); 244 | } 245 | 246 | module.exports = { 247 | RemoteServer: Server 248 | }; -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/night.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 2 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 3 | /** 4 | * Black theme for reveal.js. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | /********************************************* 9 | * GLOBAL STYLES 10 | *********************************************/ 11 | body { 12 | background: #111; 13 | background-color: #111; } 14 | 15 | .reveal { 16 | font-family: 'Open Sans', sans-serif; 17 | font-size: 30px; 18 | font-weight: normal; 19 | color: #eee; } 20 | 21 | ::selection { 22 | color: #fff; 23 | background: #e7ad52; 24 | text-shadow: none; } 25 | 26 | .reveal .slides > section, .reveal .slides > section > section { 27 | line-height: 1.3; 28 | font-weight: inherit; } 29 | 30 | /********************************************* 31 | * HEADERS 32 | *********************************************/ 33 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 34 | margin: 0 0 20px 0; 35 | color: #eee; 36 | font-family: 'Montserrat', Impact, sans-serif; 37 | font-weight: normal; 38 | line-height: 1.2; 39 | letter-spacing: -0.03em; 40 | text-transform: none; 41 | text-shadow: none; 42 | word-wrap: break-word; } 43 | 44 | .reveal h1 { 45 | font-size: 3.77em; } 46 | 47 | .reveal h2 { 48 | font-size: 2.11em; } 49 | 50 | .reveal h3 { 51 | font-size: 1.55em; } 52 | 53 | .reveal h4 { 54 | font-size: 1em; } 55 | 56 | .reveal h1 { 57 | text-shadow: none; } 58 | 59 | /********************************************* 60 | * OTHER 61 | *********************************************/ 62 | .reveal p { 63 | margin: 20px 0; 64 | line-height: 1.3; } 65 | 66 | /* Ensure certain elements are never larger than the slide itself */ 67 | .reveal img, .reveal video, .reveal iframe { 68 | max-width: 95%; 69 | max-height: 95%; } 70 | 71 | .reveal strong, .reveal b { 72 | font-weight: bold; } 73 | 74 | .reveal em { 75 | font-style: italic; } 76 | 77 | .reveal ol, .reveal dl, .reveal ul { 78 | display: inline-block; 79 | text-align: left; 80 | margin: 0 0 0 1em; } 81 | 82 | .reveal ol { 83 | list-style-type: decimal; } 84 | 85 | .reveal ul { 86 | list-style-type: disc; } 87 | 88 | .reveal ul ul { 89 | list-style-type: square; } 90 | 91 | .reveal ul ul ul { 92 | list-style-type: circle; } 93 | 94 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 95 | display: block; 96 | margin-left: 40px; } 97 | 98 | .reveal dt { 99 | font-weight: bold; } 100 | 101 | .reveal dd { 102 | margin-left: 40px; } 103 | 104 | .reveal q, .reveal blockquote { 105 | quotes: none; } 106 | 107 | .reveal blockquote { 108 | display: block; 109 | position: relative; 110 | width: 70%; 111 | margin: 20px auto; 112 | padding: 5px; 113 | font-style: italic; 114 | background: rgba(255, 255, 255, 0.05); 115 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 116 | 117 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 118 | display: inline-block; } 119 | 120 | .reveal q { 121 | font-style: italic; } 122 | 123 | .reveal pre { 124 | display: block; 125 | position: relative; 126 | width: 90%; 127 | margin: 20px auto; 128 | text-align: left; 129 | font-size: 0.55em; 130 | font-family: monospace; 131 | line-height: 1.2em; 132 | word-wrap: break-word; 133 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 134 | 135 | .reveal code { 136 | font-family: monospace; } 137 | 138 | .reveal pre code { 139 | display: block; 140 | padding: 5px; 141 | overflow: auto; 142 | max-height: 400px; 143 | word-wrap: normal; 144 | background: #3F3F3F; 145 | color: #DCDCDC; } 146 | 147 | .reveal table { 148 | margin: auto; 149 | border-collapse: collapse; 150 | border-spacing: 0; } 151 | 152 | .reveal table th { 153 | font-weight: bold; } 154 | 155 | .reveal table th, .reveal table td { 156 | text-align: left; 157 | padding: 0.2em 0.5em 0.2em 0.5em; 158 | border-bottom: 1px solid; } 159 | 160 | .reveal table th[align="center"], .reveal table td[align="center"] { 161 | text-align: center; } 162 | 163 | .reveal table th[align="right"], .reveal table td[align="right"] { 164 | text-align: right; } 165 | 166 | .reveal table tr:last-child td { 167 | border-bottom: none; } 168 | 169 | .reveal sup { 170 | vertical-align: super; } 171 | 172 | .reveal sub { 173 | vertical-align: sub; } 174 | 175 | .reveal small { 176 | display: inline-block; 177 | font-size: 0.6em; 178 | line-height: 1.2em; 179 | vertical-align: top; } 180 | 181 | .reveal small * { 182 | vertical-align: top; } 183 | 184 | /********************************************* 185 | * LINKS 186 | *********************************************/ 187 | .reveal a { 188 | color: #e7ad52; 189 | text-decoration: none; 190 | -webkit-transition: color 0.15s ease; 191 | -moz-transition: color 0.15s ease; 192 | transition: color 0.15s ease; } 193 | 194 | .reveal a:hover { 195 | color: #f3d7ac; 196 | text-shadow: none; 197 | border: none; } 198 | 199 | .reveal .roll span:after { 200 | color: #fff; 201 | background: #d0881d; } 202 | 203 | /********************************************* 204 | * IMAGES 205 | *********************************************/ 206 | .reveal section img { 207 | margin: 15px 0px; 208 | background: rgba(255, 255, 255, 0.12); 209 | border: 4px solid #eee; 210 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 211 | 212 | .reveal a img { 213 | -webkit-transition: all 0.15s linear; 214 | -moz-transition: all 0.15s linear; 215 | transition: all 0.15s linear; } 216 | 217 | .reveal a:hover img { 218 | background: rgba(255, 255, 255, 0.2); 219 | border-color: #e7ad52; 220 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 221 | 222 | /********************************************* 223 | * NAVIGATION CONTROLS 224 | *********************************************/ 225 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 226 | border-right-color: #e7ad52; } 227 | 228 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 229 | border-left-color: #e7ad52; } 230 | 231 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 232 | border-bottom-color: #e7ad52; } 233 | 234 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 235 | border-top-color: #e7ad52; } 236 | 237 | .reveal .controls div.navigate-left.enabled:hover { 238 | border-right-color: #f3d7ac; } 239 | 240 | .reveal .controls div.navigate-right.enabled:hover { 241 | border-left-color: #f3d7ac; } 242 | 243 | .reveal .controls div.navigate-up.enabled:hover { 244 | border-bottom-color: #f3d7ac; } 245 | 246 | .reveal .controls div.navigate-down.enabled:hover { 247 | border-top-color: #f3d7ac; } 248 | 249 | /********************************************* 250 | * PROGRESS BAR 251 | *********************************************/ 252 | .reveal .progress { 253 | background: rgba(0, 0, 0, 0.2); } 254 | 255 | .reveal .progress span { 256 | background: #e7ad52; 257 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 258 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 259 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 260 | 261 | /********************************************* 262 | * SLIDE NUMBER 263 | *********************************************/ 264 | .reveal .slide-number { 265 | color: #e7ad52; } 266 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/serif.css: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | .reveal a { 8 | line-height: 1.3em; } 9 | 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: #F0F1EB; 15 | background-color: #F0F1EB; } 16 | 17 | .reveal { 18 | font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 19 | font-size: 36px; 20 | font-weight: normal; 21 | color: #000; } 22 | 23 | ::selection { 24 | color: #fff; 25 | background: #26351C; 26 | text-shadow: none; } 27 | 28 | .reveal .slides > section, .reveal .slides > section > section { 29 | line-height: 1.3; 30 | font-weight: inherit; } 31 | 32 | /********************************************* 33 | * HEADERS 34 | *********************************************/ 35 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #383D3D; 38 | font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 39 | font-weight: normal; 40 | line-height: 1.2; 41 | letter-spacing: normal; 42 | text-transform: none; 43 | text-shadow: none; 44 | word-wrap: break-word; } 45 | 46 | .reveal h1 { 47 | font-size: 3.77em; } 48 | 49 | .reveal h2 { 50 | font-size: 2.11em; } 51 | 52 | .reveal h3 { 53 | font-size: 1.55em; } 54 | 55 | .reveal h4 { 56 | font-size: 1em; } 57 | 58 | .reveal h1 { 59 | text-shadow: none; } 60 | 61 | /********************************************* 62 | * OTHER 63 | *********************************************/ 64 | .reveal p { 65 | margin: 20px 0; 66 | line-height: 1.3; } 67 | 68 | /* Ensure certain elements are never larger than the slide itself */ 69 | .reveal img, .reveal video, .reveal iframe { 70 | max-width: 95%; 71 | max-height: 95%; } 72 | 73 | .reveal strong, .reveal b { 74 | font-weight: bold; } 75 | 76 | .reveal em { 77 | font-style: italic; } 78 | 79 | .reveal ol, .reveal dl, .reveal ul { 80 | display: inline-block; 81 | text-align: left; 82 | margin: 0 0 0 1em; } 83 | 84 | .reveal ol { 85 | list-style-type: decimal; } 86 | 87 | .reveal ul { 88 | list-style-type: disc; } 89 | 90 | .reveal ul ul { 91 | list-style-type: square; } 92 | 93 | .reveal ul ul ul { 94 | list-style-type: circle; } 95 | 96 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 97 | display: block; 98 | margin-left: 40px; } 99 | 100 | .reveal dt { 101 | font-weight: bold; } 102 | 103 | .reveal dd { 104 | margin-left: 40px; } 105 | 106 | .reveal q, .reveal blockquote { 107 | quotes: none; } 108 | 109 | .reveal blockquote { 110 | display: block; 111 | position: relative; 112 | width: 70%; 113 | margin: 20px auto; 114 | padding: 5px; 115 | font-style: italic; 116 | background: rgba(255, 255, 255, 0.05); 117 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 118 | 119 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 120 | display: inline-block; } 121 | 122 | .reveal q { 123 | font-style: italic; } 124 | 125 | .reveal pre { 126 | display: block; 127 | position: relative; 128 | width: 90%; 129 | margin: 20px auto; 130 | text-align: left; 131 | font-size: 0.55em; 132 | font-family: monospace; 133 | line-height: 1.2em; 134 | word-wrap: break-word; 135 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 136 | 137 | .reveal code { 138 | font-family: monospace; } 139 | 140 | .reveal pre code { 141 | display: block; 142 | padding: 5px; 143 | overflow: auto; 144 | max-height: 400px; 145 | word-wrap: normal; 146 | background: #3F3F3F; 147 | color: #DCDCDC; } 148 | 149 | .reveal table { 150 | margin: auto; 151 | border-collapse: collapse; 152 | border-spacing: 0; } 153 | 154 | .reveal table th { 155 | font-weight: bold; } 156 | 157 | .reveal table th, .reveal table td { 158 | text-align: left; 159 | padding: 0.2em 0.5em 0.2em 0.5em; 160 | border-bottom: 1px solid; } 161 | 162 | .reveal table th[align="center"], .reveal table td[align="center"] { 163 | text-align: center; } 164 | 165 | .reveal table th[align="right"], .reveal table td[align="right"] { 166 | text-align: right; } 167 | 168 | .reveal table tr:last-child td { 169 | border-bottom: none; } 170 | 171 | .reveal sup { 172 | vertical-align: super; } 173 | 174 | .reveal sub { 175 | vertical-align: sub; } 176 | 177 | .reveal small { 178 | display: inline-block; 179 | font-size: 0.6em; 180 | line-height: 1.2em; 181 | vertical-align: top; } 182 | 183 | .reveal small * { 184 | vertical-align: top; } 185 | 186 | /********************************************* 187 | * LINKS 188 | *********************************************/ 189 | .reveal a { 190 | color: #51483D; 191 | text-decoration: none; 192 | -webkit-transition: color 0.15s ease; 193 | -moz-transition: color 0.15s ease; 194 | transition: color 0.15s ease; } 195 | 196 | .reveal a:hover { 197 | color: #8b7b69; 198 | text-shadow: none; 199 | border: none; } 200 | 201 | .reveal .roll span:after { 202 | color: #fff; 203 | background: #25211c; } 204 | 205 | /********************************************* 206 | * IMAGES 207 | *********************************************/ 208 | .reveal section img { 209 | margin: 15px 0px; 210 | background: rgba(255, 255, 255, 0.12); 211 | border: 4px solid #000; 212 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 213 | 214 | .reveal a img { 215 | -webkit-transition: all 0.15s linear; 216 | -moz-transition: all 0.15s linear; 217 | transition: all 0.15s linear; } 218 | 219 | .reveal a:hover img { 220 | background: rgba(255, 255, 255, 0.2); 221 | border-color: #51483D; 222 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 223 | 224 | /********************************************* 225 | * NAVIGATION CONTROLS 226 | *********************************************/ 227 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 228 | border-right-color: #51483D; } 229 | 230 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 231 | border-left-color: #51483D; } 232 | 233 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 234 | border-bottom-color: #51483D; } 235 | 236 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 237 | border-top-color: #51483D; } 238 | 239 | .reveal .controls div.navigate-left.enabled:hover { 240 | border-right-color: #8b7b69; } 241 | 242 | .reveal .controls div.navigate-right.enabled:hover { 243 | border-left-color: #8b7b69; } 244 | 245 | .reveal .controls div.navigate-up.enabled:hover { 246 | border-bottom-color: #8b7b69; } 247 | 248 | .reveal .controls div.navigate-down.enabled:hover { 249 | border-top-color: #8b7b69; } 250 | 251 | /********************************************* 252 | * PROGRESS BAR 253 | *********************************************/ 254 | .reveal .progress { 255 | background: rgba(0, 0, 0, 0.2); } 256 | 257 | .reveal .progress span { 258 | background: #51483D; 259 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 260 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 261 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 262 | 263 | /********************************************* 264 | * SLIDE NUMBER 265 | *********************************************/ 266 | .reveal .slide-number { 267 | color: #51483D; } 268 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/moon.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/league-gothic/league-gothic.css); 2 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 3 | /** 4 | * Solarized Dark theme for reveal.js. 5 | * Author: Achim Staebler 6 | */ 7 | /** 8 | * Solarized colors by Ethan Schoonover 9 | */ 10 | html * { 11 | color-profile: sRGB; 12 | rendering-intent: auto; } 13 | 14 | /********************************************* 15 | * GLOBAL STYLES 16 | *********************************************/ 17 | body { 18 | background: #002b36; 19 | background-color: #002b36; } 20 | 21 | .reveal { 22 | font-family: 'Lato', sans-serif; 23 | font-size: 36px; 24 | font-weight: normal; 25 | color: #93a1a1; } 26 | 27 | ::selection { 28 | color: #fff; 29 | background: #d33682; 30 | text-shadow: none; } 31 | 32 | .reveal .slides > section, .reveal .slides > section > section { 33 | line-height: 1.3; 34 | font-weight: inherit; } 35 | 36 | /********************************************* 37 | * HEADERS 38 | *********************************************/ 39 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 40 | margin: 0 0 20px 0; 41 | color: #eee8d5; 42 | font-family: 'League Gothic', Impact, sans-serif; 43 | font-weight: normal; 44 | line-height: 1.2; 45 | letter-spacing: normal; 46 | text-transform: uppercase; 47 | text-shadow: none; 48 | word-wrap: break-word; } 49 | 50 | .reveal h1 { 51 | font-size: 3.77em; } 52 | 53 | .reveal h2 { 54 | font-size: 2.11em; } 55 | 56 | .reveal h3 { 57 | font-size: 1.55em; } 58 | 59 | .reveal h4 { 60 | font-size: 1em; } 61 | 62 | .reveal h1 { 63 | text-shadow: none; } 64 | 65 | /********************************************* 66 | * OTHER 67 | *********************************************/ 68 | .reveal p { 69 | margin: 20px 0; 70 | line-height: 1.3; } 71 | 72 | /* Ensure certain elements are never larger than the slide itself */ 73 | .reveal img, .reveal video, .reveal iframe { 74 | max-width: 95%; 75 | max-height: 95%; } 76 | 77 | .reveal strong, .reveal b { 78 | font-weight: bold; } 79 | 80 | .reveal em { 81 | font-style: italic; } 82 | 83 | .reveal ol, .reveal dl, .reveal ul { 84 | display: inline-block; 85 | text-align: left; 86 | margin: 0 0 0 1em; } 87 | 88 | .reveal ol { 89 | list-style-type: decimal; } 90 | 91 | .reveal ul { 92 | list-style-type: disc; } 93 | 94 | .reveal ul ul { 95 | list-style-type: square; } 96 | 97 | .reveal ul ul ul { 98 | list-style-type: circle; } 99 | 100 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 101 | display: block; 102 | margin-left: 40px; } 103 | 104 | .reveal dt { 105 | font-weight: bold; } 106 | 107 | .reveal dd { 108 | margin-left: 40px; } 109 | 110 | .reveal q, .reveal blockquote { 111 | quotes: none; } 112 | 113 | .reveal blockquote { 114 | display: block; 115 | position: relative; 116 | width: 70%; 117 | margin: 20px auto; 118 | padding: 5px; 119 | font-style: italic; 120 | background: rgba(255, 255, 255, 0.05); 121 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 122 | 123 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 124 | display: inline-block; } 125 | 126 | .reveal q { 127 | font-style: italic; } 128 | 129 | .reveal pre { 130 | display: block; 131 | position: relative; 132 | width: 90%; 133 | margin: 20px auto; 134 | text-align: left; 135 | font-size: 0.55em; 136 | font-family: monospace; 137 | line-height: 1.2em; 138 | word-wrap: break-word; 139 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 140 | 141 | .reveal code { 142 | font-family: monospace; } 143 | 144 | .reveal pre code { 145 | display: block; 146 | padding: 5px; 147 | overflow: auto; 148 | max-height: 400px; 149 | word-wrap: normal; 150 | background: #3F3F3F; 151 | color: #DCDCDC; } 152 | 153 | .reveal table { 154 | margin: auto; 155 | border-collapse: collapse; 156 | border-spacing: 0; } 157 | 158 | .reveal table th { 159 | font-weight: bold; } 160 | 161 | .reveal table th, .reveal table td { 162 | text-align: left; 163 | padding: 0.2em 0.5em 0.2em 0.5em; 164 | border-bottom: 1px solid; } 165 | 166 | .reveal table th[align="center"], .reveal table td[align="center"] { 167 | text-align: center; } 168 | 169 | .reveal table th[align="right"], .reveal table td[align="right"] { 170 | text-align: right; } 171 | 172 | .reveal table tr:last-child td { 173 | border-bottom: none; } 174 | 175 | .reveal sup { 176 | vertical-align: super; } 177 | 178 | .reveal sub { 179 | vertical-align: sub; } 180 | 181 | .reveal small { 182 | display: inline-block; 183 | font-size: 0.6em; 184 | line-height: 1.2em; 185 | vertical-align: top; } 186 | 187 | .reveal small * { 188 | vertical-align: top; } 189 | 190 | /********************************************* 191 | * LINKS 192 | *********************************************/ 193 | .reveal a { 194 | color: #268bd2; 195 | text-decoration: none; 196 | -webkit-transition: color 0.15s ease; 197 | -moz-transition: color 0.15s ease; 198 | transition: color 0.15s ease; } 199 | 200 | .reveal a:hover { 201 | color: #78bae6; 202 | text-shadow: none; 203 | border: none; } 204 | 205 | .reveal .roll span:after { 206 | color: #fff; 207 | background: #1a6291; } 208 | 209 | /********************************************* 210 | * IMAGES 211 | *********************************************/ 212 | .reveal section img { 213 | margin: 15px 0px; 214 | background: rgba(255, 255, 255, 0.12); 215 | border: 4px solid #93a1a1; 216 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 217 | 218 | .reveal a img { 219 | -webkit-transition: all 0.15s linear; 220 | -moz-transition: all 0.15s linear; 221 | transition: all 0.15s linear; } 222 | 223 | .reveal a:hover img { 224 | background: rgba(255, 255, 255, 0.2); 225 | border-color: #268bd2; 226 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 227 | 228 | /********************************************* 229 | * NAVIGATION CONTROLS 230 | *********************************************/ 231 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 232 | border-right-color: #268bd2; } 233 | 234 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 235 | border-left-color: #268bd2; } 236 | 237 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 238 | border-bottom-color: #268bd2; } 239 | 240 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 241 | border-top-color: #268bd2; } 242 | 243 | .reveal .controls div.navigate-left.enabled:hover { 244 | border-right-color: #78bae6; } 245 | 246 | .reveal .controls div.navigate-right.enabled:hover { 247 | border-left-color: #78bae6; } 248 | 249 | .reveal .controls div.navigate-up.enabled:hover { 250 | border-bottom-color: #78bae6; } 251 | 252 | .reveal .controls div.navigate-down.enabled:hover { 253 | border-top-color: #78bae6; } 254 | 255 | /********************************************* 256 | * PROGRESS BAR 257 | *********************************************/ 258 | .reveal .progress { 259 | background: rgba(0, 0, 0, 0.2); } 260 | 261 | .reveal .progress span { 262 | background: #268bd2; 263 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 264 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 265 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 266 | 267 | /********************************************* 268 | * SLIDE NUMBER 269 | *********************************************/ 270 | .reveal .slide-number { 271 | color: #268bd2; } 272 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/solarized.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/league-gothic/league-gothic.css); 2 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 3 | /** 4 | * Solarized Light theme for reveal.js. 5 | * Author: Achim Staebler 6 | */ 7 | /** 8 | * Solarized colors by Ethan Schoonover 9 | */ 10 | html * { 11 | color-profile: sRGB; 12 | rendering-intent: auto; } 13 | 14 | /********************************************* 15 | * GLOBAL STYLES 16 | *********************************************/ 17 | body { 18 | background: #fdf6e3; 19 | background-color: #fdf6e3; } 20 | 21 | .reveal { 22 | font-family: 'Lato', sans-serif; 23 | font-size: 36px; 24 | font-weight: normal; 25 | color: #657b83; } 26 | 27 | ::selection { 28 | color: #fff; 29 | background: #d33682; 30 | text-shadow: none; } 31 | 32 | .reveal .slides > section, .reveal .slides > section > section { 33 | line-height: 1.3; 34 | font-weight: inherit; } 35 | 36 | /********************************************* 37 | * HEADERS 38 | *********************************************/ 39 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 40 | margin: 0 0 20px 0; 41 | color: #586e75; 42 | font-family: 'League Gothic', Impact, sans-serif; 43 | font-weight: normal; 44 | line-height: 1.2; 45 | letter-spacing: normal; 46 | text-transform: uppercase; 47 | text-shadow: none; 48 | word-wrap: break-word; } 49 | 50 | .reveal h1 { 51 | font-size: 3.77em; } 52 | 53 | .reveal h2 { 54 | font-size: 2.11em; } 55 | 56 | .reveal h3 { 57 | font-size: 1.55em; } 58 | 59 | .reveal h4 { 60 | font-size: 1em; } 61 | 62 | .reveal h1 { 63 | text-shadow: none; } 64 | 65 | /********************************************* 66 | * OTHER 67 | *********************************************/ 68 | .reveal p { 69 | margin: 20px 0; 70 | line-height: 1.3; } 71 | 72 | /* Ensure certain elements are never larger than the slide itself */ 73 | .reveal img, .reveal video, .reveal iframe { 74 | max-width: 95%; 75 | max-height: 95%; } 76 | 77 | .reveal strong, .reveal b { 78 | font-weight: bold; } 79 | 80 | .reveal em { 81 | font-style: italic; } 82 | 83 | .reveal ol, .reveal dl, .reveal ul { 84 | display: inline-block; 85 | text-align: left; 86 | margin: 0 0 0 1em; } 87 | 88 | .reveal ol { 89 | list-style-type: decimal; } 90 | 91 | .reveal ul { 92 | list-style-type: disc; } 93 | 94 | .reveal ul ul { 95 | list-style-type: square; } 96 | 97 | .reveal ul ul ul { 98 | list-style-type: circle; } 99 | 100 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 101 | display: block; 102 | margin-left: 40px; } 103 | 104 | .reveal dt { 105 | font-weight: bold; } 106 | 107 | .reveal dd { 108 | margin-left: 40px; } 109 | 110 | .reveal q, .reveal blockquote { 111 | quotes: none; } 112 | 113 | .reveal blockquote { 114 | display: block; 115 | position: relative; 116 | width: 70%; 117 | margin: 20px auto; 118 | padding: 5px; 119 | font-style: italic; 120 | background: rgba(255, 255, 255, 0.05); 121 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 122 | 123 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 124 | display: inline-block; } 125 | 126 | .reveal q { 127 | font-style: italic; } 128 | 129 | .reveal pre { 130 | display: block; 131 | position: relative; 132 | width: 90%; 133 | margin: 20px auto; 134 | text-align: left; 135 | font-size: 0.55em; 136 | font-family: monospace; 137 | line-height: 1.2em; 138 | word-wrap: break-word; 139 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 140 | 141 | .reveal code { 142 | font-family: monospace; } 143 | 144 | .reveal pre code { 145 | display: block; 146 | padding: 5px; 147 | overflow: auto; 148 | max-height: 400px; 149 | word-wrap: normal; 150 | background: #3F3F3F; 151 | color: #DCDCDC; } 152 | 153 | .reveal table { 154 | margin: auto; 155 | border-collapse: collapse; 156 | border-spacing: 0; } 157 | 158 | .reveal table th { 159 | font-weight: bold; } 160 | 161 | .reveal table th, .reveal table td { 162 | text-align: left; 163 | padding: 0.2em 0.5em 0.2em 0.5em; 164 | border-bottom: 1px solid; } 165 | 166 | .reveal table th[align="center"], .reveal table td[align="center"] { 167 | text-align: center; } 168 | 169 | .reveal table th[align="right"], .reveal table td[align="right"] { 170 | text-align: right; } 171 | 172 | .reveal table tr:last-child td { 173 | border-bottom: none; } 174 | 175 | .reveal sup { 176 | vertical-align: super; } 177 | 178 | .reveal sub { 179 | vertical-align: sub; } 180 | 181 | .reveal small { 182 | display: inline-block; 183 | font-size: 0.6em; 184 | line-height: 1.2em; 185 | vertical-align: top; } 186 | 187 | .reveal small * { 188 | vertical-align: top; } 189 | 190 | /********************************************* 191 | * LINKS 192 | *********************************************/ 193 | .reveal a { 194 | color: #268bd2; 195 | text-decoration: none; 196 | -webkit-transition: color 0.15s ease; 197 | -moz-transition: color 0.15s ease; 198 | transition: color 0.15s ease; } 199 | 200 | .reveal a:hover { 201 | color: #78bae6; 202 | text-shadow: none; 203 | border: none; } 204 | 205 | .reveal .roll span:after { 206 | color: #fff; 207 | background: #1a6291; } 208 | 209 | /********************************************* 210 | * IMAGES 211 | *********************************************/ 212 | .reveal section img { 213 | margin: 15px 0px; 214 | background: rgba(255, 255, 255, 0.12); 215 | border: 4px solid #657b83; 216 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 217 | 218 | .reveal a img { 219 | -webkit-transition: all 0.15s linear; 220 | -moz-transition: all 0.15s linear; 221 | transition: all 0.15s linear; } 222 | 223 | .reveal a:hover img { 224 | background: rgba(255, 255, 255, 0.2); 225 | border-color: #268bd2; 226 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 227 | 228 | /********************************************* 229 | * NAVIGATION CONTROLS 230 | *********************************************/ 231 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 232 | border-right-color: #268bd2; } 233 | 234 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 235 | border-left-color: #268bd2; } 236 | 237 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 238 | border-bottom-color: #268bd2; } 239 | 240 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 241 | border-top-color: #268bd2; } 242 | 243 | .reveal .controls div.navigate-left.enabled:hover { 244 | border-right-color: #78bae6; } 245 | 246 | .reveal .controls div.navigate-right.enabled:hover { 247 | border-left-color: #78bae6; } 248 | 249 | .reveal .controls div.navigate-up.enabled:hover { 250 | border-bottom-color: #78bae6; } 251 | 252 | .reveal .controls div.navigate-down.enabled:hover { 253 | border-top-color: #78bae6; } 254 | 255 | /********************************************* 256 | * PROGRESS BAR 257 | *********************************************/ 258 | .reveal .progress { 259 | background: rgba(0, 0, 0, 0.2); } 260 | 261 | .reveal .progress span { 262 | background: #268bd2; 263 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 264 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 265 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 266 | 267 | /********************************************* 268 | * SLIDE NUMBER 269 | *********************************************/ 270 | .reveal .slide-number { 271 | color: #268bd2; } 272 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/simple.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 2 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 3 | /** 4 | * A simple theme for reveal.js presentations, similar 5 | * to the default theme. The accent color is darkblue. 6 | * 7 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 8 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 9 | */ 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: #fff; 15 | background-color: #fff; } 16 | 17 | .reveal { 18 | font-family: 'Lato', sans-serif; 19 | font-size: 36px; 20 | font-weight: normal; 21 | color: #000; } 22 | 23 | ::selection { 24 | color: #fff; 25 | background: rgba(0, 0, 0, 0.99); 26 | text-shadow: none; } 27 | 28 | .reveal .slides > section, .reveal .slides > section > section { 29 | line-height: 1.3; 30 | font-weight: inherit; } 31 | 32 | /********************************************* 33 | * HEADERS 34 | *********************************************/ 35 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #000; 38 | font-family: 'News Cycle', Impact, sans-serif; 39 | font-weight: normal; 40 | line-height: 1.2; 41 | letter-spacing: normal; 42 | text-transform: none; 43 | text-shadow: none; 44 | word-wrap: break-word; } 45 | 46 | .reveal h1 { 47 | font-size: 3.77em; } 48 | 49 | .reveal h2 { 50 | font-size: 2.11em; } 51 | 52 | .reveal h3 { 53 | font-size: 1.55em; } 54 | 55 | .reveal h4 { 56 | font-size: 1em; } 57 | 58 | .reveal h1 { 59 | text-shadow: none; } 60 | 61 | /********************************************* 62 | * OTHER 63 | *********************************************/ 64 | .reveal p { 65 | margin: 20px 0; 66 | line-height: 1.3; } 67 | 68 | /* Ensure certain elements are never larger than the slide itself */ 69 | .reveal img, .reveal video, .reveal iframe { 70 | max-width: 95%; 71 | max-height: 95%; } 72 | 73 | .reveal strong, .reveal b { 74 | font-weight: bold; } 75 | 76 | .reveal em { 77 | font-style: italic; } 78 | 79 | .reveal ol, .reveal dl, .reveal ul { 80 | display: inline-block; 81 | text-align: left; 82 | margin: 0 0 0 1em; } 83 | 84 | .reveal ol { 85 | list-style-type: decimal; } 86 | 87 | .reveal ul { 88 | list-style-type: disc; } 89 | 90 | .reveal ul ul { 91 | list-style-type: square; } 92 | 93 | .reveal ul ul ul { 94 | list-style-type: circle; } 95 | 96 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 97 | display: block; 98 | margin-left: 40px; } 99 | 100 | .reveal dt { 101 | font-weight: bold; } 102 | 103 | .reveal dd { 104 | margin-left: 40px; } 105 | 106 | .reveal q, .reveal blockquote { 107 | quotes: none; } 108 | 109 | .reveal blockquote { 110 | display: block; 111 | position: relative; 112 | width: 70%; 113 | margin: 20px auto; 114 | padding: 5px; 115 | font-style: italic; 116 | background: rgba(255, 255, 255, 0.05); 117 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 118 | 119 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 120 | display: inline-block; } 121 | 122 | .reveal q { 123 | font-style: italic; } 124 | 125 | .reveal pre { 126 | display: block; 127 | position: relative; 128 | width: 90%; 129 | margin: 20px auto; 130 | text-align: left; 131 | font-size: 0.55em; 132 | font-family: monospace; 133 | line-height: 1.2em; 134 | word-wrap: break-word; 135 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 136 | 137 | .reveal code { 138 | font-family: monospace; } 139 | 140 | .reveal pre code { 141 | display: block; 142 | padding: 5px; 143 | overflow: auto; 144 | max-height: 400px; 145 | word-wrap: normal; 146 | background: #3F3F3F; 147 | color: #DCDCDC; } 148 | 149 | .reveal table { 150 | margin: auto; 151 | border-collapse: collapse; 152 | border-spacing: 0; } 153 | 154 | .reveal table th { 155 | font-weight: bold; } 156 | 157 | .reveal table th, .reveal table td { 158 | text-align: left; 159 | padding: 0.2em 0.5em 0.2em 0.5em; 160 | border-bottom: 1px solid; } 161 | 162 | .reveal table th[align="center"], .reveal table td[align="center"] { 163 | text-align: center; } 164 | 165 | .reveal table th[align="right"], .reveal table td[align="right"] { 166 | text-align: right; } 167 | 168 | .reveal table tr:last-child td { 169 | border-bottom: none; } 170 | 171 | .reveal sup { 172 | vertical-align: super; } 173 | 174 | .reveal sub { 175 | vertical-align: sub; } 176 | 177 | .reveal small { 178 | display: inline-block; 179 | font-size: 0.6em; 180 | line-height: 1.2em; 181 | vertical-align: top; } 182 | 183 | .reveal small * { 184 | vertical-align: top; } 185 | 186 | /********************************************* 187 | * LINKS 188 | *********************************************/ 189 | .reveal a { 190 | color: #00008B; 191 | text-decoration: none; 192 | -webkit-transition: color 0.15s ease; 193 | -moz-transition: color 0.15s ease; 194 | transition: color 0.15s ease; } 195 | 196 | .reveal a:hover { 197 | color: #0000f1; 198 | text-shadow: none; 199 | border: none; } 200 | 201 | .reveal .roll span:after { 202 | color: #fff; 203 | background: #00003f; } 204 | 205 | /********************************************* 206 | * IMAGES 207 | *********************************************/ 208 | .reveal section img { 209 | margin: 15px 0px; 210 | background: rgba(255, 255, 255, 0.12); 211 | border: 4px solid #000; 212 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 213 | 214 | .reveal a img { 215 | -webkit-transition: all 0.15s linear; 216 | -moz-transition: all 0.15s linear; 217 | transition: all 0.15s linear; } 218 | 219 | .reveal a:hover img { 220 | background: rgba(255, 255, 255, 0.2); 221 | border-color: #00008B; 222 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 223 | 224 | /********************************************* 225 | * NAVIGATION CONTROLS 226 | *********************************************/ 227 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 228 | border-right-color: #00008B; } 229 | 230 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 231 | border-left-color: #00008B; } 232 | 233 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 234 | border-bottom-color: #00008B; } 235 | 236 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 237 | border-top-color: #00008B; } 238 | 239 | .reveal .controls div.navigate-left.enabled:hover { 240 | border-right-color: #0000f1; } 241 | 242 | .reveal .controls div.navigate-right.enabled:hover { 243 | border-left-color: #0000f1; } 244 | 245 | .reveal .controls div.navigate-up.enabled:hover { 246 | border-bottom-color: #0000f1; } 247 | 248 | .reveal .controls div.navigate-down.enabled:hover { 249 | border-top-color: #0000f1; } 250 | 251 | /********************************************* 252 | * PROGRESS BAR 253 | *********************************************/ 254 | .reveal .progress { 255 | background: rgba(0, 0, 0, 0.2); } 256 | 257 | .reveal .progress span { 258 | background: #00008B; 259 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 260 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 261 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 262 | 263 | /********************************************* 264 | * SLIDE NUMBER 265 | *********************************************/ 266 | .reveal .slide-number { 267 | color: #00008B; } 268 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/white.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 2 | /** 3 | * White theme for reveal.js. This is the opposite of the 'black' theme. 4 | * 5 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 6 | */ 7 | section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 { 8 | color: #fff; } 9 | 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: #fff; 15 | background-color: #fff; } 16 | 17 | .reveal { 18 | font-family: 'Source Sans Pro', Helvetica, sans-serif; 19 | font-size: 38px; 20 | font-weight: normal; 21 | color: #222; } 22 | 23 | ::selection { 24 | color: #fff; 25 | background: #98bdef; 26 | text-shadow: none; } 27 | 28 | .reveal .slides > section, .reveal .slides > section > section { 29 | line-height: 1.3; 30 | font-weight: inherit; } 31 | 32 | /********************************************* 33 | * HEADERS 34 | *********************************************/ 35 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #222; 38 | font-family: 'Source Sans Pro', Helvetica, sans-serif; 39 | font-weight: 600; 40 | line-height: 1.2; 41 | letter-spacing: normal; 42 | text-transform: uppercase; 43 | text-shadow: none; 44 | word-wrap: break-word; } 45 | 46 | .reveal h1 { 47 | font-size: 2.5em; } 48 | 49 | .reveal h2 { 50 | font-size: 1.6em; } 51 | 52 | .reveal h3 { 53 | font-size: 1.3em; } 54 | 55 | .reveal h4 { 56 | font-size: 1em; } 57 | 58 | .reveal h1 { 59 | text-shadow: none; } 60 | 61 | /********************************************* 62 | * OTHER 63 | *********************************************/ 64 | .reveal p { 65 | margin: 20px 0; 66 | line-height: 1.3; } 67 | 68 | /* Ensure certain elements are never larger than the slide itself */ 69 | .reveal img, .reveal video, .reveal iframe { 70 | max-width: 95%; 71 | max-height: 95%; } 72 | 73 | .reveal strong, .reveal b { 74 | font-weight: bold; } 75 | 76 | .reveal em { 77 | font-style: italic; } 78 | 79 | .reveal ol, .reveal dl, .reveal ul { 80 | display: inline-block; 81 | text-align: left; 82 | margin: 0 0 0 1em; } 83 | 84 | .reveal ol { 85 | list-style-type: decimal; } 86 | 87 | .reveal ul { 88 | list-style-type: disc; } 89 | 90 | .reveal ul ul { 91 | list-style-type: square; } 92 | 93 | .reveal ul ul ul { 94 | list-style-type: circle; } 95 | 96 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 97 | display: block; 98 | margin-left: 40px; } 99 | 100 | .reveal dt { 101 | font-weight: bold; } 102 | 103 | .reveal dd { 104 | margin-left: 40px; } 105 | 106 | .reveal q, .reveal blockquote { 107 | quotes: none; } 108 | 109 | .reveal blockquote { 110 | display: block; 111 | position: relative; 112 | width: 70%; 113 | margin: 20px auto; 114 | padding: 5px; 115 | font-style: italic; 116 | background: rgba(255, 255, 255, 0.05); 117 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 118 | 119 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 120 | display: inline-block; } 121 | 122 | .reveal q { 123 | font-style: italic; } 124 | 125 | .reveal pre { 126 | display: block; 127 | position: relative; 128 | width: 90%; 129 | margin: 20px auto; 130 | text-align: left; 131 | font-size: 0.55em; 132 | font-family: monospace; 133 | line-height: 1.2em; 134 | word-wrap: break-word; 135 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 136 | 137 | .reveal code { 138 | font-family: monospace; } 139 | 140 | .reveal pre code { 141 | display: block; 142 | padding: 5px; 143 | overflow: auto; 144 | max-height: 400px; 145 | word-wrap: normal; 146 | background: #3F3F3F; 147 | color: #DCDCDC; } 148 | 149 | .reveal table { 150 | margin: auto; 151 | border-collapse: collapse; 152 | border-spacing: 0; } 153 | 154 | .reveal table th { 155 | font-weight: bold; } 156 | 157 | .reveal table th, .reveal table td { 158 | text-align: left; 159 | padding: 0.2em 0.5em 0.2em 0.5em; 160 | border-bottom: 1px solid; } 161 | 162 | .reveal table th[align="center"], .reveal table td[align="center"] { 163 | text-align: center; } 164 | 165 | .reveal table th[align="right"], .reveal table td[align="right"] { 166 | text-align: right; } 167 | 168 | .reveal table tr:last-child td { 169 | border-bottom: none; } 170 | 171 | .reveal sup { 172 | vertical-align: super; } 173 | 174 | .reveal sub { 175 | vertical-align: sub; } 176 | 177 | .reveal small { 178 | display: inline-block; 179 | font-size: 0.6em; 180 | line-height: 1.2em; 181 | vertical-align: top; } 182 | 183 | .reveal small * { 184 | vertical-align: top; } 185 | 186 | /********************************************* 187 | * LINKS 188 | *********************************************/ 189 | .reveal a { 190 | color: #2a76dd; 191 | text-decoration: none; 192 | -webkit-transition: color 0.15s ease; 193 | -moz-transition: color 0.15s ease; 194 | transition: color 0.15s ease; } 195 | 196 | .reveal a:hover { 197 | color: #6ca2e8; 198 | text-shadow: none; 199 | border: none; } 200 | 201 | .reveal .roll span:after { 202 | color: #fff; 203 | background: #1a54a1; } 204 | 205 | /********************************************* 206 | * IMAGES 207 | *********************************************/ 208 | .reveal section img { 209 | margin: 15px 0px; 210 | background: rgba(255, 255, 255, 0.12); 211 | border: 4px solid #222; 212 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 213 | 214 | .reveal a img { 215 | -webkit-transition: all 0.15s linear; 216 | -moz-transition: all 0.15s linear; 217 | transition: all 0.15s linear; } 218 | 219 | .reveal a:hover img { 220 | background: rgba(255, 255, 255, 0.2); 221 | border-color: #2a76dd; 222 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 223 | 224 | /********************************************* 225 | * NAVIGATION CONTROLS 226 | *********************************************/ 227 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 228 | border-right-color: #2a76dd; } 229 | 230 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 231 | border-left-color: #2a76dd; } 232 | 233 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 234 | border-bottom-color: #2a76dd; } 235 | 236 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 237 | border-top-color: #2a76dd; } 238 | 239 | .reveal .controls div.navigate-left.enabled:hover { 240 | border-right-color: #6ca2e8; } 241 | 242 | .reveal .controls div.navigate-right.enabled:hover { 243 | border-left-color: #6ca2e8; } 244 | 245 | .reveal .controls div.navigate-up.enabled:hover { 246 | border-bottom-color: #6ca2e8; } 247 | 248 | .reveal .controls div.navigate-down.enabled:hover { 249 | border-top-color: #6ca2e8; } 250 | 251 | /********************************************* 252 | * PROGRESS BAR 253 | *********************************************/ 254 | .reveal .progress { 255 | background: rgba(0, 0, 0, 0.2); } 256 | 257 | .reveal .progress span { 258 | background: #2a76dd; 259 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 260 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 261 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 262 | 263 | /********************************************* 264 | * SLIDE NUMBER 265 | *********************************************/ 266 | .reveal .slide-number { 267 | color: #2a76dd; } 268 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/black.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 2 | /** 3 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 4 | * 5 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 6 | */ 7 | section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { 8 | color: #222; } 9 | 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: #222; 15 | background-color: #222; } 16 | 17 | .reveal { 18 | font-family: 'Source Sans Pro', Helvetica, sans-serif; 19 | font-size: 38px; 20 | font-weight: normal; 21 | color: #fff; } 22 | 23 | ::selection { 24 | color: #fff; 25 | background: #bee4fd; 26 | text-shadow: none; } 27 | 28 | .reveal .slides > section, .reveal .slides > section > section { 29 | line-height: 1.3; 30 | font-weight: inherit; } 31 | 32 | /********************************************* 33 | * HEADERS 34 | *********************************************/ 35 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #fff; 38 | font-family: 'Source Sans Pro', Helvetica, sans-serif; 39 | font-weight: 600; 40 | line-height: 1.2; 41 | letter-spacing: normal; 42 | text-transform: uppercase; 43 | text-shadow: none; 44 | word-wrap: break-word; } 45 | 46 | .reveal h1 { 47 | font-size: 2.5em; } 48 | 49 | .reveal h2 { 50 | font-size: 1.6em; } 51 | 52 | .reveal h3 { 53 | font-size: 1.3em; } 54 | 55 | .reveal h4 { 56 | font-size: 1em; } 57 | 58 | .reveal h1 { 59 | text-shadow: none; } 60 | 61 | /********************************************* 62 | * OTHER 63 | *********************************************/ 64 | .reveal p { 65 | margin: 20px 0; 66 | line-height: 1.3; } 67 | 68 | /* Ensure certain elements are never larger than the slide itself */ 69 | .reveal img, .reveal video, .reveal iframe { 70 | max-width: 95%; 71 | max-height: 95%; } 72 | 73 | .reveal strong, .reveal b { 74 | font-weight: bold; } 75 | 76 | .reveal em { 77 | font-style: italic; } 78 | 79 | .reveal ol, .reveal dl, .reveal ul { 80 | display: inline-block; 81 | text-align: left; 82 | margin: 0 0 0 1em; } 83 | 84 | .reveal ol { 85 | list-style-type: decimal; } 86 | 87 | .reveal ul { 88 | list-style-type: disc; } 89 | 90 | .reveal ul ul { 91 | list-style-type: square; } 92 | 93 | .reveal ul ul ul { 94 | list-style-type: circle; } 95 | 96 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 97 | display: block; 98 | margin-left: 40px; } 99 | 100 | .reveal dt { 101 | font-weight: bold; } 102 | 103 | .reveal dd { 104 | margin-left: 40px; } 105 | 106 | .reveal q, .reveal blockquote { 107 | quotes: none; } 108 | 109 | .reveal blockquote { 110 | display: block; 111 | position: relative; 112 | width: 70%; 113 | margin: 20px auto; 114 | padding: 5px; 115 | font-style: italic; 116 | background: rgba(255, 255, 255, 0.05); 117 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 118 | 119 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 120 | display: inline-block; } 121 | 122 | .reveal q { 123 | font-style: italic; } 124 | 125 | .reveal pre { 126 | display: block; 127 | position: relative; 128 | width: 90%; 129 | margin: 20px auto; 130 | text-align: left; 131 | font-size: 0.55em; 132 | font-family: monospace; 133 | line-height: 1.2em; 134 | word-wrap: break-word; 135 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 136 | 137 | .reveal code { 138 | font-family: monospace; } 139 | 140 | .reveal pre code { 141 | display: block; 142 | padding: 5px; 143 | overflow: auto; 144 | max-height: 400px; 145 | word-wrap: normal; 146 | background: #3F3F3F; 147 | color: #DCDCDC; } 148 | 149 | .reveal table { 150 | margin: auto; 151 | border-collapse: collapse; 152 | border-spacing: 0; } 153 | 154 | .reveal table th { 155 | font-weight: bold; } 156 | 157 | .reveal table th, .reveal table td { 158 | text-align: left; 159 | padding: 0.2em 0.5em 0.2em 0.5em; 160 | border-bottom: 1px solid; } 161 | 162 | .reveal table th[align="center"], .reveal table td[align="center"] { 163 | text-align: center; } 164 | 165 | .reveal table th[align="right"], .reveal table td[align="right"] { 166 | text-align: right; } 167 | 168 | .reveal table tr:last-child td { 169 | border-bottom: none; } 170 | 171 | .reveal sup { 172 | vertical-align: super; } 173 | 174 | .reveal sub { 175 | vertical-align: sub; } 176 | 177 | .reveal small { 178 | display: inline-block; 179 | font-size: 0.6em; 180 | line-height: 1.2em; 181 | vertical-align: top; } 182 | 183 | .reveal small * { 184 | vertical-align: top; } 185 | 186 | /********************************************* 187 | * LINKS 188 | *********************************************/ 189 | .reveal a { 190 | color: #42affa; 191 | text-decoration: none; 192 | -webkit-transition: color 0.15s ease; 193 | -moz-transition: color 0.15s ease; 194 | transition: color 0.15s ease; } 195 | 196 | .reveal a:hover { 197 | color: #8dcffc; 198 | text-shadow: none; 199 | border: none; } 200 | 201 | .reveal .roll span:after { 202 | color: #fff; 203 | background: #068ee9; } 204 | 205 | /********************************************* 206 | * IMAGES 207 | *********************************************/ 208 | .reveal section img { 209 | margin: 15px 0px; 210 | background: rgba(255, 255, 255, 0.12); 211 | border: 4px solid #fff; 212 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 213 | 214 | .reveal a img { 215 | -webkit-transition: all 0.15s linear; 216 | -moz-transition: all 0.15s linear; 217 | transition: all 0.15s linear; } 218 | 219 | .reveal a:hover img { 220 | background: rgba(255, 255, 255, 0.2); 221 | border-color: #42affa; 222 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 223 | 224 | /********************************************* 225 | * NAVIGATION CONTROLS 226 | *********************************************/ 227 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 228 | border-right-color: #42affa; } 229 | 230 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 231 | border-left-color: #42affa; } 232 | 233 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 234 | border-bottom-color: #42affa; } 235 | 236 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 237 | border-top-color: #42affa; } 238 | 239 | .reveal .controls div.navigate-left.enabled:hover { 240 | border-right-color: #8dcffc; } 241 | 242 | .reveal .controls div.navigate-right.enabled:hover { 243 | border-left-color: #8dcffc; } 244 | 245 | .reveal .controls div.navigate-up.enabled:hover { 246 | border-bottom-color: #8dcffc; } 247 | 248 | .reveal .controls div.navigate-down.enabled:hover { 249 | border-top-color: #8dcffc; } 250 | 251 | /********************************************* 252 | * PROGRESS BAR 253 | *********************************************/ 254 | .reveal .progress { 255 | background: rgba(0, 0, 0, 0.2); } 256 | 257 | .reveal .progress span { 258 | background: #42affa; 259 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 260 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 261 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 262 | 263 | /********************************************* 264 | * SLIDE NUMBER 265 | *********************************************/ 266 | .reveal .slide-number { 267 | color: #42affa; } 268 | -------------------------------------------------------------------------------- /socketio/server/www/static/demo/reveal/css/theme/template/theme.scss: -------------------------------------------------------------------------------- 1 | // Base theme template for reveal.js 2 | 3 | /********************************************* 4 | * GLOBAL STYLES 5 | *********************************************/ 6 | 7 | body { 8 | @include bodyBackground(); 9 | background-color: $backgroundColor; 10 | } 11 | 12 | .reveal { 13 | font-family: $mainFont; 14 | font-size: $mainFontSize; 15 | font-weight: normal; 16 | color: $mainColor; 17 | } 18 | 19 | ::selection { 20 | color: $selectionColor; 21 | background: $selectionBackgroundColor; 22 | text-shadow: none; 23 | } 24 | 25 | .reveal .slides>section, 26 | .reveal .slides>section>section { 27 | line-height: 1.3; 28 | font-weight: inherit; 29 | } 30 | 31 | /********************************************* 32 | * HEADERS 33 | *********************************************/ 34 | 35 | .reveal h1, 36 | .reveal h2, 37 | .reveal h3, 38 | .reveal h4, 39 | .reveal h5, 40 | .reveal h6 { 41 | margin: $headingMargin; 42 | color: $headingColor; 43 | 44 | font-family: $headingFont; 45 | font-weight: $headingFontWeight; 46 | line-height: $headingLineHeight; 47 | letter-spacing: $headingLetterSpacing; 48 | 49 | text-transform: $headingTextTransform; 50 | text-shadow: $headingTextShadow; 51 | 52 | word-wrap: break-word; 53 | } 54 | 55 | .reveal h1 {font-size: $heading1Size; } 56 | .reveal h2 {font-size: $heading2Size; } 57 | .reveal h3 {font-size: $heading3Size; } 58 | .reveal h4 {font-size: $heading4Size; } 59 | 60 | .reveal h1 { 61 | text-shadow: $heading1TextShadow; 62 | } 63 | 64 | 65 | /********************************************* 66 | * OTHER 67 | *********************************************/ 68 | 69 | .reveal p { 70 | margin: $blockMargin 0; 71 | line-height: 1.3; 72 | } 73 | 74 | /* Ensure certain elements are never larger than the slide itself */ 75 | .reveal img, 76 | .reveal video, 77 | .reveal iframe { 78 | max-width: 95%; 79 | max-height: 95%; 80 | } 81 | .reveal strong, 82 | .reveal b { 83 | font-weight: bold; 84 | } 85 | 86 | .reveal em { 87 | font-style: italic; 88 | } 89 | 90 | .reveal ol, 91 | .reveal dl, 92 | .reveal ul { 93 | display: inline-block; 94 | 95 | text-align: left; 96 | margin: 0 0 0 1em; 97 | } 98 | 99 | .reveal ol { 100 | list-style-type: decimal; 101 | } 102 | 103 | .reveal ul { 104 | list-style-type: disc; 105 | } 106 | 107 | .reveal ul ul { 108 | list-style-type: square; 109 | } 110 | 111 | .reveal ul ul ul { 112 | list-style-type: circle; 113 | } 114 | 115 | .reveal ul ul, 116 | .reveal ul ol, 117 | .reveal ol ol, 118 | .reveal ol ul { 119 | display: block; 120 | margin-left: 40px; 121 | } 122 | 123 | .reveal dt { 124 | font-weight: bold; 125 | } 126 | 127 | .reveal dd { 128 | margin-left: 40px; 129 | } 130 | 131 | .reveal q, 132 | .reveal blockquote { 133 | quotes: none; 134 | } 135 | 136 | .reveal blockquote { 137 | display: block; 138 | position: relative; 139 | width: 70%; 140 | margin: $blockMargin auto; 141 | padding: 5px; 142 | 143 | font-style: italic; 144 | background: rgba(255, 255, 255, 0.05); 145 | box-shadow: 0px 0px 2px rgba(0,0,0,0.2); 146 | } 147 | .reveal blockquote p:first-child, 148 | .reveal blockquote p:last-child { 149 | display: inline-block; 150 | } 151 | 152 | .reveal q { 153 | font-style: italic; 154 | } 155 | 156 | .reveal pre { 157 | display: block; 158 | position: relative; 159 | width: 90%; 160 | margin: $blockMargin auto; 161 | 162 | text-align: left; 163 | font-size: 0.55em; 164 | font-family: monospace; 165 | line-height: 1.2em; 166 | 167 | word-wrap: break-word; 168 | 169 | box-shadow: 0px 0px 6px rgba(0,0,0,0.3); 170 | } 171 | .reveal code { 172 | font-family: monospace; 173 | } 174 | 175 | .reveal pre code { 176 | display: block; 177 | padding: 5px; 178 | overflow: auto; 179 | max-height: 400px; 180 | word-wrap: normal; 181 | background: #3F3F3F; 182 | color: #DCDCDC; 183 | } 184 | 185 | .reveal table { 186 | margin: auto; 187 | border-collapse: collapse; 188 | border-spacing: 0; 189 | } 190 | 191 | .reveal table th { 192 | font-weight: bold; 193 | } 194 | 195 | .reveal table th, 196 | .reveal table td { 197 | text-align: left; 198 | padding: 0.2em 0.5em 0.2em 0.5em; 199 | border-bottom: 1px solid; 200 | } 201 | 202 | .reveal table th[align="center"], 203 | .reveal table td[align="center"] { 204 | text-align: center; 205 | } 206 | 207 | .reveal table th[align="right"], 208 | .reveal table td[align="right"] { 209 | text-align: right; 210 | } 211 | 212 | .reveal table tr:last-child td { 213 | border-bottom: none; 214 | } 215 | 216 | .reveal sup { 217 | vertical-align: super; 218 | } 219 | .reveal sub { 220 | vertical-align: sub; 221 | } 222 | 223 | .reveal small { 224 | display: inline-block; 225 | font-size: 0.6em; 226 | line-height: 1.2em; 227 | vertical-align: top; 228 | } 229 | 230 | .reveal small * { 231 | vertical-align: top; 232 | } 233 | 234 | 235 | /********************************************* 236 | * LINKS 237 | *********************************************/ 238 | 239 | .reveal a { 240 | color: $linkColor; 241 | text-decoration: none; 242 | 243 | -webkit-transition: color .15s ease; 244 | -moz-transition: color .15s ease; 245 | transition: color .15s ease; 246 | } 247 | .reveal a:hover { 248 | color: $linkColorHover; 249 | 250 | text-shadow: none; 251 | border: none; 252 | } 253 | 254 | .reveal .roll span:after { 255 | color: #fff; 256 | background: darken( $linkColor, 15% ); 257 | } 258 | 259 | 260 | /********************************************* 261 | * IMAGES 262 | *********************************************/ 263 | 264 | .reveal section img { 265 | margin: 15px 0px; 266 | background: rgba(255,255,255,0.12); 267 | border: 4px solid $mainColor; 268 | 269 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); 270 | } 271 | 272 | .reveal a img { 273 | -webkit-transition: all .15s linear; 274 | -moz-transition: all .15s linear; 275 | transition: all .15s linear; 276 | } 277 | 278 | .reveal a:hover img { 279 | background: rgba(255,255,255,0.2); 280 | border-color: $linkColor; 281 | 282 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); 283 | } 284 | 285 | 286 | /********************************************* 287 | * NAVIGATION CONTROLS 288 | *********************************************/ 289 | 290 | .reveal .controls div.navigate-left, 291 | .reveal .controls div.navigate-left.enabled { 292 | border-right-color: $linkColor; 293 | } 294 | 295 | .reveal .controls div.navigate-right, 296 | .reveal .controls div.navigate-right.enabled { 297 | border-left-color: $linkColor; 298 | } 299 | 300 | .reveal .controls div.navigate-up, 301 | .reveal .controls div.navigate-up.enabled { 302 | border-bottom-color: $linkColor; 303 | } 304 | 305 | .reveal .controls div.navigate-down, 306 | .reveal .controls div.navigate-down.enabled { 307 | border-top-color: $linkColor; 308 | } 309 | 310 | .reveal .controls div.navigate-left.enabled:hover { 311 | border-right-color: $linkColorHover; 312 | } 313 | 314 | .reveal .controls div.navigate-right.enabled:hover { 315 | border-left-color: $linkColorHover; 316 | } 317 | 318 | .reveal .controls div.navigate-up.enabled:hover { 319 | border-bottom-color: $linkColorHover; 320 | } 321 | 322 | .reveal .controls div.navigate-down.enabled:hover { 323 | border-top-color: $linkColorHover; 324 | } 325 | 326 | 327 | /********************************************* 328 | * PROGRESS BAR 329 | *********************************************/ 330 | 331 | .reveal .progress { 332 | background: rgba(0,0,0,0.2); 333 | } 334 | .reveal .progress span { 335 | background: $linkColor; 336 | 337 | -webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 338 | -moz-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 339 | transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 340 | } 341 | 342 | /********************************************* 343 | * SLIDE NUMBER 344 | *********************************************/ 345 | .reveal .slide-number { 346 | color: $linkColor; 347 | } 348 | 349 | 350 | --------------------------------------------------------------------------------