├── client ├── public │ ├── app │ │ ├── about │ │ │ ├── about.css │ │ │ └── about.coffee │ │ ├── gallery │ │ │ ├── list │ │ │ │ ├── gallery-list.css │ │ │ │ ├── gallery-list.coffee │ │ │ │ └── gallery-list.tpl.html │ │ │ └── detail │ │ │ │ ├── gallery-detail.coffee │ │ │ │ └── gallery-detail.tpl.html │ │ ├── article │ │ │ ├── list │ │ │ │ └── article-list.css │ │ │ ├── Common │ │ │ │ ├── article-sider-lastest-comments.coffee │ │ │ │ ├── article-sider.tpl.html │ │ │ │ ├── article-sider-search.coffee │ │ │ │ ├── article-sider-search.tpl.html │ │ │ │ ├── article-sider-lastest-comments.tpl.html │ │ │ │ └── article-post-header.tpl.html │ │ │ ├── detail │ │ │ │ └── article-detail.css │ │ │ ├── archives │ │ │ │ ├── article-archives.css │ │ │ │ ├── article-archives.coffee │ │ │ │ └── article-archives.tpl.html │ │ │ ├── article.css │ │ │ └── article.coffee │ │ ├── _framework │ │ │ ├── framework.coffee │ │ │ ├── framework-MainCtrl.coffee │ │ │ ├── framework-TopCtrl.coffee │ │ │ └── framework-HeadCtrl.coffee │ │ ├── index │ │ │ ├── index.coffee │ │ │ └── index.css │ │ └── i18n │ │ │ └── languages │ │ │ └── zh-cn.coffee │ ├── common │ │ ├── templates.coffee │ │ ├── untils.coffee │ │ ├── directives.coffee │ │ ├── services.coffee │ │ ├── resources │ │ │ ├── galleries.coffee │ │ │ ├── board.coffee │ │ │ ├── categories.coffee │ │ │ ├── users.coffee │ │ │ └── articles.coffee │ │ ├── services │ │ │ ├── messager.coffee │ │ │ ├── context.coffee │ │ │ ├── odateResource.js │ │ │ ├── progress.coffee │ │ │ └── security.coffee │ │ ├── directives │ │ │ ├── _ngBindHtmlUnsafe.coffee │ │ │ ├── fancybox.coffee │ │ │ └── oDataPager.coffee │ │ ├── untils │ │ │ ├── ajaxErrorHandler.coffee │ │ │ └── ajaxLoading.coffee │ │ ├── until.js │ │ ├── init.coffee │ │ └── filters.coffee │ ├── vendor │ │ ├── unify_1.3 │ │ │ └── theme │ │ │ │ ├── red │ │ │ │ ├── reset.css │ │ │ │ └── header1-red.css │ │ │ │ ├── default │ │ │ │ └── reset.css │ │ │ │ ├── blue │ │ │ │ └── header1-blue.css │ │ │ │ ├── light │ │ │ │ └── header1-light.css │ │ │ │ └── orange │ │ │ │ └── header1-orange.css │ │ └── fancybox │ │ │ ├── blank.gif │ │ │ ├── fancybox_loading.gif │ │ │ ├── fancybox_overlay.png │ │ │ ├── fancybox_sprite.png │ │ │ ├── fancybox_loading@2x.gif │ │ │ ├── fancybox_sprite@2x.png │ │ │ ├── .gitattributes │ │ │ └── .bower.json │ ├── robots.txt │ └── img │ │ ├── up.png │ │ ├── zack.jpg │ │ ├── avatar.png │ │ ├── bg_sky.jpg │ │ ├── favicon.png │ │ ├── upgrade.png │ │ ├── works │ │ ├── 318.png │ │ ├── api.png │ │ ├── xfj.png │ │ └── dxyw.png │ │ ├── social │ │ ├── rss.png │ │ └── github.png │ │ ├── main_bg_image.jpg │ │ ├── overlay-icon.png │ │ └── main_bg_grid_tile.png └── admin │ ├── common │ ├── templates.coffee │ ├── untils.coffee │ ├── services.coffee │ ├── resources │ │ ├── galleries.coffee │ │ ├── board.coffee │ │ ├── categories.coffee │ │ ├── users.coffee │ │ └── articles.coffee │ ├── directives.coffee │ ├── directives │ │ ├── _ngBindHtmlUnsafe.coffee │ │ ├── ckeditor.coffee │ │ ├── myDatepicker.coffee │ │ ├── oDataPager.coffee │ │ ├── epicEditor.coffee │ │ └── activeLink.coffee │ ├── services │ │ ├── tip.coffee │ │ ├── context.coffee │ │ ├── version.coffee │ │ ├── odataResource.js │ │ ├── messager.coffee │ │ └── security.coffee │ ├── untils │ │ ├── ajaxErrorHandler.coffee │ │ ├── promissLoading.coffee │ │ └── ajaxLoading.coffee │ ├── init.coffee │ └── filters.coffee │ ├── img │ ├── up.png │ ├── logo.gif │ ├── zack.jpg │ ├── avatar.png │ ├── bg_sky.jpg │ ├── favicon.ico │ ├── upgrade.png │ ├── social │ │ ├── rss.png │ │ └── github.png │ ├── works │ │ ├── 318.png │ │ ├── api.png │ │ ├── dxyw.png │ │ └── xfj.png │ ├── main_bg_image.jpg │ ├── loading_animation.gif │ └── main_bg_grid_tile.png │ ├── app │ ├── dialogs │ │ ├── dialogs.coffee │ │ └── version-upgrade │ │ │ ├── version-upgrade-dialog.coffee │ │ │ └── version-upgrade-dialog.tpl.html │ ├── article │ │ ├── article.coffee │ │ ├── list │ │ │ └── article-list.coffee │ │ └── edit │ │ │ └── article-edit.less │ ├── gallery │ │ ├── gallery.coffee │ │ └── list │ │ │ ├── gallery-list.coffee │ │ │ └── gallery-list.tpl.html │ ├── system │ │ ├── 401 │ │ │ ├── index.coffee │ │ │ └── index.tpl.html │ │ ├── 404 │ │ │ └── index.coffee │ │ ├── user │ │ │ ├── user.css │ │ │ ├── user-edit-dialog.coffee │ │ │ └── user.coffee │ │ ├── system.coffee │ │ └── history │ │ │ ├── history.coffee │ │ │ └── history.tpl.html │ ├── _framework │ │ ├── framework.coffee │ │ ├── framework-LoginCtrl.coffee │ │ └── framework-MainCtrl.coffee │ ├── dashboard │ │ ├── dashboard.coffee │ │ └── dashboard.tpl.html │ ├── category │ │ ├── category-edit-dialog.coffee │ │ └── category.coffee │ ├── style.css │ └── app.coffee │ ├── robots.txt │ ├── plugin │ ├── ckeditor_4.4.5 │ │ ├── plugins │ │ │ ├── icons.png │ │ │ ├── icons_hidpi.png │ │ │ ├── link │ │ │ │ ├── images │ │ │ │ │ ├── anchor.png │ │ │ │ │ └── hidpi │ │ │ │ │ │ └── anchor.png │ │ │ │ └── dialogs │ │ │ │ │ └── anchor.js │ │ │ ├── smiley │ │ │ │ └── images │ │ │ │ │ ├── heart.gif │ │ │ │ │ ├── heart.png │ │ │ │ │ ├── kiss.gif │ │ │ │ │ ├── kiss.png │ │ │ │ │ ├── cry_smile.gif │ │ │ │ │ ├── cry_smile.png │ │ │ │ │ ├── envelope.gif │ │ │ │ │ ├── envelope.png │ │ │ │ │ ├── lightbulb.gif │ │ │ │ │ ├── lightbulb.png │ │ │ │ │ ├── omg_smile.gif │ │ │ │ │ ├── omg_smile.png │ │ │ │ │ ├── sad_smile.gif │ │ │ │ │ ├── sad_smile.png │ │ │ │ │ ├── thumbs_up.gif │ │ │ │ │ ├── thumbs_up.png │ │ │ │ │ ├── wink_smile.gif │ │ │ │ │ ├── wink_smile.png │ │ │ │ │ ├── angel_smile.gif │ │ │ │ │ ├── angel_smile.png │ │ │ │ │ ├── angry_smile.gif │ │ │ │ │ ├── angry_smile.png │ │ │ │ │ ├── broken_heart.gif │ │ │ │ │ ├── broken_heart.png │ │ │ │ │ ├── devil_smile.gif │ │ │ │ │ ├── devil_smile.png │ │ │ │ │ ├── shades_smile.gif │ │ │ │ │ ├── shades_smile.png │ │ │ │ │ ├── teeth_smile.gif │ │ │ │ │ ├── teeth_smile.png │ │ │ │ │ ├── thumbs_down.gif │ │ │ │ │ ├── thumbs_down.png │ │ │ │ │ ├── tongue_smile.gif │ │ │ │ │ ├── tongue_smile.png │ │ │ │ │ ├── tounge_smile.gif │ │ │ │ │ ├── confused_smile.gif │ │ │ │ │ ├── confused_smile.png │ │ │ │ │ ├── regular_smile.gif │ │ │ │ │ ├── regular_smile.png │ │ │ │ │ ├── embaressed_smile.gif │ │ │ │ │ ├── embarrassed_smile.gif │ │ │ │ │ ├── embarrassed_smile.png │ │ │ │ │ ├── whatchutalkingabout_smile.gif │ │ │ │ │ └── whatchutalkingabout_smile.png │ │ │ ├── image │ │ │ │ └── images │ │ │ │ │ └── noimage.png │ │ │ ├── magicline │ │ │ │ └── images │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── icon-rtl.png │ │ │ │ │ └── hidpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── icon-rtl.png │ │ │ ├── flash │ │ │ │ └── images │ │ │ │ │ └── placeholder.png │ │ │ ├── forms │ │ │ │ └── images │ │ │ │ │ └── hiddenfield.gif │ │ │ ├── iframe │ │ │ │ └── images │ │ │ │ │ └── placeholder.png │ │ │ ├── pagebreak │ │ │ │ └── images │ │ │ │ │ └── pagebreak.gif │ │ │ ├── showblocks │ │ │ │ └── images │ │ │ │ │ ├── block_h1.png │ │ │ │ │ ├── block_h2.png │ │ │ │ │ ├── block_h3.png │ │ │ │ │ ├── block_h4.png │ │ │ │ │ ├── block_h5.png │ │ │ │ │ ├── block_h6.png │ │ │ │ │ ├── block_p.png │ │ │ │ │ ├── block_div.png │ │ │ │ │ ├── block_pre.png │ │ │ │ │ ├── block_address.png │ │ │ │ │ └── block_blockquote.png │ │ │ ├── templates │ │ │ │ └── templates │ │ │ │ │ ├── images │ │ │ │ │ ├── template1.gif │ │ │ │ │ ├── template2.gif │ │ │ │ │ └── template3.gif │ │ │ │ │ └── default.js │ │ │ ├── dialog │ │ │ │ └── dialogDefinition.js │ │ │ ├── preview │ │ │ │ └── preview.html │ │ │ ├── specialchar │ │ │ │ └── dialogs │ │ │ │ │ └── lang │ │ │ │ │ └── _translationstatus.txt │ │ │ ├── wsc │ │ │ │ ├── README.md │ │ │ │ ├── LICENSE.md │ │ │ │ └── dialogs │ │ │ │ │ └── wsc.css │ │ │ └── scayt │ │ │ │ ├── README.md │ │ │ │ ├── LICENSE.md │ │ │ │ └── dialogs │ │ │ │ └── toolbar.css │ │ ├── skins │ │ │ └── bootstrapck │ │ │ │ ├── icons.png │ │ │ │ ├── icons_hidpi.png │ │ │ │ ├── images │ │ │ │ ├── lock.png │ │ │ │ ├── arrow.png │ │ │ │ ├── close.png │ │ │ │ ├── refresh.png │ │ │ │ ├── lock-open.png │ │ │ │ └── hidpi │ │ │ │ │ ├── close.png │ │ │ │ │ ├── lock.png │ │ │ │ │ ├── refresh.png │ │ │ │ │ └── lock-open.png │ │ │ │ ├── scss │ │ │ │ ├── config │ │ │ │ │ ├── _config.scss │ │ │ │ │ └── _defaults.scss │ │ │ │ ├── browser-specific │ │ │ │ │ ├── iequirks │ │ │ │ │ │ └── dialog_iequirks.scss │ │ │ │ │ ├── gecko │ │ │ │ │ │ └── editor_gecko.scss │ │ │ │ │ ├── ie8 │ │ │ │ │ │ ├── editor_ie8.scss │ │ │ │ │ │ └── dialog_ie8.scss │ │ │ │ │ └── opera │ │ │ │ │ │ └── dialog_opera.scss │ │ │ │ └── components │ │ │ │ │ └── _presets.scss │ │ │ │ ├── sample │ │ │ │ ├── css │ │ │ │ │ └── bootstrapck-sample.css │ │ │ │ └── js │ │ │ │ │ └── analytics.js │ │ │ │ └── readme.md │ │ ├── config.js │ │ └── README.md │ └── EpicEditor-v0.2.2 │ │ └── themes │ │ └── editor │ │ ├── epic-light.css │ │ └── epic-dark.css │ └── data │ └── version.txt ├── lite ├── .gitigonre ├── views │ └── index.html ├── package.json └── index.js ├── react-native ├── .watchmanconfig ├── android │ ├── settings.gradle │ ├── app │ │ └── src │ │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ └── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ ├── app │ │ │ └── MainActivity.java │ │ │ └── cms │ │ │ └── MainActivity.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── build.gradle │ └── gradle.properties ├── src │ ├── config.js │ ├── app │ │ ├── post │ │ │ ├── containers │ │ │ │ ├── List.styles.js │ │ │ │ ├── Detail.styles.js │ │ │ │ └── Detail.js │ │ │ ├── components │ │ │ │ ├── ListItem.styles.js │ │ │ │ ├── ListItem.js │ │ │ │ ├── Title.styles.js │ │ │ │ └── Title.js │ │ │ └── redux │ │ │ │ ├── posts.js │ │ │ │ └── post.js │ │ ├── reducers.js │ │ ├── layout │ │ │ ├── Header.styles.js │ │ │ └── Header.js │ │ ├── routes.js │ │ └── home │ │ │ └── containers │ │ │ └── Home.js │ └── index.js ├── package.json ├── index.ios.js ├── .gitignore ├── ios │ ├── App │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ └── Info.plist │ ├── CMS │ │ ├── AppDelegate.h │ │ ├── main.m │ │ └── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppTests │ │ └── Info.plist │ └── CMSTests │ │ └── Info.plist └── patch.js ├── server ├── static │ └── upload │ │ ├── gallery │ │ └── README.md │ │ └── temp │ │ └── README.md ├── bootstrap │ └── init-data │ │ ├── common │ │ ├── log.json │ │ └── tag.json │ │ ├── system │ │ └── user.json │ │ ├── board │ │ └── board.json │ │ ├── article │ │ ├── category.json │ │ └── article.json │ │ ├── index.coffee │ │ └── photo │ │ └── gallery.json ├── resources │ ├── auth.coffee │ ├── article │ │ ├── comment.coffee │ │ └── category.coffee │ ├── board │ │ └── board.coffee │ ├── gallery │ │ └── gallery.coffee │ └── system │ │ └── user.coffee ├── index.js ├── models │ ├── article │ │ ├── tag.coffee │ │ ├── category.coffee │ │ ├── comment.coffee │ │ └── article.coffee │ ├── board │ │ └── board.coffee │ ├── gallery │ │ └── gallery.coffee │ ├── system │ │ └── user.coffee │ └── index.coffee ├── _migrations │ ├── 001-test.js │ └── readme.md ├── middleware │ ├── authorization.coffee │ └── domainError.coffee ├── server.coffee └── functions │ ├── upload.coffee │ └── login.coffee ├── .gitignore ├── data-migration-tool ├── models │ ├── common │ │ ├── log.coffee │ │ └── tag.coffee │ ├── article │ │ ├── category.coffee │ │ └── article.coffee │ ├── gallery │ │ └── gallery.coffee │ ├── board │ │ └── board.coffee │ └── system │ │ └── user.coffee ├── bootstrap │ └── registerModels.coffee ├── package.json ├── run.js ├── util │ └── requires.coffee ├── import-board.coffee ├── import-user.coffee └── import-photo.coffee ├── .travis.yml ├── chrome-extension ├── icon.png ├── loading_animation.gif ├── popup.js ├── popup.css ├── manifest.json ├── content_css.css ├── background.js ├── popup.html └── content_script.js ├── todo-list.md ├── config ├── config.dev.js └── config.prd.js ├── bower.json └── package.json /client/public/app/about/about.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lite/.gitigonre: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /react-native/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /server/static/upload/gallery/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/static/upload/temp/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /server/bootstrap/init-data/common/log.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data-migration-tool/models/common/log.coffee: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/admin/common/templates.coffee: -------------------------------------------------------------------------------- 1 | angular.module('admin-templates',[]) -------------------------------------------------------------------------------- /client/public/common/templates.coffee: -------------------------------------------------------------------------------- 1 | angular.module('public-templates',[]) -------------------------------------------------------------------------------- /server/resources/auth.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | admin: (req) -> !!req.user 3 | -------------------------------------------------------------------------------- /client/public/app/gallery/list/gallery-list.css: -------------------------------------------------------------------------------- 1 | .gallery-list ul li:hover{opacity: 0.8} -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | require("coffee-script").register() 2 | require("./server.coffee") 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.12" 5 | 6 | script: make 7 | -------------------------------------------------------------------------------- /client/public/vendor/unify_1.3/theme/red/reset.css: -------------------------------------------------------------------------------- 1 | .blog > p a { 2 | color: #E74C3C; 3 | } -------------------------------------------------------------------------------- /react-native/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'CMS' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /client/admin/img/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/up.png -------------------------------------------------------------------------------- /client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # robots.txt for http://www.woshinidezhu.com 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /client/public/vendor/unify_1.3/theme/default/reset.css: -------------------------------------------------------------------------------- 1 | .blog > p a { 2 | color: #72c02c; 3 | } -------------------------------------------------------------------------------- /server/models/article/tag.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | name: String 3 | collections: [] 4 | -------------------------------------------------------------------------------- /chrome-extension/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/chrome-extension/icon.png -------------------------------------------------------------------------------- /client/admin/img/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/logo.gif -------------------------------------------------------------------------------- /client/admin/img/zack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/zack.jpg -------------------------------------------------------------------------------- /client/public/app/article/list/article-list.css: -------------------------------------------------------------------------------- 1 | /* 搜索高亮 */ 2 | .ui-match { background: #FF9632; } 3 | -------------------------------------------------------------------------------- /client/public/img/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/up.png -------------------------------------------------------------------------------- /client/public/img/zack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/zack.jpg -------------------------------------------------------------------------------- /client/admin/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/avatar.png -------------------------------------------------------------------------------- /client/admin/img/bg_sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/bg_sky.jpg -------------------------------------------------------------------------------- /client/admin/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/favicon.ico -------------------------------------------------------------------------------- /client/admin/img/upgrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/upgrade.png -------------------------------------------------------------------------------- /client/public/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/avatar.png -------------------------------------------------------------------------------- /client/public/img/bg_sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/bg_sky.jpg -------------------------------------------------------------------------------- /react-native/src/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apiRoot: 'http://api.zackyang.com/oData', 3 | }; 4 | -------------------------------------------------------------------------------- /client/admin/app/dialogs/dialogs.coffee: -------------------------------------------------------------------------------- 1 | angular.module("dialogs", 2 | [ 3 | "version-upgrade-dialog" 4 | ]) 5 | -------------------------------------------------------------------------------- /client/admin/img/social/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/social/rss.png -------------------------------------------------------------------------------- /client/admin/img/works/318.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/works/318.png -------------------------------------------------------------------------------- /client/admin/img/works/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/works/api.png -------------------------------------------------------------------------------- /client/admin/img/works/dxyw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/works/dxyw.png -------------------------------------------------------------------------------- /client/admin/img/works/xfj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/works/xfj.png -------------------------------------------------------------------------------- /client/admin/robots.txt: -------------------------------------------------------------------------------- 1 | # robots.txt for http://admin.woshinidezhu.com 2 | 3 | User-agent: * 4 | Disallow: * 5 | -------------------------------------------------------------------------------- /client/public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/favicon.png -------------------------------------------------------------------------------- /client/public/img/upgrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/upgrade.png -------------------------------------------------------------------------------- /client/public/img/works/318.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/works/318.png -------------------------------------------------------------------------------- /client/public/img/works/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/works/api.png -------------------------------------------------------------------------------- /client/public/img/works/xfj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/works/xfj.png -------------------------------------------------------------------------------- /client/admin/app/article/article.coffee: -------------------------------------------------------------------------------- 1 | angular.module('article' 2 | ['article-edit' 3 | 'article-list' 4 | ]) 5 | -------------------------------------------------------------------------------- /client/admin/app/gallery/gallery.coffee: -------------------------------------------------------------------------------- 1 | angular.module('gallery' 2 | ['gallery-edit' 3 | 'gallery-list' 4 | ]) 5 | -------------------------------------------------------------------------------- /client/public/img/social/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/social/rss.png -------------------------------------------------------------------------------- /client/public/img/works/dxyw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/works/dxyw.png -------------------------------------------------------------------------------- /client/admin/img/main_bg_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/main_bg_image.jpg -------------------------------------------------------------------------------- /client/admin/img/social/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/social/github.png -------------------------------------------------------------------------------- /client/public/img/main_bg_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/main_bg_image.jpg -------------------------------------------------------------------------------- /client/public/img/overlay-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/overlay-icon.png -------------------------------------------------------------------------------- /client/public/img/social/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/social/github.png -------------------------------------------------------------------------------- /lite/views/index.html: -------------------------------------------------------------------------------- 1 | {{#each this}} 2 |
3 | {{title}} {{date}} 4 |
5 | {{/each}} 6 | -------------------------------------------------------------------------------- /chrome-extension/loading_animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/chrome-extension/loading_animation.gif -------------------------------------------------------------------------------- /client/admin/img/loading_animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/loading_animation.gif -------------------------------------------------------------------------------- /client/admin/img/main_bg_grid_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/img/main_bg_grid_tile.png -------------------------------------------------------------------------------- /client/public/img/main_bg_grid_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/img/main_bg_grid_tile.png -------------------------------------------------------------------------------- /client/public/vendor/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/vendor/fancybox/blank.gif -------------------------------------------------------------------------------- /client/admin/common/untils.coffee: -------------------------------------------------------------------------------- 1 | angular.module "zy.untils", 2 | [ 3 | 'zy.untils.ajaxLoading' 4 | 'zy.untils.ajaxErrorHandler' 5 | ] -------------------------------------------------------------------------------- /client/public/common/untils.coffee: -------------------------------------------------------------------------------- 1 | angular.module "zy.untils", 2 | [ 3 | 'zy.untils.ajaxLoading' 4 | 'zy.untils.ajaxErrorHandler' 5 | ] -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | App 3 | 4 | -------------------------------------------------------------------------------- /client/admin/app/system/user/user.css: -------------------------------------------------------------------------------- 1 | .user-page .memberdiv { 2 | margin: 5px; 3 | } 4 | .user-page .btn-minier { 5 | top: 1px; 6 | } 7 | -------------------------------------------------------------------------------- /react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CMS", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "cuz-native": "0.0.4" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /server/_migrations/001-test.js: -------------------------------------------------------------------------------- 1 | exports.up = function(next){ 2 | next(); 3 | }; 4 | 5 | exports.down = function(next){ 6 | next(); 7 | }; 8 | -------------------------------------------------------------------------------- /client/admin/app/system/system.coffee: -------------------------------------------------------------------------------- 1 | angular.module('system', 2 | ['system-user' 3 | 'system-history' 4 | 'system-401' 5 | 'system-404' 6 | ]) 7 | -------------------------------------------------------------------------------- /client/public/vendor/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/vendor/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /client/public/vendor/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/vendor/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /client/public/vendor/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/vendor/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/icons.png -------------------------------------------------------------------------------- /client/public/vendor/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/vendor/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /client/public/vendor/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/public/vendor/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/icons_hidpi.png -------------------------------------------------------------------------------- /client/admin/app/_framework/framework.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers", 2 | [ 3 | "framework.controllers.main" 4 | "framework.controllers.login" 5 | ]) 6 | -------------------------------------------------------------------------------- /react-native/index.ios.js: -------------------------------------------------------------------------------- 1 | import React, { AppRegistry } from 'react-native'; 2 | import Root from './src/index'; 3 | 4 | AppRegistry.registerComponent('App', Root); 5 | -------------------------------------------------------------------------------- /server/models/board/board.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | author: 3 | name: String 4 | email: String 5 | content: String 6 | date: Date 7 | block: Boolean 8 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/icons.png -------------------------------------------------------------------------------- /data-migration-tool/bootstrap/registerModels.coffee: -------------------------------------------------------------------------------- 1 | requires = require("../util/requires") 2 | appPath = process.cwd() 3 | module.exports = -> 4 | requires appPath + "/models" -------------------------------------------------------------------------------- /server/bootstrap/init-data/system/user.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Administrator", 4 | "loginName": "admin", 5 | "password": "123", 6 | "email": null 7 | } 8 | ] -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/link/images/anchor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/link/images/anchor.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/heart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/heart.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/heart.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/kiss.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/kiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/kiss.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/image/images/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/image/images/noimage.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/icon.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/icons_hidpi.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/lock.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /server/models/article/category.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | url: String 3 | name: Object 4 | description: String 5 | main: Boolean 6 | order: Number 7 | disable: Boolean 8 | -------------------------------------------------------------------------------- /server/models/article/comment.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | author: 3 | name: String 4 | email: String 5 | content: String 6 | date: Date 7 | articleId: String 8 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/flash/images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/flash/images/placeholder.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/forms/images/hiddenfield.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/forms/images/hiddenfield.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/link/images/hidpi/anchor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/link/images/hidpi/anchor.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/cry_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/cry_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/cry_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/cry_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/envelope.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/envelope.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/envelope.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/lightbulb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/lightbulb.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/lightbulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/lightbulb.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/omg_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/omg_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/omg_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/omg_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/sad_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/sad_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/sad_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/sad_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_up.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_up.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/wink_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/wink_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/wink_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/wink_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/arrow.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/close.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/refresh.png -------------------------------------------------------------------------------- /client/public/app/_framework/framework.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers", 2 | ["framework.controllers.main" 3 | "framework.controllers.head" 4 | "framework.controllers.top" 5 | ]) -------------------------------------------------------------------------------- /client/public/common/directives.coffee: -------------------------------------------------------------------------------- 1 | angular.module "zy.directives", 2 | [ 3 | 'zy.directives.odataPager' 4 | 'zy.directives.ngBindHtmlUnsafe' 5 | 'zy.directives.fancybox' 6 | ] 7 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/iframe/images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/iframe/images/placeholder.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/icon-rtl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/icon-rtl.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/pagebreak/images/pagebreak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/pagebreak/images/pagebreak.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h1.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h2.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h3.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h4.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h5.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_h6.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_p.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angel_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angel_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angel_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angel_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angry_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angry_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angry_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/angry_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/broken_heart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/broken_heart.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/broken_heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/broken_heart.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/devil_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/devil_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/devil_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/devil_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/shades_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/shades_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/shades_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/shades_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/teeth_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/teeth_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/teeth_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/teeth_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_down.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/thumbs_down.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/tongue_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/tongue_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/tongue_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/tongue_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/tounge_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/tounge_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/lock-open.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/hidpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/hidpi/icon.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_div.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_div.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_pre.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/confused_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/confused_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/confused_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/confused_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/regular_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/regular_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/regular_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/regular_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/close.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/lock.png -------------------------------------------------------------------------------- /react-native/src/app/post/containers/List.styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | listView: { 5 | flex: 1, 6 | }, 7 | }); 8 | 9 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/hidpi/icon-rtl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/magicline/images/hidpi/icon-rtl.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_address.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/embaressed_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/embaressed_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/embarrassed_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/embarrassed_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/embarrassed_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/embarrassed_smile.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/refresh.png -------------------------------------------------------------------------------- /react-native/src/app/reducers.js: -------------------------------------------------------------------------------- 1 | import {default as posts} from './post/redux/posts'; 2 | import {default as post} from './post/redux/post'; 3 | 4 | export default { 5 | posts, 6 | post, 7 | }; 8 | 9 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_blockquote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/showblocks/images/block_blockquote.png -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/images/hidpi/lock-open.png -------------------------------------------------------------------------------- /server/_migrations/readme.md: -------------------------------------------------------------------------------- 1 | ## Creating Migrations 2 | 3 | node '../../node_modules/migrate/bin/migrate' add-something 4 | 5 | ##Running Migrations 6 | 7 | node '../../node_modules/migrate/bin/migrate' 8 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/images/template1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/images/template1.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/images/template2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/images/template2.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/images/template3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/images/template3.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/whatchutalkingabout_smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/whatchutalkingabout_smile.gif -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/whatchutalkingabout_smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zackyang000/CMS/HEAD/client/admin/plugin/ckeditor_4.4.5/plugins/smiley/images/whatchutalkingabout_smile.png -------------------------------------------------------------------------------- /client/public/app/article/Common/article-sider-lastest-comments.coffee: -------------------------------------------------------------------------------- 1 | angular.module("article-sider-comments", []) 2 | 3 | .controller('article-sider-comments', 4 | ['$scope', 'Comments', ($scope, Comments) -> 5 | 6 | ]) 7 | -------------------------------------------------------------------------------- /client/public/app/article/Common/article-sider.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | -------------------------------------------------------------------------------- /client/public/app/article/detail/article-detail.css: -------------------------------------------------------------------------------- 1 | .article-content{ 2 | font-family: Georgia,"Times New Roman",Times,serif; 3 | font-size: 14px; 4 | line-height: 1.467em; 5 | -webkit-font-smoothing: auto; 6 | } 7 | -------------------------------------------------------------------------------- /data-migration-tool/models/common/tag.coffee: -------------------------------------------------------------------------------- 1 | mongoose = require("mongoose") 2 | Schema = mongoose.Schema 3 | 4 | TagSchema = new Schema( 5 | name: String 6 | collections: {} 7 | ) 8 | 9 | mongoose.model "Tag", TagSchema -------------------------------------------------------------------------------- /server/models/gallery/gallery.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | url: String 3 | name: Object 4 | description: Object 5 | cover: String 6 | hidden: Boolean 7 | date: Date 8 | order: Number 9 | photos : [] 10 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/dialog/dialogDefinition.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | -------------------------------------------------------------------------------- /client/public/common/services.coffee: -------------------------------------------------------------------------------- 1 | angular.module "zy.services", 2 | [ 3 | 'zy.services.messager' 4 | 'zy.services.progress' 5 | 'zy.services.security' 6 | 'zy.services.context' 7 | 'zy.services.odataResource' 8 | ] 9 | -------------------------------------------------------------------------------- /lite/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "4.13.3", 4 | "consolidate": "0.13.1", 5 | "handlebars": "3.0.3", 6 | "request": "2.60.0" 7 | }, 8 | "devDependencies": { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /client/public/vendor/fancybox/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Denote all files that are truly binary and should not be modified. 5 | *.png binary 6 | *.jpg binary 7 | *.gif binary -------------------------------------------------------------------------------- /client/admin/common/services.coffee: -------------------------------------------------------------------------------- 1 | angular.module "zy.services", 2 | [ 3 | 'zy.services.messager' 4 | 'zy.services.tip' 5 | 'zy.services.security' 6 | 'zy.services.context' 7 | 'zy.services.version' 8 | 'zy.services.odataResource' 9 | ] 10 | -------------------------------------------------------------------------------- /server/bootstrap/init-data/board/board.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "author": { 4 | "name": "Zack", 5 | "email": "zackyang@outlook.com" 6 | }, 7 | "content": "This is content of this message.", 8 | "date": "2014-01-03" 9 | } 10 | ] -------------------------------------------------------------------------------- /react-native/src/app/post/components/ListItem.styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | separator: { 5 | flex: 1, 6 | height: 1, 7 | backgroundColor: '#f5f5f5', 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /react-native/src/index.js: -------------------------------------------------------------------------------- 1 | import cuz from 'cuz-native'; 2 | import config from './config'; 3 | import reducers from './app/reducers'; 4 | import routes from './app/routes'; 5 | 6 | export default function() { 7 | return cuz(reducers, routes, config); 8 | } 9 | -------------------------------------------------------------------------------- /server/models/system/user.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | name: String 3 | loginName: String 4 | password: 5 | type: String 6 | select: false 7 | email: String 8 | token: 9 | type: String 10 | select: false 11 | disabled: Boolean 12 | -------------------------------------------------------------------------------- /client/public/app/article/archives/article-archives.css: -------------------------------------------------------------------------------- 1 | #archives .archive-title { 2 | background: #72c02c; 3 | font-size: 14px; 4 | } 5 | 6 | #archives ul { 7 | margin-left: 10px; 8 | } 9 | 10 | #archives > ul > li{ 11 | margin-top: 15px; 12 | } 13 | -------------------------------------------------------------------------------- /client/public/app/article/Common/article-sider-search.coffee: -------------------------------------------------------------------------------- 1 | angular.module("article-sider-search", []) 2 | 3 | .controller('article-sider-search', 4 | ['$scope', '$location', ($scope, $location) -> 5 | $scope.search = -> 6 | $location.path("/search/#{$scope.key}") 7 | ]) 8 | -------------------------------------------------------------------------------- /data-migration-tool/models/article/category.coffee: -------------------------------------------------------------------------------- 1 | mongoose = require("mongoose") 2 | Schema = mongoose.Schema 3 | 4 | CategorySchema = new Schema( 5 | name: String 6 | description: String 7 | main: Boolean 8 | ) 9 | 10 | mongoose.model "Category", CategorySchema -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /client/admin/app/system/404/index.coffee: -------------------------------------------------------------------------------- 1 | angular.module('system-404',['ngRoute']) 2 | 3 | .config(["$routeProvider", 4 | ($routeProvider) -> 5 | $routeProvider 6 | .when("/404", 7 | templateUrl: "/app/system/404/index.tpl.html" 8 | controller: ->) 9 | ]) -------------------------------------------------------------------------------- /client/admin/plugin/EpicEditor-v0.2.2/themes/editor/epic-light.css: -------------------------------------------------------------------------------- 1 | html { padding:10px; } 2 | 3 | body { 4 | border:0; 5 | background:#fcfcfc; 6 | font-family:monospace; 7 | font-size:14px; 8 | padding:10px; 9 | line-height:1.35em; 10 | margin:0; 11 | padding:0; 12 | } 13 | -------------------------------------------------------------------------------- /client/public/app/_framework/framework-MainCtrl.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers.main",[]) 2 | 3 | .controller('MainCtrl', 4 | ["$scope", "$rootScope","$http","$location",'$window' ,"context","security" 5 | ($scope, $rootScope,$http,$location,$window,context,security) -> 6 | 7 | ]) 8 | -------------------------------------------------------------------------------- /server/bootstrap/init-data/article/category.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": { 4 | "zh-cn": "默认", 5 | "en-us": "Default" 6 | }, 7 | "url": "default", 8 | "description": "This is a default category.", 9 | "main": true, 10 | "disable": false 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /client/admin/app/system/401/index.coffee: -------------------------------------------------------------------------------- 1 | angular.module('system-401',['ngRoute']) 2 | 3 | .config(["$routeProvider", 4 | ($routeProvider) -> 5 | $routeProvider 6 | .when("/401", 7 | templateUrl: "/app/system/401/index.tpl.html" 8 | controller: ->) 9 | ]) 10 | -------------------------------------------------------------------------------- /client/admin/common/resources/galleries.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.galleries", ["ngResource"]) 2 | .factory "Galleries", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/gallery", 4 | list: 5 | method: "GET" 6 | params: 7 | $orderby: 'date desc' 8 | ] 9 | -------------------------------------------------------------------------------- /client/public/common/resources/galleries.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.galleries", ["ngResource"]) 2 | .factory "Galleries", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/gallery", 4 | list: 5 | method: "GET" 6 | params: 7 | $orderby: 'date desc' 8 | ] 9 | -------------------------------------------------------------------------------- /chrome-extension/popup.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function () { 2 | var data = chrome.extension.getBackgroundPage().data; 3 | $("#message").hide(); 4 | $("#content-title").text(data.title); 5 | $("#content-content").text(data.content); 6 | $("#content-url").text(data.url); 7 | }); 8 | -------------------------------------------------------------------------------- /server/resources/article/comment.coffee: -------------------------------------------------------------------------------- 1 | Resource = require('node-odata').Resource 2 | model = require('../../models') 3 | auth = require('../auth') 4 | 5 | module.exports = Resource('comment', model.comment) 6 | .orderBy('date desc') 7 | .put() 8 | .auth(auth.admin) 9 | .delete() 10 | .auth(auth.admin) 11 | -------------------------------------------------------------------------------- /server/resources/board/board.coffee: -------------------------------------------------------------------------------- 1 | Resource = require('node-odata').Resource 2 | model = require('../../models') 3 | auth = require('../auth') 4 | 5 | module.exports = Resource('board', model.board) 6 | .orderBy('date desc') 7 | .put() 8 | .auth(auth.admin) 9 | .delete() 10 | .auth(auth.admin) 11 | 12 | -------------------------------------------------------------------------------- /client/admin/plugin/EpicEditor-v0.2.2/themes/editor/epic-dark.css: -------------------------------------------------------------------------------- 1 | html { padding:10px; } 2 | 3 | body { 4 | border:0; 5 | background:rgb(41,41,41); 6 | font-family:monospace; 7 | font-size:14px; 8 | padding:10px; 9 | color:#ddd; 10 | line-height:1.35em; 11 | margin:0; 12 | padding:0; 13 | } 14 | -------------------------------------------------------------------------------- /client/admin/common/directives.coffee: -------------------------------------------------------------------------------- 1 | angular.module "zy.directives", 2 | [ 3 | 'zy.directives.dropzone' 4 | 'zy.directives.odataPager' 5 | 'zy.directives.datepicker' 6 | 'zy.directives.ckEditor' 7 | 'zy.directives.epicEditor' 8 | 'zy.directives.activeLink' 9 | 'zy.directives.ngBindHtmlUnsafe' 10 | ] 11 | -------------------------------------------------------------------------------- /data-migration-tool/models/gallery/gallery.coffee: -------------------------------------------------------------------------------- 1 | mongoose = require("mongoose") 2 | Schema = mongoose.Schema 3 | 4 | GallerySchema = new Schema( 5 | name: String 6 | description: String 7 | cover: String 8 | hidden: Boolean 9 | date: Date 10 | photos : [] 11 | ) 12 | 13 | mongoose.model "Gallery", GallerySchema -------------------------------------------------------------------------------- /server/bootstrap/init-data/common/tag.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Tag1", 4 | "collections": { 5 | "key": "test-article", 6 | "type": "Article" 7 | } 8 | }, 9 | { 10 | "name": "Tag2", 11 | "collections": { 12 | "key": "test-article", 13 | "type": "Article" 14 | } 15 | } 16 | ] -------------------------------------------------------------------------------- /server/models/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | article: require('./article/article') 3 | comment: require('./article/comment') 4 | category: require('./article/category') 5 | board: require('./board/board') 6 | tag: require('./article/tag') 7 | gallery: require('./gallery/gallery') 8 | user: require('./system/user') 9 | -------------------------------------------------------------------------------- /client/public/common/services/messager.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.messager", []) 2 | 3 | .factory "messager", -> 4 | success : (msg) -> 5 | alert(msg) 6 | 7 | error : (msg) -> 8 | alert(msg) 9 | 10 | confirm : (callback,msg) -> 11 | if confirm(msg || "Do you want to continue?") 12 | callback() 13 | -------------------------------------------------------------------------------- /client/admin/common/resources/board.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.board", ["ngResource"]) 2 | .factory "Board", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/board", 4 | list: 5 | method: "GET" 6 | params: 7 | $orderby: 'date desc' 8 | update: 9 | method: "PUT" 10 | ] 11 | -------------------------------------------------------------------------------- /client/public/common/resources/board.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.board", ["ngResource"]) 2 | .factory "Board", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/board", 4 | list: 5 | method: "GET" 6 | params: 7 | $orderby: 'date desc' 8 | update: 9 | method: "PUT" 10 | ] 11 | -------------------------------------------------------------------------------- /client/admin/common/directives/_ngBindHtmlUnsafe.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.ngBindHtmlUnsafe",[]) 2 | 3 | .directive "ngBindHtmlUnsafe", [-> 4 | (scope, element, attr) -> 5 | element.addClass("ng-binding").data "$binding", attr.ngBindHtmlUnsafe 6 | scope.$watch attr.ngBindHtmlUnsafe, (value) -> 7 | element.html value or "" 8 | ] -------------------------------------------------------------------------------- /client/public/common/directives/_ngBindHtmlUnsafe.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.ngBindHtmlUnsafe",[]) 2 | 3 | .directive "ngBindHtmlUnsafe", [-> 4 | (scope, element, attr) -> 5 | element.addClass("ng-binding").data "$binding", attr.ngBindHtmlUnsafe 6 | scope.$watch attr.ngBindHtmlUnsafe, (value) -> 7 | element.html value or "" 8 | ] -------------------------------------------------------------------------------- /client/public/app/article/article.css: -------------------------------------------------------------------------------- 1 | .blog blockquote, 2 | .blog blockquote p, 3 | .blog blockquote span{ 4 | font-size: 13px; 5 | } 6 | 7 | .blog > p h1, 8 | .blog > p h2 { 9 | font-size: 21px; 10 | } 11 | 12 | .blog > p h3 { 13 | color: #555; 14 | font-size: 19px; 15 | } 16 | 17 | .blog > p h4 { 18 | font-size: 17px; 19 | } -------------------------------------------------------------------------------- /data-migration-tool/models/board/board.coffee: -------------------------------------------------------------------------------- 1 | mongoose = require("mongoose") 2 | Schema = mongoose.Schema 3 | 4 | BoardSchema = new Schema( 5 | author: 6 | name: String 7 | email: String 8 | content: String 9 | date: 10 | type: Date 11 | default: Date.now 12 | block: Boolean 13 | ) 14 | 15 | mongoose.model "Board", BoardSchema -------------------------------------------------------------------------------- /server/resources/article/category.coffee: -------------------------------------------------------------------------------- 1 | Resource = require('node-odata').Resource 2 | model = require('../../models') 3 | auth = require('../auth') 4 | 5 | module.exports = Resource('category', model.category) 6 | .orderBy('date desc') 7 | .post() 8 | .auth(auth.admin) 9 | .put() 10 | .auth(auth.admin) 11 | .delete() 12 | .auth(auth.admin) 13 | -------------------------------------------------------------------------------- /client/public/app/about/about.coffee: -------------------------------------------------------------------------------- 1 | angular.module('about',[]) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/about", 6 | templateUrl: "/app/about/about.tpl.html" 7 | controller: 'AboutCtrl' 8 | title: 'About' 9 | ]) 10 | 11 | .controller('AboutCtrl', 12 | ["$scope", ($scope) -> 13 | 14 | ]) -------------------------------------------------------------------------------- /server/resources/gallery/gallery.coffee: -------------------------------------------------------------------------------- 1 | Resource = require('node-odata').Resource 2 | model = require('../../models') 3 | auth = require('../auth') 4 | 5 | module.exports = Resource('gallery', model.gallery) 6 | .orderBy('date desc') 7 | .post() 8 | .auth(auth.admin) 9 | .put() 10 | .auth(auth.admin) 11 | .delete() 12 | .auth(auth.admin) 13 | 14 | -------------------------------------------------------------------------------- /server/middleware/authorization.coffee: -------------------------------------------------------------------------------- 1 | resources = require('node-odata').resources 2 | 3 | module.exports = (req, res, next) -> 4 | token = req.headers.authorization 5 | return next() unless token 6 | resources.user.findOne({token: token}).exec (err, user) -> 7 | if user && !user.disabled 8 | req.user = user 9 | next() 10 | 11 | -------------------------------------------------------------------------------- /react-native/src/app/post/containers/Detail.styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | contentView: { 5 | padding: 10, 6 | flex: 1, 7 | }, 8 | content: { 9 | }, 10 | p: { 11 | fontSize: 16, 12 | lineHeight: 23, 13 | padding: 0, 14 | margin: 0, 15 | }, 16 | }); 17 | 18 | -------------------------------------------------------------------------------- /client/admin/app/dashboard/dashboard.coffee: -------------------------------------------------------------------------------- 1 | angular.module('dashboard',[]) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/", 6 | templateUrl: "/app/dashboard/dashboard.tpl.html" 7 | controller: 'DashboardCtrl' 8 | ]) 9 | 10 | .controller('DashboardCtrl', 11 | ["$scope","$http", 12 | ($scope,$http) -> 13 | 14 | ]) -------------------------------------------------------------------------------- /client/admin/app/dialogs/version-upgrade/version-upgrade-dialog.coffee: -------------------------------------------------------------------------------- 1 | angular.module('version-upgrade-dialog',[]) 2 | 3 | .controller('VersionUpgradeDialogCtrl', 4 | ["$scope", '$location', ($scope, $location) -> 5 | $scope.more = -> 6 | $location.path '/system/history' 7 | $scope.close() 8 | 9 | $scope.close = -> 10 | $scope.closeThisDialog() 11 | ]) 12 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/preview/preview.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /data-migration-tool/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "data-migration-tool", 3 | "version": "0.0.1", 4 | "private": false, 5 | "author": "Zack ", 6 | "engines": { 7 | "node": "0.10.x", 8 | "npm": "1.4.ex" 9 | }, 10 | "dependencies": { 11 | "coffee-script": "*", 12 | "request": "*", 13 | "mongoose": "~3.8.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /client/admin/app/dashboard/dashboard.tpl.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
-------------------------------------------------------------------------------- /data-migration-tool/models/system/user.coffee: -------------------------------------------------------------------------------- 1 | mongoose = require("mongoose") 2 | Schema = mongoose.Schema 3 | 4 | UserSchema = new Schema( 5 | name: 6 | type: String 7 | unique: true 8 | loginName: 9 | type: String 10 | unique: true 11 | password: String 12 | email: String 13 | token: String 14 | disabled: Boolean 15 | ) 16 | 17 | mongoose.model("User", UserSchema) -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | * For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | CKEDITOR.editorConfig = function( config ) { 7 | // Define changes to default configuration here. For example: 8 | // config.language = 'fr'; 9 | // config.uiColor = '#AADC6E'; 10 | }; 11 | -------------------------------------------------------------------------------- /client/admin/common/resources/categories.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.categories", ["ngResource"]) 2 | .factory "Categories", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/category", 4 | list: 5 | method: "GET" 6 | main: 7 | url: "#{config.url.api}/category" 8 | cache: true 9 | method: "GET" 10 | params: 11 | $filter: 'main eq true' 12 | ] 13 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/config/_config.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | Config 3 | 4 | This file is exclusively intended for setting up imports 5 | Never add styles directly to this file 6 | ========================================================================== */ 7 | 8 | @import "colors"; 9 | @import "defaults"; 10 | -------------------------------------------------------------------------------- /client/public/common/resources/categories.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.categories", ["ngResource"]) 2 | .factory "Categories", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/category", 4 | list: 5 | method: "GET" 6 | main: 7 | url: "#{config.url.api}/category" 8 | cache: true 9 | method: "GET" 10 | params: 11 | $filter: 'main eq true' 12 | ] 13 | -------------------------------------------------------------------------------- /chrome-extension/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: 320px; 3 | } 4 | table { 5 | border-collapse:collapse; 6 | font-size: 0.85em; 7 | } 8 | table,td { 9 | border: 1px solid gray; 10 | } 11 | td{ 12 | padding: 4px; 13 | text-overflow:ellipsis; 14 | } 15 | td.item-name{ 16 | text-align: right; 17 | } 18 | .content-div{ 19 | width:220px; 20 | white-space:nowrap; 21 | overflow-x:hidden; 22 | text-overflow:ellipsis; 23 | } 24 | -------------------------------------------------------------------------------- /server/middleware/domainError.coffee: -------------------------------------------------------------------------------- 1 | domain = require("domain") 2 | module.exports = -> 3 | (req, res, next) -> 4 | d = domain.create() 5 | d.add req 6 | d.add res 7 | d._throwErrorCount = 0 8 | 9 | d.on "error", (err) -> 10 | d._throwErrorCount++ 11 | if (d._throwErrorCount > 1) 12 | return 13 | res.setHeader("Connection", "close") 14 | next err 15 | 16 | d.run next -------------------------------------------------------------------------------- /data-migration-tool/run.js: -------------------------------------------------------------------------------- 1 | require('coffee-script/register'); 2 | require("./bootstrap/registerModels")(); 3 | mongoose = require('mongoose') 4 | 5 | host = "http://www.woshinidezhu.com:80"; 6 | 7 | mongoose.connect("mongodb://127.0.0.1/cms-dev"); 8 | console.log("Loading data..."); 9 | require('./import-article')(host); 10 | require('./import-board')(host); 11 | require('./import-photo')(host); 12 | require('./import-user')(host); -------------------------------------------------------------------------------- /client/public/vendor/fancybox/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fancybox", 3 | "homepage": "https://github.com/fancyapps/fancyBox", 4 | "version": "2.1.5", 5 | "_release": "2.1.5", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v2.1.5", 9 | "commit": "18d171278d21ca59067aace6d52a1adeb6462219" 10 | }, 11 | "_source": "git://github.com/fancyapps/fancyBox.git", 12 | "_target": "~2.1.5", 13 | "_originalSource": "fancybox" 14 | } -------------------------------------------------------------------------------- /client/public/app/article/article.coffee: -------------------------------------------------------------------------------- 1 | angular.module('article', 2 | [ 3 | 'article-list' 4 | 'article-detail' 5 | 'article-archives' 6 | 'article-sider-search' 7 | 'article-sider-comments' 8 | ]) 9 | 10 | .filter "i18nCategory", ['dataCacheCategories', (dataCacheCategories) -> 11 | (url) -> 12 | return '' unless url 13 | 14 | for item in dataCacheCategories 15 | if item.url == url 16 | return item.name 17 | return '' 18 | ] 19 | -------------------------------------------------------------------------------- /client/admin/app/system/history/history.coffee: -------------------------------------------------------------------------------- 1 | angular.module('system-history',[]) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/system/history", 6 | templateUrl: "/app/system/history/history.tpl.html" 7 | controller: 'SystemHistoryCtrl' 8 | ]) 9 | 10 | .controller('SystemHistoryCtrl', 11 | ["$scope","$http",'version' 12 | ($scope,$http,version) -> 13 | version.get().then (data)-> 14 | $scope.versions=data 15 | ]) -------------------------------------------------------------------------------- /client/admin/common/resources/users.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.users", ["ngResource"]) 2 | .factory "Users", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/user", 4 | autoSignin: 5 | method: "POST" 6 | params: 7 | action:'auto-login' 8 | signin: 9 | method: "POST" 10 | params: 11 | action:'login' 12 | signout: 13 | method: "POST" 14 | params: 15 | action:'logout' 16 | ] 17 | -------------------------------------------------------------------------------- /client/public/common/resources/users.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.users", ["ngResource"]) 2 | .factory "Users", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/user", 4 | autoSignin: 5 | method: "POST" 6 | params: 7 | action:'auto-login' 8 | signin: 9 | method: "POST" 10 | params: 11 | action:'login' 12 | signout: 13 | method: "POST" 14 | params: 15 | action:'logout' 16 | ] 17 | -------------------------------------------------------------------------------- /client/admin/common/directives/ckeditor.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.ckEditor",[]) 2 | 3 | .directive('ckEditor', -> 4 | require: '?ngModel' 5 | link: (scope, elm, attr, ngModel)-> 6 | editor = CKEDITOR.instances[elm[0].name] 7 | ck = CKEDITOR.replace elm[0] 8 | unless ngModel then return 9 | ck.on 'pasteState', -> 10 | scope.$apply -> 11 | ngModel.$setViewValue ck.getData() 12 | ngModel.$render = (value) -> ck.setData ngModel.$viewValue 13 | ) -------------------------------------------------------------------------------- /chrome-extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Blog", 4 | "version": "0.0.1", 5 | "background": { 6 | "scripts": ["jquery-2.0.0.min.js", "background.js"], 7 | "persistent": false 8 | }, 9 | "page_action": { 10 | "default_icon": { 11 | "19": "icon.png", 12 | "38": "icon.png" 13 | }, 14 | //"default_popup": "popup.html", 15 | "default_title": "Blog" 16 | }, 17 | "permissions" : ["tabs","http://*/*","https://*/*", "storage"] 18 | } 19 | -------------------------------------------------------------------------------- /client/admin/common/resources/articles.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.articles", ["ngResource"]) 2 | .factory "Articles", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/article", 4 | list: 5 | method: "GET" 6 | params: 7 | $orderby: 'date desc' 8 | addComment: 9 | method: "POST" 10 | params: 11 | action: "add-comment" 12 | browsed: 13 | method: "POST" 14 | params: 15 | action: 'browsed' 16 | ] 17 | -------------------------------------------------------------------------------- /client/public/common/resources/articles.coffee: -------------------------------------------------------------------------------- 1 | angular.module("resource.articles", ["ngResource"]) 2 | .factory "Articles", ['odataResource', (odataResource) -> 3 | odataResource "#{config.url.api}/article", 4 | list: 5 | method: "GET" 6 | params: 7 | $orderby: 'date desc' 8 | addComment: 9 | method: "POST" 10 | params: 11 | action: "add-comment" 12 | browsed: 13 | method: "POST" 14 | params: 15 | action: 'browsed' 16 | ] 17 | -------------------------------------------------------------------------------- /react-native/src/app/layout/Header.styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | container: { 5 | paddingLeft: 10, 6 | paddingRight: 10, 7 | alignItems: 'center', 8 | flexDirection: 'row', 9 | justifyContent: 'space-between', 10 | height: 25, 11 | }, 12 | hasContent: { 13 | height: 55, 14 | borderBottomColor: '#ccc', 15 | borderBottomWidth: 1, 16 | paddingTop: 15, 17 | } 18 | }); 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /chrome-extension/content_css.css: -------------------------------------------------------------------------------- 1 | .backend_loadingbox { 2 | z-index: 1002; 3 | outline: 0px; 4 | position: fixed; 5 | height: 100px; 6 | line-height: 100px; 7 | width: 300px; 8 | margin-top: -50px; 9 | margin-left: -150px; 10 | left: 50%; 11 | top: 40%; 12 | background: url('http://10.16.75.10:8002/img/loading_animation.gif') 200px 0 no-repeat #8EBD40; 13 | color: #FFF; 14 | font-size: 20px; 15 | font-weight: lighter; 16 | padding-left: 50px; 17 | } -------------------------------------------------------------------------------- /client/public/common/directives/fancybox.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.fancybox",[]) 2 | 3 | .directive "fancybox", ($compile, $timeout) -> 4 | link: (scope, element, attrs) -> 5 | if scope.$last 6 | setTimeout -> 7 | $('.fancybox-button').fancybox 8 | groupAttr: 'data-rel' 9 | prevEffect: 'none' 10 | nextEffect: 'none' 11 | closeBtn: true 12 | helpers: 13 | title: 14 | type: 'over' 15 | , 0 16 | -------------------------------------------------------------------------------- /client/admin/common/services/tip.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.tip", []).provider "tip", -> 2 | @$get = ["$document", "$window", "$compile", "$rootScope" 3 | ($document, $window, $compile, $rootScope) -> 4 | $scope = $rootScope 5 | 6 | ( 7 | show : (tip) -> 8 | $scope.loadingTip = (tip || "Loading") + "..." 9 | hide : -> 10 | $scope.loadingTip = "" 11 | status : -> 12 | !!$scope.loadingTip 13 | ) 14 | ] 15 | return 16 | 17 | -------------------------------------------------------------------------------- /react-native/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | .idea 28 | .gradle 29 | local.properties 30 | 31 | # node.js 32 | # 33 | node_modules/ 34 | npm-debug.log 35 | -------------------------------------------------------------------------------- /todo-list.md: -------------------------------------------------------------------------------- 1 | #### public 2 | 3 | - 利用artile字段 status, password 4 | - 根据tags查询文章列表, 使用tag实体 5 | - 编辑category的时候应该把article所属category一并修改(需要调整node-data, 因为after中无法获取修改前的数据) 6 | - 最近浏览功能 7 | - hidden全改为disable, 所有集合增加disable/enable 8 | - 增加rainbow 9 | - 后台生成gravatar 10 | - 相册显示照片数量 11 | 12 | #### admin 13 | 14 | - 相册删除功能 15 | - user修改密码 16 | - user删除 17 | - 修改登陆token记录方式, 改为允许多个 token 存在. 18 | 19 | #### code 20 | - 调整init data 21 | - config 改为 $config 22 | - 调整 odata 代码 23 | - server 端代码不需 _dist 24 | -------------------------------------------------------------------------------- /react-native/src/app/routes.js: -------------------------------------------------------------------------------- 1 | import React from 'react-native'; 2 | import { Route } from 'cuz-native'; 3 | import Home from './home/containers/Home'; 4 | import PostList from './post/containers/List'; 5 | import PostDetail from './post/containers/Detail'; 6 | 7 | export default function() { 8 | return ( 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /client/public/app/_framework/framework-TopCtrl.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers.top", []) 2 | 3 | .controller('TopCtrl', 4 | ["$scope", "$http", "$location", '$window', "$translate", "context" 5 | ($scope, $http, $location, $window, $translate, context) -> 6 | $scope.use = $translate.use() 7 | 8 | $scope.changeLanguage = (langKey) -> 9 | $scope.use = langKey 10 | $translate.use(langKey) 11 | context.language = langKey 12 | 13 | $scope.login = -> 14 | $window.location.href='/admin/' 15 | ]) 16 | -------------------------------------------------------------------------------- /client/admin/common/services/context.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.context", []) 2 | .factory "context", ['$http','$localStorage',($http,$localStorage) -> 3 | _account = undefined 4 | 5 | obj = {} 6 | Object.defineProperty obj, "account", 7 | get: -> 8 | _account || $localStorage.account || {name: undefined, email: undefined, avatar: '/img/avatar.png'} 9 | set: (val) -> 10 | _account = val 11 | $localStorage.account = val 12 | 13 | obj.auth = 14 | admin : false 15 | 16 | return obj 17 | ] -------------------------------------------------------------------------------- /client/public/app/index/index.coffee: -------------------------------------------------------------------------------- 1 | angular.module('index',[]) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/index", 6 | templateUrl: "/app/index/index.tpl.html" 7 | controller: 'IndexCtrl' 8 | title: 'Home' 9 | ]) 10 | 11 | .controller('IndexCtrl', 12 | ["$scope","$http", ($scope,$http) -> 13 | $http.get("/data/words.js").success (data) -> 14 | $scope.$parent.word = data[Math.floor(Math.random() * data.length + 1)-1] 15 | Index.initLayerSlider() 16 | ]) 17 | -------------------------------------------------------------------------------- /client/public/common/services/context.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.context", []) 2 | .factory "context", ['$http','$localStorage',($http,$localStorage) -> 3 | _account = undefined 4 | 5 | obj = {} 6 | Object.defineProperty obj, "account", 7 | get: -> 8 | _account || $localStorage.account || {name: undefined, email: undefined, avatar: '/img/avatar.png'} 9 | set: (val) -> 10 | _account = val 11 | $localStorage.account = val 12 | 13 | obj.auth = 14 | admin : false 15 | 16 | return obj 17 | ] -------------------------------------------------------------------------------- /lite/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var cons = require('consolidate'); 3 | var request = require('request'); 4 | 5 | var app = express(); 6 | 7 | app.engine('html', cons.handlebars); 8 | 9 | app.set('view engine', 'html'); 10 | app.set('views', __dirname + '/views'); 11 | 12 | app.get('/', function(req, res){ 13 | request({ url: 'http://localhost:40002/article?$top=10&$select=title,date', json: true }, function(error, response, body) { 14 | res.render('index', body.value); 15 | }); 16 | }); 17 | 18 | app.listen(3000); 19 | -------------------------------------------------------------------------------- /react-native/ios/App/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /react-native/ios/CMS/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /server/models/article/article.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | url: String 3 | title: String 4 | content: String 5 | description: String 6 | category: String 7 | status: String 8 | password: String 9 | date: Date 10 | markdown: String 11 | editor: String 12 | meta: 13 | author: String 14 | views: Number 15 | comments: Number 16 | tags: [ String ] 17 | source: String 18 | thumbnail: String 19 | comments:[ 20 | author: 21 | name: String 22 | email: String 23 | content: String 24 | date: Date 25 | ] 26 | -------------------------------------------------------------------------------- /react-native/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /client/admin/common/untils/ajaxErrorHandler.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.untils.ajaxErrorHandler", []) 2 | 3 | .factory 'ajaxErrorHandler', ["$rootScope", "$q", "messager", ($rootScope, $q, messager) -> 4 | success = (response) -> 5 | response 6 | error = (response) -> 7 | messager.error response.data 8 | status.cancel() 9 | $q.reject(response) 10 | (promise) -> 11 | promise.then success, error 12 | ] 13 | 14 | .config(['$httpProvider', '$provide', ($httpProvider, $provide) -> 15 | $httpProvider.interceptors.push('ajaxErrorHandler') 16 | ]) 17 | -------------------------------------------------------------------------------- /client/public/common/untils/ajaxErrorHandler.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.untils.ajaxErrorHandler", []) 2 | 3 | .factory 'ajaxErrorHandler', ["$rootScope", "$q", "messager", ($rootScope, $q, messager) -> 4 | success = (response) -> 5 | response 6 | error = (response) -> 7 | messager.error response.data 8 | status.cancel() 9 | $q.reject(response) 10 | (promise) -> 11 | promise.then success, error 12 | ] 13 | 14 | .config(['$httpProvider', '$provide', ($httpProvider, $provide) -> 15 | $httpProvider.interceptors.push('ajaxErrorHandler') 16 | ]) 17 | -------------------------------------------------------------------------------- /client/public/app/article/Common/article-sider-search.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

{{'article.sider.search' | translate}}

3 |
4 | 5 |
6 | 7 | 8 | 11 | 12 |
13 | -------------------------------------------------------------------------------- /data-migration-tool/util/requires.coffee: -------------------------------------------------------------------------------- 1 | fs = require("fs") 2 | 3 | module.exports = (path) -> 4 | modules = [] 5 | requireAll = (path) -> 6 | fs.readdirSync(path).forEach (file) -> 7 | newPath = path + "/" + file 8 | newPath = require("path").normalize newPath 9 | stat = fs.statSync(newPath) 10 | if stat.isFile() and /(.*)\.(js|coffee$)/.test(file) 11 | newPath = newPath.replace('.coffee', '') 12 | modules.push(require(newPath)) 13 | if stat.isDirectory() 14 | requireAll(newPath) 15 | 16 | requireAll(path) 17 | 18 | return modules -------------------------------------------------------------------------------- /react-native/src/app/post/redux/posts.js: -------------------------------------------------------------------------------- 1 | import { createReducer } from 'cuz-native'; 2 | 3 | const FETCH_POSTS = 'fetch posts'; 4 | 5 | export function fetchPosts() { 6 | return { 7 | type: FETCH_POSTS, 8 | promise: (request) => request.get(`/articles?$top=50&$select=title, meta.author, url, date&$orderby=date desc`) 9 | }; 10 | } 11 | 12 | const initState = { 13 | posts: [], 14 | } 15 | 16 | export default createReducer(initState, { 17 | [FETCH_POSTS](state, action) { 18 | return { 19 | ...state, 20 | posts: action.result.value, 21 | } 22 | } 23 | }); 24 | 25 | -------------------------------------------------------------------------------- /react-native/ios/App/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /react-native/ios/CMS/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /chrome-extension/background.js: -------------------------------------------------------------------------------- 1 | 2 | chrome.tabs.onUpdated.addListener(function (tabId) { 3 | chrome.pageAction.show(tabId); 4 | }); 5 | 6 | var data = undefined; 7 | chrome.runtime.onMessage.addListener(function(request, sender, sendRequest){ 8 | data = request; 9 | }); 10 | 11 | 12 | 13 | chrome.pageAction.onClicked.addListener(function(tab) { 14 | chrome.tabs.executeScript(null, {file: "jquery-2.0.0.min.js"}); 15 | chrome.tabs.executeScript(null, {file: "readability.js"}); 16 | chrome.tabs.executeScript(null, {file: "content_script.js"}); 17 | chrome.tabs.insertCSS(null, {file: "content_css.css"}) 18 | }); -------------------------------------------------------------------------------- /client/admin/app/article/list/article-list.coffee: -------------------------------------------------------------------------------- 1 | angular.module('article-list', ['resource.articles']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when '/article', 6 | templateUrl: '/app/article/list/article-list.tpl.html' 7 | controller: 'ArticleListCtrl' 8 | ]) 9 | 10 | .controller('ArticleListCtrl', 11 | ['$scope', "Articles", ($scope, Articles) -> 12 | $scope.setPage = (pageNo) -> 13 | Articles.list 14 | $skip: (pageNo - 1) * 10 15 | $top: 10 16 | $count: true 17 | ,(data) -> 18 | $scope.data = data 19 | 20 | $scope.setPage 1 21 | ]) 22 | -------------------------------------------------------------------------------- /react-native/src/app/post/redux/post.js: -------------------------------------------------------------------------------- 1 | import { createReducer } from 'cuz-native'; 2 | 3 | const FETCH_POST = 'fetch post'; 4 | 5 | export function fetchPostByUrl(url) { 6 | return { 7 | type: FETCH_POST, 8 | promise: (request) => request.get(`/articles?$filter=url eq '${url}'`), 9 | url, 10 | }; 11 | } 12 | 13 | const initState = { 14 | } 15 | 16 | export default createReducer(initState, { 17 | [FETCH_POST](state, action) { 18 | return { 19 | ...state, 20 | post: { 21 | ...state.post, 22 | [action.url]: action.result.value[0], 23 | } 24 | } 25 | } 26 | }); 27 | 28 | 29 | -------------------------------------------------------------------------------- /data-migration-tool/import-board.coffee: -------------------------------------------------------------------------------- 1 | request = require('request') 2 | mongoose = require('mongoose') 3 | Board = mongoose.model("Board") 4 | 5 | module.exports = (host) -> 6 | url = "#{host}/odata/Board?$orderby=CreateDate+desc" 7 | 8 | request.get {url: url, json: true}, (e, r, data) -> 9 | for item, i in data.value 10 | board = new Board 11 | author: 12 | name: item.Author 13 | email: item.Email 14 | content: item.Content 15 | date: item.CreateDate 16 | block: item.IsDeleted 17 | board.save() 18 | console.log "[BOARD] [#{i}] import is complate." -------------------------------------------------------------------------------- /client/admin/common/untils/promissLoading.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.untils.promissLoading", []) 2 | 3 | .config ($provide) -> 4 | $provide.decorator "$q", ["$delegate", "$rootScope" 5 | ($delegate, $rootScope) -> 6 | pendingPromisses = 0 7 | $rootScope.$watch -> 8 | pendingPromisses > 0 9 | , (loading) -> 10 | $rootScope.loading = loading 11 | 12 | $q = $delegate 13 | origDefer = $q.defer 14 | $q.defer = -> 15 | defer = origDefer() 16 | pendingPromisses++ 17 | defer.promise.finally -> pendingPromisses-- 18 | return defer 19 | return $q 20 | ] -------------------------------------------------------------------------------- /config/config.dev.js: -------------------------------------------------------------------------------- 1 | var config = config || {}; 2 | 3 | config.host = { 4 | domain: 'localhost', 5 | public: 'localhost:40000', 6 | admin: 'localhost:40001', 7 | feed: 'localhost:40002', 8 | img: 'localhost:40002', 9 | api: 'localhost:40002', 10 | }; 11 | 12 | config.url = { 13 | public: "http://" + config.host.public, 14 | admin: "http://" + config.host.admin, 15 | feed: "http://" + config.host.feed, 16 | img: "http://" + config.host.img, 17 | api: "http://" + config.host.api, 18 | }; 19 | 20 | config.site = { 21 | name: 'Zack Yang' 22 | }; 23 | 24 | config.languages = { 25 | 'English': 'en-us', 26 | '中文': 'zh-cn', 27 | }; 28 | -------------------------------------------------------------------------------- /client/admin/app/gallery/list/gallery-list.coffee: -------------------------------------------------------------------------------- 1 | angular.module('gallery-list',['resource.galleries']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider.when "/gallery", 5 | templateUrl: "/app/gallery/list/gallery-list.tpl.html" 6 | controller: 'GalleryCtrl' 7 | resolve : 8 | galleries : ["$q", "Galleries", ($q, Galleries)-> 9 | deferred = $q.defer() 10 | Galleries.list (data) -> 11 | deferred.resolve data.value 12 | deferred.promise 13 | ] 14 | ]) 15 | 16 | .controller('GalleryCtrl', 17 | ["$scope", "galleries", ($scope, galleries) -> 18 | $scope.list = galleries 19 | ]) 20 | -------------------------------------------------------------------------------- /client/public/common/services/odateResource.js: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.odataResource", ['ngResource']) 2 | 3 | .factory("odataResource", ['$resource', function($resource) { 4 | return function(url, actions) { 5 | actions = actions || {}; 6 | entityUrl = url + "(:id)/:action" 7 | 8 | if (actions.list) { 9 | actions.list.url = url; 10 | } else { 11 | actions.list = { method: "GET", url: url }; 12 | } 13 | if (actions.post) { 14 | actions.post.url = url; 15 | } else { 16 | actions.post = { method: "POST", url: url }; 17 | } 18 | return $resource(entityUrl, { id: '@id' }, actions); 19 | } 20 | }]); 21 | -------------------------------------------------------------------------------- /config/config.prd.js: -------------------------------------------------------------------------------- 1 | var config = config || {}; 2 | 3 | config.host = { 4 | domain: 'zackyang.com', 5 | public: 'zackyang.com', 6 | admin: 'admin.zackyang.com', 7 | feed: 'feed.zackyang.com', 8 | img: 'img.zackyang.com', 9 | api: 'api.zackyang.com', 10 | }; 11 | 12 | config.url = { 13 | public: "http://" + config.host.public, 14 | admin: "http://" + config.host.admin, 15 | feed: "http://" + config.host.feed, 16 | img: "http://" + config.host.img, 17 | api: "http://" + config.host.api, 18 | }; 19 | 20 | config.site = { 21 | name: 'Zack Yang' 22 | }; 23 | 24 | config.languages = { 25 | 'English': 'en-us', 26 | '中文': 'zh-cn', 27 | }; 28 | -------------------------------------------------------------------------------- /client/public/common/services/progress.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.progress", []).provider "progress", -> 2 | @$get = ["$document", "$window", "$compile", "$rootScope" 3 | ($document, $window, $compile, $rootScope) -> 4 | $scope = $rootScope 5 | $body = $document.find("body") 6 | el = $compile("
{{ loading }}
")($scope) 7 | $body.append el 8 | 9 | ( 10 | start : (tip) -> 11 | $scope.loading = (tip || "Loading") + "..." 12 | complete : -> 13 | $scope.loading = "" 14 | status : -> 15 | !!$scope.loading 16 | ) 17 | ] 18 | return 19 | 20 | -------------------------------------------------------------------------------- /client/admin/data/version.txt: -------------------------------------------------------------------------------- 1 | v1.4.0 2 | - ASP.NET WEB API (OData) 3 | - MSSQL 4 | + NodeJS 5 | + MongoDB 6 | Separation the front-client and backend-server. 7 | Add data migration tool for move data from MSSQL to MongoDB. 8 | 9 | v1.3.1 2014-05-20 10 | Add chrome extension used to fast copy articles from other's site. 11 | Fix lots of bugs. 12 | 13 | v1.3.0 2013-08-30 14 | + ASP.NET WEB API (OData) 15 | + Chrome Extension 16 | - DDD 17 | 18 | v1.2.0 2013-08-04 19 | + AngularJS 20 | + CoffeeScript 21 | - Knockout.js 22 | 23 | v1.1.0 2013-05-24 24 | + Knockout.js 25 | + Bootstrap 26 | 27 | v1.0.0 2013-03-14 28 | + Domain driven design 29 | + ASP.NET MVC 3 30 | + Entity Framework 4.0 31 | 32 | -------------------------------------------------------------------------------- /react-native/src/app/post/components/ListItem.js: -------------------------------------------------------------------------------- 1 | import styles from './ListItem.styles'; 2 | import React, { Component, StyleSheet, Text, View, ListView, TouchableOpacity } from 'react-native'; 3 | import Title from './Title'; 4 | 5 | export default class App extends Component { 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | render() { 11 | const { post } = this.props; 12 | return ( 13 | 14 | 15 | 16 | </TouchableOpacity> 17 | <View style={styles.separator} /> 18 | </View> 19 | ); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/browser-specific/iequirks/dialog_iequirks.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* 7 | dialog_ie7.css 8 | =============== 9 | 10 | This file contains styles to used by Internet Explorer in 11 | Quirks mode only. 12 | */ 13 | 14 | /* Base it on dialog_ie.css, overriding it with styles defined in this file. */ 15 | @import "../../dialog/dialog"; 16 | 17 | /* [IE7-8] Filter on footer causes background artifacts when opening dialog. */ 18 | .cke_dialog_footer 19 | { 20 | filter: ""; 21 | } 22 | -------------------------------------------------------------------------------- /server/resources/system/user.coffee: -------------------------------------------------------------------------------- 1 | Resource = require('node-odata').Resource 2 | model = require('../../models') 3 | auth = require('../auth') 4 | resources = require('node-odata').resources 5 | 6 | module.exports = Resource('user', model.user) 7 | .orderBy('date desc') 8 | .list() 9 | .auth(auth.admin) 10 | .get() 11 | .auth(auth.admin) 12 | .post() 13 | .auth(auth.admin) 14 | .delete() 15 | .auth(auth.admin) 16 | .put() 17 | .auth(auth.admin) 18 | .after (newEntity, oldEntity) -> 19 | resources.article.find( {'meta.author': oldEntity.name }).exec (err, articles) -> 20 | for article in articles 21 | article.meta.author = newEntity.name 22 | article.save() 23 | 24 | -------------------------------------------------------------------------------- /server/bootstrap/init-data/index.coffee: -------------------------------------------------------------------------------- 1 | resources = require('node-odata').resources 2 | 3 | initData = (model, path) -> 4 | require(path).forEach (item) -> 5 | data = new model(item) 6 | data.save() 7 | console.log "data init: #{path} import successful." 8 | 9 | module.exports = 10 | import: -> 11 | resources.user.find().exec (err, users) -> 12 | unless users.length 13 | initData(resources.user, "./system/user.json") 14 | initData(resources.article, "./article/article.json") 15 | initData(resources.category, "./article/category.json") 16 | initData(resources.board, "./board/board.json") 17 | initData(resources.gallery, "./photo/gallery.json") 18 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/browser-specific/gecko/editor_gecko.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* 7 | editor_gecko.css 8 | ================== 9 | 10 | This file contains styles to used by all Gecko based browsers (Firefox) only. 11 | */ 12 | 13 | /* Base it on editor.css, overriding it with styles defined in this file. */ 14 | @import "../../components/editor"; 15 | 16 | .cke_bottom 17 | { 18 | padding-bottom: 3px; 19 | } 20 | 21 | .cke_combo_text 22 | { 23 | margin-bottom: -1px; 24 | margin-top: 1px; 25 | } 26 | -------------------------------------------------------------------------------- /server/bootstrap/init-data/photo/gallery.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": { 4 | "zh-cn": "我的相册", 5 | "en-us": "My album" 6 | }, 7 | "url": "my-album", 8 | "description": "This is default gallery.", 9 | "cover": "/img/avatar.png", 10 | "hidden": false, 11 | "date": "2014-01-01", 12 | "photos": [ 13 | { 14 | "name": "Photo1", 15 | "description": "My first photo.", 16 | "url": "/img/avatar.png", 17 | "thumbnail": "/img/avatar.png" 18 | }, 19 | { 20 | "name": "Photo2", 21 | "description": "My second photo.", 22 | "url": "/img/avatar.png", 23 | "thumbnail": "/img/avatar.png" 24 | } 25 | ] 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /data-migration-tool/models/article/article.coffee: -------------------------------------------------------------------------------- 1 | mongoose = require("mongoose") 2 | Schema = mongoose.Schema 3 | 4 | ArticleSchema = new Schema 5 | url: 6 | type: String 7 | unique: true 8 | title: String 9 | content: String 10 | description: String 11 | category: String 12 | status: String 13 | password: String 14 | date: Date 15 | meta: 16 | author: String 17 | views: Number 18 | comments: Number 19 | tags: [ String ] 20 | source: String 21 | thumbnail: String 22 | comments: 23 | [ 24 | author: 25 | name: String 26 | email: String 27 | content: String 28 | date: Date 29 | block: Boolean 30 | ] 31 | 32 | mongoose.model "Article", ArticleSchema -------------------------------------------------------------------------------- /client/admin/app/system/user/user-edit-dialog.coffee: -------------------------------------------------------------------------------- 1 | 1 2 | angular.module('user-edit',[]) 3 | 4 | .controller('UserEditDialogCtrl', 5 | ['$scope', 'Users', 'messager', 'tip' 6 | ($scope, Users, messager, tip) -> 7 | $scope.entity = angular.copy $scope.$parent.entity 8 | 9 | $scope.save = -> 10 | tip.show("Saving") 11 | if $scope.entity.id 12 | Users.put {id:$scope.entity.id}, $scope.entity 13 | ,(data)-> 14 | messager.success "Edit user successfully." 15 | $scope.closeThisDialog() 16 | else 17 | Users.post $scope.entity 18 | ,(data)-> 19 | messager.success "Add user successfully." 20 | $scope.closeThisDialog() 21 | 22 | $scope.close = -> 23 | $scope.closeThisDialog() 24 | ]) 25 | -------------------------------------------------------------------------------- /client/public/common/untils/ajaxLoading.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.untils.ajaxLoading", []) 2 | 3 | .factory 'globalLoading', ["$rootScope", "$q", ($rootScope, $q) -> 4 | activeRequests = 0 5 | started = -> 6 | activeRequests++ 7 | $rootScope.loading = true 8 | 9 | ended = -> 10 | activeRequests-- 11 | $rootScope.loading = false if activeRequests is 0 12 | 13 | request: (config) -> 14 | started() 15 | config or $q.when(config) 16 | 17 | response: (response) -> 18 | ended() 19 | response or $q.when(response) 20 | 21 | responseError: (rejection) -> 22 | ended() 23 | $q.reject rejection 24 | ] 25 | 26 | .config(['$httpProvider', ($httpProvider) -> 27 | $httpProvider.interceptors.push('globalLoading') 28 | ]) -------------------------------------------------------------------------------- /client/admin/common/untils/ajaxLoading.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.untils.ajaxLoading", []) 2 | 3 | .factory 'globalLoading', ["$rootScope", "$q", ($rootScope, $q) -> 4 | activeRequests = 0 5 | started = -> 6 | activeRequests++ 7 | $rootScope.loading = true 8 | 9 | ended = -> 10 | activeRequests-- 11 | $rootScope.loading = false if activeRequests is 0 12 | 13 | request: (config) -> 14 | started() 15 | config or $q.when(config) 16 | 17 | response: (response) -> 18 | ended() 19 | response or $q.when(response) 20 | 21 | responseError: (rejection) -> 22 | ended() 23 | $q.reject rejection 24 | ] 25 | 26 | .config(['$httpProvider', ($httpProvider) -> 27 | $httpProvider.interceptors.push('globalLoading') 28 | ]) 29 | -------------------------------------------------------------------------------- /client/admin/common/directives/myDatepicker.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.datepicker",[]) 2 | 3 | .directive("zyDatepicker", -> 4 | restrict: "A" 5 | require: "ngModel" 6 | link: (scope, element, attrs, ngModelCtrl) -> 7 | element.attr("readonly":"readonly") 8 | element.css("cursor","pointer") 9 | element.css("background","#FFF") 10 | 11 | options = {} 12 | options = $.parseJSON(attrs.negDatePicker) if attrs.negDatePicker 13 | 14 | element.datepicker 15 | changeMonth: options.changeMonth || false 16 | changeYear: options.changeYear || false 17 | dateFormat: options.dateFormat || "mm/dd/yy" 18 | showAnim: "drop" 19 | onSelect: (date) -> 20 | ngModelCtrl.$setViewValue date 21 | scope.$apply() 22 | ) -------------------------------------------------------------------------------- /client/admin/app/category/category-edit-dialog.coffee: -------------------------------------------------------------------------------- 1 | angular.module('category-edit',[]) 2 | 3 | .controller('CategoryEditDialogCtrl', 4 | ["$scope","Categories", "messager", "tip" 5 | ($scope, Categories, messager, tip) -> 6 | $scope.entity = angular.copy $scope.$parent.entity 7 | 8 | $scope.save = -> 9 | tip.show("Saving") 10 | if $scope.entity.id 11 | debugger 12 | Categories.put $scope.entity 13 | ,(data)-> 14 | messager.success "Edit category successfully." 15 | $scope.closeThisDialog() 16 | else 17 | Categories.post $scope.entity 18 | ,(data)-> 19 | messager.success "Add category successfully." 20 | $scope.closeThisDialog() 21 | 22 | $scope.close = -> 23 | $scope.closeThisDialog() 24 | ]) 25 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/browser-specific/ie8/editor_ie8.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* 7 | editor_ie8.css 8 | =============== 9 | 10 | This file contains styles to used by Internet Explorer 8 only. 11 | */ 12 | 13 | /* Base it on editor_ie.css, overriding it with styles defined in this file. */ 14 | @import "../../components/editor"; 15 | 16 | .cke_toolbox_collapser .cke_arrow 17 | { 18 | border-width:4px; 19 | } 20 | .cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow 21 | { 22 | border-width:3px; 23 | } 24 | .cke_toolbox_collapser .cke_arrow 25 | { 26 | margin-top: 0; 27 | } 28 | -------------------------------------------------------------------------------- /react-native/src/app/layout/Header.js: -------------------------------------------------------------------------------- 1 | import React, { Component, StyleSheet, Text, View, TouchableOpacity } from 'react-native'; 2 | import styles from './Header.styles'; 3 | 4 | export default class App extends Component { 5 | render() { 6 | const containerStyle = [ styles.container ]; 7 | if (this.props.leftContainer || this.props.centerContainer || this.props.rightContainer) { 8 | containerStyle.push(styles.hasContent); 9 | } 10 | return ( 11 | <View style={containerStyle}> 12 | <View> 13 | {this.props.leftContainer} 14 | </View> 15 | <View> 16 | {this.props.centerContainer} 17 | </View> 18 | <View> 19 | {this.props.rightContainer} 20 | </View> 21 | </View> 22 | ); 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /client/public/common/until.js: -------------------------------------------------------------------------------- 1 | String.prototype.format = function (fmt) { 2 | if (fmt==null) fmt = "yyyy-MM-dd"; 3 | var myDate = new Date(this); 4 | var o = { 5 | "M+": myDate.getMonth() + 1, 6 | "d+": myDate.getDate(), 7 | "h+": myDate.getHours(), 8 | "m+": myDate.getMinutes(), 9 | "s+": myDate.getSeconds(), 10 | "q+": Math.floor((myDate.getMonth() + 3) / 3), 11 | "S": myDate.getMilliseconds() 12 | }; 13 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (myDate.getFullYear() + "").substr(4 - RegExp.$1.length)); 14 | for (var k in o) 15 | if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); 16 | return fmt; 17 | }; -------------------------------------------------------------------------------- /react-native/src/app/home/containers/Home.js: -------------------------------------------------------------------------------- 1 | import React, { Component, StyleSheet, Text, View, TouchableOpacity } from 'react-native'; 2 | 3 | export default class App extends Component { 4 | componentDidMount() { 5 | // this.props.router.push('post'); 6 | } 7 | 8 | toPost() { 9 | this.props.router.push('post'); 10 | } 11 | 12 | render() { 13 | return ( 14 | <View style={styles.container}> 15 | <TouchableOpacity onPress={this.toPost.bind(this)}> 16 | <Text>Go!!</Text> 17 | </TouchableOpacity> 18 | </View> 19 | ); 20 | } 21 | } 22 | 23 | var styles = StyleSheet.create({ 24 | container: { 25 | flex: 1, 26 | justifyContent: 'center', 27 | alignItems: 'center', 28 | backgroundColor: '#F5FCFF', 29 | }, 30 | }); 31 | 32 | 33 | -------------------------------------------------------------------------------- /react-native/ios/App/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /react-native/ios/CMS/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /react-native/src/app/post/components/Title.styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | export default StyleSheet.create({ 4 | item: { 5 | flex: 1, 6 | justifyContent: 'center', 7 | paddingBottom: 15, 8 | paddingTop: 10, 9 | paddingLeft: 10, 10 | paddingRight: 10, 11 | }, 12 | title: { 13 | fontSize: 18, 14 | marginBottom: 2, 15 | textAlign: 'left', 16 | }, 17 | sub: { 18 | marginTop: 8, 19 | flexDirection: 'row', 20 | }, 21 | author: { 22 | fontSize: 12, 23 | textAlign: 'left', 24 | color: "#999", 25 | }, 26 | date: { 27 | fontSize: 12, 28 | textAlign: 'left', 29 | marginLeft: 10, 30 | color: "#999", 31 | }, 32 | separator: { 33 | flex: 1, 34 | height: 1, 35 | backgroundColor: '#ccc', 36 | }, 37 | }); 38 | -------------------------------------------------------------------------------- /data-migration-tool/import-user.coffee: -------------------------------------------------------------------------------- 1 | request = require('request') 2 | mongoose = require('mongoose') 3 | User = mongoose.model("User") 4 | 5 | module.exports = (host) -> 6 | url = "#{host}/odata/User" 7 | 8 | request.get {url: url, json: true}, (e, r, data) -> 9 | userArr = [] 10 | for item, i in data.value 11 | unless item.UserName in userArr 12 | userArr.push item.UserName 13 | user = new User 14 | name: item.UserName 15 | loginName: item.LoginName 16 | password: "123" 17 | email: item.Email 18 | token: item.Token 19 | disabled: item.IsDeleted 20 | user.save() 21 | console.log "[USER] [#{i}] '#{item.UserName}' import is complate." 22 | else 23 | console.log "[USER] [#{i}] '#{item.UserName}' exist, skip." 24 | -------------------------------------------------------------------------------- /client/admin/common/services/version.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.version", []) 2 | .factory "version", ['$http','$q',($http, $q) -> 3 | get: -> 4 | deferred = $q.defer() 5 | $http.get("/data/version.txt",cache:true) 6 | .success (data) -> 7 | list=data.match(/([^\r\n])+/g) 8 | versions=[] 9 | for item in list 10 | if item.indexOf('v')==0 11 | info=item.split(' ') 12 | if info.length==2 13 | begin=true 14 | versions.push 15 | ver:info[0] 16 | date:info[1] 17 | content:[] 18 | else 19 | if begin 20 | versions[versions.length-1].content.push item 21 | deferred.resolve versions 22 | .error (data) -> 23 | deferred.reject data 24 | deferred.promise 25 | ] -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/browser-specific/ie8/dialog_ie8.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* 7 | dialog_ie8.css 8 | =============== 9 | 10 | This file contains styles to used by Internet Explorer 8 only. 11 | */ 12 | 13 | /* Base it on dialog_ie.css, overriding it with styles defined in this file. */ 14 | @import "../../dialog/dialog"; 15 | 16 | /* Without the following, IE8 cannot compensate footer button thick borders 17 | on :focus/:active. */ 18 | a.cke_dialog_ui_button_ok:focus span, 19 | a.cke_dialog_ui_button_ok:active span, 20 | a.cke_dialog_ui_button_cancel:focus span, 21 | a.cke_dialog_ui_button_cancel:active span 22 | { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /client/admin/app/_framework/framework-LoginCtrl.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers.login",['ngRoute']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when("/login", 6 | template: "" 7 | controller: ->) 8 | ]) 9 | 10 | .controller('LoginCtrl',["$scope", "$rootScope", "security", "context" 11 | ($scope,$rootScope,security, context) -> 12 | $scope.login = -> 13 | $scope.error = '' 14 | security.login($scope.user).then (data)-> 15 | context.account = data 16 | context.auth.admin = true 17 | $rootScope.$broadcast "loginSuccessed" 18 | , () -> 19 | $scope.user.Password = '' 20 | $scope.error = "Username or password wrong." 21 | 22 | $scope.logout = -> 23 | context.auth.admin = false 24 | security.logoff().then () -> 25 | $rootScope.$broadcast "logoutSuccessed" 26 | ]) 27 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/specialchar/dialogs/lang/_translationstatus.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 2 | For licensing, see LICENSE.md or http://ckeditor.com/license 3 | 4 | cs.js Found: 118 Missing: 0 5 | cy.js Found: 118 Missing: 0 6 | de.js Found: 118 Missing: 0 7 | el.js Found: 16 Missing: 102 8 | eo.js Found: 118 Missing: 0 9 | et.js Found: 31 Missing: 87 10 | fa.js Found: 24 Missing: 94 11 | fi.js Found: 23 Missing: 95 12 | fr.js Found: 118 Missing: 0 13 | hr.js Found: 23 Missing: 95 14 | it.js Found: 118 Missing: 0 15 | nb.js Found: 118 Missing: 0 16 | nl.js Found: 118 Missing: 0 17 | no.js Found: 118 Missing: 0 18 | tr.js Found: 118 Missing: 0 19 | ug.js Found: 39 Missing: 79 20 | zh-cn.js Found: 118 Missing: 0 21 | -------------------------------------------------------------------------------- /react-native/src/app/post/components/Title.js: -------------------------------------------------------------------------------- 1 | import styles from './Title.styles'; 2 | import React, { Component, StyleSheet, Text, View, ListView, TouchableOpacity } from 'react-native'; 3 | import moment from 'moment'; 4 | import 'moment/locale/zh-cn'; 5 | 6 | export default class App extends Component { 7 | constructor(props) { 8 | super(props); 9 | } 10 | 11 | render() { 12 | const { post } = this.props; 13 | return ( 14 | <View style={styles.item}> 15 | <Text style={styles.title}> 16 | {post.title} 17 | </Text> 18 | <View style={styles.sub}> 19 | <Text style={styles.author}> 20 | {post.meta.author} 21 | </Text> 22 | <Text style={styles.date}> 23 | {moment(post.date).fromNow()} 24 | </Text> 25 | </View> 26 | </View> 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/browser-specific/opera/dialog_opera.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* 7 | dialog_opera.css 8 | =============== 9 | 10 | This file contains styles to used by all versions of Opera only. 11 | */ 12 | 13 | /* Base it on dialog.css, overriding it with styles defined in this file. */ 14 | @import "../../dialog/dialog"; 15 | 16 | /* Opera has problem with box-shadow and td with border-collapse: collapse */ 17 | /* inset shadow is mis-aligned */ 18 | .cke_dialog_footer 19 | { 20 | display: block; 21 | height: 38px; 22 | } 23 | 24 | .cke_ltr .cke_dialog_footer > * 25 | { 26 | float:right; 27 | } 28 | .cke_rtl .cke_dialog_footer > * 29 | { 30 | float:left; 31 | } 32 | -------------------------------------------------------------------------------- /react-native/ios/AppTests/Info.plist: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 | <plist version="1.0"> 4 | <dict> 5 | <key>CFBundleDevelopmentRegion</key> 6 | <string>en</string> 7 | <key>CFBundleExecutable</key> 8 | <string>$(EXECUTABLE_NAME)</string> 9 | <key>CFBundleIdentifier</key> 10 | <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> 11 | <key>CFBundleInfoDictionaryVersion</key> 12 | <string>6.0</string> 13 | <key>CFBundleName</key> 14 | <string>$(PRODUCT_NAME)</string> 15 | <key>CFBundlePackageType</key> 16 | <string>BNDL</string> 17 | <key>CFBundleShortVersionString</key> 18 | <string>1.0</string> 19 | <key>CFBundleSignature</key> 20 | <string>????</string> 21 | <key>CFBundleVersion</key> 22 | <string>1</string> 23 | </dict> 24 | </plist> 25 | -------------------------------------------------------------------------------- /react-native/ios/CMSTests/Info.plist: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 | <plist version="1.0"> 4 | <dict> 5 | <key>CFBundleDevelopmentRegion</key> 6 | <string>en</string> 7 | <key>CFBundleExecutable</key> 8 | <string>$(EXECUTABLE_NAME)</string> 9 | <key>CFBundleIdentifier</key> 10 | <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> 11 | <key>CFBundleInfoDictionaryVersion</key> 12 | <string>6.0</string> 13 | <key>CFBundleName</key> 14 | <string>$(PRODUCT_NAME)</string> 15 | <key>CFBundlePackageType</key> 16 | <string>BNDL</string> 17 | <key>CFBundleShortVersionString</key> 18 | <string>1.0</string> 19 | <key>CFBundleSignature</key> 20 | <string>????</string> 21 | <key>CFBundleVersion</key> 22 | <string>1</string> 23 | </dict> 24 | </plist> 25 | -------------------------------------------------------------------------------- /chrome-extension/popup.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title> 5 | Blacklist Checking 6 | 7 | 8 | 9 | 10 |

加载中...

11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
标题
 
正文
 
URL
 
26 |
27 |
28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/components/_presets.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | 6 | /* "Source" button label */ 7 | .cke_button__source_label, 8 | .cke_button__sourcedialog_label { 9 | display: inline; 10 | } 11 | 12 | /* "Font Size" combo width */ 13 | .cke_combo__fontsize .cke_combo_text { 14 | width: 30px; 15 | } 16 | 17 | /* "Font Size" panel size */ 18 | .cke_combopanel__fontsize { 19 | width: 120px; 20 | } 21 | 22 | /* Editable regions */ 23 | .cke_source { 24 | font-family: 'Courier New' , Monospace; 25 | font-size: small; 26 | background-color: #fff; 27 | white-space: pre; 28 | } 29 | 30 | .cke_wysiwyg_frame, .cke_wysiwyg_div { 31 | background-color: #fff; 32 | } 33 | -------------------------------------------------------------------------------- /client/admin/app/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 3 | } 4 | 5 | .loadingbox { 6 | text-align: center; 7 | height: 32px; 8 | line-height: 18px; 9 | position: fixed; 10 | left: 50%; 11 | top: 0; 12 | margin-left: -45px; 13 | padding: 6px 16px 6px 16px; 14 | font-weight: bold; 15 | font-size: 12px; 16 | color: #333; 17 | background: #f9edbe; 18 | border: 1px solid #f0c36d; 19 | z-index: 10000; 20 | -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2); 21 | box-shadow: 0 2px 4px rgba(0,0,0,0.2); 22 | } 23 | 24 | .label-invalid{ 25 | position:absolute; 26 | padding-bottom: 0; 27 | } 28 | 29 | @media (min-width: 992px){ 30 | .navbar-toggle { 31 | display: none; 32 | } 33 | } 34 | @media (max-width: 992px){ 35 | .navbar-toggle { 36 | display: block; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /client/admin/app/dialogs/version-upgrade/version-upgrade-dialog.tpl.html: -------------------------------------------------------------------------------- 1 | 5 | 20 | 29 | -------------------------------------------------------------------------------- /client/public/app/gallery/detail/gallery-detail.coffee: -------------------------------------------------------------------------------- 1 | angular.module('gallery-detail',['resource.galleries']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/gallery/:id", 6 | templateUrl: "/app/gallery/detail/gallery-detail.tpl.html" 7 | controller: 'GalleryDetailCtrl' 8 | resolve: 9 | gallery: ['$route', '$q', 'Galleries', ($route, $q, Galleries) -> 10 | deferred = $q.defer() 11 | Galleries.list 12 | $filter: "url eq '#{$route.current.params.id}'" 13 | , (data) -> 14 | deferred.resolve data.value[0] 15 | deferred.promise 16 | ] 17 | ]) 18 | 19 | .controller('GalleryDetailCtrl', 20 | ["$scope", '$rootScope', '$translate', "gallery", 'context' 21 | ($scope, $rootScope, $translate, gallery, context) -> 22 | $rootScope.title = gallery.name[context.language] 23 | $scope.gallery = gallery 24 | ]) 25 | -------------------------------------------------------------------------------- /data-migration-tool/import-photo.coffee: -------------------------------------------------------------------------------- 1 | request = require('request') 2 | mongoose = require('mongoose') 3 | Gallery = mongoose.model("Gallery") 4 | 5 | module.exports = (host) -> 6 | url = "#{host}/odata/Gallery?$expand=Photos&$filter=IsDeleted+eq+false&$orderby=CreateDate+desc" 7 | 8 | request.get {url: url, json: true}, (e, r, data) -> 9 | for item, i in data.value 10 | gallery = new Gallery 11 | name: item.Name 12 | description: item.Description 13 | cover: item.Cover 14 | hidden: item.IsHidden || false 15 | date: item.CreateDate 16 | photos : [] 17 | for photo in item.Photos 18 | gallery.photos.push 19 | name: photo.Name 20 | description: photo.Description 21 | url: photo.Path 22 | thumbnail: photo.Thumbnail 23 | gallery.save() 24 | console.log "[PHOTO] [#{i}] '#{item.Name}' import is complate." -------------------------------------------------------------------------------- /react-native/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /client/public/app/article/Common/article-sider-lastest-comments.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

{{'article.sider.lastestComments' | translate}}

3 |
4 | 5 |
6 |
7 | 8 | zack: 9 | test. 10 | 5 hours ago 11 |
12 |
13 | 14 | zack 15 | test. 16 | 5 hours ago 17 |
18 |
19 | 20 | zack 21 | test. 22 | 5 hours ago 23 |
24 |
25 | 26 | zack 27 | test. 28 | 5 hours ago 29 |
30 |
31 | -------------------------------------------------------------------------------- /react-native/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /client/admin/app/article/edit/article-edit.less: -------------------------------------------------------------------------------- 1 | .article-detail .sider { 2 | position: relative; 3 | padding: 45px 15px 15px; 4 | margin: 0 -15px 15px; 5 | background-color: #fafafa; 6 | border-color: #e5e5e5 #eee #eee; 7 | border-style: solid; 8 | border-width: 1px 0; 9 | margin-left: 0; 10 | margin-right: 0; 11 | background-color: #fff; 12 | border-width: 1px; 13 | border-color: #ddd; 14 | border-radius: 4px 4px 0 0; 15 | box-shadow: none; 16 | } 17 | .article-detail .sider > div:first-child { 18 | position: absolute; 19 | top: 15px; 20 | left: 15px; 21 | font-size: 12px; 22 | font-weight: bold; 23 | color: #bbb; 24 | text-transform: uppercase; 25 | letter-spacing: 1px; 26 | } 27 | .article-detail .sider.has-error{ 28 | border-color: #b94a48; 29 | } 30 | .article-detail .sider.has-error > div:first-child { 31 | color: #b94a48; 32 | } 33 | .article-detail .form-group.has-error span[class*="cke_editor_"]{ 34 | border-color: #b94a48; 35 | } 36 | 37 | .epic-editor{ 38 | border: 1px solid #D5D5D5; 39 | } -------------------------------------------------------------------------------- /server/bootstrap/init-data/article/article.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "title": "Test Article", 4 | "url": "test-article", 5 | "content": "This is content of this article.", 6 | "description": "This is description of this article.", 7 | "category": "default", 8 | "status": "normal", 9 | "password": null, 10 | "date": "2014-01-01", 11 | "meta": { 12 | "author": "zack", 13 | "views": 0, 14 | "comments": 2, 15 | "tags": ["Tag1", "Tag2"], 16 | "source": null, 17 | "thumbnail": null 18 | }, 19 | "comments": [ 20 | { 21 | "author": { 22 | "name": "Guest", 23 | "email": null 24 | }, 25 | "content": "This is content of this comment.", 26 | "date": "2014-01-01" 27 | }, 28 | { 29 | "author": { 30 | "name": "Zack", 31 | "email": "zackyang@outlook.com" 32 | }, 33 | "content": "Good article.", 34 | "date": "2014-01-02" 35 | } 36 | ] 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /client/public/app/_framework/framework-HeadCtrl.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers.head", []) 2 | 3 | .controller('HeaderCtrl', 4 | ["$scope", "$http", "$location", "$window", "dataCacheCategories" 5 | ($scope, $http, $location, $window, dataCacheCategories) -> 6 | 7 | $scope.$on "categoryChange", (event, categoryUrl) -> 8 | $scope.currentCategoryUrl = categoryUrl || $scope.defaultCategoryUrl 9 | 10 | $scope.categories = dataCacheCategories 11 | $scope.defaultCategoryUrl = (category.url for category in $scope.categories when category.main)[0] 12 | 13 | $scope.isActiveCategory = (category) -> 14 | #home page 15 | return true if category.url == $scope.defaultCategoryUrl && $location.path() == "/" 16 | #article list 17 | return true if $location.path().indexOf(category.url) > -1 18 | #article detail 19 | return $location.path().indexOf("/post") > -1 && category.url.indexOf($scope.currentCategoryUrl) > -1 20 | 21 | $scope.isActive = (route) -> 22 | $location.path().indexOf(route) == 0 23 | ]) 24 | -------------------------------------------------------------------------------- /client/public/app/gallery/list/gallery-list.coffee: -------------------------------------------------------------------------------- 1 | angular.module('gallery',['gallery-detail','resource.galleries']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/gallery", 6 | templateUrl: "/app/gallery/list/gallery-list.tpl.html" 7 | controller: 'GalleryCtrl' 8 | title: 'Galleries' 9 | resolve: 10 | galleries: ['$q','Galleries',($q,Galleries)-> 11 | deferred = $q.defer() 12 | Galleries.list 13 | $top: 1000 14 | $select: 'url, name, description, cover, hidden' 15 | $orderby: 'order' 16 | $filter: 'hidden eq false' 17 | ,(data) -> 18 | deferred.resolve data.value 19 | deferred.promise 20 | ] 21 | ]) 22 | 23 | .controller('GalleryCtrl', 24 | ["$scope", "galleries", 'context', ($scope, galleries, context) -> 25 | group = [] 26 | current = undefined 27 | for item, i in galleries 28 | if i % 3 == 0 29 | current = [] 30 | group.push current 31 | current.push item 32 | 33 | $scope.group = group 34 | ]) 35 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/wsc/README.md: -------------------------------------------------------------------------------- 1 | CKEditor WebSpellChecker Plugin 2 | =============================== 3 | 4 | This plugin brings Web Spell Checker (WSC) into CKEditor. 5 | 6 | WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. 7 | 8 | Installation 9 | ------------ 10 | 11 | 1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation. 12 | 2. Enable the "wsc" plugin in the CKEditor configuration file (config.js): 13 | 14 | config.extraPlugins = 'wsc'; 15 | 16 | That's all. WSC will appear on the editor toolbar and will be ready to use. 17 | 18 | License 19 | ------- 20 | 21 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). 22 | 23 | See LICENSE.md for more information. 24 | 25 | Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). 26 | -------------------------------------------------------------------------------- /client/public/app/article/archives/article-archives.coffee: -------------------------------------------------------------------------------- 1 | angular.module('article-archives',['resource.articles']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | articleFormat = (data) -> 5 | obj = [] 6 | for post in data.value 7 | date = post.date?.format('yyyy-MM') 8 | obj[date]=[] unless obj[date] 9 | obj[date].push(post) 10 | { date:key, posts:value } for key, value of obj when obj.hasOwnProperty key 11 | 12 | $routeProvider 13 | .when "/archives", 14 | templateUrl: "/app/article/archives/article-archives.tpl.html" 15 | controller: 'ArchivesCtrl' 16 | resolve: 17 | articles: ['$route', '$q', 'Articles', ($route, $q, Articles) -> 18 | deferred = $q.defer() 19 | Articles.list 20 | $select: 'title, url, date, category' 21 | $top: 1000 22 | ,(data)-> 23 | deferred.resolve articleFormat(data) 24 | deferred.promise 25 | ] 26 | ]) 27 | 28 | .controller('ArchivesCtrl', 29 | ["$scope", 'articles', 30 | ($scope, articles) -> 31 | $scope.list = articles 32 | ]) 33 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/scayt/README.md: -------------------------------------------------------------------------------- 1 | CKEditor SCAYT Plugin 2 | ===================== 3 | 4 | This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. 5 | 6 | SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. 7 | 8 | Installation 9 | ------------ 10 | 11 | 1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. 12 | 2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): 13 | 14 | config.extraPlugins = 'scayt'; 15 | 16 | That's all. SCAYT will appear on the editor toolbar and will be ready to use. 17 | 18 | License 19 | ------- 20 | 21 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). 22 | 23 | See LICENSE.md for more information. 24 | 25 | Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/). 26 | -------------------------------------------------------------------------------- /client/admin/common/services/odataResource.js: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.odataResource", ['ngResource']) 2 | 3 | .factory("odataResource", ['$resource', function($resource) { 4 | return function(url, actions) { 5 | entityUrl = url + "(:id)/:action" 6 | actions = actions || {}; 7 | 8 | if (actions.list) { 9 | actions.list.url = url; 10 | } else { 11 | actions.list = { method: "GET", url: url }; 12 | } 13 | if (actions.post) { 14 | actions.post.url = url; 15 | } else { 16 | actions.post = { method: "POST", url: url }; 17 | } 18 | if (actions.put) { 19 | actions.put.url = url; 20 | } else { 21 | actions.put = { method: "PUT", url: entityUrl }; 22 | } 23 | if (actions.get) { 24 | actions.get.url = entityUrl; 25 | } else { 26 | actions.get = { method: "GET", url: entityUrl }; 27 | } 28 | if (actions.delete) { 29 | actions.delete.url = entityUrl; 30 | } else { 31 | actions.delete = { method: "DELETE", url: entityUrl }; 32 | } 33 | 34 | return $resource('', { id: '@id' }, actions); 35 | } 36 | }]); 37 | 38 | -------------------------------------------------------------------------------- /client/admin/common/services/messager.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.messager", []) 2 | 3 | .factory "messager", -> 4 | Messenger.options = 5 | extraClasses: 'messenger-fixed messenger-on-top' 6 | theme: 'flat' 7 | 8 | success : (msg) -> 9 | Messenger().post({ message : msg, type : 'success', showCloseButton : true }) 10 | 11 | error : (msg) -> 12 | msg = 'Unauthorized.' if (msg == '401') 13 | Messenger().post 14 | message : msg 15 | type : 'error' 16 | showCloseButton : true 17 | delay : 600 18 | 19 | confirm : (callback,msg) -> 20 | Messenger.options = 21 | extraClasses: 'messenger-fixed messenger-on-top' 22 | theme: 'flat' 23 | msg = Messenger().post 24 | message : msg || "Do you want to continue?" 25 | id : "Only-one-message" 26 | showCloseButton : true 27 | actions : 28 | OK : 29 | label : "OK" 30 | phrase : "Confirm" 31 | delay : 60 32 | action : -> 33 | callback() 34 | msg.cancel() 35 | cancel : 36 | action : -> 37 | msg.cancel() 38 | -------------------------------------------------------------------------------- /client/admin/app/system/401/index.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 4 | 5 | 401 6 | 7 | Access Denied. 8 |

9 | 10 |
11 |

You do not have permission to view it.

12 | 13 |
14 |
15 |

Try one of the following:

16 | 17 |
    18 |
  • 19 | 20 | Re-check the url for typos 21 |
  • 22 |
  • 23 | 24 | Tell us about it 25 |
  • 26 |
27 |
28 | 29 |
30 |
31 | 32 | 38 |
-------------------------------------------------------------------------------- /client/admin/common/init.coffee: -------------------------------------------------------------------------------- 1 | galleryInit = -> 2 | setTimeout (-> 3 | $("[data-rel=\"colorbox\"]").colorbox 4 | reposition: true 5 | scalePhotos: true 6 | scrolling: false 7 | previous: "" 8 | next: "" 9 | close: "×" 10 | current: "{current} of {total}" 11 | maxWidth: "100%" 12 | maxHeight: "100%" 13 | onOpen: -> 14 | document.body.style.overflow = "hidden" 15 | onClosed: -> 16 | document.body.style.overflow = "auto" 17 | onComplete: -> 18 | $.colorbox.resize() 19 | ), 1000 20 | 21 | #代码高亮 22 | codeformat = -> 23 | jQuery -> 24 | #SyntaxHighlighter.highlight() 25 | 26 | #fix Array indexOf() in JavaScript for IE browsers 27 | unless Array::indexOf 28 | Array::indexOf = (elt) -> #, from 29 | len = @length >>> 0 30 | from = Number(arguments_[1]) or 0 31 | from = (if (from < 0) then Math.ceil(from) else Math.floor(from)) 32 | from += len if from < 0 33 | while from < len 34 | return from if from of this and this[from] is elt 35 | from++ 36 | -1 37 | -------------------------------------------------------------------------------- /client/public/common/init.coffee: -------------------------------------------------------------------------------- 1 | galleryInit = -> 2 | setTimeout (-> 3 | $("[data-rel=\"colorbox\"]").colorbox 4 | reposition: true 5 | scalePhotos: true 6 | scrolling: false 7 | previous: "" 8 | next: "" 9 | close: "×" 10 | current: "{current} of {total}" 11 | maxWidth: "100%" 12 | maxHeight: "100%" 13 | onOpen: -> 14 | document.body.style.overflow = "hidden" 15 | onClosed: -> 16 | document.body.style.overflow = "auto" 17 | onComplete: -> 18 | $.colorbox.resize() 19 | ), 1000 20 | 21 | #代码高亮 22 | codeformat = -> 23 | jQuery -> 24 | #SyntaxHighlighter.highlight() 25 | 26 | #fix Array indexOf() in JavaScript for IE browsers 27 | unless Array::indexOf 28 | Array::indexOf = (elt) -> #, from 29 | len = @length >>> 0 30 | from = Number(arguments_[1]) or 0 31 | from = (if (from < 0) then Math.ceil(from) else Math.floor(from)) 32 | from += len if from < 0 33 | while from < len 34 | return from if from of this and this[from] is elt 35 | from++ 36 | -1 37 | -------------------------------------------------------------------------------- /client/public/app/index/index.css: -------------------------------------------------------------------------------- 1 | #cta-content { 2 | height: 450px; 3 | width: 100%; 4 | background: url('/img/main_bg_tile.jpg') repeat-x transparent 50% 50%; 5 | text-align: center; 6 | color: #fff; 7 | } 8 | #cta-content h1, 9 | #cta-content h2 { 10 | text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 11 | } 12 | #cta-content .grid-image { 13 | width: 100%; 14 | height: 100%; 15 | background: url('/img/main_bg_grid_tile.png') repeat transparent; 16 | } 17 | #cta-content .lights { 18 | width: 100%; 19 | height: 100%; 20 | background: url('/img/main_bg_image.jpg') repeat-x transparent 50% 50%; 21 | } 22 | #cta-content .wrapped-content { 23 | padding: 150px 0px 20px 0px; 24 | margin: auto; 25 | } 26 | #cta-content h1 { 27 | letter-spacing: 12px; 28 | color: white; 29 | font-size: 50px; 30 | margin: 3px 0px; 31 | } 32 | #cta-content h2 { 33 | font-weight: normal; 34 | letter-spacing: 1px; 35 | margin-top: 20px; 36 | margin-bottom: 40px; 37 | font-size: 22px; 38 | } 39 | #cta-content h2 p { 40 | margin: auto; 41 | font-weight: normal; 42 | letter-spacing: 1px; 43 | font-size: 12px; 44 | padding-top: 10px; 45 | color: #fff; 46 | } -------------------------------------------------------------------------------- /client/admin/app/system/user/user.coffee: -------------------------------------------------------------------------------- 1 | angular.module('system-user', ['resource.users', 'user-edit']) 2 | 3 | .config(['$routeProvider', ($routeProvider) -> 4 | $routeProvider.when '/system/user', 5 | templateUrl : '/app/system/user/user.tpl.html' 6 | controller : 'SystemUserCtrl' 7 | resolve : 8 | users : ["$q", "Users", ($q, Users)-> 9 | deferred = $q.defer() 10 | Users.list (data) -> 11 | deferred.resolve data.value 12 | deferred.promise 13 | ] 14 | ]) 15 | 16 | .controller('SystemUserCtrl', 17 | ['$scope', 'users', 'Users', 'ngDialog', 18 | ($scope, users, Users, ngDialog) -> 19 | $scope.list = users 20 | 21 | load = -> 22 | Users.list (data) -> 23 | $scope.list = data.value 24 | 25 | $scope.openAddDialog = ()-> 26 | $scope.entity = {} 27 | openDialog() 28 | 29 | $scope.openEditDialog = (item) -> 30 | $scope.entity = item 31 | openDialog() 32 | 33 | openDialog = -> 34 | dialog = ngDialog.open 35 | template: '/app/system/user/user-edit-dialog.tpl.html' 36 | controller: 'UserEditDialogCtrl' 37 | scope: $scope 38 | dialog.closePromise.then load 39 | ]) 40 | -------------------------------------------------------------------------------- /client/admin/app/_framework/framework-MainCtrl.coffee: -------------------------------------------------------------------------------- 1 | angular.module("framework.controllers.main",[]) 2 | 3 | .controller('MainCtrl', ["$scope","$rootScope","$http","$location","version", "context", "$localStorage", 'ngDialog' 4 | ($scope,$rootScope,$http,$location, version, context, $localStorage, ngDialog) -> 5 | $scope.$on "loginSuccessed", -> 6 | version.get().then (data)-> 7 | return if !data.length 8 | $scope.newVersion = data[0] 9 | if $scope.newVersion.ver != $localStorage.ver 10 | dialog = ngDialog.open 11 | template: '/app/dialogs/version-upgrade/version-upgrade-dialog.tpl.html' 12 | controller: 'VersionUpgradeDialogCtrl' 13 | scope: $scope 14 | dialog.closePromise.then -> 15 | $localStorage.ver = $scope.newVersion.ver 16 | 17 | $rootScope.account = context.account 18 | 19 | $rootScope.__login = true 20 | $rootScope.__logoff = false 21 | 22 | #Back to page. 23 | $location.path($scope.__returnUrl || '/').replace() 24 | $scope.__returnUrl = null 25 | 26 | $scope.$on "logoutSuccessed", -> 27 | $rootScope.__login = false 28 | $rootScope.__logoff = true 29 | ]) 30 | 31 | -------------------------------------------------------------------------------- /client/admin/app/system/history/history.tpl.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 | {{ item.ver }} 23 | 24 | {{ item.date | date:'yyyy-MM-dd' }} 25 |
26 |
27 |
{{ detail }}
28 |
29 |
30 |
31 |
32 |
-------------------------------------------------------------------------------- /react-native/android/app/src/main/java/com/app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.app; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactPackage; 5 | import com.facebook.react.shell.MainReactPackage; 6 | 7 | import java.util.Arrays; 8 | import java.util.List; 9 | 10 | public class MainActivity extends ReactActivity { 11 | 12 | /** 13 | * Returns the name of the main component registered from JavaScript. 14 | * This is used to schedule rendering of the component. 15 | */ 16 | @Override 17 | protected String getMainComponentName() { 18 | return "App"; 19 | } 20 | 21 | /** 22 | * Returns whether dev mode should be enabled. 23 | * This enables e.g. the dev menu. 24 | */ 25 | @Override 26 | protected boolean getUseDeveloperSupport() { 27 | return BuildConfig.DEBUG; 28 | } 29 | 30 | /** 31 | * A list of packages used by the app. If the app uses additional views 32 | * or modules besides the default ones, add more packages here. 33 | */ 34 | @Override 35 | protected List getPackages() { 36 | return Arrays.asList( 37 | new MainReactPackage()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/java/com/cms/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.cms; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactPackage; 5 | import com.facebook.react.shell.MainReactPackage; 6 | 7 | import java.util.Arrays; 8 | import java.util.List; 9 | 10 | public class MainActivity extends ReactActivity { 11 | 12 | /** 13 | * Returns the name of the main component registered from JavaScript. 14 | * This is used to schedule rendering of the component. 15 | */ 16 | @Override 17 | protected String getMainComponentName() { 18 | return "CMS"; 19 | } 20 | 21 | /** 22 | * Returns whether dev mode should be enabled. 23 | * This enables e.g. the dev menu. 24 | */ 25 | @Override 26 | protected boolean getUseDeveloperSupport() { 27 | return BuildConfig.DEBUG; 28 | } 29 | 30 | /** 31 | * A list of packages used by the app. If the app uses additional views 32 | * or modules besides the default ones, add more packages here. 33 | */ 34 | @Override 35 | protected List getPackages() { 36 | return Arrays.asList( 37 | new MainReactPackage()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/sample/css/bootstrapck-sample.css: -------------------------------------------------------------------------------- 1 | body{margin-top:1.0em;background-color:#fff;font-family:Helvetica,Arial,sans-serif;color:#404040}.container{margin:0 auto;width:900px;padding:0 0 20px}h1{font-size:40px;margin:40px 0 28px;padding:110px 0 9px;border-bottom:1px solid #ccc}h1 a,h1 a:visited,h1 a:focus,h1 a:hover{color:#404040;text-decoration:none}h1 span{font-size:18px;font-weight:normal;color:#bfbfbf}h1 span a,h1 span a:visited,h1 span a:focus,h1 span a:hover{color:#bfbfbf}h1 a{text-decoration:none}h2{font-size:23px;margin:10px 0 8px}h3{font-size:16px;margin:10px 0 8px}p{margin:0 0 30px;font-size:13px;line-height:18px}a,a:visited,a:focus{color:#0069d6;text-decoration:none}a:hover{color:#00438a;text-decoration:underline}.download{float:right}pre{background:#f5f5f5;color:#404040;padding:16px;border:1px solid rgba(0,0,0,0.05);border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,0.05) inset;margin:-20px 0 10px;line-height:200%}.twitter{margin:-20px 0 40px;color:#666}.twitter iframe{vertical-align:bottom;margin:0 0 0 5px}.footer{text-align:center;padding-top:20px;margin-top:60px;font-size:14px;color:#808080;border-top:1px solid #ccc}.footer a,.footer a:visited,.footer a:focus{color:#333}.footer a:hover{color:#000} -------------------------------------------------------------------------------- /client/admin/common/directives/oDataPager.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.odataPager",[]) 2 | 3 | .directive("zyOdataPager", ['$compile',($compile)-> 4 | link:(scope, element, attrs) -> 5 | data=undefined 6 | update = -> 7 | scope.currentPage=1 if scope.currentPage is undefined 8 | scope.currentPage=1 if scope.numData isnt data['@odata.count'] and scope.numData #如果数量发生变化则重置为第一页. 9 | scope.numData=data['@odata.count'] 10 | scope.numPages=Math.ceil(scope.numData / 10) 11 | scope.totalItems=scope.numData 12 | element[0].innerHTML='' 13 | if scope.currentPage < scope.numPages 14 | element[0].innerHTML+='
{{(currentPage-1)*10+1}} - {{currentPage*10}} of {{numData}}
' 15 | else 16 | element[0].innerHTML+='
{{(currentPage-1)*10+1}} - {{numData}} of {{numData}}
' 17 | element[0].innerHTML='' if scope.numData is '0' 18 | $compile(element.contents())(scope) 19 | 20 | scope.$watch attrs.zyOdataPager, (value) -> 21 | data=value 22 | return if data==null or data==undefined 23 | update() 24 | ]) -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/scss/config/_defaults.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | Defaults 3 | 4 | This file is exclusively intended for setting up variables 5 | Never add styles directly to this file 6 | ========================================================================== */ 7 | 8 | // Border radius 9 | // ------------------------- 10 | 11 | $border-radius: 4px; 12 | 13 | 14 | // Forms 15 | // ------------------------- 16 | 17 | %input-style { 18 | background-color: #fff; 19 | outline: none; 20 | width: 100%; 21 | *width: 95%; 22 | height: 30px; 23 | padding: 4px 10px; 24 | border: 1px solid $hr-border; 25 | border-radius: $border-radius; 26 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); 27 | box-shadow: inset 0 1px 1px rgba(0,0,0,.075); 28 | 29 | -moz-box-sizing: border-box; 30 | -webkit-box-sizing: border-box; 31 | box-sizing: border-box; 32 | &:focus { 33 | border-color: $form-blue; 34 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba($form-blue,.6); 35 | box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba($form-blue,.6); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /chrome-extension/content_script.js: -------------------------------------------------------------------------------- 1 | var server = "http://api.zackyang.com" 2 | var client = "http://www.zackyang.com" 3 | var admin = "http://admin.zackyang.com" 4 | 5 | try { 6 | token = ''; 7 | //读取token 8 | try{ token = chrome.storage.local.get('token') } catch(e) {} 9 | 10 | 11 | //设置token 12 | if(!token){ 13 | var token = prompt("please input token.",""); 14 | chrome.storage.local.set({'token': token}) 15 | } 16 | 17 | $.ajaxSetup({ 18 | beforeSend: function (xhr) 19 | { 20 | xhr.setRequestHeader("authorization", token); 21 | } 22 | }); 23 | 24 | 25 | var data = readability.get() 26 | $("body").html('
Processing...
') 27 | 28 | if(data.description.length > 200) 29 | data.description = data.description.substring(0, 200) + "..."; 30 | 31 | $.post(server + "/odata/articles", 32 | { 33 | content: data.content, 34 | description: data.description, 35 | title: data.title, 36 | meta : {}, 37 | date: new Date(), 38 | comments : [] 39 | }, 40 | function(data) { 41 | window.location.href = admin + "/article/" + data._id; 42 | }); 43 | } 44 | catch (e) { 45 | alert("解析失败"); 46 | window.location.reload(); 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /client/admin/app/category/category.coffee: -------------------------------------------------------------------------------- 1 | angular.module('category',['resource.categories', 'category-edit']) 2 | 3 | .config(["$routeProvider", ($routeProvider) -> 4 | $routeProvider 5 | .when "/category", 6 | templateUrl: "/app/category/category.tpl.html" 7 | controller: 'CategoryCtrl' 8 | ]) 9 | 10 | .controller('CategoryCtrl', 11 | ["$scope", "ngDialog", "Categories", "messager" 12 | ($scope, ngDialog, Categories, messager) -> 13 | $scope.languages = config.languages 14 | 15 | load = -> 16 | Categories.list (data)-> 17 | $scope.list = data.value 18 | 19 | $scope.openAddDialog = ()-> 20 | $scope.entity = {} 21 | openDialog() 22 | 23 | $scope.openEditDialog = (item) -> 24 | $scope.entity = item 25 | openDialog() 26 | 27 | openDialog = -> 28 | dialog = ngDialog.open 29 | template: '/app/category/category-edit-dialog.tpl.html' 30 | controller: 'CategoryEditDialogCtrl' 31 | scope: $scope 32 | dialog.closePromise.then load 33 | 34 | $scope.remove = (item)-> 35 | messager.confirm -> 36 | tip.show("Deleting") 37 | Categories.delete {id:item.id} 38 | , (data) -> 39 | messager.success "Delete channel successfully." 40 | load() 41 | 42 | load() 43 | ]) 44 | -------------------------------------------------------------------------------- /client/public/vendor/unify_1.3/theme/red/header1-red.css: -------------------------------------------------------------------------------- 1 | /*Menu 2 | ------------------------------------*/ 3 | /*Navbar*/ 4 | .header .navbar-default .navbar-nav > .active > a { 5 | color: #e74c3c; 6 | } 7 | 8 | /*Navber Toggle*/ 9 | .navbar-toggle, 10 | .navbar-default .navbar-toggle:hover, 11 | .navbar-default .navbar-toggle:focus { 12 | background: #e74c3c; 13 | } 14 | 15 | .navbar-toggle:hover { 16 | background: #c0392b !important; 17 | } 18 | 19 | .navbar-default .navbar-toggle { 20 | border-color: #c0392b; 21 | } 22 | 23 | /*Serach Box*/ 24 | .header .navbar .nav > li > a.search:hover { 25 | color: #e74c3c; 26 | border-bottom-color: #e74c3c; 27 | } 28 | 29 | /*Responsive @Media 30 | ------------------------------------*/ 31 | @media (min-width: 767px) { 32 | /*Navbar*/ 33 | .header .navbar-default .navbar-nav > li > a:hover, 34 | .header .navbar-default .navbar-nav > li.active > a { 35 | border-bottom: solid 2px #e74c3c; 36 | } 37 | 38 | .header .navbar-default .navbar-nav > .open > a, 39 | .header .navbar-default .navbar-nav > .open > a:hover, 40 | .header .navbar-default .navbar-nav > .open > a:focus { 41 | color: #e74c3c; 42 | } 43 | 44 | /*Dropdown Menu*/ 45 | .header .dropdown-menu { 46 | border-top: solid 2px #e74c3c; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /client/public/vendor/unify_1.3/theme/blue/header1-blue.css: -------------------------------------------------------------------------------- 1 | /*Menu 2 | ------------------------------------*/ 3 | /*Navbar*/ 4 | .header .navbar-default .navbar-nav > .active > a { 5 | color: #3498db; 6 | } 7 | 8 | /*Navber Toggle*/ 9 | .navbar-toggle, 10 | .navbar-default .navbar-toggle:hover, 11 | .navbar-default .navbar-toggle:focus { 12 | background: #3498db; 13 | } 14 | 15 | .navbar-toggle:hover { 16 | background: #2980b9 !important; 17 | } 18 | 19 | .navbar-default .navbar-toggle { 20 | border-color: #2980b9; 21 | } 22 | 23 | /*Serach Box*/ 24 | .header .navbar .nav > li > a.search:hover { 25 | color: #3498db; 26 | border-bottom-color: #3498db; 27 | } 28 | 29 | /*Responsive @Media 30 | ------------------------------------*/ 31 | @media (min-width: 767px) { 32 | /*Navbar*/ 33 | .header .navbar-default .navbar-nav > li > a:hover, 34 | .header .navbar-default .navbar-nav > li.active > a { 35 | border-bottom: solid 2px #3498db; 36 | } 37 | 38 | .header .navbar-default .navbar-nav > .open > a, 39 | .header .navbar-default .navbar-nav > .open > a:hover, 40 | .header .navbar-default .navbar-nav > .open > a:focus { 41 | color: #3498db; 42 | } 43 | 44 | /*Dropdown Menu*/ 45 | .header .dropdown-menu { 46 | border-top: solid 2px #3498db; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /client/public/vendor/unify_1.3/theme/light/header1-light.css: -------------------------------------------------------------------------------- 1 | /*Menu 2 | ------------------------------------*/ 3 | /*Navbar*/ 4 | .header .navbar-default .navbar-nav > .active > a { 5 | color: #787d80; 6 | } 7 | 8 | /*Navber Toggle*/ 9 | .navbar-toggle, 10 | .navbar-default .navbar-toggle:hover, 11 | .navbar-default .navbar-toggle:focus { 12 | background: #787d80; 13 | } 14 | 15 | .navbar-toggle:hover { 16 | background: #7f8c8d !important; 17 | } 18 | 19 | .navbar-default .navbar-toggle { 20 | border-color: #7f8c8d; 21 | } 22 | 23 | /*Serach Box*/ 24 | .header .navbar .nav > li > a.search:hover { 25 | color: #787d80; 26 | border-bottom-color: #787d80; 27 | } 28 | 29 | /*Responsive @Media 30 | ------------------------------------*/ 31 | @media (min-width: 767px) { 32 | /*Navbar*/ 33 | .header .navbar-default .navbar-nav > li > a:hover, 34 | .header .navbar-default .navbar-nav > li.active > a { 35 | border-bottom: solid 2px #787d80; 36 | } 37 | 38 | .header .navbar-default .navbar-nav > .open > a, 39 | .header .navbar-default .navbar-nav > .open > a:hover, 40 | .header .navbar-default .navbar-nav > .open > a:focus { 41 | color: #787d80; 42 | } 43 | 44 | /*Dropdown Menu*/ 45 | .header .dropdown-menu { 46 | border-top: solid 2px #787d80; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /client/public/vendor/unify_1.3/theme/orange/header1-orange.css: -------------------------------------------------------------------------------- 1 | /*Menu 2 | ------------------------------------*/ 3 | /*Navbar*/ 4 | .header .navbar-default .navbar-nav > .active > a { 5 | color: #e67e22; 6 | } 7 | 8 | /*Navber Toggle*/ 9 | .navbar-toggle, 10 | .navbar-default .navbar-toggle:hover, 11 | .navbar-default .navbar-toggle:focus { 12 | background: #e67e22; 13 | } 14 | 15 | .navbar-toggle:hover { 16 | background: #d35400 !important; 17 | } 18 | 19 | .navbar-default .navbar-toggle { 20 | border-color: #d35400; 21 | } 22 | 23 | /*Serach Box*/ 24 | .header .navbar .nav > li > a.search:hover { 25 | color: #e67e22; 26 | border-bottom-color: #e67e22; 27 | } 28 | 29 | /*Responsive @Media 30 | ------------------------------------*/ 31 | @media (min-width: 767px) { 32 | /*Navbar*/ 33 | .header .navbar-default .navbar-nav > li > a:hover, 34 | .header .navbar-default .navbar-nav > li.active > a { 35 | border-bottom: solid 2px #e67e22; 36 | } 37 | 38 | .header .navbar-default .navbar-nav > .open > a, 39 | .header .navbar-default .navbar-nav > .open > a:hover, 40 | .header .navbar-default .navbar-nav > .open > a:focus { 41 | color: #e67e22; 42 | } 43 | 44 | /*Dropdown Menu*/ 45 | .header .dropdown-menu { 46 | border-top: solid 2px #e67e22; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /client/admin/common/filters.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.filters", []) 2 | 3 | .filter "isFuture", -> 4 | (input) -> 5 | new Date(input) > new Date() 6 | 7 | .filter "utc", -> 8 | (val) -> 9 | date = new Date(val) 10 | new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) 11 | 12 | .filter 'fromNow', -> 13 | (input) -> 14 | return unless input? 15 | return moment(input).fromNow() 16 | 17 | .filter "line", -> 18 | (input) -> 19 | return unless input? 20 | return input.replace(//g,'>').replace(/\n/g,'
') 21 | 22 | .filter 'fileSize', -> 23 | (bytes) -> 24 | return bytes if bytes==null or bytes==undefined 25 | return '' if typeof bytes isnt 'number' 26 | return (bytes / 1000*1000*1000).toFixed(2) + ' GB' if bytes >= 1000000000 27 | return (bytes / 1000*1000).toFixed(2) + ' MB' if bytes >= 1000000 28 | return (bytes / 1000).toFixed(2) + ' KB' 29 | 30 | .filter 'remoteImage', -> 31 | (input) -> 32 | return unless input? 33 | return config.url.img + input 34 | 35 | .filter 'gravatar', -> 36 | (input) -> 37 | if input 38 | return 'http://www.gravatar.com/avatar/' + md5(input) 39 | else 40 | return '/img/avatar.png' -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Awesome", 3 | "version": "0.0.1", 4 | "license": "MIT", 5 | "private": true, 6 | "ignore": [ 7 | "**/.*", 8 | "node_modules", 9 | "bower_components", 10 | "test", 11 | "tests" 12 | ], 13 | "dependencies": { 14 | "jquery": "2.1.1", 15 | "jqueryui": "1.11.1", 16 | "moment": "2.8.1", 17 | "moment-range": "1.0.5", 18 | "bootstrap": "3.0.0", 19 | "fontawesome": "4.2.0", 20 | "messenger": "1.4.1", 21 | "blueimp-md5": "1.1.0", 22 | "dropzone": "3.10.2", 23 | "angular": "1.3.0", 24 | "angular-animate": "1.3.0", 25 | "angular-cookies": "1.3.0", 26 | "angular-messages": "1.3.0", 27 | "angular-resource": "1.3.0", 28 | "angular-route": "1.3.0", 29 | "angular-sanitize": "1.3.0", 30 | "angular-ui-utils": "0.1.0", 31 | "angular-translate": "2.4.0", 32 | "angular-translate-storage-cookie": "2.4.0", 33 | "angular-translate-storage-local": "2.4.0", 34 | "angulartics": "0.16.5", 35 | "ngprogress": "1.0.7", 36 | "ngstorage": "0.3.0", 37 | "jquery-cookie": "~1.4.1", 38 | "ngDialog": "~0.3.4", 39 | "angular-cookie": "~4.0.6", 40 | "sweetalert": "~0.3.1", 41 | "fancybox": "~2.1.5", 42 | "angular-deferred-bootstrap": "~0.1.5", 43 | "angular-utils-pagination": "~0.4.0", 44 | "angular-ui-router": "~0.2.13" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /server/server.coffee: -------------------------------------------------------------------------------- 1 | #dependencies 2 | odata = require 'node-odata' 3 | cors = require 'cors' 4 | path = require "path" 5 | errorHandler = require 'errorhandler' 6 | morgan = require 'morgan' 7 | domainError = require './middleware/domainError' 8 | 9 | server = odata('mongodb://localhost/cms') 10 | 11 | # save resouces for actions and functions. 12 | odata.resources = server.resources 13 | 14 | # odata config 15 | server.use cors exposedHeaders: "authorization" 16 | # server.use odata._express.bodyParser({uploadDir : path.join(path.dirname(__dirname), 'server/static/upload/temp')}) 17 | # server.use odata._express["static"](path.join(__dirname, "./static")) 18 | server.use require("./middleware/authorization") 19 | server.use morgan("short") 20 | server.use domainError() 21 | server.use errorHandler() 22 | 23 | # init resources 24 | server.use require('./resources/article/article') 25 | server.use require('./resources/article/category') 26 | server.use require('./resources/article/comment') 27 | server.use require('./resources/gallery/gallery') 28 | server.use require('./resources/board/board') 29 | server.use require('./resources/system/user') 30 | 31 | # init functions 32 | server.use require('./functions/login') 33 | server.use require('./functions/upload') 34 | 35 | # start web server 36 | server.listen(process.env.PORT or 40002, -> 37 | # import data 38 | require('./bootstrap/init-data').import() 39 | ) 40 | -------------------------------------------------------------------------------- /client/admin/common/directives/epicEditor.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.epicEditor",[]) 2 | 3 | .directive 'epicEditor', -> 4 | require: "ngModel" 5 | replace: true 6 | template: "
" 7 | scope: 8 | md: '=' 9 | link: (scope, element, attrs, ngModel) -> 10 | new EpicEditor().remove('article') 11 | opts = 12 | container: element.get(0) 13 | file: 14 | name: 'article' 15 | defaultContent: scope.md 16 | autoSave: false 17 | autogrow: 18 | minHeight: 300 19 | maxHeight: 300 20 | theme: 21 | base: '/../../plugin/EpicEditor-v0.2.2/themes/base/epiceditor.css' 22 | preview: '/../../plugin/EpicEditor-v0.2.2/themes/preview/epic-light.css' 23 | editor: '/../../plugin/EpicEditor-v0.2.2/themes/editor/github.css' 24 | 25 | editor = new EpicEditor(opts) 26 | 27 | editor.load -> 28 | epicEditor = editor.getElement("editor") 29 | content = epicEditor.body.innerHTML 30 | 31 | $("body", epicEditor).blur -> 32 | currentContent = $(this).html() 33 | if content != currentContent 34 | content = currentContent 35 | editor.save() 36 | scope.$apply -> 37 | scope.md = editor.exportFile() 38 | htmlContent = editor.exportFile(undefined, 'html') 39 | ngModel.$setViewValue htmlContent -------------------------------------------------------------------------------- /client/public/common/filters.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.filters", []) 2 | 3 | .filter("i18n", ["context", (context)-> 4 | (input) -> 5 | return input unless input 6 | input[context.language] 7 | ]) 8 | 9 | .filter "isFuture", -> 10 | (input) -> 11 | new Date(input) > new Date() 12 | 13 | .filter "utc", -> 14 | (val) -> 15 | date = new Date(val) 16 | new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()) 17 | 18 | .filter 'fromNow', -> 19 | (input) -> 20 | return unless input? 21 | return input.format() 22 | 23 | .filter "line", -> 24 | (input) -> 25 | return unless input? 26 | return input.replace(//g,'>').replace(/\n/g,'
') 27 | 28 | .filter 'fileSize', -> 29 | (bytes) -> 30 | return bytes if bytes==null or bytes==undefined 31 | return '' if typeof bytes isnt 'number' 32 | return (bytes / 1000*1000*1000).toFixed(2) + ' GB' if bytes >= 1000000000 33 | return (bytes / 1000*1000).toFixed(2) + ' MB' if bytes >= 1000000 34 | return (bytes / 1000).toFixed(2) + ' KB' 35 | 36 | .filter 'remoteImage', -> 37 | (input) -> 38 | return unless input? 39 | return config.url.img + input 40 | 41 | .filter 'gravatar', -> 42 | (input) -> 43 | if input 44 | return 'http://www.gravatar.com/avatar/' + md5(input) 45 | else 46 | return '/img/avatar.png' 47 | -------------------------------------------------------------------------------- /client/public/app/i18n/languages/zh-cn.coffee: -------------------------------------------------------------------------------- 1 | translationsZH= 2 | global: 3 | menu: 4 | logotip: '根本停不下来!' 5 | home: '首页' 6 | archive: '归档' 7 | board: '留言板' 8 | issue: '问题' 9 | gallery: '相册' 10 | about: '关于' 11 | admin: '管理' 12 | breadcrumb: 13 | home: '主页' 14 | loading: '努力加载中' 15 | post: '提交中' 16 | languages: '语言' 17 | article: 18 | preview: '上一篇' 19 | next: '下一篇' 20 | edit: '编辑' 21 | comments: '评论' 22 | source: '来源' 23 | views_count: '{{meta.views || 0}} 人浏览' 24 | comments_count: '{{meta.comments || 0}} 条回复' 25 | related_posts: '相关文章' 26 | not_found: '没有找到文章 T_T' 27 | menu: 28 | view_all: '浏览全部' 29 | view_by_group: '按分组浏览' 30 | breadcrumb: 31 | tag: "文章标签 '{{tag}}'" 32 | key: "关键字: '{{key}}'" 33 | comment: 34 | welcome:"欢迎" 35 | hide:"隐藏" 36 | change:"修改" 37 | name:"昵称" 38 | email:"电子邮件" 39 | content:"新增评论" 40 | submit:"提交评论" 41 | complete:"评论发布成功." 42 | nameValidTxt:"请输入您的昵称." 43 | contentValidTxt:"请输入评论内容." 44 | sider: 45 | search: '搜索' 46 | lastestComments: '最新评论' 47 | board: 48 | welcome:"欢迎" 49 | hide:"隐藏" 50 | change:"修改" 51 | name:"昵称" 52 | email:"电子邮件" 53 | content:"新增留言" 54 | submit:"提交留言" 55 | complete:"留言发布成功." 56 | nameValidTxt:"请输入您的昵称." 57 | contentValidTxt:"请输入评论内容." 58 | -------------------------------------------------------------------------------- /react-native/src/app/post/containers/Detail.js: -------------------------------------------------------------------------------- 1 | import styles from './Detail.styles'; 2 | import React, { Component, StyleSheet, ScrollView, Text, View, ListView, TouchableOpacity } from 'react-native'; 3 | import Dimensions from 'Dimensions'; 4 | import { connect } from 'react-redux/native'; 5 | import HTMLView from 'react-native-htmlview'; 6 | import * as actions from '../redux/post'; 7 | import Header from '../../layout/Header'; 8 | import Title from '../components/Title'; 9 | 10 | @connect((state) => ({ 11 | post: state.post.post, 12 | }), actions) 13 | export default class App extends Component { 14 | constructor(props) { 15 | super(props); 16 | } 17 | 18 | componentDidMount() { 19 | this.props.fetchPostByUrl(this.props.params.post.url); 20 | } 21 | 22 | toList() { 23 | this.props.router.pop(); 24 | } 25 | 26 | render() { 27 | let { post = {}, params } = this.props; 28 | post = post[this.props.params.post.url] || this.props.params.post; 29 | const { width, height } = Dimensions.get('window'); 30 | return ( 31 | 32 |
33 | 34 | 35 | <View style={styles.contentView}> 36 | {post.content && 37 | <HTMLView value={post.content} stylesheet={styles} /> 38 | } 39 | </View> 40 | </ScrollView> 41 | </View> 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /client/public/app/gallery/list/gallery-list.tpl.html: -------------------------------------------------------------------------------- 1 | <!--=== Breadcrumbs ===--> 2 | <div class="breadcrumbs margin-bottom-30"> 3 | <div class="container"> 4 | <h1 class="pull-left">{{'global.menu.gallery' | translate}}</h1> 5 | <ul class="pull-right breadcrumb"> 6 | <li><a href="/">{{'global.breadcrumb.home' | translate}}</a></li> 7 | <li class="active">{{'global.menu.gallery' | translate}}</li> 8 | </ul> 9 | </div> 10 | </div> 11 | <!--=== End Breadcrumbs ===--> 12 | 13 | <!--=== Content Part ===--> 14 | <div class="container"> 15 | <div class="row" ng-repeat="galleries in group"> 16 | <div class="col-md-4" ng-repeat="gallery in galleries"> 17 | <div class="thumbnails thumbnail-style thumbnail-kenburn"> 18 | <div class="thumbnail-img"> 19 | <div class="overflow-hidden"> 20 | <a href="/gallery/{{gallery.url}}" ><img class="img-responsive" ng-src="{{gallery.cover | remoteImage}}" alt=""></a> 21 | </div> 22 | </div> 23 | <div class="caption"> 24 | <h3><a class="hover-effect" href="/gallery/{{gallery.url}}">{{gallery.name | i18n}}</a></h3> 25 | <p>{{gallery.description | i18n}}</p> 26 | </div> 27 | </div> 28 | </div> 29 | </div> 30 | </div> 31 | 32 | 33 | <!--=== End Content Part ===--> 34 | -------------------------------------------------------------------------------- /client/admin/app/app.coffee: -------------------------------------------------------------------------------- 1 | angular.module("app", 2 | ['ngRoute' 3 | 'ngCookies' 4 | 'ngSanitize' 5 | 'admin-templates' 6 | 'dashboard' 7 | 'category' 8 | 'article' 9 | 'gallery' 10 | 'system' 11 | 'dialogs' 12 | 'framework.controllers' 13 | 'zy.services' 14 | 'zy.directives' 15 | 'zy.filters' 16 | 'zy.untils' 17 | 'ngProgress' 18 | 'ngStorage' 19 | 'ngDialog' 20 | 'angularFileUpload' 21 | 'ui.utils' 22 | 'ui.bootstrap' 23 | ]) 24 | 25 | .config ["$locationProvider", ($locationProvider) -> 26 | $locationProvider.html5Mode 27 | enabled: true 28 | requireBase: false 29 | ] 30 | 31 | #when route missing then goto 404 page. 32 | .config(["$routeProvider",($routeProvider) -> 33 | $routeProvider.otherwise redirectTo: "/404" 34 | ]) 35 | 36 | .run ['ngProgress', (ngProgress) -> 37 | ngProgress.color('#5cb85c') 38 | ] 39 | 40 | #try to auto login. 41 | .run(["$rootScope","security","$location","context", 42 | ($rootScope,security,$location, context) -> 43 | current = $location.path() 44 | if current != '/login' 45 | $rootScope.__returnUrl = current 46 | $location.path('/login').replace() 47 | security.autoLogin().then (data) -> 48 | context.account= 49 | name:data.name 50 | email:data.email 51 | context.auth.admin = true 52 | $rootScope.$broadcast "loginSuccessed" 53 | , -> 54 | $rootScope.$broadcast "logoutSuccessed" 55 | ]) 56 | 57 | .run ["$rootScope", ($rootScope) -> 58 | $rootScope.config = config 59 | ] 60 | -------------------------------------------------------------------------------- /client/public/app/article/Common/article-post-header.tpl.html: -------------------------------------------------------------------------------- 1 | <div class="blog-post-tags"> 2 | <ul class="list-unstyled list-inline blog-info"> 3 | <li><i class="fa fa-calendar"></i> {{item.date | date:"yyyy/MM/dd"}}</li> 4 | <li> 5 | <i class="fa fa-bookmark"></i> 6 | <a ng-href="/list/{{item.category}}">{{item.category | i18nCategory | i18n}}</a> 7 | </li> 8 | <li><i class="fa fa-pencil"></i> {{item.meta.author}}</li> 9 | <li><i class="fa fa-comments"></i> {{'article.comments_count' | translate: item}}</li> 10 | <li><i class="fa fa-eye"></i> {{'article.views_count' | translate: item}}</li> 11 | <li ng-if="item.meta.tags.length > 0"> 12 | <ul class="list-unstyled list-inline blog-tags"> 13 | <li> 14 | <i class="fa fa-tags"></i> 15 | <a ng-repeat="tag in item.meta.tags track by $index" ng-href="/list/{{item.category}}/tag/{{tag}}">{{tag}}</a> 16 | </li> 17 | </ul> 18 | </li> 19 | <li ng-if="item.meta.source"> 20 | <i class="fa fa-external-link"></i> 21 | <a ng-href="{{item.meta.source}}" title="{{item.meta.source}}">{{'article.source' | translate}}</a> 22 | </li> 23 | <li ng-if="auth.admin"> 24 | <a href="JavaScript:void(0)" ng-click="edit(item)">{{'article.edit' | translate:item}}</a> 25 | </li> 26 | </ul> 27 | 28 | </div> 29 | -------------------------------------------------------------------------------- /client/admin/common/directives/activeLink.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.activeLink",[]) 2 | 3 | .directive("activeLink", 4 | ["$location", (location) -> 5 | restrict: "A" 6 | link: (scope, element, attrs) -> 7 | className = attrs.activeLink 8 | link = $(element).children("a")[0] 9 | path = $(link).attr('href') 10 | scope.location = location 11 | scope.$watch "location.path()", (currentPath) -> 12 | if match(path, currentPath) 13 | element.addClass className 14 | else 15 | element.removeClass className 16 | 17 | match = (path, currentPath)-> 18 | if path is '/' 19 | return currentPath is '/' 20 | else 21 | return currentPath.indexOf(path) is 0 22 | ]) 23 | 24 | .directive("activeParentLink", ["$location", (location) -> 25 | restrict: "A" 26 | link: (scope, element, attrs) -> 27 | className = attrs.activeParentLink 28 | links = $(element).children("ul").children("li").children("a") 29 | paths=[] 30 | for item in links 31 | paths.push $(item).attr('href') 32 | scope.location = location 33 | scope.$watch "location.path()", (currentPath) -> 34 | element.removeClass className 35 | for path in paths 36 | if match(path, currentPath) 37 | element.addClass className 38 | 39 | match = (path, currentPath)-> 40 | if path is '/' 41 | return currentPath is '/' 42 | else 43 | return currentPath.indexOf(path) is 0 44 | ]) 45 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/readme.md: -------------------------------------------------------------------------------- 1 | BootstrapCK Skin 2 | ==================== 3 | 4 | The BootstrapCK-Skin is a skin for [CKEditor4](http://ckeditor.com/) based on [Twitter Bootstrap3](http://getbootstrap.com/) styles. 5 | 6 | [Sass](http://sass-lang.com/) is used to rewrite the editor's styles and [Grunt](http://gruntjs.com/) to be able to watch, convert and minify the sass into css files. These files aren't really needed for the simple use of the skin, but handy if you want to make some adjustments to it. 7 | 8 | For more information about skins, please check the [CKEditor Skin SDK](http://docs.cksource.com/CKEditor_4.x/Skin_SDK) 9 | documentation. 10 | 11 | ## Installation 12 | 13 | **Just skin please** 14 | 15 | Add the whole bootstrapck folder to the skin folder.<br /> 16 | In ckeditor.js and config.js change the skin name to "bootstrapck".<br /> 17 | Done! 18 | 19 | **The whole skin - sass - grunt package** 20 | 21 | All the sass files are included in the bootstrapck folder, so first follow the 'just skin please'-steps<br /> 22 | Now add the Gruntfile.js and the package.json to de ckeditor folder. 23 | 24 | npm install 25 | grunt build 26 | 27 | You can start tampering now. 28 | 29 | ## Demo 30 | 31 | http://kunstmaan.github.io/BootstrapCK4-Skin/ 32 | 33 | ### Previous version 34 | 35 | If you would like to get the Bootstrap2 skin for CKeditor3, [here](https://github.com/Kunstmaan/BootstrapCK-Skin)'s the previous version. 36 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/templates/templates/default.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.addTemplates("default",{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),templates:[{title:"Image and Title",image:"template1.gif",description:"One main image with a title and text that surround the image.",html:'<h3><img src=" " alt="" style="margin-right: 10px" height="100" width="100" align="left" />Type the title here</h3><p>Type the text here</p>'},{title:"Strange Template",image:"template2.gif",description:"A template that defines two colums, each one with a title, and some text.", 6 | html:'<table cellspacing="0" cellpadding="0" style="width:100%" border="0"><tr><td style="width:50%"><h3>Title 1</h3></td><td></td><td style="width:50%"><h3>Title 2</h3></td></tr><tr><td>Text 1</td><td></td><td>Text 2</td></tr></table><p>More text goes here.</p>'},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.",html:'<div style="width: 80%"><h3>Title goes here</h3><table style="width:150px;float: right" cellspacing="0" cellpadding="0" border="1"><caption style="border:solid 1px black"><strong>Table title</strong></caption><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></table><p>Type the text here</p></div>'}]}); -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/skins/bootstrapck/sample/js/analytics.js: -------------------------------------------------------------------------------- 1 | var _ga=_ga||{},_gaq=_gaq||[];_ga.trackSocial=function(a,c){_ga.trackFacebook(a,c);_ga.trackTwitter(a,c)}; 2 | _ga.trackFacebook=function(a,c){var d=_ga.buildTrackerName_(c);try{FB&&FB.Event&&FB.Event.subscribe&&(FB.Event.subscribe("edge.create",function(b){_gaq.push([d+"_trackSocial","facebook","like",b,a])}),FB.Event.subscribe("edge.remove",function(b){_gaq.push([d+"_trackSocial","facebook","unlike",b,a])}),FB.Event.subscribe("message.send",function(b){_gaq.push([d+"_trackSocial","facebook","send",b,a])}))}catch(e){}};_ga.buildTrackerName_=function(a){return a?a+".":""}; 3 | _ga.trackTwitter=function(a,c){var d=_ga.buildTrackerName_(c);try{twttr&&twttr.events&&twttr.events.bind&&twttr.events.bind("tweet",function(b){if(b){var c;b.target&&"IFRAME"==b.target.nodeName&&(c=_ga.extractParamFromUri_(b.target.src,"url"));_gaq.push([d+"_trackSocial","twitter","tweet",c,a])}})}catch(e){}};_ga.extractParamFromUri_=function(a,c){if(a){var a=a.split("#")[0],d=a.split("?");if(1!=d.length)for(var d=decodeURI(d[1]),c=c+"=",d=d.split("&"),e=0,b;b=d[e];++e)if(0===b.indexOf(c))return unescape(b.split("=")[1])}}; 4 | jQuery&&jQuery("a").click(function(){var a=jQuery(this).attr("href");null!=a&&(a.match(/^http/i)&&!a.match(document.domain)?_gaq.push(["_trackEvent","outgoing","click",a]):a.match(/\.(doc|pdf|xls|ppt|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3)$/i)?_gaq.push(["_trackEvent","download","click",a]):a.match(/^mailto:/i)&&_gaq.push(["_trackEvent","mailto","click",a]))}); -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/README.md: -------------------------------------------------------------------------------- 1 | CKEditor 4 2 | ========== 3 | 4 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 5 | http://ckeditor.com - See LICENSE.md for license information. 6 | 7 | CKEditor is a text editor to be used inside web pages. It's not a replacement 8 | for desktop text editors like Word or OpenOffice, but a component to be used as 9 | part of web applications and websites. 10 | 11 | ## Documentation 12 | 13 | The full editor documentation is available online at the following address: 14 | http://docs.ckeditor.com 15 | 16 | ## Installation 17 | 18 | Installing CKEditor is an easy task. Just follow these simple steps: 19 | 20 | 1. **Download** the latest version from the CKEditor website: 21 | http://ckeditor.com. You should have already completed this step, but be 22 | sure you have the very latest version. 23 | 2. **Extract** (decompress) the downloaded file into the root of your website. 24 | 25 | **Note:** CKEditor is by default installed in the `ckeditor` folder. You can 26 | place the files in whichever you want though. 27 | 28 | ## Checking Your Installation 29 | 30 | The editor comes with a few sample pages that can be used to verify that 31 | installation proceeded properly. Take a look at the `samples` directory. 32 | 33 | To test your installation, just call the following page at your website: 34 | 35 | http://<your site>/<CKEditor installation path>/samples/index.html 36 | 37 | For example: 38 | 39 | http://www.example.com/ckeditor/samples/index.html 40 | -------------------------------------------------------------------------------- /server/functions/upload.coffee: -------------------------------------------------------------------------------- 1 | fs = require("fs") 2 | mkdirp = require('mkdirp') 3 | gm = require('gm') 4 | func = require('node-odata').Function 5 | resources = require('node-odata').resources 6 | 7 | router = func() 8 | 9 | router.post '/file-upload', (req, res, next) -> 10 | sourcePath = req.files.file.path 11 | targetFolder = "./static/upload/" + req.query.path 12 | mkdirp(targetFolder) 13 | filename = req.query.name || crypto.createHash('sha1').update('' + +new Date()).digest('hex') 14 | fileExtension = req.files.file.name.split('.').pop() 15 | targetPath = targetFolder + '/' + filename + '.' + fileExtension 16 | 17 | #缩略图 18 | if req.query.thumbnail 19 | [ width, height ] = req.query.thumbnail.split('x') 20 | gm(sourcePath) 21 | .resize(width, height, '^') 22 | .gravity('Center') 23 | .crop(width, height) 24 | .autoOrient() 25 | .noProfile() 26 | .write targetFolder + '/' + filename + '.thumbnail.' + fileExtension, -> 27 | 28 | 29 | complated = (err) -> 30 | throw err if err 31 | fs.unlink sourcePath, -> 32 | throw err if err 33 | #缩放 34 | if req.query.resize 35 | [ width, height ] = req.query.resize.split('x') 36 | gm(sourcePath) 37 | .resize(width, height, '@') 38 | .autoOrient() 39 | .noProfile() 40 | .write targetPath, complated 41 | #直接保存 42 | else 43 | fs.rename sourcePath, targetPath, complated 44 | 45 | res.set("Connection", 'keep-alive') 46 | res.send '/upload/' + req.query.path + '/' + filename + '.' + fileExtension 47 | 48 | module.exports = router 49 | -------------------------------------------------------------------------------- /server/functions/login.coffee: -------------------------------------------------------------------------------- 1 | crypto = require("crypto") 2 | func = require('node-odata').Function 3 | resources = require('node-odata').resources 4 | 5 | router = func() 6 | 7 | router.post '/login', (req, res, next) -> 8 | name = req.body.name 9 | pwd = req.body.password 10 | resources.user.findOne({password: pwd}).or([{ loginName: name }, { email: name }]).exec (err, user) -> 11 | unless user 12 | return res.send(401, "Failed to login.") 13 | user.token = crypto.createHash("md5").update(new Date() + pwd).digest("hex") 14 | user.save() 15 | res.set("authorization", user.token) 16 | res.json 17 | name: user.name 18 | loginName: user.loginName 19 | email: user.email 20 | gravatar: user.gravatar 21 | disabled: user.disabled 22 | 23 | router.post '/auto-login', (req, res, next) -> 24 | return res.send(401, "Failed to auto-login.") unless req.user 25 | res.json 26 | name: req.user.name 27 | loginName: req.user.loginName 28 | email: req.user.email 29 | gravatar: req.user.gravatar 30 | disabled: req.user.disabled 31 | 32 | router.post '/logoff', (req, res, next) -> 33 | token = req.get("authorization") 34 | resources.user.findOne(token: token).exec (err, user) -> 35 | unless user 36 | return res.send(400, "User not found.") 37 | user.token = null 38 | user.save() 39 | res.json 40 | name: user.name 41 | loginName: user.loginName 42 | email: user.email 43 | gravatar: user.gravatar 44 | disabled: user.disabled 45 | 46 | module.exports = router 47 | -------------------------------------------------------------------------------- /client/public/app/article/archives/article-archives.tpl.html: -------------------------------------------------------------------------------- 1 | <!--=== Breadcrumbs ===--> 2 | <div class="breadcrumbs margin-bottom-30"> 3 | <div class="container"> 4 | <h1 class="pull-left"> 5 | Blog 6 | </h1> 7 | <ul class="pull-right breadcrumb"> 8 | <li><a href="/">{{'global.breadcrumb.home' | translate}}</a></li> 9 | <li ng-if="category"><a href="/list/{{category.url}}">{{category.name | i18n}}</a></li> 10 | <li class="active" ng-if="params.tag">{{'article.breadcrumb.tag' | translate:params}}</li> 11 | <li class="active" ng-if="params.key">{{'article.breadcrumb.key' | translate:params}}</li> 12 | </ul> 13 | </div> 14 | </div> 15 | <!--=== End Breadcrumbs ===--> 16 | 17 | <!--=== Content Part ===--> 18 | <div class="container"> 19 | <div id="archives"> 20 | <ul class="list-unstyled"> 21 | <li ng-repeat="item in list | orderBy:'-date'"> 22 | <h3 class="badge archive-title"> 23 | {{item.date}} 24 | ({{item.posts.length}}) 25 | </h3> 26 | <ul class="list-unstyled"> 27 | <li ng-repeat="post in item.posts | orderBy:'-date'"> 28 | {{post.date | date:"yyyy-MM-dd"}} 29 | » 30 | <a href="/post/{{post.url}}" ng-bind-html="post.title | highlight:params.key"></a> 31 | </li> 32 | </ul> 33 | </li> 34 | </ul> 35 | </div> 36 | </div> 37 | <!--=== End Content Part ===--> 38 | -------------------------------------------------------------------------------- /client/admin/app/gallery/list/gallery-list.tpl.html: -------------------------------------------------------------------------------- 1 | <div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs"> 2 | <ul class="breadcrumb"> 3 | <li> 4 | <i class="fa fa-home home-icon"></i> 5 | <a href="/">Home</a> 6 | </li> 7 | <li class="active">Gallery</li> 8 | </ul> 9 | </div> 10 | 11 | <div class="page-content"> 12 | <div class="text-right"> 13 | <a href="gallery/new" class="btn btn-primary btn-sm"> 14 | <i class="fa fa-plus"></i> New 15 | </a> 16 | </div> 17 | <div class="hr hr-10 dotted hr-double"></div> 18 | <table class="table table-hover table-striped table-bordered"> 19 | <thead> 20 | <tr> 21 | <th style="width: 40px">Hidden</th> 22 | <th style="width: 120px">Cover</th> 23 | <th style="width: 100px">Url</th> 24 | <th style="width: 300px">Name</th> 25 | <th>Description</th> 26 | <th style="width: 40px">Order</th> 27 | </tr> 28 | </thead> 29 | <tbody> 30 | <tr ng-repeat="item in list"> 31 | <td><span ng-show="item.hidden"><i class="fa fa-check"></i></span></td> 32 | <td><img style="width: 97px;height: 62px;" ng-src="{{item.cover | remoteImage}}"/></td> 33 | <td>{{item.url}}</td> 34 | <td><a href="gallery/{{item.id}}">{{item.name}}</a></td> 35 | <td>{{item.description}}</td> 36 | <td>{{item.order}}</td> 37 | </tr> 38 | </tbody> 39 | </table> 40 | </div> 41 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/wsc/LICENSE.md: -------------------------------------------------------------------------------- 1 | Software License Agreement 2 | ========================== 3 | 4 | **CKEditor WSC Plugin** 5 | Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. 6 | 7 | Licensed under the terms of any of the following licenses at your choice: 8 | 9 | * GNU General Public License Version 2 or later (the "GPL"): 10 | http://www.gnu.org/licenses/gpl.html 11 | 12 | * GNU Lesser General Public License Version 2.1 or later (the "LGPL"): 13 | http://www.gnu.org/licenses/lgpl.html 14 | 15 | * Mozilla Public License Version 1.1 or later (the "MPL"): 16 | http://www.mozilla.org/MPL/MPL-1.1.html 17 | 18 | You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. 19 | 20 | Sources of Intellectual Property Included in this plugin 21 | -------------------------------------------------------- 22 | 23 | Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. 24 | 25 | Trademarks 26 | ---------- 27 | 28 | CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. 29 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/scayt/LICENSE.md: -------------------------------------------------------------------------------- 1 | Software License Agreement 2 | ========================== 3 | 4 | **CKEditor SCAYT Plugin** 5 | Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved. 6 | 7 | Licensed under the terms of any of the following licenses at your choice: 8 | 9 | * GNU General Public License Version 2 or later (the "GPL"): 10 | http://www.gnu.org/licenses/gpl.html 11 | 12 | * GNU Lesser General Public License Version 2.1 or later (the "LGPL"): 13 | http://www.gnu.org/licenses/lgpl.html 14 | 15 | * Mozilla Public License Version 1.1 or later (the "MPL"): 16 | http://www.mozilla.org/MPL/MPL-1.1.html 17 | 18 | You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. 19 | 20 | Sources of Intellectual Property Included in this plugin 21 | -------------------------------------------------------- 22 | 23 | Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission. 24 | 25 | Trademarks 26 | ---------- 27 | 28 | CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. 29 | -------------------------------------------------------------------------------- /client/public/common/directives/oDataPager.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.directives.odataPager",['template/odata-pager.html']) 2 | 3 | .directive("zyOdataPager", ['$compile', '$http', '$templateCache', ($compile, $http, $templateCache) -> 4 | link:(scope, element, attrs) -> 5 | data=undefined 6 | update = -> 7 | scope.currentPage = 1 if scope.currentPage is undefined 8 | scope.currentPage = 1 if scope.numData isnt data['@odata.count'] and scope.numData #如果数量发生变化则重置为第一页. 9 | scope.numData = data['@odata.count'] 10 | scope.numPages = Math.ceil(scope.numData / 10) 11 | scope.totalItems = scope.numData 12 | scope.selectPage = (count) -> 13 | scope.currentPage = count 14 | scope.setPage(count) if scope.setPage 15 | $http.get("template/odata-pager.html", {cache: $templateCache}).success (tplContent) -> 16 | element.replaceWith($compile(tplContent.trim())(scope)) 17 | 18 | scope.$watch attrs.zyOdataPager, (value) -> 19 | data=value 20 | return if data==null or data==undefined 21 | update() 22 | ]) 23 | 24 | angular.module("template/odata-pager.html", []).run ["$templateCache", ($templateCache) -> 25 | $templateCache.put "template/odata-pager.html", 26 | "<div class=\"odata-pager\">\n" + 27 | " <ul class=\"pagination\">"+ 28 | " <li style='float: left;' ng-if='currentPage!=numPages'><a href='Javascript:void(0)' ng-click='selectPage(currentPage+1)'>Older</a></li>" + 29 | " <li style='float: right;' ng-if='currentPage!=1'><a href='Javascript:void(0)' ng-click='selectPage(currentPage-1)'>Newer</a></li>" + 30 | " </ul>" + 31 | "</div>" 32 | ] 33 | -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/link/dialogs/anchor.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.md or http://ckeditor.com/license 4 | */ 5 | CKEDITOR.dialog.add("anchor",function(c){function d(a,b){return a.createFakeElement(a.document.createElement("a",{attributes:b}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:a,name:a,"data-cke-saved-name":a};if(this._.selectedElement)this._.selectedElement.data("cke-realelement")?(a=d(c,a),a.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(a)): 6 | this._.selectedElement.setAttributes(a);else{var b=c.getSelection(),b=b&&b.getRanges()[0];b.collapsed?(a=d(c,a),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,c.applyStyle(a))}},onHide:function(){delete this._.selectedElement},onShow:function(){var a=c.getSelection(),b=a.getSelectedElement(),d=b&&b.data("cke-realelement"),e=d?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b):CKEDITOR.plugins.link.getSelectedLink(c); 7 | e&&(this._.selectedElement=e,this.setValueOf("info","txtName",e.data("cke-saved-name")||""),!d&&a.selectElement(e),b&&(this._.selectedElement=b));this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return!this.getValue()?(alert(c.lang.link.anchor.errorName),!1):!0}}]}]}}); -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/wsc/dialogs/wsc.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. 3 | For licensing, see LICENSE.html or http://ckeditor.com/license 4 | */ 5 | 6 | html, body 7 | { 8 | background-color: transparent; 9 | margin: 0px; 10 | padding: 0px; 11 | } 12 | 13 | body 14 | { 15 | padding: 10px; 16 | } 17 | 18 | body, td, input, select, textarea 19 | { 20 | font-size: 11px; 21 | font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; 22 | } 23 | 24 | .midtext 25 | { 26 | padding:0px; 27 | margin:10px; 28 | } 29 | 30 | .midtext p 31 | { 32 | padding:0px; 33 | margin:10px; 34 | } 35 | 36 | .Button 37 | { 38 | border: #737357 1px solid; 39 | color: #3b3b1f; 40 | background-color: #c7c78f; 41 | } 42 | 43 | .PopupTabArea 44 | { 45 | color: #737357; 46 | background-color: #e3e3c7; 47 | } 48 | 49 | .PopupTitleBorder 50 | { 51 | border-bottom: #d5d59d 1px solid; 52 | } 53 | .PopupTabEmptyArea 54 | { 55 | padding-left: 10px; 56 | border-bottom: #d5d59d 1px solid; 57 | } 58 | 59 | .PopupTab, .PopupTabSelected 60 | { 61 | border-right: #d5d59d 1px solid; 62 | border-top: #d5d59d 1px solid; 63 | border-left: #d5d59d 1px solid; 64 | padding: 3px 5px 3px 5px; 65 | color: #737357; 66 | } 67 | 68 | .PopupTab 69 | { 70 | margin-top: 1px; 71 | border-bottom: #d5d59d 1px solid; 72 | cursor: pointer; 73 | } 74 | 75 | .PopupTabSelected 76 | { 77 | font-weight: bold; 78 | cursor: default; 79 | padding-top: 4px; 80 | border-bottom: #f1f1e3 1px solid; 81 | background-color: #f1f1e3; 82 | } 83 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CMS", 3 | "version": "0.0.1", 4 | "private": false, 5 | "author": "Zack <zackyang@outlook.com>", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/TossShinHwa/CMS.git" 9 | }, 10 | "engines": { 11 | "node": "0.12.x", 12 | "npm": "2.5.x" 13 | }, 14 | "scripts": { 15 | "start": "grunt" 16 | }, 17 | "dependencies": { 18 | "node-odata": "0.7.6", 19 | "cors": "2.4.2", 20 | "grunt-cli": "0.1.11", 21 | "errorhandler": "1.2.0", 22 | "morgan": "1.3.2", 23 | "lodash": "2.4.1", 24 | "gm": "*", 25 | "rss": "1.0.0", 26 | "coffee-script": "1.7.0", 27 | "migrate": "0.1.5" 28 | }, 29 | "devDependencies": { 30 | "open": "0.0.5", 31 | "matchdep": "0.3.0", 32 | "grunt": "0.4.1", 33 | "grunt-contrib-coffee": "0.10.1", 34 | "grunt-contrib-less": "0.11.0", 35 | "grunt-contrib-uglify": "0.4.0", 36 | "grunt-contrib-cssmin": "0.9.0", 37 | "grunt-contrib-watch": "0.6.1", 38 | "grunt-contrib-connect": "0.8.0", 39 | "grunt-contrib-concat": "0.3.0", 40 | "grunt-contrib-clean": "0.5.0", 41 | "grunt-contrib-copy": "0.5.0", 42 | "grunt-concurrent": "0.5.0", 43 | "grunt-sails-linker": "0.9.2", 44 | "connect-livereload": "0.3.1", 45 | "grunt-open": "0.2.3", 46 | "grunt-newer": "0.6.0", 47 | "grunt-rev": "0.1.0", 48 | "grunt-text-replace": "0.3.10", 49 | "connect-modrewrite": "0.7.9", 50 | "grunt-angular-templates": "0.5.7", 51 | "grunt-nodemon": "0.2.0", 52 | "grunt-bower": "0.14.0", 53 | "grunt-coffeelint": "0.0.13", 54 | "grunt-contrib-imagemin": "0.9.1" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /client/public/app/gallery/detail/gallery-detail.tpl.html: -------------------------------------------------------------------------------- 1 | <!--=== Breadcrumbs ===--> 2 | <div class="breadcrumbs margin-bottom-30"> 3 | <div class="container"> 4 | <h1 class="pull-left">{{gallery.name | i18n}}</h1> 5 | <ul class="pull-right breadcrumb"> 6 | <li><a href="/">{{'global.breadcrumb.home' | translate}}</a></li> 7 | <li><a href="/gallery">{{'global.menu.gallery' | translate}}</a></li> 8 | <li class="active">{{gallery.name | i18n}}</li> 9 | </ul> 10 | </div> 11 | </div> 12 | <!--=== End Breadcrumbs ===--> 13 | 14 | <!--=== Content Part ===--> 15 | <div class="container"> 16 | <blockquote class="hero" ng-show="gallery.description" style="margin-top: 0;"> 17 | <p>{{gallery.description | i18n}}</p> 18 | </blockquote> 19 | 20 | <div class="gallery-page"> 21 | <div class="row"> 22 | <div class="col-md-3 col-sm-6" dir-paginate="photo in gallery.photos | orderBy:'Name' | itemsPerPage: 12"> 23 | <a class="thumbnail fancybox-button zoomer" data-rel="fancybox-button" fancybox title="" 24 | ng-href="{{photo.url | remoteImage}}"> 25 | <span class="overlay-zoom"> 26 | <img ng-src="{{photo.thumbnail | remoteImage}}" alt="" class="img-responsive"> 27 | <div class="zoom-icon"></div> 28 | </span> 29 | </a> 30 | </div> 31 | </div> 32 | 33 | <div class="text-right"> 34 | <dir-pagination-controls></dir-pagination-controls> 35 | </div> 36 | </div> 37 | </div> 38 | <!--=== End Content Part ===--> 39 | -------------------------------------------------------------------------------- /client/public/common/services/security.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.security", ['resource.users', 'ipCookie']) 2 | .factory "security", ['Users','$q', "$http", "ipCookie", (Users, $q, $http, ipCookie) -> 3 | autoLogin: -> 4 | deferred = $q.defer() 5 | token = ipCookie('authorization') 6 | if token 7 | $http.defaults.headers.common['authorization'] = token 8 | $http.post "#{config.url.api}/auto-login", undefined 9 | .success (data) -> 10 | deferred.resolve data 11 | .error (error) -> 12 | #ipCookie.remove('authorization', { path: '/' }) 13 | deferred.reject undefined 14 | else 15 | deferred.reject undefined 16 | deferred.promise 17 | 18 | login: (user) -> 19 | deferred = $q.defer() 20 | $http.post "#{config.url.api}/login", { name: user.name, password: user.password } 21 | .success (data, status, headers) -> 22 | token = headers('authorization') 23 | $http.defaults.headers.common['authorization'] = token 24 | if user.remember 25 | ipCookie('authorization', token, { expires: 180, path: '/', domain: config.host.domain }) 26 | else 27 | ipCookie('authorization', token, { path: '/', domain: config.host.domain }) 28 | deferred.resolve data 29 | .error (error) -> 30 | deferred.reject undefined 31 | deferred.promise 32 | 33 | logoff: -> 34 | deferred = $q.defer() 35 | $http.post "#{config.url.api}/logoff", undefined 36 | .success (data) -> 37 | ipCookie.remove('authorization', { path: '/' }) 38 | delete $http.defaults.headers.common['authorization'] 39 | deferred.resolve "OK" 40 | deferred.promise 41 | ] -------------------------------------------------------------------------------- /client/admin/plugin/ckeditor_4.4.5/plugins/scayt/dialogs/toolbar.css: -------------------------------------------------------------------------------- 1 | a 2 | { 3 | text-decoration:none; 4 | padding: 2px 4px 4px 6px; 5 | display : block; 6 | border-width: 1px; 7 | border-style: solid; 8 | margin : 0px; 9 | } 10 | 11 | a.cke_scayt_toogle:hover, 12 | a.cke_scayt_toogle:focus, 13 | a.cke_scayt_toogle:active 14 | { 15 | border-color: #316ac5; 16 | background-color: #dff1ff; 17 | color : #000; 18 | cursor: pointer; 19 | margin : 0px; 20 | } 21 | a.cke_scayt_toogle { 22 | color : #316ac5; 23 | border-color: #fff; 24 | } 25 | .scayt_enabled a.cke_scayt_item { 26 | color : #316ac5; 27 | border-color: #fff; 28 | margin : 0px; 29 | } 30 | .scayt_disabled a.cke_scayt_item { 31 | color : gray; 32 | border-color : #fff; 33 | } 34 | .scayt_enabled a.cke_scayt_item:hover, 35 | .scayt_enabled a.cke_scayt_item:focus, 36 | .scayt_enabled a.cke_scayt_item:active 37 | { 38 | border-color: #316ac5; 39 | background-color: #dff1ff; 40 | color : #000; 41 | cursor: pointer; 42 | } 43 | .scayt_disabled a.cke_scayt_item:hover, 44 | .scayt_disabled a.cke_scayt_item:focus, 45 | .scayt_disabled a.cke_scayt_item:active 46 | { 47 | border-color: gray; 48 | background-color: #dff1ff; 49 | color : gray; 50 | cursor: no-drop; 51 | } 52 | .cke_scayt_set_on, .cke_scayt_set_off 53 | { 54 | display: none; 55 | } 56 | .scayt_enabled .cke_scayt_set_on 57 | { 58 | display: none; 59 | } 60 | .scayt_disabled .cke_scayt_set_on 61 | { 62 | display: inline; 63 | } 64 | .scayt_disabled .cke_scayt_set_off 65 | { 66 | display: none; 67 | } 68 | .scayt_enabled .cke_scayt_set_off 69 | { 70 | display: inline; 71 | } 72 | -------------------------------------------------------------------------------- /react-native/patch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * https://groups.google.com/forum/#!topic/reactnative/vrdcrjh-jX0 3 | * https://github.com/facebook/react-native/issues/4577 4 | * This file patches react-native's packager's .babelrc file to add support 5 | * for decorators. There's no way to subclass and extend the .babelrc file, 6 | * as such we have to directly modify it. 7 | */ 8 | 9 | const path = require('path'); 10 | const fs = require('fs'); 11 | 12 | // Path to react-native's .babelrc file. 13 | // This value can change as we update react-native. 14 | const babelRcPath = path.resolve( 15 | __dirname, 16 | './node_modules/react-native/', 17 | 'packager/react-packager/.babelrc' 18 | ); 19 | 20 | 21 | const babelRc = fs.readFileSync(babelRcPath, 'utf8'); 22 | const babelRcJson = JSON.parse(babelRc); 23 | 24 | // Decorator plugin we want to add to react-native's packager. 25 | const decoratorPlugin = 'transform-decorators-legacy'; 26 | 27 | // If we haven't already modified the .babelrc file then do it now. 28 | if (babelRcJson.plugins[0] !== decoratorPlugin) { 29 | console.log('Patched react-native packager .babelrc'); 30 | 31 | // Prepend. 32 | babelRcJson.plugins.unshift(decoratorPlugin); 33 | 34 | // Write file. 35 | fs.writeFileSync( 36 | babelRcPath, 37 | JSON.stringify(babelRcJson), 38 | 'utf8' 39 | ); 40 | } 41 | 42 | 43 | 44 | /* remove other .babelrc */ 45 | const uselessBabelRcPath = path.resolve( 46 | __dirname, 47 | './node_modules/cuz-native/', 48 | 'node_modules/redux-request/', 49 | '.babelrc' 50 | ); 51 | fs.unlink(uselessBabelRcPath, (err) => { 52 | if (err) throw err; 53 | console.log('Removed uesless .babelrc'); 54 | }); 55 | -------------------------------------------------------------------------------- /client/admin/common/services/security.coffee: -------------------------------------------------------------------------------- 1 | angular.module("zy.services.security", ['resource.users', 'ipCookie']) 2 | .factory "security", ['Users','$q', "$http", "ipCookie", (Users, $q, $http, ipCookie) -> 3 | autoLogin: -> 4 | deferred = $q.defer() 5 | token = ipCookie('authorization') 6 | if token 7 | $http.defaults.headers.common['authorization'] = token 8 | $http.post "#{config.url.api}/auto-login", undefined 9 | .success (data) -> 10 | deferred.resolve data 11 | .error (error) -> 12 | ipCookie.remove('authorization', { path: '/' }) 13 | deferred.reject undefined 14 | else 15 | deferred.reject undefined 16 | deferred.promise 17 | 18 | login: (user) -> 19 | deferred = $q.defer() 20 | $http.post "#{config.url.api}/login", { name: user.name, password: user.password } 21 | .success (data, status, headers) -> 22 | token = headers('authorization') 23 | $http.defaults.headers.common['authorization'] = token 24 | 25 | params = 26 | path: '/' 27 | domain: config.host.domain 28 | params.domain = '' if config.host.domain is 'localhost' 29 | params.expires = 180 if user.remember 30 | ipCookie('authorization', token, params) 31 | deferred.resolve data 32 | .error (error) -> 33 | deferred.reject undefined 34 | deferred.promise 35 | 36 | logoff: -> 37 | deferred = $q.defer() 38 | $http.post "#{config.url.api}/logoff", undefined 39 | .success (data) -> 40 | ipCookie.remove('authorization', { path: '/' }) 41 | delete $http.defaults.headers.common['authorization'] 42 | deferred.resolve "OK" 43 | deferred.promise 44 | ] 45 | -------------------------------------------------------------------------------- /react-native/ios/App/Info.plist: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 | <plist version="1.0"> 4 | <dict> 5 | <key>CFBundleDevelopmentRegion</key> 6 | <string>en</string> 7 | <key>CFBundleExecutable</key> 8 | <string>$(EXECUTABLE_NAME)</string> 9 | <key>CFBundleIdentifier</key> 10 | <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string> 11 | <key>CFBundleInfoDictionaryVersion</key> 12 | <string>6.0</string> 13 | <key>CFBundleName</key> 14 | <string>$(PRODUCT_NAME)</string> 15 | <key>CFBundlePackageType</key> 16 | <string>APPL</string> 17 | <key>CFBundleShortVersionString</key> 18 | <string>1.0</string> 19 | <key>CFBundleSignature</key> 20 | <string>????</string> 21 | <key>CFBundleVersion</key> 22 | <string>1</string> 23 | <key>LSRequiresIPhoneOS</key> 24 | <true/> 25 | <key>UILaunchStoryboardName</key> 26 | <string>LaunchScreen</string> 27 | <key>UIRequiredDeviceCapabilities</key> 28 | <array> 29 | <string>armv7</string> 30 | </array> 31 | <key>UISupportedInterfaceOrientations</key> 32 | <array> 33 | <string>UIInterfaceOrientationPortrait</string> 34 | <string>UIInterfaceOrientationLandscapeLeft</string> 35 | <string>UIInterfaceOrientationLandscapeRight</string> 36 | </array> 37 | <key>UIViewControllerBasedStatusBarAppearance</key> 38 | <false/> 39 | <key>NSLocationWhenInUseUsageDescription</key> 40 | <string></string> 41 | <key>NSAppTransportSecurity</key> 42 | <dict> 43 | <!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ --> 44 | <key>NSAllowsArbitraryLoads</key> 45 | <true/> 46 | </dict> 47 | </dict> 48 | </plist> 49 | --------------------------------------------------------------------------------