├── Staticfile ├── .gitattributes ├── app ├── fonts │ ├── icons-hinted.ttf │ ├── icons.eot │ ├── icons.ttf │ ├── icons.woff │ ├── icons.woff2 │ ├── home │ │ ├── coding_home.eot │ │ ├── coding_home.ttf │ │ └── coding_home.woff │ ├── RobotoCondensed-Bold.eot │ ├── RobotoCondensed-Bold.ttf │ ├── RobotoCondensed-Bold.woff │ ├── RobotoCondensed-Light.eot │ ├── RobotoCondensed-Light.ttf │ ├── RobotoCondensed-Italic.eot │ ├── RobotoCondensed-Italic.ttf │ ├── RobotoCondensed-Italic.woff │ ├── RobotoCondensed-Light.woff │ ├── RobotoCondensed-Regular.eot │ ├── RobotoCondensed-Regular.ttf │ ├── RobotoCondensed-Regular.woff │ ├── RobotoCondensed-BoldItalic.eot │ ├── RobotoCondensed-BoldItalic.ttf │ ├── RobotoCondensed-BoldItalic.woff │ ├── RobotoCondensed-LightItalic.eot │ ├── RobotoCondensed-LightItalic.ttf │ ├── RobotoCondensed-LightItalic.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── icons.svg ├── images │ ├── icons │ │ ├── icons-hinted.ttf │ │ ├── @_.png │ │ ├── pp.png │ │ ├── code.png │ │ ├── file.png │ │ ├── fork.png │ │ ├── logo.png │ │ ├── man.png │ │ ├── menu.png │ │ ├── task.png │ │ ├── user.png │ │ ├── 最新_.png │ │ ├── 热门_.png │ │ ├── 表情_.png │ │ ├── avatar.png │ │ ├── cloud .png │ │ ├── comment.png │ │ ├── folder.png │ │ ├── icons.eot │ │ ├── icons.ttf │ │ ├── icons.woff │ │ ├── icons.woff2 │ │ ├── like1.png │ │ ├── like2.png │ │ ├── logout.png │ │ ├── pp_icon.png │ │ ├── project.png │ │ ├── square.png │ │ ├── watched.png │ │ ├── woman.png │ │ ├── 冒泡_edit.png │ │ ├── addfriend.png │ │ ├── concerned.png │ │ ├── dropdown.png │ │ ├── feedback.png │ │ ├── pp_active.png │ │ ├── priority.png │ │ ├── up_arrow.png │ │ ├── app-logo-ios.png │ │ ├── comment_gray.png │ │ ├── down_arrow.png │ │ ├── folder_blue.png │ │ ├── key_checked.png │ │ ├── left_arrow.png │ │ ├── login_logo.png │ │ ├── logo&slogan.png │ │ ├── logo-coding.png │ │ ├── pp_checked.png │ │ ├── pp_unchecked.png │ │ ├── project_icon.png │ │ ├── right_arrow.png │ │ ├── scenery-20.png │ │ ├── task_active.png │ │ ├── user_right.png │ │ ├── 精选_unchecked.png │ │ ├── eachconcerned.png │ │ ├── elite_checked.png │ │ ├── email_checked.png │ │ ├── folder_default.png │ │ ├── key_unchecked.png │ │ ├── priority_gray.png │ │ ├── project_active.png │ │ ├── square_active.png │ │ ├── x_activate_tip.png │ │ ├── x_input_clear.png │ │ ├── 冒泡_down arrow.png │ │ ├── email_unchecked.png │ │ ├── feedback_active.png │ │ ├── placeholder--wide.png │ │ ├── projects_checked.png │ │ ├── pic_projects_banner.png │ │ ├── placeholder--medium.png │ │ ├── placeholder--small.png │ │ ├── projects_unchecked.png │ │ └── icons.svg │ ├── .DS_Store │ ├── pp │ │ ├── at.png │ │ ├── .DS_Store │ │ ├── emoji.png │ │ ├── like1.png │ │ ├── like2.png │ │ ├── plus.png │ │ ├── write.png │ │ ├── comment.png │ │ ├── emojis.png │ │ ├── loading.gif │ │ ├── monkeys.png │ │ ├── emojihead.png │ │ ├── keyboard.png │ │ ├── location1.png │ │ ├── location2.png │ │ ├── monkeyhead.png │ │ ├── addtodesk_x.png │ │ ├── comment_more.png │ │ ├── deleteimg_x.png │ │ └── emojidelete.png │ ├── coding.net.png │ ├── static │ │ ├── file.png │ │ ├── folder.png │ │ ├── read.png │ │ ├── left_arrow.png │ │ ├── right_arrow.png │ │ ├── blankpage_image_Hi.png │ │ ├── blankpage_image_Sleep.png │ │ └── blankpage_image_loadFail.png │ ├── touch │ │ ├── icon-128x128.png │ │ ├── chrome-touch-icon-192x192.png │ │ └── ms-touch-icon-144x144-precomposed.png │ ├── hamburger.svg │ └── close.svg ├── robots.txt ├── .DS_Store ├── favicon.ico ├── icon-144x144.png ├── styles │ ├── .DS_Store │ ├── components │ │ ├── _modules │ │ │ ├── _featured-section.scss │ │ │ ├── _guides-section.scss │ │ │ ├── _in-this-guide.scss │ │ │ ├── _related-items.scss │ │ │ ├── _articles-section.scss │ │ │ ├── _page-header.scss │ │ │ ├── _summary-header.scss │ │ │ ├── _toc.scss │ │ │ ├── _related-guides.scss │ │ │ ├── _quote.scss │ │ │ ├── _did-you-know.scss │ │ │ ├── _featured-spotlight.scss │ │ │ ├── _next-lessons.scss │ │ │ ├── _editorial-header.scss │ │ │ └── _article-nav.scss │ │ ├── _components │ │ │ ├── _media.scss │ │ │ ├── _subsection-title.scss │ │ │ ├── _link.scss │ │ │ ├── _breadcrumb.scss │ │ │ ├── _typography.scss │ │ │ ├── _column-list.scss │ │ │ ├── _articles-list.scss │ │ │ ├── _button.scss │ │ │ ├── _guides-list.scss │ │ │ ├── _icon-circle.scss │ │ │ ├── _table.scss │ │ │ ├── _icons.scss │ │ │ └── _grid.scss │ │ ├── _pages │ │ │ ├── _page-resources.scss │ │ │ └── _styleguide.scss │ │ ├── _global.scss │ │ ├── components.scss │ │ ├── _helper.scss │ │ └── _themed.scss │ ├── reset.css │ ├── bootstrap.less │ ├── nav.css │ └── _h5bp.scss ├── apple-icon-57x57.png ├── apple-icon-72x72.png ├── apple-icon-114x114.png ├── apple-icon-144x144.png ├── apple-icon-180x180.png ├── apple-touch-icon-precomposed.png ├── views │ ├── my_project_task_desc.html │ ├── project_topics.html │ ├── project_blob.html │ ├── pp_like_users.html │ ├── user_info.html │ ├── pp_detail.html │ ├── my_project_attachment_preview.html │ ├── my_project_git_blob.html │ ├── project_tree.html │ ├── project.html │ ├── my_project_topic_create.html │ ├── project_pull.html │ ├── my_project_git_pull.html │ ├── pp.html │ ├── my_project_attachment_list.html │ ├── user_projects.html │ ├── my_project_members.html │ ├── register.html │ ├── feedback.html │ ├── my_project_git_code.html │ ├── project_topic.html │ ├── my_project.html │ ├── user_fans.html │ ├── my_project_topics.html │ ├── pp_iphoneAddtoDesk.html │ ├── user_item.html │ ├── activate.html │ ├── my_project_git_merge.html │ ├── resetPassword.html │ ├── user_pp.html │ ├── my_project_topic.html │ ├── my_project_attachment.html │ ├── login.html │ ├── my_project_activity.html │ ├── project_item.html │ └── pp_modal.html ├── scripts │ ├── controllers │ │ ├── root_ctrl.js │ │ ├── dispatch_project_topics_ctrl.js │ │ ├── dispatch_project_home_ctrl.js │ │ ├── dispatch_project_topic_ctrl.js │ │ ├── dispatch_project_git_code_ctrl.js │ │ ├── my_project_topic_create_ctrl.js │ │ ├── my_project_member_ctrl.js │ │ ├── my_project_task_desc_ctrl.js │ │ ├── my_project_attachment_preview_ctrl.js │ │ ├── my_project_attachment_list_ctrl.js │ │ ├── my_project_topics_ctrl.js │ │ ├── my_project_git_code_ctrl.js │ │ ├── my_project_git_merge_ctrl.js │ │ ├── my_project_git_blob_ctrl.js │ │ └── project_item_ctrl.js │ ├── public_method.js │ ├── async.localStorage.examples.js │ ├── main-web-starter-kit.js │ ├── fullscreensnippet.js │ ├── feedbackUploadImage.js │ └── sha1.js ├── lib │ └── home-mobile.js ├── nginx.conf └── index-web-starter-kit.html ├── .yo-rc.json ├── .bowerrc ├── test ├── .bowerrc ├── bower.json ├── spec │ └── test.js └── index.html ├── .DS_Store ├── .gitignore ├── bower.json ├── .jshintrc ├── .editorconfig ├── LICENSE ├── package.json └── README.md /Staticfile: -------------------------------------------------------------------------------- 1 | root: dist -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /app/fonts/icons-hinted.ttf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/images/icons/icons-hinted.ttf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-mocha": {} 3 | } -------------------------------------------------------------------------------- /app/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "app/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /test/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/.DS_Store -------------------------------------------------------------------------------- /app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/.DS_Store -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/favicon.ico -------------------------------------------------------------------------------- /app/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/icons.eot -------------------------------------------------------------------------------- /app/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/icons.ttf -------------------------------------------------------------------------------- /app/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/icons.woff -------------------------------------------------------------------------------- /app/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/icon-144x144.png -------------------------------------------------------------------------------- /app/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/.DS_Store -------------------------------------------------------------------------------- /app/images/pp/at.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/at.png -------------------------------------------------------------------------------- /app/styles/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/styles/.DS_Store -------------------------------------------------------------------------------- /app/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/icons.woff2 -------------------------------------------------------------------------------- /app/images/icons/@_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/@_.png -------------------------------------------------------------------------------- /app/images/icons/pp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/pp.png -------------------------------------------------------------------------------- /app/images/pp/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/.DS_Store -------------------------------------------------------------------------------- /app/images/pp/emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/emoji.png -------------------------------------------------------------------------------- /app/images/pp/like1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/like1.png -------------------------------------------------------------------------------- /app/images/pp/like2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/like2.png -------------------------------------------------------------------------------- /app/images/pp/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/plus.png -------------------------------------------------------------------------------- /app/images/pp/write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/write.png -------------------------------------------------------------------------------- /app/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/apple-icon-57x57.png -------------------------------------------------------------------------------- /app/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/apple-icon-72x72.png -------------------------------------------------------------------------------- /app/images/coding.net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/coding.net.png -------------------------------------------------------------------------------- /app/images/icons/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/code.png -------------------------------------------------------------------------------- /app/images/icons/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/file.png -------------------------------------------------------------------------------- /app/images/icons/fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/fork.png -------------------------------------------------------------------------------- /app/images/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/logo.png -------------------------------------------------------------------------------- /app/images/icons/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/man.png -------------------------------------------------------------------------------- /app/images/icons/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/menu.png -------------------------------------------------------------------------------- /app/images/icons/task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/task.png -------------------------------------------------------------------------------- /app/images/icons/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/user.png -------------------------------------------------------------------------------- /app/images/icons/最新_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/最新_.png -------------------------------------------------------------------------------- /app/images/icons/热门_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/热门_.png -------------------------------------------------------------------------------- /app/images/icons/表情_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/表情_.png -------------------------------------------------------------------------------- /app/images/pp/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/comment.png -------------------------------------------------------------------------------- /app/images/pp/emojis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/emojis.png -------------------------------------------------------------------------------- /app/images/pp/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/loading.gif -------------------------------------------------------------------------------- /app/images/pp/monkeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/monkeys.png -------------------------------------------------------------------------------- /app/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/apple-icon-114x114.png -------------------------------------------------------------------------------- /app/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/apple-icon-144x144.png -------------------------------------------------------------------------------- /app/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/apple-icon-180x180.png -------------------------------------------------------------------------------- /app/images/icons/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/avatar.png -------------------------------------------------------------------------------- /app/images/icons/cloud .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/cloud .png -------------------------------------------------------------------------------- /app/images/icons/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/comment.png -------------------------------------------------------------------------------- /app/images/icons/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/folder.png -------------------------------------------------------------------------------- /app/images/icons/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/icons.eot -------------------------------------------------------------------------------- /app/images/icons/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/icons.ttf -------------------------------------------------------------------------------- /app/images/icons/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/icons.woff -------------------------------------------------------------------------------- /app/images/icons/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/icons.woff2 -------------------------------------------------------------------------------- /app/images/icons/like1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/like1.png -------------------------------------------------------------------------------- /app/images/icons/like2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/like2.png -------------------------------------------------------------------------------- /app/images/icons/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/logout.png -------------------------------------------------------------------------------- /app/images/icons/pp_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/pp_icon.png -------------------------------------------------------------------------------- /app/images/icons/project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/project.png -------------------------------------------------------------------------------- /app/images/icons/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/square.png -------------------------------------------------------------------------------- /app/images/icons/watched.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/watched.png -------------------------------------------------------------------------------- /app/images/icons/woman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/woman.png -------------------------------------------------------------------------------- /app/images/icons/冒泡_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/冒泡_edit.png -------------------------------------------------------------------------------- /app/images/pp/emojihead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/emojihead.png -------------------------------------------------------------------------------- /app/images/pp/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/keyboard.png -------------------------------------------------------------------------------- /app/images/pp/location1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/location1.png -------------------------------------------------------------------------------- /app/images/pp/location2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/location2.png -------------------------------------------------------------------------------- /app/images/pp/monkeyhead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/monkeyhead.png -------------------------------------------------------------------------------- /app/images/static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/file.png -------------------------------------------------------------------------------- /app/images/static/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/folder.png -------------------------------------------------------------------------------- /app/images/static/read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/read.png -------------------------------------------------------------------------------- /app/fonts/home/coding_home.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/home/coding_home.eot -------------------------------------------------------------------------------- /app/fonts/home/coding_home.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/home/coding_home.ttf -------------------------------------------------------------------------------- /app/images/icons/addfriend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/addfriend.png -------------------------------------------------------------------------------- /app/images/icons/concerned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/concerned.png -------------------------------------------------------------------------------- /app/images/icons/dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/dropdown.png -------------------------------------------------------------------------------- /app/images/icons/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/feedback.png -------------------------------------------------------------------------------- /app/images/icons/pp_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/pp_active.png -------------------------------------------------------------------------------- /app/images/icons/priority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/priority.png -------------------------------------------------------------------------------- /app/images/icons/up_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/up_arrow.png -------------------------------------------------------------------------------- /app/images/pp/addtodesk_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/addtodesk_x.png -------------------------------------------------------------------------------- /app/images/pp/comment_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/comment_more.png -------------------------------------------------------------------------------- /app/images/pp/deleteimg_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/deleteimg_x.png -------------------------------------------------------------------------------- /app/images/pp/emojidelete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/pp/emojidelete.png -------------------------------------------------------------------------------- /app/fonts/home/coding_home.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/home/coding_home.woff -------------------------------------------------------------------------------- /app/images/icons/app-logo-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/app-logo-ios.png -------------------------------------------------------------------------------- /app/images/icons/comment_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/comment_gray.png -------------------------------------------------------------------------------- /app/images/icons/down_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/down_arrow.png -------------------------------------------------------------------------------- /app/images/icons/folder_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/folder_blue.png -------------------------------------------------------------------------------- /app/images/icons/key_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/key_checked.png -------------------------------------------------------------------------------- /app/images/icons/left_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/left_arrow.png -------------------------------------------------------------------------------- /app/images/icons/login_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/login_logo.png -------------------------------------------------------------------------------- /app/images/icons/logo&slogan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/logo&slogan.png -------------------------------------------------------------------------------- /app/images/icons/logo-coding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/logo-coding.png -------------------------------------------------------------------------------- /app/images/icons/pp_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/pp_checked.png -------------------------------------------------------------------------------- /app/images/icons/pp_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/pp_unchecked.png -------------------------------------------------------------------------------- /app/images/icons/project_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/project_icon.png -------------------------------------------------------------------------------- /app/images/icons/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/right_arrow.png -------------------------------------------------------------------------------- /app/images/icons/scenery-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/scenery-20.png -------------------------------------------------------------------------------- /app/images/icons/task_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/task_active.png -------------------------------------------------------------------------------- /app/images/icons/user_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/user_right.png -------------------------------------------------------------------------------- /app/images/icons/精选_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/精选_unchecked.png -------------------------------------------------------------------------------- /app/images/static/left_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/left_arrow.png -------------------------------------------------------------------------------- /app/images/static/right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/right_arrow.png -------------------------------------------------------------------------------- /app/images/touch/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/touch/icon-128x128.png -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Bold.eot -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Bold.woff -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Light.eot -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Light.ttf -------------------------------------------------------------------------------- /app/images/icons/eachconcerned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/eachconcerned.png -------------------------------------------------------------------------------- /app/images/icons/elite_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/elite_checked.png -------------------------------------------------------------------------------- /app/images/icons/email_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/email_checked.png -------------------------------------------------------------------------------- /app/images/icons/folder_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/folder_default.png -------------------------------------------------------------------------------- /app/images/icons/key_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/key_unchecked.png -------------------------------------------------------------------------------- /app/images/icons/priority_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/priority_gray.png -------------------------------------------------------------------------------- /app/images/icons/project_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/project_active.png -------------------------------------------------------------------------------- /app/images/icons/square_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/square_active.png -------------------------------------------------------------------------------- /app/images/icons/x_activate_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/x_activate_tip.png -------------------------------------------------------------------------------- /app/images/icons/x_input_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/x_input_clear.png -------------------------------------------------------------------------------- /app/images/icons/冒泡_down arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/冒泡_down arrow.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .tmp 3 | .sass-cache 4 | app/bower_components 5 | test/bower_components 6 | dist 7 | .idea 8 | .* 9 | -------------------------------------------------------------------------------- /app/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Italic.eot -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Italic.ttf -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Italic.woff -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Light.woff -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Regular.eot -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-Regular.woff -------------------------------------------------------------------------------- /app/images/icons/email_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/email_unchecked.png -------------------------------------------------------------------------------- /app/images/icons/feedback_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/feedback_active.png -------------------------------------------------------------------------------- /app/images/icons/placeholder--wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/placeholder--wide.png -------------------------------------------------------------------------------- /app/images/icons/projects_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/projects_checked.png -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-BoldItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-BoldItalic.eot -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /app/images/icons/pic_projects_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/pic_projects_banner.png -------------------------------------------------------------------------------- /app/images/icons/placeholder--medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/placeholder--medium.png -------------------------------------------------------------------------------- /app/images/icons/placeholder--small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/placeholder--small.png -------------------------------------------------------------------------------- /app/images/icons/projects_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/icons/projects_unchecked.png -------------------------------------------------------------------------------- /app/images/static/blankpage_image_Hi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/blankpage_image_Hi.png -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-BoldItalic.woff -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-LightItalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-LightItalic.eot -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-LightItalic.ttf -------------------------------------------------------------------------------- /app/fonts/RobotoCondensed-LightItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/RobotoCondensed-LightItalic.woff -------------------------------------------------------------------------------- /app/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /app/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /app/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app/images/static/blankpage_image_Sleep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/blankpage_image_Sleep.png -------------------------------------------------------------------------------- /app/images/static/blankpage_image_loadFail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/static/blankpage_image_loadFail.png -------------------------------------------------------------------------------- /app/images/touch/chrome-touch-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/touch/chrome-touch-icon-192x192.png -------------------------------------------------------------------------------- /app/images/hamburger.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/images/touch/ms-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/m.coding.net/master/app/images/touch/ms-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /app/styles/components/_modules/_featured-section.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Editorial Header 4 | * 5 | **/ 6 | 7 | .featured-section { 8 | background: $colorGrayBackground; 9 | } 10 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_guides-section.scss: -------------------------------------------------------------------------------- 1 | .guides-section { 2 | background: $colorGrayBackground; 3 | text-align: center; 4 | padding: $lineHeight 0 $lineHeight * 4; 5 | } 6 | -------------------------------------------------------------------------------- /test/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobile", 3 | "private": true, 4 | "dependencies": { 5 | "chai": "~1.8.0", 6 | "mocha": "~1.14.0" 7 | }, 8 | "devDependencies": {} 9 | } 10 | -------------------------------------------------------------------------------- /app/views/my_project_task_desc.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 | 8 | -------------------------------------------------------------------------------- /app/views/project_topics.html: -------------------------------------------------------------------------------- 1 | 3 |
4 |
5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /app/styles/components/_components/_media.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Media - imgs/videos 4 | * 5 | **/ 6 | 7 | img, 8 | video, 9 | object { 10 | max-width: 100%; 11 | } 12 | 13 | img { 14 | 15 | .content & { 16 | margin-top: $lineHeight; 17 | margin-bottom: $lineHeight; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_in-this-guide.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * In this guide 4 | * 5 | **/ 6 | 7 | .in-this-guide { 8 | margin-top: - $lineHeight * 3; 9 | } 10 | 11 | .in-this-guide__title { 12 | @include type--medium(true); 13 | font-family: $fontHighlight; 14 | margin-bottom: $lineHeight; 15 | } 16 | -------------------------------------------------------------------------------- /app/views/project_blob.html: -------------------------------------------------------------------------------- 1 | 2 |
 3 |         
 4 |             
 5 |                 
 6 |             
 7 |         
 8 |     
9 | 10 | -------------------------------------------------------------------------------- /app/styles/components/_components/_subsection-title.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * subsection__title 4 | * 5 | **/ 6 | 7 | .subsection-title { 8 | color: $colorGrayDark; 9 | margin-top: $lineHeight * 2; 10 | } 11 | 12 | .subsection-number { 13 | @include type--base; 14 | padding-top: 0; 15 | display: block; 16 | } 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/pp_like_users.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 5 |
6 | 7 |
8 |
-------------------------------------------------------------------------------- /app/scripts/controllers/root_ctrl.js: -------------------------------------------------------------------------------- 1 | var ROOT_ROUTE = (function(){ 2 | return { 3 | before_enter: function(type){ 4 | if (!router.current_user) { 5 | location.href = '/home.html'; 6 | } else { 7 | location.href = '/user/projects'; 8 | } 9 | } 10 | }; 11 | })(); 12 | -------------------------------------------------------------------------------- /app/styles/components/_components/_link.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Link 4 | * 5 | **/ 6 | 7 | a { 8 | color: $colorBlue; 9 | } 10 | 11 | a:hover { 12 | text-decoration: none; 13 | } 14 | 15 | .cta--primary { 16 | @include style-cta($colorBlue, $icon-chevron-right); 17 | } 18 | 19 | .cta--secondary { 20 | @include style-cta($colorBlue); 21 | } 22 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_related-items.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Related items 4 | * 5 | **/ 6 | 7 | .related-items { 8 | background-color: $colorGrayDark; 9 | color: #ffffff; 10 | padding-bottom: $lineHeight * 2; 11 | margin-top: $lineHeight * 2; 12 | 13 | .list-links { 14 | a { 15 | color: #ffffff; 16 | } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/views/user_info.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
-------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobile", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "bootstrap": "~3.0.0", 6 | "modernizr": "~2.6.2", 7 | "highlightjs": "~8.4.0", 8 | "jquery": "~1.9.1", 9 | "video.js": "4.6.4", 10 | "coding-smart-app-banner": "git://git.coding.net/bluishoul/coding-smart-app-banner.git" 11 | }, 12 | "devDependencies": {} 13 | } 14 | -------------------------------------------------------------------------------- /app/views/pp_detail.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 | 8 |
9 |
-------------------------------------------------------------------------------- /app/styles/components/_pages/_page-resources.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Resources page 4 | * 5 | **/ 6 | 7 | .page--resources { 8 | & .article-section__icon, 9 | & .articles-count, 10 | & .guides-list__item .secondary-content { 11 | display: none; 12 | } 13 | 14 | & .primary-content { 15 | padding-top: $lineHeight; 16 | padding-bottom: $lineHeight*2; 17 | 18 | p { 19 | margin-top: 0; 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/views/my_project_attachment_preview.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | 18 | -------------------------------------------------------------------------------- /app/views/my_project_git_blob.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
 5 | 	        
 6 | 	        
 7 | 	    
8 |
9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.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 | "quotmark": "single", 15 | "regexp": true, 16 | "undef": true, 17 | "unused": true, 18 | "strict": true, 19 | "trailing": true, 20 | "smarttabs": true 21 | } 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 4 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /app/views/project_tree.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | 8 |
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_articles-section.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Articles section 4 | * 5 | **/ 6 | 7 | .articles-section { 8 | background: $colorGrayBackground; 9 | text-align: center; 10 | padding: $lineHeight 0 $lineHeight*4; 11 | } 12 | 13 | .articles-count { 14 | color: $colorBlue; 15 | font-family: $fontHighlight; 16 | font-weight: 400; 17 | } 18 | 19 | .article-section__icon { 20 | top: -($lineHeight); 21 | 22 | @include medium { 23 | top: -($lineHeight + $lineHeight/2); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/views/project.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 | -------------------------------------------------------------------------------- /app/styles/components/_components/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Breadcrumb 4 | * 5 | **/ 6 | 7 | .breadcrumbs { 8 | display: none; 9 | @include medium { 10 | display: block; 11 | } 12 | 13 | position: relative; 14 | z-index: 1; 15 | } 16 | 17 | .breadcrumbs p { 18 | @include type--small; 19 | padding-top: $lineHeight; 20 | } 21 | 22 | .breadcrumbs__link { 23 | @include type--small; 24 | color: black; 25 | font-weight: 400; 26 | padding-top: 0; 27 | 28 | @include medium { 29 | padding-top: 0; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_page-header.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Page header 4 | * 5 | **/ 6 | 7 | .page-header { 8 | text-align: center; 9 | 10 | .breadcrumbs { 11 | text-align: left; 12 | color: $colorBlue; 13 | 14 | a { 15 | color: $colorBlue; 16 | } 17 | } 18 | 19 | h3 { 20 | color: $colorGrayDark; 21 | padding-top: $lineHeight * 2; 22 | } 23 | } 24 | 25 | .page-header__excerpt { 26 | position: relative; 27 | padding-top: 0; 28 | 29 | &:last-child { 30 | padding-bottom: $lineHeight * 3; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_summary-header.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Editorial Header 4 | * 5 | **/ 6 | 7 | .summary-header { 8 | background-color: $colorBlue; 9 | padding-bottom: $lineHeight * 3; 10 | color: #ffffff; 11 | margin-bottom: $lineHeight; 12 | box-shadow: inset 0 2px 0 0 #fff; 13 | 14 | .breadcrumbs__link { 15 | color: #ffffff; 16 | } 17 | 18 | } 19 | 20 | .summary-header__anchor-list { 21 | margin-top: $lineHeight * 2; 22 | } 23 | 24 | 25 | .summary-header__anchors-item { 26 | & a { 27 | color: #ffffff; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/views/my_project_topic_create.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 | 14 |
-------------------------------------------------------------------------------- /app/scripts/controllers/dispatch_project_topics_ctrl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by phy on 15-11-3. 3 | */ 4 | var DISPATCH_PROJECT_TOPICS_ROUTE = (function(){ 5 | return { 6 | resolve: function (ownerName, projectName) { 7 | var path = '/api/user/' + ownerName + '/project/' + projectName; 8 | return coding.get(path); 9 | }, 10 | dispatch: function (ownerName, projectName, project) { 11 | if (!project) { 12 | router.run.call(router, '/user/projects'); 13 | } 14 | return project.is_public ? PROJECT_TOPICS_ROUTE : MY_PROJECT_TOPICS_ROUTE; 15 | }, 16 | context: '.container', 17 | } 18 | 19 | })(); -------------------------------------------------------------------------------- /app/scripts/public_method.js: -------------------------------------------------------------------------------- 1 | function bindClearInput(name){ 2 | var $input = $('input[name="' + name +'"]'); 3 | 4 | $input.on('focus input',function(){ 5 | var span = $(this).next('span')[0]; 6 | if ($(this).val() != ''){ 7 | if ($(span).css('display') == 'none'){ 8 | $(span).show(); 9 | $(span).one('click',function(){ 10 | var input = $(this).prev("input")[0]; 11 | $(input).val(''); 12 | $(input).trigger('focus'); 13 | $(this).hide(); 14 | }); 15 | } 16 | }else{ 17 | $(span).hide(); 18 | } 19 | }); 20 | } -------------------------------------------------------------------------------- /app/scripts/controllers/dispatch_project_home_ctrl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by phy on 15-10-30. 3 | */ 4 | 5 | var DISPATCH_PROJECT_HOME_ROUTE = (function(){ 6 | return { 7 | resolve: function (ownerName, projectName) { 8 | var path = '/api/user/' + ownerName + '/project/' + projectName; 9 | return coding.get(path); 10 | }, 11 | dispatch: function (ownerName, projectName, project) { 12 | if (!project) { 13 | router.run.call(router, '/user/projects'); 14 | } 15 | return project.is_public ? PROJECT_ITEM_ROUTE : MY_PROJECT_HOME_ROUTE; 16 | }, 17 | context: '.container', 18 | } 19 | 20 | })(); 21 | -------------------------------------------------------------------------------- /app/scripts/controllers/dispatch_project_topic_ctrl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by phy on 15-11-3. 3 | */ 4 | var DISPATCH_PROJECT_TOPIC_ROUTE = (function(){ 5 | return { 6 | resolve: function (ownerName, projectName) { 7 | var path = '/api/user/' + ownerName + '/project/' + projectName; 8 | return coding.get(path); 9 | }, 10 | dispatch: function (ownerName, projectName, topicId, project) { 11 | if (!project) { 12 | router.run.call(router, '/user/projects'); 13 | } 14 | return project.is_public ? PROJECT_TOPIC_ROUTE : MY_PROJECT_TOPIC_ROUTE; 15 | }, 16 | context: '.container', 17 | } 18 | 19 | })(); -------------------------------------------------------------------------------- /app/scripts/controllers/dispatch_project_git_code_ctrl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by phy on 15-11-3. 3 | */ 4 | 5 | var DISPATCH_PROJECT_GIT_CODE_ROUTE = (function(){ 6 | return { 7 | resolve: function (ownerName, projectName) { 8 | var path = '/api/user/' + ownerName + '/project/' + projectName; 9 | return coding.get(path); 10 | }, 11 | dispatch: function (ownerName, projectName, project) { 12 | if (!project) { 13 | router.run.call(router, '/user/projects'); 14 | } 15 | return project.is_public ? PROJECT_ITEM_ROUTE : MY_PROJECT_GIT_CODE_ROUTE; 16 | }, 17 | context: '.container', 18 | } 19 | 20 | })(); 21 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_toc.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Table of contents 4 | * 5 | **/ 6 | 7 | .toc__title { 8 | @include type--medium; 9 | font-family: $fontHighlight; 10 | padding-bottom: $lineHeight/2; 11 | margin-bottom: ($lineHeight/2) - 1; 12 | border-bottom: 1px solid $colorGrayKeyline; 13 | 14 | @include medium { 15 | padding-bottom: $lineHeight/2; 16 | margin-bottom: $lineHeight/2; 17 | } 18 | } 19 | 20 | .toc__list { 21 | padding-top: 0; 22 | 23 | border-bottom: 1px solid $colorGrayKeyline; 24 | padding-bottom: ($lineHeight/2) - 1; 25 | margin-bottom: $lineHeight/2; 26 | 27 | a { 28 | display: block; 29 | } 30 | } 31 | 32 | .toc__sublist { 33 | padding-top: 0; 34 | } 35 | -------------------------------------------------------------------------------- /app/styles/components/_components/_typography.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Typography 4 | * 5 | **/ 6 | 7 | // Just normalizing text 8 | // Recommend using padding instead of margin 9 | h1, h2, h3, h4, h5, p { 10 | margin: 0; 11 | } 12 | 13 | // Definitions 14 | .small, 15 | small { 16 | @include type--small; 17 | } 18 | 19 | .base, 20 | p, 21 | ul, 22 | ol { 23 | @include type--base; 24 | } 25 | 26 | .medium, 27 | h4 { 28 | @include type--medium; 29 | } 30 | 31 | .large, 32 | h3 { 33 | @include type--large; 34 | } 35 | .xlarge, 36 | h2 { 37 | @include type--xlarge; 38 | } 39 | 40 | .xxlarge, 41 | h1 { 42 | @include type--xxlarge; 43 | } 44 | 45 | .huge { 46 | @include type--huge; 47 | } 48 | 49 | 50 | li > p { 51 | padding-top: 0; 52 | } 53 | -------------------------------------------------------------------------------- /app/styles/components/_components/_column-list.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Column list 4 | * 5 | **/ 6 | 7 | .columns-list-wrapper { 8 | @include wide { 9 | margin-right: $mediumColWidth; 10 | } 11 | 12 | } 13 | 14 | .list--columns { 15 | border-bottom: 1px solid #ccc; 16 | padding-bottom: $lineHeight - 1; 17 | margin-bottom: 1px; 18 | 19 | @include medium { 20 | column-count: 2; 21 | column-rule: 0 none transparent; 22 | column-gap: 0; 23 | } 24 | 25 | & li, 26 | & .columns-list-item { 27 | @include type--small; 28 | padding: 0; 29 | } 30 | 31 | & a { 32 | display: block; 33 | position: relative; 34 | padding-left: 39px; 35 | 36 | &::before { 37 | line-height: 26px; 38 | } 39 | } 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_related-guides.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Related items 4 | * 5 | **/ 6 | 7 | .related-guides { 8 | margin-top: $lineHeight*3; 9 | padding-bottom: ($lineHeight*2) - 2; 10 | border-top: 2px solid $colorGrayKeyline; 11 | padding-top: ($lineHeight*2) - 2; 12 | } 13 | 14 | .related-guides__list { 15 | .list-links { 16 | padding-top: 0; 17 | } 18 | 19 | a { 20 | display: block; 21 | } 22 | } 23 | 24 | .related-guides__title { 25 | @include type--xlarge; 26 | padding-top: 0; 27 | 28 | @include medium { 29 | padding-top: 0; 30 | } 31 | } 32 | 33 | .related-guides__main-link { 34 | text-transform: uppercase; 35 | 36 | &::before { 37 | content: '#'; 38 | display: inline-block; 39 | padding-right: 2px; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/project_pull.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 未处理 4 |
5 | 6 |
7 |
8 | 13 |
14 | 16 |
17 |
18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /app/views/my_project_git_pull.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 7 | -------------------------------------------------------------------------------- /app/views/pp.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 |
7 | 8 | 9 | 12 | 13 |
14 |
15 |
16 |
17 |
18 | 19 |
20 | 21 |
22 |
23 | -------------------------------------------------------------------------------- /app/views/my_project_attachment_list.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 11 | 12 | 27 | -------------------------------------------------------------------------------- /app/views/user_projects.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 |
14 | 17 |
18 |
19 |
20 | 24 | -------------------------------------------------------------------------------- /app/views/my_project_members.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 |
8 | 9 |
10 |
11 | 12 | 29 | 30 | -------------------------------------------------------------------------------- /app/styles/components/_components/_articles-list.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Articles list 4 | * 5 | **/ 6 | 7 | .articles-list { 8 | padding-left: 0; 9 | } 10 | 11 | .articles-list__item { 12 | 13 | padding-bottom: $lineHeight * 2; 14 | 15 | &:last-child { 16 | padding-bottom: $lineHeight * 2 + 1; 17 | } 18 | 19 | padding-left: 0; 20 | 21 | &::before { 22 | content: ""; 23 | display: block; 24 | width: 40%; 25 | height: 1px; 26 | box-shadow: inset 0 1px 0 0 $colorGrayKeyline; 27 | margin-right: 0; 28 | margin-left: 30%; 29 | } 30 | 31 | h3 { 32 | a:hover { 33 | text-decoration: none; 34 | } 35 | } 36 | 37 | p { 38 | margin-top: $lineHeight; 39 | margin-bottom: $lineHeight; 40 | } 41 | 42 | &:first-child { 43 | padding-top: 0; 44 | 45 | @include medium { 46 | padding-top: $lineHeight - 2; 47 | } 48 | 49 | &::before { 50 | display: none; 51 | } 52 | } 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /app/views/register.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

加入 Coding,体验云端开发之美!

4 |
5 |
6 |
7 | 8 |   9 |
10 |
11 | 12 |   13 |
14 | 15 |
16 | 23 |
24 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_quote.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Quote 4 | * 5 | **/ 6 | 7 | .quote__content { 8 | position: relative; 9 | font-family: $fontHighlight; 10 | @include type--medium; 11 | padding-top: $lineHeight * 4; 12 | padding-left: $lineHeight; 13 | 14 | @include medium { 15 | padding-top: $lineHeight * 2; 16 | padding-left: 0; 17 | } 18 | 19 | p { 20 | border-top: 1px solid $colorGrayKeyline; 21 | text-align: right; 22 | font-weight: 500; 23 | margin-top: $lineHeight/2 - 1; 24 | padding-top: $lineHeight/2; 25 | } 26 | 27 | &::before { 28 | content: open-quote; 29 | display: block; 30 | position: absolute; 31 | font-family: $fontHighlight; 32 | font-weight: 700; 33 | color: $colorGrayBackground; 34 | top: 90px; 35 | left: $lineHeight; 36 | font-size: 260px; 37 | 38 | @include medium { 39 | top: 225px; 40 | left: -210px; 41 | font-size: 540px; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/styles/reset.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre, 3 | form,fieldset,input,textarea,p,blockquote,th,td { 4 | padding: 0; 5 | margin: 0; 6 | } 7 | table { 8 | border-collapse: collapse; 9 | border-spacing: 0; 10 | } 11 | fieldset,img { 12 | border: 0; 13 | } 14 | address,caption,cite,code,dfn,em,strong,th,var { 15 | font-weight: normal; 16 | font-style: normal; 17 | } 18 | ol,ul { 19 | list-style: none; 20 | } 21 | caption,th { 22 | text-align: left; 23 | } 24 | h1,h2,h3,h4,h5,h6 { 25 | font-weight: normal; 26 | font-size: 100%; 27 | } 28 | q:before,q:after { 29 | content:""; 30 | } 31 | abbr,acronym { border: 0; 32 | } 33 | /* == clearfix == */ 34 | .clearfix:after { 35 | content: "."; 36 | display: block; 37 | height: 0; 38 | clear: both; 39 | visibility: hidden; 40 | } 41 | .clearfix {display: inline-block;} 42 | * html .clearfix {height: 1%;} 43 | .clearfix {display: block;} 44 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_did-you-know.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Text module 4 | * 5 | **/ 6 | 7 | .did-you-know { 8 | 9 | ol { 10 | @include medium { 11 | padding-top: 0 !important; 12 | } 13 | } 14 | 15 | .cta--primary { 16 | margin-top: $lineHeight; 17 | font-weight: 500; 18 | } 19 | 20 | &>.g--half { 21 | position: relative; 22 | padding-left: 0; 23 | @include medium {padding-left: 32px} 24 | } 25 | } 26 | 27 | .did-you-know__symbol { 28 | padding-bottom: $lineHeight*12; 29 | @include medium {padding-bottom: $lineHeight} 30 | 31 | &::after { 32 | content: $icon-question; 33 | color: $colorBlue; 34 | font-family: $fontIcon; 35 | font-size: 300px; 36 | top: 150px; 37 | left: 30%; 38 | position: relative; 39 | display: block; 40 | width: 0; 41 | 42 | @include medium { 43 | position: absolute; 44 | font-size: 400px; 45 | top: 200px; 46 | left: 110%; 47 | } 48 | 49 | @include wide { 50 | position: absolute; 51 | font-size: 400px; 52 | top: 200px; 53 | left: 124%; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2015 Coding(https://coding.net/) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /app/styles/components/_modules/_featured-spotlight.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Editorial Header 4 | * 5 | **/ 6 | 7 | .featured-spotlight { 8 | background: $colorGrayDark; 9 | color: #ffffff; 10 | overflow: hidden; 11 | padding-bottom: $lineHeight * 3 - 1; 12 | margin-top: $lineHeight * 2; 13 | 14 | p { 15 | padding-bottom: $lineHeight; 16 | } 17 | 18 | .cta--primary { 19 | color: #ffffff; 20 | 21 | &:hover { 22 | color: #ffffff; 23 | } 24 | } 25 | } 26 | 27 | .featured-spotlight__container { 28 | position: relative; 29 | } 30 | 31 | .featured-spotlight__img { 32 | @include small-only { 33 | padding-top: 58.4%; 34 | padding-bottom: 0; 35 | height: 0; 36 | overflow: hidden; 37 | position: relative; 38 | width: 100%; 39 | } 40 | 41 | img { 42 | margin: 0 auto; 43 | display: block; 44 | width: 100%; 45 | 46 | position: absolute; 47 | left: 0; 48 | top: 0; 49 | margin: 0; 50 | 51 | @include medium { 52 | width: auto; 53 | max-width: none; 54 | left: 100% + $mediumGutterWidth * 2; 55 | } 56 | 57 | @include wide { 58 | left: 100% + $wideGutterWidth * 2; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/styles/components/_components/_button.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Button 4 | * 5 | **/ 6 | 7 | .button { 8 | display: inline-block; 9 | padding: (($lineHeight / 2) - 1) 32px; 10 | margin-bottom: $lineHeight / 2; 11 | margin-top: $lineHeight / 2; 12 | min-height: $lineHeight; 13 | 14 | text-align: center; 15 | 16 | font-family: $fontHighlight; 17 | font-weight: 600; 18 | text-decoration: none; 19 | 20 | outline: 0; 21 | 22 | transition: none; 23 | 24 | &:hover { 25 | background: #4d4d4d; 26 | color: #ffffff; 27 | border: 1px solid #4d4d4d; 28 | text-decoration: none; 29 | } 30 | } 31 | 32 | // Mixin to create buttons 33 | @mixin style-button($color, $textColor, $isInverted: false) { 34 | 35 | background: $color; 36 | color: $textColor; 37 | border: 1px solid darken($color, 10%); 38 | 39 | @if $isInverted { border-color: transparent;} 40 | } 41 | 42 | 43 | .button--primary { 44 | @extend .button; 45 | @include style-button(#4285f4, #ffffff); 46 | } 47 | 48 | .button--secondary { 49 | @extend .button; 50 | @include style-button(#ffffff, $colorBlue); 51 | } 52 | 53 | .button--secondary-variation { 54 | @extend .button; 55 | @include style-button(#ffffff, $colorBlue, true); 56 | } 57 | -------------------------------------------------------------------------------- /app/views/feedback.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /app/styles/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import 'bootstrap/less/variables.less'; 3 | @import 'bootstrap/less/mixins.less'; 4 | 5 | //disable navbar breakpoint 6 | @grid-float-breakpoint: -1; 7 | 8 | // Reset 9 | @import "bootstrap/less/normalize.less"; 10 | @import "bootstrap/less/print.less"; 11 | 12 | // Core CSS 13 | @import 'bootstrap/less/scaffolding.less'; 14 | @import "bootstrap/less/type.less"; 15 | @import "bootstrap/less/code.less"; 16 | @import 'bootstrap/less/grid.less'; 17 | @import 'bootstrap/less/tables.less'; 18 | @import 'bootstrap/less/forms.less'; 19 | @import 'bootstrap/less/buttons.less'; 20 | 21 | // Components 22 | @import 'bootstrap/less/component-animations.less'; 23 | @import 'bootstrap/less/glyphicons.less'; 24 | @import 'bootstrap/less/input-groups.less'; 25 | @import 'bootstrap/less/list-group.less'; 26 | @import 'bootstrap/less/panels.less'; 27 | @import 'bootstrap/less/wells.less'; 28 | @import 'bootstrap/less/navbar.less'; 29 | @import 'bootstrap/less/navs.less'; 30 | @import 'bootstrap/less/labels.less'; 31 | @import 'bootstrap/less/close.less'; 32 | @import 'bootstrap/less/modals.less'; 33 | 34 | // Utility classes 35 | @import 'bootstrap/less/utilities.less'; 36 | @import "bootstrap/less/responsive-utilities.less"; 37 | -------------------------------------------------------------------------------- /app/views/my_project_git_code.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 7 | 8 | 30 | 31 | -------------------------------------------------------------------------------- /app/styles/components/_global.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Global 4 | * 5 | **/ 6 | 7 | *, 8 | *::before, 9 | *::after { 10 | box-sizing: border-box; 11 | } 12 | 13 | html, 14 | body, 15 | button { 16 | -moz-osx-font-smoothing: antialiased; 17 | -webkit-font-smoothing: antialiased; 18 | font-smoothing: antialiased; 19 | } 20 | 21 | body { 22 | font-family: $fontDefault; 23 | font-size: $fontBase; 24 | line-height: 1.6250em; /* 26px */ 25 | font-weight: 300; // to thicken it a bit, we need to remove font-smoothing 26 | color: $colorText; 27 | 28 | @include baseline-grid(); 29 | } 30 | 31 | pre { 32 | background: $colorGrayBackground; 33 | padding: 13px; 34 | } 35 | 36 | .main-container { 37 | @include container(true); 38 | } 39 | 40 | .container { 41 | @include container(true); 42 | } 43 | 44 | .container-medium { 45 | @include medium { 46 | @include container(true); 47 | } 48 | } 49 | 50 | .container-small { 51 | @include small-only { 52 | @include container(true); 53 | } 54 | } 55 | 56 | .content { 57 | @include wide { 58 | margin-right: 25.9%; // took this from the grid output - using @extend inside media-query is deprecated, need to figure out a better way to do this. 59 | 60 | & pre { 61 | margin-right: -25.9%; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/images/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/styles/nav.css: -------------------------------------------------------------------------------- 1 | .navbar-coding { 2 | background-color: #ffffff; 3 | height: 57px; 4 | margin-bottom: 0; 5 | } 6 | 7 | .navbar-header-coding { 8 | border-bottom: 1px solid #e5e5e5; 9 | } 10 | 11 | .banner { 12 | position: relative; 13 | top: 8px; 14 | left: 7px; 15 | } 16 | 17 | .navbar-coding-detail { 18 | background-color: #f6f6f6; 19 | position: absolute; 20 | width: 100%; 21 | z-index: 2000; 22 | } 23 | 24 | .nav-icon { 25 | margin: 0 7px 0 7px; 26 | width: 20px; 27 | height: 20px; 28 | } 29 | 30 | .navbar-nav { 31 | margin: 1px -15px; 32 | } 33 | 34 | .navbar-nav .active{ 35 | border-left: 4px solid #3bbd79; 36 | } 37 | 38 | .navbar-nav .active a{ 39 | padding-left: 11px !important; 40 | } 41 | 42 | .navbar-nav li a { 43 | padding: 12px 15px; 44 | cursor: pointer; 45 | } 46 | 47 | .navbar-nav li span { 48 | margin-left: 15px; 49 | color: #222222; 50 | font-size: 16px; 51 | } 52 | .navbar-nav li img { 53 | margin-top: -3px; 54 | } 55 | 56 | .nav-login { 57 | padding-top: 14px; 58 | } 59 | 60 | .nav-pp { 61 | padding-bottom: 15px; 62 | } 63 | 64 | .black-cover { 65 | position: absolute; 66 | top: 57px; 67 | left: 0; 68 | width: 100%; 69 | height: 100%; 70 | background-color: rgba(0, 0, 0, 0.4); 71 | display: none; 72 | z-index: 1000 73 | } 74 | 75 | .black-cover-top{ 76 | top: 100px !important; 77 | } 78 | -------------------------------------------------------------------------------- /app/views/project_topic.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | 8 |
9 | 10 |
11 |
12 |
13 |

14 |
15 |
评论
16 |
  • 17 | 18 |
      19 |
    20 |
    21 |
    22 | 23 | 24 | 25 | 26 |
    27 |
    28 |
    29 |
    30 |
    31 |
    32 | -------------------------------------------------------------------------------- /app/scripts/async.localStorage.examples.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | // Methods 6 | // ======================================== 7 | // See https://github.com/slightlyoff/async-local-storage for methods. 8 | 9 | 10 | // Examples 11 | // ======================================== 12 | 13 | 14 | var storage = navigator.storage || 15 | navigator.alsPolyfillStorage; 16 | 17 | // Testing for a value 18 | storage.has("thinger").then(function(doesHaveThinger) { 19 | if (doesHaveThinger) { 20 | // ... 21 | } 22 | }); 23 | 24 | // Getting a value 25 | storage.get("thinger").then( 26 | function(value) { 27 | // ... 28 | }, 29 | function(e) { console.log("get failed with error:", e); } 30 | ); 31 | 32 | // Setting a value without error handling is simple: 33 | storage.set("thinger", "blarg"); 34 | 35 | // But setting is also async, so to read related values, it's best to wait 36 | storage.set("thinger", "othervalue").then(function() { 37 | storage.get("...").then(function(value) { 38 | // ... 39 | }); 40 | }); 41 | 42 | // Iteration is also async. The returned Future resolves when the passed 43 | // callback has been invoked for each item (or when one fails, in case of error) 44 | var itemCount = 0; 45 | storage.forEach(function(value, key) { 46 | itemCount++; 47 | }).then(function() { console.log(itemCount, "items in storage"); }); 48 | 49 | // The above is equivalent to using .count(): 50 | storage.count().then(function(c) { console.log(c, "items in storage"); }); 51 | 52 | -------------------------------------------------------------------------------- /app/styles/components/_components/_guides-list.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Guides List 4 | * 5 | **/ 6 | 7 | 8 | .guides-list { 9 | overflow: hidden; 10 | 11 | @include medium { 12 | display: flex; 13 | justify-content: space-between; 14 | flex-wrap: wrap; 15 | 16 | padding-top: $lineHeight*2; 17 | } 18 | } 19 | 20 | .guides-list__item { 21 | padding: 0; 22 | background: #ffffff; 23 | margin-top: $lineHeight; 24 | margin-bottom: 0; 25 | 26 | @include medium { 27 | display: flex; 28 | flex-direction: column; 29 | flex-wrap: wrap; 30 | } 31 | 32 | h3 { 33 | margin: 0 32px; 34 | } 35 | 36 | p { 37 | margin: $lineHeight 32px 0; 38 | } 39 | 40 | .primary-content { 41 | @include medium { 42 | flex: 1; 43 | } 44 | } 45 | 46 | .secondary-content { 47 | position: relative; 48 | // background: #f5f5f5; 49 | margin-top: ($lineHeight*2) - 1; 50 | border-top: 1px solid $colorGrayKeyline; 51 | 52 | @include medium { 53 | width: 100%; // needed due to parent being flex 54 | } 55 | 56 | .icon-circle { 57 | position: absolute; 58 | top: -$lineHeight - 2; 59 | left: 50%; 60 | margin-left: -21px; 61 | border: 2px solid #ffffff; 62 | 63 | & i { 64 | font-size: 23px; 65 | } 66 | } 67 | } 68 | 69 | ol { 70 | margin: $lineHeight 0 0; 71 | padding: $lineHeight*2 0 $lineHeight*2; 72 | margin-top: 0; 73 | } 74 | 75 | &::before { 76 | display: none; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobile", 3 | "version": "0.0.0", 4 | "devDependencies": { 5 | "connect-livereload": "~0.5.3", 6 | "connect-modrewrite": "~0.7.9", 7 | "grunt": "~0.4.1", 8 | "grunt-autoshot": "~0.2.0", 9 | "grunt-browser-sync": "~0.5.7", 10 | "grunt-concurrent": "~0.4.0", 11 | "grunt-connect-proxy": "0.1.6", 12 | "grunt-contrib-clean": "~0.5.0", 13 | "grunt-contrib-coffee": "~0.7.0", 14 | "grunt-contrib-compass": "~0.7.0", 15 | "grunt-contrib-concat": "~0.3.0", 16 | "grunt-contrib-connect": "~0.5.0", 17 | "grunt-contrib-copy": "~0.4.1", 18 | "grunt-contrib-cssmin": "~0.7.0", 19 | "grunt-contrib-htmlmin": "~0.1.3", 20 | "grunt-contrib-imagemin": "~0.2.0", 21 | "grunt-contrib-jshint": "~0.7.0", 22 | "grunt-contrib-less": "~0.12.0", 23 | "grunt-contrib-requirejs": "~0.4.0", 24 | "grunt-contrib-uglify": "~0.2.0", 25 | "grunt-contrib-watch": "~0.4.0", 26 | "grunt-mocha": "~0.4.0", 27 | "grunt-modernizr": "~0.3.0", 28 | "grunt-notify": "~0.2.16", 29 | "grunt-open": "~0.2.0", 30 | "grunt-responsive-images": "~0.0.3", 31 | "grunt-rev": "~0.1.0", 32 | "grunt-svgmin": "~0.2.0", 33 | "grunt-usemin": "~0.1.10", 34 | "grunt-webp": "~0.0.1", 35 | "jshint-stylish": "~0.1.5", 36 | "load-grunt-tasks": "~0.2.0", 37 | "time-grunt": "~0.2.0" 38 | }, 39 | "scripts": { 40 | "start": "grunt serve:dist", 41 | "postinstall": "bower install" 42 | }, 43 | "engines": { 44 | "node": "0.10.32" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/views/my_project.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |
    常用项目
    5 |
    6 |
    7 |
    8 |
    一般项目
    9 |
    10 |
    11 |
    12 |
    13 |
    14 | 15 |
    16 |
    17 | 18 | 42 | 43 | -------------------------------------------------------------------------------- /app/lib/home-mobile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by jiong on 15/5/6. 3 | */ 4 | $(function () { 5 | 6 | //play video 7 | //video modal 8 | videojs.options.flash.swf = "/static/video-js.swf" 9 | var modal = $('.modal'); 10 | var videoWidth = Math.floor($(window).width() * 0.8); 11 | var videoHeight = Math.floor(videoWidth/16*9); 12 | var coding_video = null; 13 | 14 | var playVideo = function(){ 15 | modal.css({'z-index': '9999'}); 16 | setTimeout(function(){ 17 | coding_video && coding_video.play(); 18 | },300); 19 | }; 20 | 21 | var stopVideo = function(){ 22 | coding_video && coding_video.pause(); 23 | }; 24 | 25 | videojs('coding-video', {width: videoWidth, height: videoHeight}, function(){ 26 | coding_video = this; 27 | $('#coding-video').css('margin', 'auto'); 28 | if(location.hash.indexOf('#video')>=0){ 29 | modal.css({'visibility': 'visible'}).fadeIn(); 30 | playVideo(); 31 | } 32 | }); 33 | 34 | var play = $('.play-video').on('click', function(){ 35 | modal.css({'visibility': 'visible'}).fadeIn(); 36 | playVideo(); 37 | }); 38 | 39 | modal.on('click', 'a.close', function(){ 40 | $(this).parent().fadeOut(); 41 | stopVideo(); 42 | }); 43 | 44 | //press esc to close video 45 | $(window).on('keyup', function(event){ 46 | if(event.keyCode === 27 && modal.is(':visible')){ 47 | modal.fadeOut(); 48 | stopVideo(); 49 | } 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_next-lessons.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Next Lessons 4 | * 5 | **/ 6 | 7 | .next-lessons { 8 | background: $colorGrayDark; 9 | padding: $lineHeight $lineHeight $lineHeight * 2; 10 | margin-top: $lineHeight; 11 | color: #ffffff; 12 | position: relative; 13 | 14 | h3 { 15 | i { 16 | @include medium { 17 | display: none; 18 | } 19 | } 20 | } 21 | 22 | &::before, 23 | &::after { 24 | color: rgba(255, 255, 255, 0.5); 25 | position: absolute; 26 | display: none; 27 | 28 | @include medium { 29 | display: inline-block; 30 | } 31 | } 32 | 33 | &::before { 34 | @include medium { 35 | content: attr(data-current-lesson); 36 | 37 | font-family: $fontHighlight; 38 | font-size: $fontBase; 39 | font-weight: 400; 40 | line-height: 1; 41 | 42 | background: $colorGrayDark; 43 | display: inline-block; 44 | padding: 5px 7px; 45 | 46 | right: 127px; 47 | top: 143px; 48 | 49 | z-index: 1; 50 | color: rgba(255, 255, 255, 0.5); 51 | } 52 | 53 | @include wide { 54 | font-size: $fontMedium; 55 | padding-left: 15px; 56 | padding-right: 15px; 57 | top: 126px; 58 | right: 230px; 59 | } 60 | 61 | } 62 | 63 | &::after { 64 | @include medium { 65 | content: $icon-lessons; 66 | font-family: $fontIcon; 67 | font-size: 150px; 68 | 69 | right: 40px; 70 | top: 185px; 71 | } 72 | 73 | @include wide { 74 | font-size: 210px; 75 | right: 120px; 76 | } 77 | 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/styles/components/_pages/_styleguide.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Styleguide 4 | * 5 | **/ 6 | 7 | .page--styleguide { 8 | 9 | .styleguide__module-title { 10 | margin-bottom: $lineHeight; 11 | } 12 | 13 | section { 14 | margin-bottom: $lineHeight*2; 15 | border-bottom: 1px solid #ccc; 16 | padding-bottom: $lineHeight*3 - 1; 17 | 18 | } 19 | 20 | .styleguide__color-list { 21 | text-align: center; 22 | 23 | li { 24 | border-bottom: $lineHeight*2 solid; 25 | margin-bottom: $lineHeight; 26 | position: relative; 27 | } 28 | } 29 | 30 | .styleguide__breadcrumb .breadcrumbs { 31 | display: block; 32 | } 33 | 34 | .styleguide__lists { 35 | ul, 36 | ol { 37 | margin-bottom: $lineHeight; 38 | } 39 | } 40 | 41 | .styleguide__inverted-block { 42 | background: #e8e8e8; 43 | padding: 0 13px; 44 | } 45 | 46 | .styleguide__theme-block { 47 | background: $colorLayouts; 48 | padding: 0 13px; 49 | } 50 | 51 | } 52 | 53 | .demo { 54 | margin-bottom: $lineHeight; 55 | margin-top: $lineHeight; 56 | } 57 | 58 | .demo { 59 | [class*="g-"] { 60 | background-color: $colorGrayLight; 61 | position: relative; 62 | margin-bottom: $lineHeight; 63 | min-height: $lineHeight*6; 64 | 65 | &::before, 66 | &::after { 67 | @include type--small; 68 | display: block; 69 | margin: 0 10px; 70 | } 71 | 72 | &::before { 73 | content: 'HTML classes: '; 74 | font-weight: 700; 75 | } 76 | 77 | &::after { 78 | content: attr(class); 79 | word-spacing: 15px; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/styles/components/components.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Main Stylesheet For Visual Style Guide 4 | * 5 | **/ 6 | 7 | @import '_utils'; 8 | @import '_normalize'; 9 | @import '_global'; 10 | 11 | // Icons - Leave it here to otherfiles can extend if needed 12 | @import '_components/_icons'; 13 | 14 | // Color Palette 15 | @import '_palette'; 16 | 17 | // Modules 18 | @import '_modules/_highlight'; 19 | @import '_modules/_editorial-header'; 20 | @import '_modules/_summary-header'; 21 | @import '_modules/_related-guides'; 22 | @import '_modules/_in-this-guide'; 23 | @import '_modules/_articles-section'; 24 | @import '_modules/_guides-section'; 25 | @import '_modules/_page-header'; 26 | @import '_modules/_featured-section'; 27 | @import '_modules/_featured-spotlight'; 28 | @import '_modules/_quote'; 29 | @import '_modules/_article-nav'; 30 | @import '_modules/_did-you-know'; 31 | @import '_modules/_toc'; 32 | @import '_modules/_next-lessons'; 33 | 34 | // Components 35 | @import '_components/_grid'; 36 | @import '_components/_typography'; 37 | @import '_components/_button'; 38 | @import '_components/_list'; 39 | @import '_components/_link'; 40 | @import '_components/_table'; 41 | @import '_components/_media'; 42 | @import '_components/_breadcrumb'; 43 | @import '_components/_subsection-title'; 44 | @import '_components/_articles-list'; 45 | @import '_components/_guides-list'; 46 | @import '_components/_icon-circle'; 47 | 48 | // Themed styles 49 | @import '_themed'; 50 | 51 | // Pages 52 | @import '_pages/_styleguide'; 53 | @import '_pages/_page-resources'; 54 | 55 | // Make sure this is last to override anything else :) 56 | @import '_helper'; 57 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_editorial-header.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Editorial Header 4 | * 5 | **/ 6 | 7 | .editorial-header { 8 | overflow: hidden; 9 | 10 | .breadcrumbs { 11 | color: $colorBlue; 12 | 13 | a { 14 | color: $colorBlue; 15 | } 16 | } 17 | 18 | .container { 19 | 20 | @include medium { 21 | position: relative; 22 | 23 | // Pseudo elements to add the background characters 24 | &::before { 25 | content: $icon-chevron-large; 26 | font-family: $fontIcon; 27 | font-size: 1000px; 28 | line-height: 0; 29 | display: block; 30 | position: absolute; 31 | top: 0; 32 | right: 100%; 33 | color: $colorGrayBackground; 34 | margin: 168px -35px 0 0; 35 | } 36 | } 37 | } 38 | 39 | } 40 | 41 | .editorial-header__excerpt { 42 | @include type--medium(true); 43 | font-family: $fontHighlight; 44 | } 45 | 46 | .editorial-header .tag{ 47 | padding-top: $lineHeight*2; 48 | } 49 | 50 | .editorial-header__subtitle { 51 | @include type--xxlarge; 52 | padding-top: 0; 53 | @include medium { 54 | padding-top: 0; 55 | padding-bottom: $lineHeight; 56 | } 57 | color: $colorBlue; 58 | } 59 | 60 | .editorial-header__toc { 61 | margin-top: $lineHeight; 62 | 63 | ol { 64 | padding-top: 0; 65 | 66 | @include medium { 67 | padding-top: 0; 68 | } 69 | } 70 | } 71 | 72 | .editorial-header__toc-title { 73 | font-family: $fontHighlight; 74 | border-bottom: 1px solid $colorGrayKeyline; 75 | margin-bottom: 13px; 76 | padding-bottom: 13px !important; 77 | color: $colorBlue; 78 | } 79 | -------------------------------------------------------------------------------- /app/views/user_fans.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 6 |
    8 |
    9 |
    10 | 11 |
    12 |
    13 |
    14 |
    15 |
    16 | 19 |
    20 |
    21 |
    22 | 28 | 32 | 36 | -------------------------------------------------------------------------------- /app/styles/components/_modules/_article-nav.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Article nav 4 | * 5 | **/ 6 | 7 | .article-nav { 8 | overflow: hidden; 9 | position: relative; 10 | 11 | &::before { 12 | content: ''; 13 | border-left: 2px solid $colorGrayKeyline; 14 | height: 100%; 15 | position: absolute; 16 | top: 0; 17 | left: 50%; 18 | } 19 | } 20 | 21 | .article-nav-link { 22 | padding: $lineHeight 32px; 23 | float: left; 24 | width: 50%; 25 | position: relative; 26 | 27 | &::before{ 28 | position: absolute; 29 | top: 21px; 30 | font-family: $fontHighlight; 31 | font-size: $fontMedium; 32 | font-weight: 400; 33 | 34 | @include medium { 35 | top: 25px; 36 | font-size: $fontLarge; 37 | display: block; 38 | padding: 13px 10px; 39 | color: #ffffff; 40 | background: $colorBlue; 41 | } 42 | } 43 | } 44 | 45 | .article-nav p { 46 | padding: 0; 47 | margin: 0; 48 | } 49 | 50 | .article-nav-link--prev { 51 | text-align: right; 52 | // border-right-width: 1px; 53 | 54 | &::before { 55 | font-family: $fontIcon; 56 | @extend .icon-chevron-left::before; 57 | left: 32px; 58 | } 59 | 60 | p { 61 | @include medium { 62 | padding-left: 52px; 63 | } 64 | } 65 | } 66 | 67 | .article-nav-link--next { 68 | // border-left-width: 1px; 69 | 70 | &::before { 71 | font-family: $fontIcon; 72 | @extend .icon-chevron-right::before; 73 | right: 32px; 74 | } 75 | 76 | p { 77 | @include medium { 78 | padding-right: 52px; 79 | } 80 | } 81 | } 82 | 83 | .article-nav-count { 84 | @include type--large; 85 | font-weight: 700; 86 | @include medium {font-weight: 400;} 87 | } 88 | 89 | -------------------------------------------------------------------------------- /app/views/my_project_topics.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 发个讨论 4 |
    5 | 11 |
    12 |
    13 |
    14 |
    15 |
    16 |
    17 | 18 |
    19 |
    20 | 21 | 43 | 44 | -------------------------------------------------------------------------------- /app/nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes 2; 2 | daemon off; 3 | 4 | # set level to notice, so we can see messages printed in lua 5 | error_log <%= ENV["NGINX_ROOT"] %>/logs/error.log notice; 6 | events { 7 | use epoll; 8 | worker_connections 1024; 9 | } 10 | 11 | <% if ENV["WEBHOOK_TOKEN"] %> 12 | # keep env for ngx_lua 13 | env HOME; 14 | env TMPDIR; 15 | env WEBHOOK_TOKEN; 16 | env GIT_REF; 17 | <% end %> 18 | 19 | http { 20 | log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent'; 21 | access_log <%= ENV["NGINX_ROOT"] %>/logs/access.log cloudfoundry; 22 | default_type application/octet-stream; 23 | include mime.types; 24 | sendfile on; 25 | tcp_nopush on; 26 | keepalive_timeout 30; 27 | 28 | gzip on; 29 | gzip_min_length 1000; 30 | gzip_types text/plain text/css application/x-javascript; 31 | 32 | server { 33 | listen <%= ENV["PORT"] %>; 34 | server_name _; 35 | server_tokens off; 36 | port_in_redirect off; 37 | root <%= ENV["APP_ROOT"] %>/public; 38 | 39 | <% if ENV["WEBHOOK_TOKEN"] %> 40 | # enable webhook updater 41 | location /_ { 42 | default_type text/plain; 43 | content_by_lua_file conf/webhook.lua; 44 | } 45 | <% end %> 46 | 47 | location / { 48 | <% if File.exists?(File.join(ENV["NGINX_ROOT"], "conf/.enable_directory_index")) %> 49 | # enable dirtory index 50 | autoindex on; 51 | <% end %> 52 | <% if File.exists?(auth_file = File.join(ENV["NGINX_ROOT"], "conf/.htpasswd")) %> 53 | # enable basic auth 54 | auth_basic "Restricted"; 55 | auth_basic_user_file <%= auth_file %>; 56 | <% end %> 57 | try_files $uri $uri/ /index.html ; 58 | } 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/scripts/main-web-starter-kit.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * 3 | * Web Starter Kit 4 | * Copyright 2014 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | (function () { 20 | 'use strict'; 21 | 22 | var querySelector = document.querySelector.bind(document); 23 | 24 | var navdrawerContainer = querySelector('.navdrawer-container'); 25 | var body = document.body; 26 | var appbarElement = querySelector('.app-bar'); 27 | var menuBtn = querySelector('.menu'); 28 | var main = querySelector('main'); 29 | 30 | function closeMenu() { 31 | body.classList.remove('open'); 32 | appbarElement.classList.remove('open'); 33 | navdrawerContainer.classList.remove('open'); 34 | } 35 | 36 | function toggleMenu() { 37 | body.classList.toggle('open'); 38 | appbarElement.classList.toggle('open'); 39 | navdrawerContainer.classList.toggle('open'); 40 | navdrawerContainer.classList.add('opened'); 41 | } 42 | 43 | main.addEventListener('click', closeMenu); 44 | menuBtn.addEventListener('click', toggleMenu); 45 | navdrawerContainer.addEventListener('click', function (event) { 46 | if (event.target.nodeName === 'A' || event.target.nodeName === 'LI') { 47 | closeMenu(); 48 | } 49 | }); 50 | })(); 51 | -------------------------------------------------------------------------------- /app/views/pp_iphoneAddtoDesk.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 12 |
    13 |
    14 | 15 | 16 |
    17 |
    18 | 添加到主屏幕
    19 | 访问Coding更方便~ 20 |
    21 | 24 |
    25 |
    -------------------------------------------------------------------------------- /app/scripts/fullscreensnippet.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | // Sample code for using the Fullscreen API 5 | // ========================================== 6 | 7 | document.cancelFullScreen = document.webkitCancelFullScreen || document.mozCancelFullScreen || document.cancelFullScreen; 8 | 9 | document.body.requestFullScreen = document.body.webkitRequestFullScreen || document.body.mozRequestFullScreen || document.body.requestFullScreen; 10 | 11 | function displayFullScreenStatus() { 12 | var status = isFullScreen() ? 'Document is now full screen.' : 'Document is currently not full screen.'; 13 | document.querySelector('#status') 14 | .innerHTML = status; 15 | } 16 | 17 | displayFullScreenStatus(); // on load 18 | 19 | document.onfullscreenchange = document.onwebkitfullscreenchange = document.onmozfullscreenchange = displayFullScreenStatus; 20 | 21 | function isFullScreen() { 22 | return !!(document.webkitIsFullScreen || document.mozFullScreen || document.isFullScreen); // if any defined and true 23 | } 24 | 25 | function fullScreenElement() { 26 | return document.webkitFullScreenElement || document.webkitCurrentFullScreenElement || document.mozFullScreenElement || document.fullScreenElement; 27 | } 28 | 29 | var el = document.getElementById("fullscreenTest"); 30 | 31 | el.requestFullScreen = el.webkitRequestFullScreen || el.mozRequestFullScreen || el.requestFullScreen; 32 | 33 | document.body.onclick = function(e) { 34 | console.log(fullScreenElement()); 35 | if ((isFullScreen() && e.target !== el) || fullScreenElement() === el) { 36 | document.cancelFullScreen(); 37 | } else if (e.target === el) { 38 | el.requestFullScreen(); 39 | } else { 40 | document.body.requestFullScreen(); 41 | } 42 | }; 43 | 44 | 45 | 46 | // TODO: Bootstrap layout is currently the only one which properly handles the fullscreen 47 | // button injection. This should be done more generally (i.e inject via index.js) -------------------------------------------------------------------------------- /app/views/user_item.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 6 |
    8 |
    9 |
    10 |
    11 |
    12 |
    13 |
    14 |
    15 | 21 | 24 | 27 | 31 | 34 | 38 | 42 | -------------------------------------------------------------------------------- /app/views/activate.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    加入 Coding,体验云端开发之美!

    4 |
    5 |
    6 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /app/views/my_project_git_merge.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 未处理 4 |
    5 | 6 |
    7 |
    8 | 13 | 14 |
    15 | 16 |
    17 |
    18 |
    19 |
    20 | 21 | 46 | 47 | -------------------------------------------------------------------------------- /app/views/resetPassword.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    加入 Coding,体验云端开发之美!

    4 |
    5 |
    6 | 7 | 21 | -------------------------------------------------------------------------------- /app/views/user_pp.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 | 31 |
    32 |
    33 |
    34 | 37 |
    38 |
    39 |
    40 | 43 | 46 | -------------------------------------------------------------------------------- /app/views/my_project_topic.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |
    5 |
    6 |
    7 | 8 | 9 | 10 | 11 |
    12 |
    13 |
    14 |
    15 |
    16 | 17 |
    18 |
    19 | 20 | 34 | 35 | 54 | 55 | 64 | -------------------------------------------------------------------------------- /app/views/my_project_attachment.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |
    5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 | 12 | 27 | 28 | 62 | -------------------------------------------------------------------------------- /app/scripts/controllers/my_project_topic_create_ctrl.js: -------------------------------------------------------------------------------- 1 | var MY_PROJECT_TOPIC_CREATE_ROUTE = (function(){ 2 | 3 | var $container, 4 | projectData, 5 | ownerName, 6 | projectName; 7 | 8 | function loadProject(){ 9 | var path = '/api/user/' + ownerName + '/project/' + projectName; 10 | coding.get(path, function(data){ 11 | if(data.data){ 12 | coding.showProjectBreadcrumb(data.data); 13 | projectData = data.data; 14 | $("#submit").removeAttr('disabled'); 15 | } 16 | }); 17 | } 18 | 19 | function submit() { 20 | var $content = $("#topic-content"); 21 | var $title = $("#topic-title"); 22 | if($.trim($title.val())==""){ 23 | alert('请输入标题!'); 24 | return; 25 | } 26 | if($.trim($content.val())==""){ 27 | alert('请输入内容!'); 28 | return; 29 | } 30 | coding.post(API_DOMAIN + '/api/project/'+projectData.id+'/topic?parent=0', 31 | { 32 | title:$title.val(), 33 | content:$content.val(), 34 | type:1 35 | }, 36 | function(data){ 37 | if(data.data){ 38 | router.run.call(router, coding.projectHomePath(ownerName, projectName)+'/topic/'+data.data.id); 39 | } 40 | } 41 | ); 42 | } 43 | 44 | return { 45 | template_url: '/views/my_project_topic_create.html', 46 | context: ".container", 47 | before_enter: function(user, project){ 48 | $('#navigator').find('.li-project').addClass('active'); 49 | $('#navigator').find(".li-project img").attr('src','/images/icons/project_active.png'); 50 | 51 | 52 | }, 53 | on_enter: function(user, project){ 54 | ownerName = user; 55 | projectName = project; 56 | 57 | loadProject(); 58 | $("#submit").on('click', submit); 59 | }, 60 | on_exit: function(){ 61 | $('#navigator').find('li').removeClass('active'); 62 | $('#navigator').find(".li-project img").attr('src','/images/icons/project.png'); 63 | $('.project_header').remove(); 64 | coding.showBanner(); 65 | } 66 | } 67 | 68 | })(); 69 | -------------------------------------------------------------------------------- /app/views/login.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |
    5 |
    6 | 10 | 14 | 15 | 16 |
    17 | 18 | 22 | 23 | 33 |
    34 |
    35 | 36 | 44 | 45 | 46 |
    47 | 48 |
    49 |
    50 |
    51 | 找回密码 52 | 重发激活邮件 53 | 54 | 55 |
    -------------------------------------------------------------------------------- /app/views/my_project_activity.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |
    5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 | 12 | 13 | 46 | 47 | 56 | -------------------------------------------------------------------------------- /app/styles/components/_components/_icon-circle.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Icon Circle 4 | * 5 | **/ 6 | 7 | .icon-circle, 8 | .icon-circle--large { 9 | height: 0; 10 | width: 0; 11 | background: $colorGray; 12 | display: block; 13 | position: relative; 14 | border-radius: 100%; 15 | font-size: 0; 16 | padding: 22px; // Breaks baseline grid 17 | margin: 4px auto; // Adds margin top/bottom to fix baseline grid ;) 18 | 19 | i, 20 | span { 21 | position: absolute; 22 | line-height: 0px; 23 | top: 50%; 24 | width: 100%; 25 | left: 0; 26 | text-align: center; 27 | color: #ffffff; 28 | font-size: $fontLarge; 29 | } 30 | 31 | span { 32 | font-family: $fontHighlight; 33 | font-size: $fontLarge; 34 | font-weight: 700; 35 | 36 | @include medium { 37 | font-size: $fontXLarge; 38 | } 39 | } 40 | } 41 | 42 | .icon-circle--large { 43 | margin-top: 0; 44 | margin-bottom: 0; 45 | padding: $lineHeight; 46 | position: relative; 47 | 48 | i { 49 | font-size: $fontLarge; 50 | 51 | @include medium { 52 | font-size: $fontXLarge; 53 | } 54 | } 55 | 56 | @include medium { 57 | padding: ($lineHeight + $lineHeight/2) - 2; 58 | border: 2px solid #ffffff; 59 | 60 | a & { 61 | padding: ($lineHeight + $lineHeight/2) - 1; 62 | 63 | box-shadow: inset 0px 0px 0px 1px rgba(#ffffff, .42); 64 | border: 1px solid; 65 | 66 | // demo transition 67 | transition: all 100ms linear; 68 | transform: translateZ(0); // kick in hardware acceleration 69 | } 70 | 71 | .no-touch a:hover & { 72 | box-shadow: inset 0px 0px 0px 1px #ffffff; 73 | transform: scale(1.1); 74 | } 75 | } 76 | 77 | } 78 | 79 | .icon-circle--nav { 80 | height: 0; 81 | width: 0; 82 | background: $colorGray; 83 | display: block; 84 | position: relative; 85 | border-radius: 100%; 86 | font-size: 0; 87 | padding: $lineHeight/2; 88 | margin: 0 auto; 89 | 90 | @include medium { 91 | padding: 22px; // Breaks baseline grid 92 | margin-top: 4px; // Adds margin top/bottom to fix baseline grid ;) 93 | margin-bottom: 4px; // Adds margin top/bottom to fix baseline grid ;) 94 | } 95 | 96 | i { 97 | position: absolute; 98 | line-height: 1px; 99 | top: 50%; 100 | width: 100%; 101 | left: 0; 102 | text-align: center; 103 | color: #ffffff; 104 | font-size: $fontBase; 105 | 106 | @include medium { 107 | font-size: $fontLarge; 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # m.coding.net 项目介绍 2 | 此项目为m.coding.net的前端代码,后端api和coding.net一致,通过跨域ajax请求 https://coding.net 域名下的api实现数据通信。实际开发过程中可能会因为本地域名导致CORS限制以至于无法获取到数据。具体解决方案可查看[这里](#cors)。项目通过Yeoman生成代码模版,并可使用Grunt来完成类似构建,开启服务器之类的任务。项目的开发基于ZeptoJS框架,并实现了类似于AngularJS的前端HTML5模式路由。具体实现请参看其[源代码](app/scripts/router.coffee) 3 | 4 | ## 项目运行 5 | Clone项目之后,执行以下步骤commands安装dependencies: 6 | 7 | npm install 8 | bower install 9 | 10 | 安装完dependencies之后,以开发环境运行项目: 11 | 12 | grunt serve 13 | 14 | 或以产品环境运行项目(minified js,css): 15 | 16 | grunt serve:dist 17 | 18 | 或单纯的构建项目(不运行Grunt服务器): 19 | 20 | grunt build 21 | 22 | 构建后的代码将在dist目录下,可运行以下命令清楚dist文件夹: 23 | 24 | grunt clean 25 | 26 | ## 项目结构 27 | . 28 | ├── codin-mobile 29 | │ ├── app:所有应用程序代码 30 | │ │ ├── bower_components:前端 bower dependencies 31 | │ │ ├── fonts:所有的字体 32 | │ │ ├── images:所有的图片和icons 33 | │ │ ├── scripts: 所有的前端js代码 34 | | │ | ├── vendor:第三方代码库 35 | | │ | ├── controllers:控制器,对应app中的各个页面 36 | │ │ ├── styles:所有的样式表 37 | │ │ ├── views:所有的视图,对应app/controllers中的每个controller 38 | │ ├── dist:app构建后的代码 39 | │ ├── node_modules:项目dependencies,包括grunt插件和其他开发工具都在这里 40 | │ ├── test:测试代码 41 | 42 | ## 关于CORS 43 | 如果是在本地环境下运行项目,则需要修改操作系统的hosts文件来跳过CORS设置。由于目前coding后台API的CORS设置只允许m.coding.net域名下的ajax请求,所以当在本地localhost运行项目的时候,所有的ajax请求将被拒绝,导致无法获取数据。可将操作系统的域名解析hosts文件进行如下修改,让m.coding.net指向本地,然后通过浏览器访问m.coding.net来实现本地开发: 44 | 45 | 127.0.0.1 m.coding.net 46 | 注:由于hosts文件不支持端口设置,所以上述方法只有在当grunt server是在80端口上监听时才会生效 47 | 48 | 如果不想改变grunt server的默认端口(9000),则需要通过在本地设置http代理来实现本地开发。可在本地安装nginx来实现http代理。具体安装步骤可查看[nginx官网](http://wiki.nginx.org/Install)。安装完nginx之后,在nginx.conf的server directive下输入以下配置: 49 | 50 | location / { 51 | proxy_pass http://127.0.0.1:9000; 52 | } 53 | 54 | 即可把所有发至m.coding.net的请求,代理到127.0.0.1:9000地址上,实现本地开发。 55 | 56 | ## 关于https 57 | 如果需要在本地环境下通过https访问m.coding.net,需要在完成上述步骤之后,为nginx加入https设置。在设置nginx之前,需要通过OpenSSL工具生成密钥和自签发https服务器证书。具体步骤网上有,很容易搜到。完成上述步骤后,打开之前的nginx.conf文件,在server directive下,输入以下配置: 58 | 59 | listen 443 ssl; 60 | server_name m.coding.net; 61 | ssl_certificate certificate.pem; //这个指向之前生成的自签发证书文件 62 | ssl_certificate_key key.pem; //这个指向之前生成的密钥文件 63 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 64 | ssl_ciphers HIGH:!aNULL:!MD5; 65 | 66 | 设置完上述步骤后,打开浏览器,输入 https://m.coding.net 访问本地环境下运行的m.coding.net。 67 | 注:前提是grunt server已启动并在9000端口上运行。如果浏览器提示ssl证书不认可并有风险,可跳过提示并直接访问 68 | 69 | 70 | ## 关于调试及浏览器选用 71 | Chrome 4.0 以上的版本完全禁止访问带自签发证书的 https 请求 72 | Chrome 4.0 能手动选择继续访问不安全的链接 73 | 下载地址:http://download.csdn.net/download/NothingSky/2033778 74 | 请停用所有翻墙工具和自动代理,已防止 Chrome 自动更新 75 | 76 | 已经访问过 https://m.coding.net 原站的情况,再次访问本地代理的 https://m.coding.net 将会失去继续访问不安全链接的选项,Mac 通过 Finder 进入 /Users/xxx/Library/Application Support/Google,直接将其中的 Chrome 文件夹备份更名,才可以重新访问并调试。 77 | 78 | ## 可能的点击失效 79 | FastClick 会导致非 iphone 设备启用 iphone 浏览器标识点击失效 80 | 已经检查到的情况有 小米 和 Chrome 81 | -------------------------------------------------------------------------------- /app/scripts/controllers/my_project_member_ctrl.js: -------------------------------------------------------------------------------- 1 | var MY_PROJECT_MEMBERS_ROUTE = (function(){ 2 | 3 | var pageSize = 10; 4 | var pageCount = 0; 5 | var $container = null; 6 | var projectData = null; 7 | var ownerName = ""; 8 | var projectName = ""; 9 | 10 | var type_desc = { 11 | "Project": "项目", 12 | "ProjectTopic": "讨论", 13 | "ProjectMember": "项目成员", 14 | "ProjectFile": "文件", 15 | "Task": "任务" 16 | }; 17 | 18 | function loadProject(){ 19 | 20 | var path = '/api/user/' + ownerName + '/project/' + projectName; 21 | coding.get(path, function(data){ 22 | if(data.data){ 23 | coding.showProjectBreadcrumb(data.data); 24 | projectData = data.data; 25 | loadMembers(); 26 | } 27 | }); 28 | } 29 | 30 | function loadMembers() { 31 | coding.loading() 32 | 33 | pageCount++; 34 | 35 | var path = '/api/project/' + projectData.id + '/members'; 36 | path += '?page=' + pageCount + '&' + 'pageSize=' + pageSize; 37 | coding.get(path, function(data){ 38 | if(data.data){ 39 | assembleDOM(data.data); 40 | } 41 | }, null, coding.loadingDone); 42 | } 43 | 44 | function assembleDOM(data){ 45 | if(!data || !data.list || !data.list.length) return; 46 | 47 | // 创建者 48 | for (var index = 0; index < data.list.length; index++) { 49 | var element = data.list[index]; 50 | if(element.type == 100){ 51 | data.list[index].isCreator = true; 52 | } 53 | if(element.user.avatar.substr(0,1) === '/'){ 54 | data.list[index].user.avatar = API_DOMAIN + element.user.avatar; 55 | } 56 | } 57 | 58 | 59 | var rendered = Mustache.render($('#tlist').html(), data); 60 | $('#members').append(rendered); 61 | } 62 | 63 | return { 64 | template_url: '/views/my_project_members.html', 65 | context: ".container", 66 | before_enter: function(user, project){ 67 | $('#navigator').find('.li-project').addClass('active'); 68 | $('#navigator').find(".li-project img").attr('src','/images/icons/project_active.png'); 69 | 70 | pageCount = 0; 71 | }, 72 | on_enter: function(user, project){ 73 | ownerName = user; 74 | projectName = project; 75 | 76 | loadProject(); 77 | var element = $("#load_more"); 78 | element.on('click', function(e){ 79 | e.preventDefault(); 80 | loadMembers(); 81 | }); 82 | 83 | 84 | }, 85 | on_exit: function(){ 86 | $('#navigator').find('li').removeClass('active'); 87 | $('#navigator').find(".li-project img").attr('src','/images/icons/project.png'); 88 | coding.showBanner(); 89 | } 90 | } 91 | 92 | })(); 93 | -------------------------------------------------------------------------------- /app/views/project_item.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 | 58 | 59 | -------------------------------------------------------------------------------- /app/scripts/controllers/my_project_task_desc_ctrl.js: -------------------------------------------------------------------------------- 1 | var MY_PROJECT_TASK_DESC_ROUTE = (function(){ 2 | 3 | var pageSize = 20, 4 | pageCount = 0, 5 | ownerName = '', 6 | projectName = '', 7 | projectData = null, 8 | taskId = null, 9 | taskCounts = null, 10 | members = null, 11 | deadline = moment(), 12 | $container = null; 13 | 14 | var priority_list = [ 15 | {name:'十万火急',level:3, images:[{isFirst:true,image:'priority.png'},{image:'priority.png'},{image:'priority.png'}]}, 16 | {name:'有线处理',level:2, images:[{isFirst:true,image:'priority.png'},{image:'priority.png'},{image:'priority_gray.png'}]}, 17 | {name:'正常处理',level:1, images:[{isFirst:true,image:'priority.png'},{image:'priority_gray.png'},{image:'priority_gray.png'}]}, 18 | {name:'有空看看',level:0, images:[{isFirst:true,image:'priority_gray.png'},{image:'priority_gray.png'},{image:'priority_gray.png'}]}, 19 | ]; 20 | 21 | function loadProject(){ 22 | var path = '/api/user/' + ownerName + '/project/' + projectName; 23 | var successed = function(data){ 24 | if(data.data){ 25 | coding.showProjectBreadcrumb(data.data); 26 | projectData = data.data; 27 | getTask(); 28 | } 29 | } 30 | coding.get(path,successed); 31 | } 32 | 33 | function getTask() { 34 | var path = '/api/project/' + projectData.id + '/task/'+taskId; 35 | var successed = function(data){ 36 | if(data.data){ 37 | $("#task_content").html(data.data.content); 38 | if(data.data.has_description){ 39 | getTaskDesc(); 40 | } 41 | 42 | } 43 | }; 44 | coding.get(path,successed); 45 | } 46 | function getTaskDesc() { 47 | var path = '/api/task/'+taskId+'/description'; 48 | var successed = function(data){ 49 | if(data.data){ 50 | $("#task_desc").html(data.data.description); 51 | } 52 | }; 53 | coding.get(path,successed); 54 | } 55 | 56 | 57 | return { 58 | template_url: '/views/my_project_task_desc.html', 59 | context: ".container", 60 | before_enter: function(user,project){ 61 | $('#navigator').find('.li-project').addClass('active'); 62 | $('#navigator').find(".li-project img").attr('src','/images/icons/project_active.png'); 63 | 64 | pageCount = 0; 65 | }, 66 | on_enter: function(user, project, id){ 67 | ownerName = user; 68 | projectName = project; 69 | taskId = id; 70 | loadProject(); 71 | }, 72 | on_exit: function(){ 73 | $('#navigator').find('li').removeClass('active'); 74 | $('#navigator').find(".li-project img").attr('src','/images/icons/project.png'); 75 | $('.project_header').remove(); 76 | coding.showBanner(); 77 | } 78 | } 79 | 80 | })(); 81 | -------------------------------------------------------------------------------- /app/styles/components/_helper.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Helper 4 | * 5 | **/ 6 | 7 | 8 | .clear { 9 | &::before, 10 | &::after { 11 | content: ''; 12 | display: table; 13 | } 14 | &::after { 15 | clear: both; 16 | } 17 | } 18 | 19 | 20 | /*========== COLORS ==========*/ 21 | 22 | .color--blue { color: $colorBlue; } 23 | .color--red { color: $colorRed; } 24 | .color--green { color: $colorGreen; } 25 | .color--yellow { color: $colorYellow; } 26 | .color--blue-secondary { color: $colorBlueSecondary; } 27 | .color--red-secondary { color: $colorRedSecondary; } 28 | .color--green-secondary { color: $colorGreenSecondary; } 29 | .color--yellow-secondary { color: $colorYellowSecondary; } 30 | 31 | .color--gray-background { color: $colorGrayBackground; } 32 | .color--gray-keyline { color: $colorGrayKeyline; } 33 | .color--gray { color: $colorGray; } 34 | .color--gray-dark { color: $colorGrayDark; } 35 | 36 | .color--text { color: $colorText; } 37 | .color--highlight { color: $colorHighlight; } 38 | .color--warning { color: $colorWarning; } 39 | .color--danger { color: $colorDanger; } 40 | .color--muted { color: $colorMuted; } 41 | 42 | .color--remember { color: $colorRemember; } 43 | .color--learning { color: $colorLearning; } 44 | 45 | .color--layouts { color: $colorLayouts; } 46 | .color--user { color: $colorUser; } 47 | .color--media { color: $colorMedia; } 48 | .color--performance { color: $colorPerformance; } 49 | .color--layouts-secondary { color: $colorLayoutsSecondary; } 50 | .color--user-secondary { color: $colorUserSecondary; } 51 | .color--media-secondary { color: $colorMediaSecondary; } 52 | .color--performance-secondary { color: $colorPerformanceSecondary; } 53 | 54 | 55 | 56 | /*========== TEXT DIVIDER ==========*/ 57 | 58 | .text-divider { 59 | position: relative; 60 | margin-bottom: $lineHeight; 61 | 62 | &::after { 63 | content: ''; 64 | display: block; 65 | position: absolute; 66 | width: 40%; 67 | height: 1px; 68 | box-shadow: 0 1px 0 0 $colorGrayKeyline; 69 | left: 30%; 70 | bottom: -$lineHeight/2; 71 | } 72 | 73 | &.xlarge { 74 | margin-bottom: $lineHeight*2; 75 | 76 | &::after { 77 | bottom: -($lineHeight*2)/2; 78 | } 79 | } 80 | 81 | &.xxlarge { 82 | margin-bottom: $lineHeight*3; 83 | 84 | &::after { 85 | bottom: -($lineHeight*3)/2; 86 | } 87 | } 88 | 89 | &.huge { 90 | margin-bottom: $lineHeight*3; 91 | 92 | &::after { 93 | bottom: -($lineHeight*3)/2; 94 | } 95 | } 96 | } 97 | 98 | 99 | /*========== GENERIC ==========*/ 100 | .centered { 101 | text-align: center; 102 | } 103 | 104 | 105 | /*========== TAG ==========*/ 106 | .tag { 107 | @include type--small; 108 | font-family: $fontHighlight; 109 | text-transform: uppercase; 110 | font-weight: 700; 111 | display: inline-block; 112 | text-decoration: none; 113 | 114 | &:hover { 115 | color: $colorGrayDark; 116 | } 117 | 118 | &::before { 119 | content: '# '; 120 | display: inline-block; 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /app/scripts/controllers/my_project_attachment_preview_ctrl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by cyg on 13/10/2015. 3 | */ 4 | var MY_PROJECT_ATTACHMENT_PREVIEW_ROUTE = (function(){ 5 | var fileUrl = ""; 6 | var fileId = ""; 7 | var fileType = ""; 8 | var ownerName = null; 9 | var projectName = null; 10 | 11 | function requestServer(url, method, form, callback) { 12 | $.ajax({ 13 | url: url, 14 | dataType: 'json', 15 | type: method, 16 | data: form, 17 | xhrFields: { 18 | withCredentials: true 19 | }, 20 | success: callback, 21 | error: function(xhr, type){ 22 | alert('Failed to load file'); 23 | } 24 | }); 25 | } 26 | 27 | function showPreview() { 28 | if (fileType != 'txt' & fileType != 'md') return; 29 | 30 | requestServer(fileUrl, 'GET', undefined, function(data){ 31 | if (data.code == 0) { 32 | if (fileType == 'md') { 33 | var previewUrl = API_DOMAIN + "/api/markdown/preview?toc=true"; 34 | requestServer(previewUrl, 'POST', {content: data.data.content}, function(previewData){ 35 | if (previewData.code == 0) { 36 | data.data.content = previewData.data; 37 | assembleDOM(data.data); 38 | } 39 | }); 40 | } else { 41 | data.data.content = "
    " + data.data.content + "
    "; 42 | assembleDOM(data.data); 43 | } 44 | } else { 45 | alert('该文件不存在!'); 46 | router.run.call(router, '/u/'+ownerName+'/p/'+projectName+'/attachment'); 47 | } 48 | }); 49 | } 50 | 51 | function assembleDOM(json) { 52 | var data = { 53 | isText: fileType === 'md' || fileType === 'txt', 54 | fileType: fileType, 55 | file: json.file, 56 | content: json.content 57 | }; 58 | var rendered = Mustache.render($('#tPreview').html(), data); 59 | $('#tcontainer').append(rendered); 60 | } 61 | 62 | return { 63 | template_url: '/views/my_project_attachment_preview.html', 64 | context: ".container", 65 | before_enter: function(){ 66 | $('#navigator').find('.li-project').addClass('active'); 67 | $('#navigator').find(".li-project img").attr('src','/images/icons/project_active.png'); 68 | }, 69 | on_enter: function(user, project, parentId, fileId, type){ 70 | fileUrl = API_DOMAIN + '/api/user/' + user + '/project/' + project + '/files/' + fileId + '/view'; 71 | fileId = fileId; 72 | fileType = type; 73 | ownerName = user; 74 | projectName = project; 75 | 76 | showPreview(); 77 | }, 78 | on_exit: function(){ 79 | $('#navigator').find('li').removeClass('active'); 80 | $('#navigator').find(".li-project img").attr('src','/images/icons/project.png'); 81 | coding.showBanner(); 82 | } 83 | }; 84 | })(); 85 | -------------------------------------------------------------------------------- /app/styles/components/_themed.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Themed styles 4 | * 5 | **/ 6 | 7 | .themed { 8 | 9 | .theme--multi-device-layouts & { color: $colorLayouts; } 10 | 11 | .theme--introduction-to-media & { color: $colorMedia; } 12 | 13 | .theme--user-input & { color: $colorUser; } 14 | 15 | .theme--performance & { color: $colorPerformance; } 16 | 17 | } 18 | 19 | .themed--background { 20 | 21 | .theme--multi-device-layouts &, 22 | .theme--multi-device-layouts &.next-lessons::before { background-color: $colorLayouts; } 23 | 24 | .theme--introduction-to-media &, 25 | .theme--introduction-to-media &.next-lessons::before { background-color: $colorMedia; } 26 | 27 | .theme--user-input &, 28 | .theme--user-input &.next-lessons::before { background-color: $colorUser; } 29 | 30 | .theme--performance &, 31 | .theme--performance &.next-lessons::before { background-color: $colorPerformance; } 32 | 33 | } 34 | 35 | .themed--hover { 36 | 37 | .theme--multi-device-layouts &:hover { color: $colorLayouts; } 38 | 39 | .theme--introduction-to-media &:hover { color: $colorMedia; } 40 | 41 | .theme--user-input &:hover { color: $colorUser; } 42 | 43 | .theme--performance &:hover { color: $colorPerformance; } 44 | 45 | } 46 | 47 | .themed--hover-secondary { 48 | 49 | .theme--multi-device-layouts &:hover { color: $colorLayoutsSecondary; } 50 | 51 | .theme--introduction-to-media &:hover { color: $colorMediaSecondary; } 52 | 53 | .theme--user-input &:hover { color: $colorUserSecondary; } 54 | 55 | .theme--performance &:hover { color: $colorPerformanceSecondary; } 56 | 57 | } 58 | 59 | 60 | // Wrapped content in .article-container so we can 61 | // encapsulate what needs to be themed without overriding 62 | // anything outside of this container. 63 | .article-container h1, 64 | .article-container h2 { 65 | 66 | .article--multi-device-layouts & { color: $colorLayouts; } 67 | 68 | .article--introduction-to-media & { color: $colorMedia; } 69 | 70 | .article--user-input & { color: $colorUser; } 71 | 72 | .article--performance & { color: $colorPerformance; } 73 | } 74 | 75 | 76 | // Let's make sure this is at the end so we can override 77 | // previous rules. Specicifity rules. 78 | .themed--hover { 79 | 80 | .nav-theme--multi-device-layouts &:hover { color: $colorLayouts; } 81 | 82 | .nav-theme--introduction-to-media &:hover { color: $colorMedia; } 83 | 84 | .nav-theme--user-input &:hover { color: $colorUser; } 85 | 86 | .nav-theme--performance &:hover { color: $colorPerformance; } 87 | 88 | } 89 | 90 | .themed { 91 | 92 | .nav-theme--multi-device-layouts & { color: $colorLayouts; } 93 | 94 | .nav-theme--introduction-to-media & { color: $colorMedia; } 95 | 96 | .nav-theme--user-input & { color: $colorUser; } 97 | 98 | .nav-theme--performance & { color: $colorPerformance; } 99 | 100 | } 101 | 102 | .themed--background { 103 | 104 | .nav-theme--multi-device-layouts & { background-color: $colorLayouts; } 105 | 106 | .nav-theme--introduction-to-media & { background-color: $colorMedia; } 107 | 108 | .nav-theme--user-input & { background-color: $colorUser; } 109 | 110 | .nav-theme--performance & { background-color: $colorPerformance; } 111 | 112 | } 113 | -------------------------------------------------------------------------------- /app/styles/components/_components/_table.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Table 4 | * 5 | **/ 6 | 7 | table { 8 | margin-top: $lineHeight; 9 | width: 100%; 10 | 11 | thead { 12 | background: $colorBlue; 13 | color: #ffffff; 14 | } 15 | 16 | th { 17 | text-align: center; 18 | display: none; 19 | font-family: $fontHighlight; 20 | @include type--medium; 21 | } 22 | 23 | tr { 24 | @include medium { 25 | border-bottom: 1px solid #ffffff; 26 | } 27 | } 28 | 29 | tbody { 30 | background: $colorGrayBackground; 31 | } 32 | 33 | td { 34 | display: block; 35 | padding-top: $lineHeight/2; 36 | padding-bottom: $lineHeight/2; 37 | 38 | // This is to re-plicate the table-headers for mobile 39 | &::before { 40 | content: attr(data-th) " :"; 41 | display: inline-block; 42 | color: #ffffff; 43 | background: $colorBlue; 44 | border-right: 2px solid #ffffff; 45 | position: absolute; 46 | top: 0; 47 | left: 0; 48 | bottom: 0; 49 | width: 100px; 50 | max-height: 100%; 51 | font-family: $fontHighlight; 52 | font-size: 16px; 53 | font-weight: 400; 54 | padding-left: $lineHeight/2; 55 | padding-top: $lineHeight/2; 56 | 57 | @include medium { 58 | display: none; 59 | } 60 | } 61 | } 62 | 63 | th, 64 | td { 65 | position: relative; 66 | padding-left: 140px; 67 | 68 | @include medium { 69 | display: table-cell; 70 | } 71 | } 72 | 73 | th { 74 | @include medium { 75 | padding: $lineHeight; 76 | padding-top: 13px; 77 | padding-bottom: $lineHeight/2 - 1; 78 | } 79 | } 80 | 81 | td { 82 | @include medium { 83 | padding: $lineHeight; 84 | padding-bottom: $lineHeight - 1; 85 | } 86 | } 87 | } 88 | 89 | td:last-child::after { 90 | content: ""; 91 | display: block; 92 | background: #ffffff; 93 | height: 1px; 94 | left: 0; 95 | position: absolute; 96 | bottom: 0; 97 | width: 100%; 98 | @include medium { 99 | display: none; 100 | } 101 | } 102 | 103 | .table-2 { 104 | col { 105 | width: $mediumContainer / 2; 106 | @include wide { 107 | width: $wideContainer / 2; 108 | } 109 | } 110 | 111 | th, 112 | td { 113 | @include medium { 114 | &:first-child { 115 | border-right: 2px solid #ffffff; 116 | } 117 | } 118 | } 119 | } 120 | 121 | .table-3 { 122 | col { 123 | width: $mediumContainer / 3; 124 | @include wide { 125 | width: $wideContainer / 3; 126 | } 127 | } 128 | 129 | th, 130 | td { 131 | @include medium { 132 | &:nth-child(2) { 133 | border-left: 2px solid #ffffff; 134 | border-right: 2px solid #ffffff; 135 | } 136 | } 137 | } 138 | } 139 | 140 | .table-4 { 141 | col { 142 | width: $mediumContainer / 4; 143 | @include wide { 144 | width: $wideContainer / 4; 145 | } 146 | } 147 | 148 | th, 149 | td { 150 | @include medium { 151 | &:nth-child(2), 152 | &:nth-child(3) { 153 | border-left: 2px solid #ffffff; 154 | border-right: 2px solid #ffffff; 155 | } 156 | } 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /app/styles/components/_components/_icons.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: icons; 3 | src: url(../images/icons/icons.eot); 4 | src: url(../images/icons/icons.eot?#iefix) format('embedded-opentype'), 5 | url(../images/icons/icons.woff2) format('woff2'), 6 | url(../images/icons/icons.woff) format('woff'), 7 | url(../images/icons/icons.ttf) format('truetype'), 8 | url(../images/icons/icons.svg?#icons) format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | 13 | .icon { 14 | font-family: 'icons'; 15 | display: inline-block; 16 | vertical-align: top; 17 | line-height: 1; 18 | font-weight: normal; 19 | font-style: normal; 20 | speak: none; 21 | text-decoration: inherit; 22 | text-transform: none; 23 | text-rendering: optimizeLegibility; 24 | -webkit-font-smoothing: antialiased; 25 | -moz-osx-font-smoothing: grayscale; 26 | } 27 | 28 | // Icons 29 | $icon-bullet: '\e001'; 30 | .icon-bullet::before { 31 | content:"\e001"; 32 | } 33 | 34 | $icon-chevron-down: '\e002'; 35 | .icon-chevron-down::before { 36 | content: '\e002'; 37 | } 38 | 39 | $icon-chevron-large: '\e003'; 40 | .icon-chevron-large::before { 41 | content: '\e003'; 42 | } 43 | 44 | $icon-chevron-left: '\e004'; 45 | .icon-chevron-left::before { 46 | content: '\e004'; 47 | } 48 | 49 | $icon-chevron-right: '\e005'; 50 | .icon-chevron-right::before { 51 | content: '\e005'; 52 | } 53 | 54 | $icon-chevron-up: '\e006'; 55 | .icon-chevron-up::before { 56 | content: '\e006'; 57 | } 58 | 59 | $icon-close: '\e007'; 60 | .icon-close::before { 61 | content: '\e007'; 62 | } 63 | 64 | $icon-cog: '\e008'; 65 | .icon-cog::before { 66 | content: '\e008'; 67 | } 68 | 69 | $icon-diamond: '\e009'; 70 | .icon-diamond::before { 71 | content: '\e009'; 72 | } 73 | 74 | $icon-exclamation: '\e00a'; 75 | .icon-exclamation::before { 76 | content: '\e00a'; 77 | } 78 | 79 | $icon-google-dev: '\e00b'; 80 | .icon-google-dev::before { 81 | content: '\e00b'; 82 | } 83 | 84 | $icon-hash: '\e00c'; 85 | .icon-hash::before { 86 | content: '\e00c'; 87 | } 88 | 89 | $icon-introduction-to-media: '\e00d'; 90 | .icon-introduction-to-media::before { 91 | content: '\e00d'; 92 | } 93 | 94 | $icon-lessons: '\e00e'; 95 | .icon-lessons::before { 96 | content: '\e00e'; 97 | } 98 | 99 | $icon-menu: '\e00f'; 100 | .icon-menu::before { 101 | content: '\e00f'; 102 | } 103 | 104 | $icon-minus: '\e010'; 105 | .icon-minus::before { 106 | content: '\e010'; 107 | } 108 | 109 | $icon-multi-device-layouts: '\e011'; 110 | .icon-multi-device-layouts::before { 111 | content: '\e011'; 112 | } 113 | 114 | $icon-performance: '\e012'; 115 | .icon-performance::before { 116 | content: '\e012'; 117 | } 118 | 119 | $icon-plus: '\e013'; 120 | .icon-plus::before { 121 | content: '\e013'; 122 | } 123 | 124 | $icon-question: '\e014'; 125 | .icon-question::before { 126 | content: '\e014'; 127 | } 128 | 129 | $icon-slash: '\e015'; 130 | .icon-slash::before { 131 | content: '\e015'; 132 | } 133 | 134 | $icon-star: '\e016'; 135 | .icon-star::before { 136 | content: '\e016'; 137 | } 138 | 139 | $icon-tick: '\e017'; 140 | .icon-tick::before { 141 | content: '\e017'; 142 | } 143 | 144 | $icon-user-input: '\e018'; 145 | .icon-user-input::before { 146 | content: '\e018'; 147 | } 148 | -------------------------------------------------------------------------------- /app/index-web-starter-kit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Web Starter Kit 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 |
    34 |
    35 | 36 |

    Web Starter Kit

    37 |
    38 | 39 | 40 |
    41 |
    42 |
    43 | 44 | 52 | 53 |
    54 |

    Hello!

    55 |

    Welcome to Web Starter Kit.

    56 | 57 |

    Get Started.

    58 |

    Read how to Get Started or check out the Style Guide.

    59 |
    60 | 61 | 62 | 63 | 64 | 65 | 66 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /app/views/pp_modal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 56 | 57 | 58 |
    59 |
    60 | 取消 61 |
    62 |
    63 | 64 |
    65 | 67 |
    68 | 69 | 70 |
    71 |
    72 | 取消 73 |
    74 | 75 | 77 |
    加载更多
    78 |
    79 |
    -------------------------------------------------------------------------------- /app/styles/components/_components/_grid.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Grid 4 | * 5 | **/ 6 | 7 | 8 | @include medium-only { 9 | // Generating grid classes for medium view 10 | @for $i from 1 through $mediumColCount { 11 | .g-medium--#{$i} { 12 | @include rule--col(medium); 13 | width: ($mediumColWidth*$i) + ($mediumGutterWidth*($i + -1)); 14 | @if $i == $mediumColCount { margin-right: 0; } 15 | } 16 | 17 | @if $i < $mediumColCount { 18 | .g-medium--push-#{$i} { 19 | margin-left: ($mediumColWidth*$i) + ($mediumGutterWidth*$i); 20 | } 21 | .g-medium--pull-#{$i} { 22 | margin-right: ($mediumColWidth*$i) + ($mediumGutterWidth*$i); 23 | } 24 | } 25 | } 26 | 27 | .g-medium--full { 28 | @include rule--col(medium); 29 | margin-right: 0; 30 | width: 100%; 31 | } 32 | 33 | .g--third { 34 | @include rule--col(medium); 35 | width: $mediumColWidth; 36 | } 37 | 38 | .g--half, 39 | .g-medium--half { 40 | @include rule--col(medium); 41 | width: 50% - $mediumGutterWidth/2; 42 | } 43 | 44 | .g-medium--last { margin-right: 0; } 45 | .g-medium--last + .g-medium--half { clear: left; } 46 | 47 | .g--pull-half { margin-right: 50% + $mediumGutterWidth/2; } 48 | } 49 | 50 | 51 | @include wide { 52 | // Generating grid classes for wide view 53 | @for $i from 1 through $wideColCount { 54 | .g-wide--#{$i} { 55 | @include rule--col(wide); 56 | width: ($wideColWidth*$i) + ($wideGutterWidth*($i + -1)); 57 | @if $i == $wideColCount { margin-right: 0; } 58 | } 59 | 60 | @if $i < $wideColCount { 61 | .g-wide--push-#{$i} { 62 | margin-left: ($wideColWidth*$i) + ($wideGutterWidth*$i); 63 | } 64 | .g-wide--pull-#{$i} { 65 | margin-right: ($wideColWidth*$i) + ($wideGutterWidth*$i); 66 | } 67 | } 68 | } 69 | 70 | .g-wide--last { margin-right: 0; } 71 | 72 | .g-wide--full { 73 | @include rule--col(wide); 74 | margin-right: 0; 75 | width: 100%; 76 | } 77 | 78 | .g--third { 79 | @include rule--col(wide); 80 | width: 30.8%; 81 | } 82 | 83 | .g--half, 84 | .g-wide--half { 85 | @include rule--col(wide); 86 | width: 50% - $wideGutterWidth/2; 87 | } 88 | 89 | .g--pull-half { margin-right: 50% + $wideGutterWidth/2; } 90 | } 91 | 92 | 93 | // This is a global 'last' class 94 | // to be used with global grid classes, such as 'half' or 'third' 95 | // Example usage: 96 | //
    97 | //
    98 | //
    99 | .g--last { margin-right: 0; } 100 | 101 | 102 | // This is a global 'centered' class 103 | .g--centered { 104 | float: none; // reset float to none so we can center it 105 | margin-left: auto; 106 | margin-right: auto; 107 | } 108 | 109 | // This is a grid overlay 110 | // Its purpose is to show users our grid system 111 | // It becomes visible when a class 'debug' is added to the body 112 | .grid-overlay { 113 | 114 | display: none; 115 | pointer-events: none; 116 | 117 | // Only show when parents (body) has debug class 118 | .debug & { 119 | @include container(true); 120 | 121 | position: absolute; 122 | top: 0; 123 | bottom: 0; 124 | left: 0; 125 | right: 0; 126 | height: 100%; 127 | display: block; 128 | 129 | [class*="g-"] { 130 | height: 100%; 131 | background-color: rgba(lighten(#000, 35%), .2); 132 | } 133 | 134 | @include medium-only { 135 | .g-wide--last { 136 | display: none; 137 | } 138 | } 139 | 140 | @include small-only { 141 | display: none; 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /app/fonts/icons.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/images/icons/icons.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/scripts/feedbackUploadImage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by phy on 15-10-23. 3 | */ 4 | //上传图片模块 5 | Zepto(function(){ 6 | var images = {}; 7 | var uploader; 8 | 9 | initialize(); 10 | 11 | function initialize(){ 12 | eventAndHandlers(); 13 | setUploader(); 14 | } 15 | 16 | function eventAndHandlers(){ 17 | //删除图片 18 | $('#image_board').off('click').on('click','i.icon-delete',function(){ 19 | removeImage( $(this).closest('.image[key]').attr('key') ); 20 | }); 21 | } 22 | 23 | function setUploader(){ 24 | uploaderPrepare( uploaderReady ); 25 | 26 | function uploaderReady( Uploader ){ 27 | uploader = new Uploader({ 28 | target: $('#feedback_image'), 29 | path: API_DOMAIN + '/api/tweet/insert_image', 30 | filefiled: 'tweetImg', 31 | multiple: true, 32 | multipleSize: 6, 33 | start: start, 34 | uploading: uploading, 35 | success: success, 36 | failed: failed, 37 | appenddata: {}, 38 | ajaxconfig: { 39 | xhrFields: { 40 | withCredentials: true 41 | } 42 | } 43 | }); 44 | } 45 | 46 | function start( url, key ){ 47 | uploader.multipleSize --; 48 | var imageurl = ''; 49 | var image = $('
    '); 50 | 51 | if(url){ 52 | imageurl = url; 53 | image.css('background-image', 'url(' + imageurl + ')'); 54 | } 55 | image.addClass('upload-start').attr('key', key); 56 | 57 | $('#feedback_image').before( image ); 58 | 59 | images[key] = { 60 | imageurl: imageurl, 61 | image: image 62 | } 63 | } 64 | 65 | function uploading( persent, key ){ 66 | images[key]['image'].removeClass('upload-start').addClass('upload-ing'); 67 | window.postMessage('checkModalCouldSend','*'); 68 | } 69 | 70 | function success( data, key ){ 71 | typeof data == 'string' && ( data=JSON.parse(data) ); 72 | 73 | if( !data.code ){ 74 | if(!images[key]['imageurl']){ 75 | images[key]['imageurl'] = data.data; 76 | images[key]['image'].css('background-image', 'url(' + imageurl + ')'); 77 | } 78 | images[key]['image'].attr('url', data.data); 79 | 80 | images[key]['image'].removeClass('upload-start').removeClass('upload-ing').addClass('upload-success'); 81 | window.postMessage('checkModalCouldSend','*'); 82 | }else{ 83 | failed( '上传失败', key ); 84 | } 85 | } 86 | 87 | function failed( err, key ){ 88 | alert( err || '上传失败' ); 89 | removeImage(key); 90 | } 91 | } 92 | 93 | function removeImage(key){ 94 | if(!images[key]) return; 95 | uploader.multipleSize ++; 96 | images[key]['image'].remove(); 97 | window.postMessage('checkModalCouldSend','*'); 98 | delete images[key]; 99 | } 100 | 101 | function uploaderPrepare( success ){ 102 | if(window.rangoUploader){ 103 | callSuccessOnce(); 104 | return; 105 | } 106 | 107 | var script = $('