├── .gitattributes ├── CNAME ├── robots.txt ├── test ├── .bowerrc ├── bower.json ├── spec │ └── test.js └── index.html ├── favicon.ico ├── markdown.jpg ├── images ├── point.png └── star.png ├── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff └── fontawesome-webfont.woff2 ├── .gitignore ├── scripts ├── locales │ ├── zh │ │ └── translation.json │ └── en │ │ └── translation.json ├── app.react.js ├── data │ ├── example.md │ └── resume.md ├── component │ ├── LanguageComponent.react.js │ ├── ExportPDFComponent.react.js │ ├── ExampleComponent.react.js │ ├── SearchComponent.react.js │ └── IndexComponent.react.js ├── vendor │ ├── extensions │ │ ├── github.js │ │ ├── icons.js │ │ ├── star.js │ │ ├── prettify.js │ │ ├── twitter.js │ │ └── table.js │ ├── json.js │ ├── jsx.js │ ├── i18next.js │ ├── Showdown.min.js │ ├── text.js │ ├── zepto.min.js │ └── i18next.amd.min.js ├── main.js └── router.react.js ├── .editorconfig ├── .yo-rc.json ├── README.md ├── bower.json ├── .jshintrc ├── index.html ├── package.json ├── styles ├── main.css ├── grids-responsive-old-ie-min.css ├── pure-min.css ├── font-awesome.css.map └── font-awesome.min.css └── Gruntfile.js /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | resume.phodal.com 2 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /test/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/favicon.ico -------------------------------------------------------------------------------- /markdown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/markdown.jpg -------------------------------------------------------------------------------- /images/point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/images/point.png -------------------------------------------------------------------------------- /images/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/images/star.png -------------------------------------------------------------------------------- /fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/react-resume/HEAD/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | test/temp 4 | .sass-cache 5 | app/bower_components 6 | .tmp 7 | test/bower_components/ 8 | .idea/ 9 | -------------------------------------------------------------------------------- /scripts/locales/zh/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "preview": "打印预览", 4 | "pdfExport": "导出为PDF" 5 | }, 6 | "nav": { 7 | "home": "首页", 8 | "example": "示例" 9 | } 10 | } -------------------------------------------------------------------------------- /test/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backbone-react", 3 | "private": true, 4 | "dependencies": { 5 | "chai": "~1.8.0", 6 | "mocha": "~1.14.0" 7 | }, 8 | "devDependencies": {} 9 | } 10 | -------------------------------------------------------------------------------- /scripts/locales/en/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "preview": "Print Preview", 4 | "pdfExport": "PDF Export" 5 | }, 6 | "nav": { 7 | "home": "Homepage", 8 | "example": "Examples" 9 | } 10 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-backbone": { 3 | "appPath": "app", 4 | "appName": "BackboneReact", 5 | "coffee": false, 6 | "testFramework": "mocha", 7 | "templateFramework": "lodash", 8 | "sassBootstrap": false, 9 | "includeRequireJS": true 10 | }, 11 | "generator-mocha": {} 12 | } -------------------------------------------------------------------------------- /scripts/app.react.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define([ 4 | 'react', 'jsx!router.react' 5 | ], function (React, Router) { 6 | 7 | var initialize = function () { 8 | var router = new Router(); 9 | router.init(); 10 | }; 11 | 12 | return { 13 | initialize: initialize 14 | }; 15 | }); 16 | -------------------------------------------------------------------------------- /test/spec/test.js: -------------------------------------------------------------------------------- 1 | /* global describe, it */ 2 | 3 | (function () { 4 | 'use strict'; 5 | 6 | describe('Give it some context', function () { 7 | describe('maybe a bit more context here', function () { 8 | it('should run here few assertions', function () { 9 | 10 | }); 11 | }); 12 | }); 13 | })(); 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #RESUME Generator 2 | 3 | > A Online Resume Generator in Pure Client-Side JavaScript. 4 | 5 | screenshot: 6 | 7 | ![markdown](markdown.jpg) 8 | 9 | ##Libs 10 | 11 | - React 12 | - jsPDF 13 | - jQuery 14 | - RequireJS 15 | - Showdown 16 | 17 | 18 | ##其他 19 | 20 | [TEX,Web版的旧简历Demo](https://github.com/phodal/OLD-RESUME) 21 | -------------------------------------------------------------------------------- /scripts/data/example.md: -------------------------------------------------------------------------------- 1 | OS: 2 | 3 | [https://github.com/phodal](https://github.com/phodal) 4 | 5 | [http://weibo.com/phodal](http://weibo.com/phodal) 6 | 7 | 2012.2-2013.3 8 | 9 | 2013.3-2013.6 10 | 11 | 2013.7-2013.8 12 | 13 | 14 | | Name | Level | 15 | |======== |=======================| 16 | | Java | | 17 | | JavaScript | | 18 | | Python | | 19 | | Ruby | | 20 | | SQL | | 21 | 22 | 23 | 24 | 1. Cordova 25 | 1. Ruby 26 | 1. MySQL 27 | 1. FAST / Solr 28 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backbonereact", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "jquery": "~2.1.0", 6 | "zepto": "~1.1.6", 7 | "lodash": "~2.4.1", 8 | "backbone": "~1.1.0", 9 | "requirejs": "~2.1.10", 10 | "requirejs-text": "~2.0.10", 11 | "modernizr": "~2.7.1", 12 | "react.backbone": "~0.6.0" 13 | }, 14 | "devDependencies": { 15 | "react": "~0.13.1", 16 | "requirejs-plugins": "~1.0.3", 17 | "jsx-requirejs-plugin": "~0.6.0", 18 | "jquery": "~2.1.3", 19 | "pure": "~0.6.0", 20 | "showdown": "~0.4.0", 21 | "material-ui": "~0.7.2", 22 | "font-awesome": "~4.3.0", 23 | "elasticsearch": "~4.0.2", 24 | "i18next": "~1.8.0", 25 | "require-i18next": "~0.5.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Mocha Spec Runner 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /scripts/component/LanguageComponent.react.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define([ 4 | 'react', 5 | 'i18n!:translation' 6 | ], function (React, i18n) { 7 | var LanguageComponent; 8 | LanguageComponent = React.createClass({ 9 | switchEn: function () { 10 | i18n.setLng('en'); 11 | }, 12 | switchCn: function () { 13 | i18n.setLng('zh'); 14 | }, 15 | render: function () { 16 | return ( 17 |
18 | 19 |   20 | 21 |
22 | ) 23 | } 24 | }); 25 | 26 | return LanguageComponent; 27 | }); 28 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 4, 11 | "latedef": true, 12 | "newcap": true, 13 | "noarg": true, 14 | "undef": true, 15 | "unused": true, 16 | "strict": true, 17 | "jquery": true, 18 | "globals": { 19 | "BackboneReact": true, 20 | "backbonereact": true, 21 | "_": false, 22 | "Backbone": false, 23 | "JST": false, 24 | "beforeEach": false, 25 | "describe": false, 26 | "it": false, 27 | "assert": true, 28 | "expect": true, 29 | "should": true, 30 | "require": false, 31 | "define": false 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RESUME Generator 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /scripts/component/ExportPDFComponent.react.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define([ 4 | 'react', 5 | 'jquery', 6 | 'jsPDF', 7 | 'i18n!:translation' 8 | ], function (React, $, jsPDF, i18n) { 9 | var exportPDFComponent = React.createClass({ 10 | onButtonClicked: function () { 11 | var doc, elementHandler, source; 12 | doc = new jsPDF(); 13 | elementHandler = {}; 14 | source = $('#' + this.props.id).html(); 15 | doc.fromHTML(source, 15, 15, 16 | { 17 | 'width': 180, 'elementHandlers': elementHandler 18 | }); 19 | doc.save("resume.pdf"); 20 | }, 21 | render: function () { 22 | return ( 23 | 24 | 27 | 28 | ); 29 | } 30 | }); 31 | 32 | return exportPDFComponent; 33 | }); 34 | -------------------------------------------------------------------------------- /scripts/vendor/extensions/github.js: -------------------------------------------------------------------------------- 1 | // 2 | // Github Extension (WIP) 3 | // ~~strike-through~~ -> strike-through 4 | // 5 | 6 | (function(){ 7 | var github = function(converter) { 8 | return [ 9 | { 10 | // strike-through 11 | // NOTE: showdown already replaced "~" with "~T", so we need to adjust accordingly. 12 | type : 'lang', 13 | regex : '(~T){2}([^~]+)(~T){2}', 14 | replace : function(match, prefix, content, suffix) { 15 | return '' + content + ''; 16 | } 17 | } 18 | ]; 19 | }; 20 | 21 | // Client-side export 22 | if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.github = github; } 23 | // Server-side export 24 | if (typeof module !== 'undefined') module.exports = github; 25 | }()); 26 | -------------------------------------------------------------------------------- /scripts/vendor/extensions/icons.js: -------------------------------------------------------------------------------- 1 | // 2 | // Github Extension (WIP) 3 | // ~~strike-through~~ -> strike-through 4 | // 5 | 6 | (function(){ 7 | var icons = function(converter) { 8 | return [ 9 | { type: 'output', filter: function(source){ 10 | return source.replace(//gi, function(match, isLevel) { 11 | var type = match.match(//i)[1]; 12 | 13 | if (isLevel) { 14 | return ''; 15 | } 16 | }); 17 | }} 18 | ]; 19 | }; 20 | 21 | // Client-side export 22 | if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.icons = icons; } 23 | // Server-side export 24 | if (typeof module !== 'undefined') module.exports = icons; 25 | }()); 26 | -------------------------------------------------------------------------------- /scripts/component/ExampleComponent.react.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define([ 4 | 'react', 5 | 'text!../data/resume.md', 6 | 'showdown', 7 | 'jsx!component/SearchComponent.react', 8 | 'jsx!component/ExportPDFComponent.react', 9 | 'table', 10 | 'prettify', 11 | 'star', 12 | 'icons' 13 | ], function (React, Resume, Showdown, SearchComponent, ExportPDFComponent) { 14 | var converter, html, ExampleComponent; 15 | converter = new Showdown.converter({extensions: ['table', 'prettify', 'star', 'icons']}); 16 | html = converter.makeHtml(Resume); 17 | 18 | ExampleComponent = React.createClass({ 19 | render: function () { 20 | var id = 'resume'; 21 | return ( 22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 | ); 30 | } 31 | }); 32 | 33 | return ExampleComponent; 34 | }); 35 | -------------------------------------------------------------------------------- /scripts/vendor/extensions/star.js: -------------------------------------------------------------------------------- 1 | // 2 | // A showdown extension to add star for Resume 3 | // hints to showdown's HTML output. 4 | // 5 | 6 | (function(){ 7 | 8 | var star = function(converter) { 9 | return [ 10 | { type: 'output', filter: function(source){ 11 | return source.replace(/()/gi, function(match, isLevel) { 12 | var level = match.match(//i)[1]; 13 | level = level.replace(".", "-"); 14 | 15 | if (isLevel) { 16 | return ''; 17 | } 18 | }); 19 | }} 20 | ]; 21 | }; 22 | 23 | // Client-side export 24 | if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.star = star; } 25 | // Server-side export 26 | if (typeof module !== 'undefined') module.exports = star; 27 | 28 | }()); 29 | -------------------------------------------------------------------------------- /scripts/vendor/extensions/prettify.js: -------------------------------------------------------------------------------- 1 | // 2 | // Google Prettify 3 | // A showdown extension to add Google Prettify (http://code.google.com/p/google-code-prettify/) 4 | // hints to showdown's HTML output. 5 | // 6 | 7 | (function(){ 8 | 9 | var prettify = function(converter) { 10 | return [ 11 | { type: 'output', filter: function(source){ 12 | 13 | return source.replace(/(
)?/gi, function(match, pre) {
14 |                     if (pre) {
15 |                         return '
';
16 |                     } else {
17 |                         return '';
18 |                     }
19 |                 });
20 |             }}
21 |         ];
22 |     };
23 | 
24 |     // Client-side export
25 |     if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.prettify = prettify; }
26 |     // Server-side export
27 |     if (typeof module !== 'undefined') module.exports = prettify;
28 | 
29 | }());
30 | 


--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "name": "resume",
 3 |   "version": "0.0.1",
 4 |   "dependencies": {},
 5 |   "devDependencies": {
 6 |     "apache-server-configs": "^2.8.0",
 7 |     "connect-livereload": "^0.4.0",
 8 |     "grunt": "^0.4.5",
 9 |     "grunt-bower-requirejs": "^1.1.0",
10 |     "grunt-contrib-clean": "^0.6.0",
11 |     "grunt-contrib-concat": "^0.5.0",
12 |     "grunt-contrib-connect": "^0.8.0",
13 |     "grunt-contrib-copy": "^0.5.0",
14 |     "grunt-contrib-cssmin": "^0.10.0",
15 |     "grunt-contrib-htmlmin": "^0.3.0",
16 |     "grunt-contrib-imagemin": "^0.9.2",
17 |     "grunt-contrib-jshint": "^0.10.0",
18 |     "grunt-contrib-jst": "^0.6.0",
19 |     "grunt-contrib-uglify": "^0.6.0",
20 |     "grunt-contrib-watch": "^0.6.1",
21 |     "grunt-jsxhint": "^0.5.0",
22 |     "grunt-mocha": "^0.4.11",
23 |     "grunt-open": "^0.2.3",
24 |     "grunt-requirejs": "^0.4.2",
25 |     "grunt-rev": "^0.1.0",
26 |     "grunt-usemin": "^2.4.0",
27 |     "jshint-stylish": "^1.0.0",
28 |     "load-grunt-tasks": "^0.6.0",
29 |     "react-tools": "^0.13.1",
30 |     "time-grunt": "^1.0.0"
31 |   },
32 |   "engines": {
33 |     "node": ">=0.10.0"
34 |   }
35 | }
36 | 


--------------------------------------------------------------------------------
/scripts/main.js:
--------------------------------------------------------------------------------
 1 | 'use strict';
 2 | 
 3 | require.config({
 4 | 	map: {
 5 | 		"*": {
 6 | 			i18n: "vendor/i18next"
 7 | 		}
 8 | 	},
 9 | 	paths: {
10 | 		jquery: 'vendor/zepto.min',
11 | 
12 | 		react: 'vendor/react-with-addons.min',
13 | 		'react-router': 'vendor/ReactRouter.min',
14 | 		"JSXTransformer": 'vendor/JSXTransformer',
15 | 		jsx: 'vendor/jsx',
16 | 
17 | 		jsPDF: 'vendor/jspdf.min',
18 | 
19 | 		text: 'vendor/text',
20 | 		json: 'vendor/json',
21 | 		i18next: 'vendor/i18next.amd.min',
22 | 
23 | 		showdown: 'vendor/Showdown',
24 | 		table: 'vendor/extensions/table',
25 | 		prettify: 'vendor/extensions/prettify',
26 | 		star: 'vendor/extensions/star',
27 | 		icons: 'vendor/extensions/icons'
28 | 	},
29 | 	shim: {
30 | 		table: ["showdown"],
31 | 		prettify: ["showdown"],
32 | 		star: ["showdown"],
33 | 		icons: ["showdown"],
34 | 		"react-router": {
35 | 			exports: "ReactRouter",
36 | 			deps: ['react'],
37 | 			init: function (React) {
38 | 				this.React = React;
39 | 			}
40 | 		},
41 | 		jquery: {
42 | 			exports: '$'
43 | 		}
44 | 	},
45 | 	i18next: {
46 | 		ns: "translation",
47 | 		fallbackLng: "zh-CN",
48 | 		detectLngQS: "locale",
49 | 		supportedLngs: {
50 | 			zh: ['translation'],
51 | 			en: ['translation'],
52 | 			'zh-cn': ['translation']
53 | 		}
54 | 	}
55 | });
56 | 
57 | require([
58 | 	'jsx!app.react'
59 | ], function (App) {
60 | 	App.initialize();
61 | });
62 | 


--------------------------------------------------------------------------------
/scripts/component/SearchComponent.react.js:
--------------------------------------------------------------------------------
 1 | 'use strict';
 2 | 
 3 | define([
 4 | 	'react',
 5 | 	'jquery',
 6 | 
 7 | ], function (React, $) {
 8 | 	function getListsName(ol_list) {
 9 | 		var libraries = [];
10 | 		$.each(ol_list, function (index, list) {
11 | 			libraries.push({name: $(list).text()});
12 | 		});
13 | 		return libraries;
14 | 	}
15 | 	
16 | 	var SearchComponent = React.createClass({
17 | 		getInitialState: function () {
18 | 			return {searchString: ''};
19 | 		},
20 | 		handleChange: function (e) {
21 | 			this.setState({searchString: e.target.value});
22 | 		},
23 | 		render: function () {
24 | 			var libraries, searchString;
25 | 
26 | 			libraries = getListsName($(this.props.html).find('ol li'));
27 | 			searchString = this.state.searchString.trim().toLowerCase();
28 | 
29 | 			if (searchString.length > 0) {
30 | 				libraries = libraries.filter(function (l) {
31 | 					return l.name.toLowerCase().match(searchString);
32 | 				});
33 | 			}
34 | 
35 | 			return (
36 | 				
37 | 						Search:
38 | 						
40 | 
41 | 						

Keywords: 42 | { 43 | libraries.map(function (l) { 44 | return {l.name},; 45 | }) 46 | } 47 |

48 |
49 | ); 50 | } 51 | }); 52 | 53 | return SearchComponent; 54 | }); 55 | -------------------------------------------------------------------------------- /scripts/router.react.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define([ 4 | 'react-router', 5 | 'react', 6 | 'jsx!component/IndexComponent.react', 7 | 'jsx!component/ExampleComponent.react', 8 | 'jsx!component/LanguageComponent.react', 9 | 'i18n!:translation' 10 | ],function(Router, React, IndexComponent, ExampleComponent, LanguageComponent, i18n){ 11 | var AppRouter; 12 | 13 | var DefaultRoute = Router.DefaultRoute; 14 | var Link = Router.Link; 15 | var Route = Router.Route; 16 | var RouteHandler = Router.RouteHandler; 17 | 18 | var App = React.createClass({ 19 | render: function () { 20 | return ( 21 |
22 |
23 | 24 |
25 |
    26 |
  • {i18n.t('nav.home')}
  • 27 |
  • {i18n.t('nav.example')}
  • 28 |
29 |
30 |
31 | 32 |
33 | ); 34 | } 35 | }); 36 | var routes = ( 37 | 38 | 39 | 40 | 41 | ); 42 | 43 | AppRouter = function(){}; 44 | AppRouter.prototype.init = function () { 45 | Router.run(routes, Router.HistoryLocation, function (Handler) { 46 | React.render(, document.getElementById('main_content')); 47 | }); 48 | }; 49 | 50 | return AppRouter; 51 | }); 52 | -------------------------------------------------------------------------------- /scripts/data/resume.md: -------------------------------------------------------------------------------- 1 | # Fengda Huang 2 | ## Developer & Code Enthusiast 3 | 4 | [phodal.com](http://www.phodal.com) 5 | [h@phodal.com](mailto:h@phodal.com) 6 | (86) 182-0921-9631 7 | 8 | ------ 9 | 10 | ### Technical 11 | 12 | OS: 13 | 14 | 15 | 16 | 1. Java 17 | 1. Javascript / NodeJS 18 | 1. Android 19 | 1. Python 20 | 1. Git 21 | 1. Backbone.js 22 | 23 | 24 | 25 | 1. Cordova 26 | 1. Ruby 27 | 1. MySQL 28 | 1. FAST / Solr 29 | 30 | ------ 31 | 32 | ### Experience 33 | 34 | **ThoughtWorks** *Consultant* __2013 to present__ 35 | **Technical Environment** Backbone.js, Jasmine.js, Java, Spring, Cucumber, Ruby, 36 | 37 | ------ 38 | 39 | ### Projects 40 | 41 | * **IoT** 42 | https://github.com/phodal/iot() 43 | 44 | ------ 45 | 46 | ###Mobile App 47 | 48 | | Name | URL | 49 | |======== |=======================| 50 | |教你设计物联网 | [Google Play](https://play.google.com/store/apps/details?id=com.phodal.designiot) | 51 | |极客爱情 | [Google Play](https://play.google.com/store/apps/details?id=com.phodal.geekslove) | 52 | | 程序语言答人 | [Google Play](https://play.google.com/store/apps/details?id=com.ionicframework.learningionic860614) | 53 | 54 | ------ 55 | 56 | ### Education 57 | 58 | **西安文理学院(电子信息工程)** __2010 ~ 2014__ -------------------------------------------------------------------------------- /scripts/vendor/extensions/twitter.js: -------------------------------------------------------------------------------- 1 | // 2 | // Twitter Extension 3 | // @username -> @username 4 | // #hashtag -> #hashtag 5 | // 6 | 7 | (function(){ 8 | 9 | var twitter = function(converter) { 10 | return [ 11 | 12 | // @username syntax 13 | { type: 'lang', regex: '\\B(\\\\)?@([\\S]+)\\b', replace: function(match, leadingSlash, username) { 14 | // Check if we matched the leading \ and return nothing changed if so 15 | if (leadingSlash === '\\') { 16 | return match; 17 | } else { 18 | return '@' + username + ''; 19 | } 20 | }}, 21 | 22 | // #hashtag syntax 23 | { type: 'lang', regex: '\\B(\\\\)?#([\\S]+)\\b', replace: function(match, leadingSlash, tag) { 24 | // Check if we matched the leading \ and return nothing changed if so 25 | if (leadingSlash === '\\') { 26 | return match; 27 | } else { 28 | return '#' + tag + ''; 29 | } 30 | }}, 31 | 32 | // Escaped @'s 33 | { type: 'lang', regex: '\\\\@', replace: '@' } 34 | ]; 35 | }; 36 | 37 | // Client-side export 38 | if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.twitter = twitter; } 39 | // Server-side export 40 | if (typeof module !== 'undefined') module.exports = twitter; 41 | 42 | }()); 43 | -------------------------------------------------------------------------------- /scripts/component/IndexComponent.react.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | define([ 4 | 'react', 5 | 'showdown', 6 | 'jquery', 7 | 'text!../data/example.md', 8 | 'jsx!component/SearchComponent.react', 9 | 'jsx!component/ExportPDFComponent.react', 10 | 'i18n!:translation', 11 | 'table', 12 | 'prettify', 13 | 'star', 14 | 'icons' 15 | ], function (React, Showdown, $, example, SearchComponent, ExportPDFComponent, i18n) { 16 | var IndexComponent; 17 | var converter = new Showdown.converter({ extensions: ['table', 'prettify', 'star', 'icons'] }); 18 | 19 | IndexComponent = React.createClass({ 20 | getInitialState: function () { 21 | var save = localStorage.getItem("markdown-editor-storage"); 22 | if(save !== undefined && save !== null && save != '') { 23 | return {value: save}; 24 | } 25 | return { 26 | value: example 27 | }; 28 | }, 29 | componentDidMount: function() { 30 | this.setState({i18n: i18n}); 31 | }, 32 | handleChange: function () { 33 | this.setState({value: this.refs.textarea.getDOMNode().value}); 34 | }, 35 | hiddenOthers: function () { 36 | $('.input').hide(); 37 | $('.top').hide(); 38 | $('.header').hide(); 39 | $('.output h3').hide(); 40 | localStorage.setItem("markdown-editor-storage", this.refs.textarea.getDOMNode().value); 41 | }, 42 | render: function () { 43 | var html = converter.makeHtml(this.state.value); 44 | return ( 45 |
46 |
47 |   48 | 51 | 52 |
53 |
54 |

Input

55 |