├── src ├── main │ ├── webapp │ │ ├── images │ │ │ ├── bg.jpg │ │ │ ├── user.jpg │ │ │ ├── loading.gif │ │ │ └── fire_favicon.ico │ │ ├── fonts │ │ │ ├── icomoon.eot │ │ │ ├── icomoon.ttf │ │ │ ├── icomoon.woff │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ ├── glyphicons-halflings-regular.woff2 │ │ │ └── icomoon.svg │ │ ├── plugins │ │ │ ├── editor.md │ │ │ │ ├── images │ │ │ │ │ ├── loading.gif │ │ │ │ │ ├── loading@2x.gif │ │ │ │ │ ├── loading@3x.gif │ │ │ │ │ └── logos │ │ │ │ │ │ └── editormd-favicon-16x16.ico │ │ │ │ ├── fonts │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ ├── editormd-logo.eot │ │ │ │ │ ├── editormd-logo.ttf │ │ │ │ │ ├── editormd-logo.woff │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ │ └── editormd-logo.svg │ │ │ │ ├── lib │ │ │ │ │ ├── codemirror │ │ │ │ │ │ ├── theme │ │ │ │ │ │ │ ├── ambiance-mobile.css │ │ │ │ │ │ │ ├── neat.css │ │ │ │ │ │ │ ├── elegant.css │ │ │ │ │ │ │ ├── neo.css │ │ │ │ │ │ │ ├── eclipse.css │ │ │ │ │ │ │ ├── cobalt.css │ │ │ │ │ │ │ ├── monokai.css │ │ │ │ │ │ │ ├── rubyblue.css │ │ │ │ │ │ │ ├── night.css │ │ │ │ │ │ │ ├── the-matrix.css │ │ │ │ │ │ │ ├── colorforth.css │ │ │ │ │ │ │ ├── blackboard.css │ │ │ │ │ │ │ ├── 3024-day.css │ │ │ │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ │ │ │ ├── paraiso-light.css │ │ │ │ │ │ │ ├── paraiso-dark.css │ │ │ │ │ │ │ └── 3024-night.css │ │ │ │ │ │ ├── addon │ │ │ │ │ │ │ ├── display │ │ │ │ │ │ │ │ ├── fullscreen.css │ │ │ │ │ │ │ │ └── fullscreen.js │ │ │ │ │ │ │ ├── search │ │ │ │ │ │ │ │ └── matchesonscrollbar.css │ │ │ │ │ │ │ ├── fold │ │ │ │ │ │ │ │ ├── foldgutter.css │ │ │ │ │ │ │ │ ├── indent-fold.js │ │ │ │ │ │ │ │ └── markdown-fold.js │ │ │ │ │ │ │ ├── dialog │ │ │ │ │ │ │ │ └── dialog.css │ │ │ │ │ │ │ ├── hint │ │ │ │ │ │ │ │ ├── show-hint.css │ │ │ │ │ │ │ │ └── anyword-hint.js │ │ │ │ │ │ │ ├── mode │ │ │ │ │ │ │ │ └── multiplex_test.js │ │ │ │ │ │ │ ├── lint │ │ │ │ │ │ │ │ ├── yaml-lint.js │ │ │ │ │ │ │ │ ├── json-lint.js │ │ │ │ │ │ │ │ ├── css-lint.js │ │ │ │ │ │ │ │ └── coffeescript-lint.js │ │ │ │ │ │ │ ├── edit │ │ │ │ │ │ │ │ ├── trailingspace.js │ │ │ │ │ │ │ │ └── continuelist.js │ │ │ │ │ │ │ ├── tern │ │ │ │ │ │ │ │ └── worker.js │ │ │ │ │ │ │ ├── runmode │ │ │ │ │ │ │ │ └── colorize.js │ │ │ │ │ │ │ └── scroll │ │ │ │ │ │ │ │ ├── simplescrollbars.css │ │ │ │ │ │ │ │ └── scrollpastend.js │ │ │ │ │ │ ├── mode │ │ │ │ │ │ │ ├── tiddlywiki │ │ │ │ │ │ │ │ └── tiddlywiki.css │ │ │ │ │ │ │ ├── ruby │ │ │ │ │ │ │ │ └── test.js │ │ │ │ │ │ │ ├── tiki │ │ │ │ │ │ │ │ └── tiki.css │ │ │ │ │ │ │ ├── diff │ │ │ │ │ │ │ │ └── diff.js │ │ │ │ │ │ │ ├── ntriples │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── spreadsheet │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── http │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── solr │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── z80 │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── ecl │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── rust │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── turtle │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── pascal │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── pig │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── vbscript │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── gherkin │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── properties │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── javascript │ │ │ │ │ │ │ │ └── typescript.html │ │ │ │ │ │ │ ├── sass │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── perl │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── idl │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── dart │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ │ ├── xml │ │ │ │ │ │ │ │ └── test.js │ │ │ │ │ │ │ └── jinja2 │ │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── LICENSE │ │ │ │ │ └── jquery.flowchart.min.js │ │ │ │ ├── css │ │ │ │ │ └── editormd.logo.min.css │ │ │ │ └── plugins │ │ │ │ │ └── test-plugin │ │ │ │ │ └── test-plugin.js │ │ │ ├── jquery-jcryption │ │ │ │ └── fo-jcryption-gen-keys.js │ │ │ └── bootstrap-validation │ │ │ │ └── css │ │ │ │ └── bootstrapValidator.min.css │ │ ├── modules │ │ │ ├── index │ │ │ │ ├── index.service.js │ │ │ │ └── index.controller.js │ │ │ ├── common │ │ │ │ ├── 404.view.html │ │ │ │ ├── loading.html │ │ │ │ ├── left-nav.controller.js │ │ │ │ ├── article.list.summary.view.html │ │ │ │ └── sign-controller-service.js │ │ │ ├── about │ │ │ │ ├── about.service.js │ │ │ │ ├── about.view.html │ │ │ │ └── about.controller.js │ │ │ ├── blog │ │ │ │ ├── tag │ │ │ │ │ ├── tag.service.js │ │ │ │ │ ├── tag.list.controller.js │ │ │ │ │ ├── tag.article.controller.js │ │ │ │ │ └── tag.list.view.html │ │ │ │ ├── archive │ │ │ │ │ ├── archive.service.js │ │ │ │ │ ├── archive.list.controller.js │ │ │ │ │ ├── archive.article.controller.js │ │ │ │ │ ├── archive.article.view.html │ │ │ │ │ └── archive.list.view.html │ │ │ │ ├── category │ │ │ │ │ ├── category.service.js │ │ │ │ │ ├── category.list.controller.js │ │ │ │ │ ├── category.article.controller.js │ │ │ │ │ └── category.list.view.html │ │ │ │ └── article │ │ │ │ │ ├── article.service.js │ │ │ │ │ ├── message.service.js │ │ │ │ │ └── article.controller.js │ │ │ ├── manage │ │ │ │ ├── info │ │ │ │ │ ├── info.manage.service.js │ │ │ │ │ ├── info.manage.controller.js │ │ │ │ │ ├── info.form.manage.controller.js │ │ │ │ │ └── info.manage.view.html │ │ │ │ ├── manage.controller.js │ │ │ │ ├── category │ │ │ │ │ ├── category.add.controller.js │ │ │ │ │ ├── category.manage.service.js │ │ │ │ │ └── category.add.view.html │ │ │ │ ├── sign │ │ │ │ │ └── sign.manage.service.js │ │ │ │ ├── manage.view.html │ │ │ │ ├── tag │ │ │ │ │ └── tag.manage.service.js │ │ │ │ ├── recommend │ │ │ │ │ └── recommend.manage.service.js │ │ │ │ ├── friendlink │ │ │ │ │ └── friendlink.manage.service.js │ │ │ │ ├── project │ │ │ │ │ └── project.manage.service.js │ │ │ │ ├── manage-left-sub-nav.html │ │ │ │ └── article │ │ │ │ │ ├── article.detail.manage.controller.js │ │ │ │ │ └── article.manage.service.js │ │ │ ├── project │ │ │ │ ├── project.service.js │ │ │ │ └── project.controller.js │ │ │ ├── friendlink │ │ │ │ ├── friendlink.service.js │ │ │ │ ├── friendlink.controller.js │ │ │ │ └── friendlink.view.html │ │ │ └── recommend │ │ │ │ ├── recommend.service.js │ │ │ │ └── recommend.controller.js │ │ ├── css │ │ │ ├── modules │ │ │ │ ├── recmd-proj.view.css │ │ │ │ ├── manage.view.css │ │ │ │ ├── friend.view.css │ │ │ │ ├── category-tag.view.css │ │ │ │ └── archive.view.css │ │ │ └── top-nav.css │ │ ├── json │ │ │ └── manage-nav-data.json │ │ └── scripts │ │ │ ├── http.interceptor.js │ │ │ ├── request.service.js │ │ │ └── constant.js │ ├── resources │ │ ├── messages.properties │ │ ├── database.properties │ │ └── config │ │ │ └── mybatis │ │ │ └── GuestEx_SqlMap.xml │ └── java │ │ └── studio │ │ └── baxia │ │ └── fo │ │ ├── util │ │ ├── CookieUtil.java │ │ ├── TokenException.java │ │ ├── ExecuteSecurity.java │ │ ├── TokenManagerUtil.java │ │ ├── ReturnUtil.java │ │ ├── TokenManagerUtilImpl.java │ │ ├── StringUtil.java │ │ └── MDUtil.java │ │ ├── vo │ │ ├── TagVo.java │ │ ├── AuthorSessionVo.java │ │ ├── ArchiveVo.java │ │ ├── AuthorVo.java │ │ ├── CategoryVo.java │ │ ├── ArticleVo.java │ │ └── ArticleMessageVo.java │ │ ├── service │ │ ├── IRecommendService.java │ │ ├── IProjectService.java │ │ ├── IGuestService.java │ │ ├── IFriendlinkService.java │ │ ├── IBTagService.java │ │ ├── IMessageService.java │ │ ├── impl │ │ │ └── GuestServiceImpl.java │ │ └── IBCategoryService.java │ │ ├── common │ │ ├── TreeInfo.java │ │ ├── TreeInfoResult.java │ │ ├── CommonResult.java │ │ ├── PageInfoResult.java │ │ └── CommonConstant.java │ │ ├── pojo │ │ ├── RecommendContent.java │ │ ├── Tag.java │ │ ├── Category.java │ │ ├── Guest.java │ │ └── Recommend.java │ │ └── dao │ │ ├── IFriendDao.java │ │ ├── IProjectDao.java │ │ ├── IRecommendDao.java │ │ ├── IGuestDao.java │ │ ├── ITagDao.java │ │ ├── IAuthorsDao.java │ │ └── ICategoryDao.java └── test │ └── java │ └── studio │ └── baxia │ └── fo │ ├── service │ └── IGuestServiceTest.java │ ├── BaseControlTest.java │ └── BaseTest.java ├── README.md └── .gitignore /src/main/webapp/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/images/bg.jpg -------------------------------------------------------------------------------- /src/main/webapp/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/icomoon.eot -------------------------------------------------------------------------------- /src/main/webapp/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/icomoon.ttf -------------------------------------------------------------------------------- /src/main/webapp/images/user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/images/user.jpg -------------------------------------------------------------------------------- /src/main/webapp/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/icomoon.woff -------------------------------------------------------------------------------- /src/main/webapp/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/images/loading.gif -------------------------------------------------------------------------------- /src/main/resources/messages.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/resources/messages.properties -------------------------------------------------------------------------------- /src/main/webapp/images/fire_favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/images/fire_favicon.ico -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/images/loading.gif -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/images/loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/images/loading@2x.gif -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/images/loading@3x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/images/loading@3x.gif -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/modules/index/index.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | app.service("IndexService", function ($http, $q) { 5 | }); 6 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/editormd-logo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/editormd-logo.eot -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/editormd-logo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/editormd-logo.ttf -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/editormd-logo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/editormd-logo.woff -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/css/modules/recmd-proj.view.css: -------------------------------------------------------------------------------- 1 | .recommend-body,.project-body{ 2 | padding:15px 8px; 3 | } 4 | .body-recommend-body,.body-project-body{ 5 | margin: 0 10px; 6 | } -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/webapp/modules/common/404.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

抱歉,你访问的页面不存在!

4 |
5 |
-------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/images/logos/editormd-favicon-16x16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panhainan/foblog/HEAD/src/main/webapp/plugins/editor.md/images/logos/editormd-favicon-16x16.ico -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /src/main/webapp/json/manage-nav-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "typeCode": "manage", 3 | "key2": 4 | { 5 | "key3": "value3", 6 | "key4": 7 | [ 8 | {"value": "name", "event": "function"} 9 | ] 10 | } 11 | } -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/webapp/css/top-nav.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | .top-nav { 4 | height: 100%; 5 | width: 100%; 6 | margin: 0; 7 | padding: 10px 15px; 8 | /* background-color: #FFF; 9 | border: 1px solid #E6E6E6; */ 10 | } 11 | -------------------------------------------------------------------------------- /src/main/webapp/modules/common/loading.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |

5 |

数据加载中,请稍候片刻...

6 |
-------------------------------------------------------------------------------- /src/main/webapp/css/modules/manage.view.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | #manage-body-content { 3 | padding: 0; 4 | -webkit-transition: width 0.3s ease; 5 | -moz-transition: width 0.3s ease; 6 | -o-transition: width 0.3s ease; 7 | transition: width 0.3s ease; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/webapp/modules/about/about.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | app.service("AboutService", function (RequestService) { 5 | this.get = function () { 6 | return RequestService.getRequest('/author', cfg_form); 7 | }; 8 | }); 9 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/webapp/modules/index/index.controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | 5 | app.controller("IndexController", function (IndexService, $scope) { 6 | console.log("IndexController") 7 | $scope.test = function(){ 8 | console.log("test"); 9 | } 10 | 11 | }); -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/CookieUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package studio.baxia.fo.util; 5 | 6 | /** 7 | * @author Fire.Pan. 8 | * @email panhainan@yeah.net 9 | * @date 2016年4月7日 10 | */ 11 | public class CookieUtil { 12 | public static final String DEFAULT_TOKEN_NAME = "X-Token"; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/TokenException.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | /** 4 | * 令牌异常 5 | * 6 | * @author huangyong 7 | * @since 1.0.0 8 | */ 9 | public class TokenException extends RuntimeException { 10 | 11 | public TokenException(String message) { 12 | super(message); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/tag/tag.service.js: -------------------------------------------------------------------------------- 1 | app.service("TagService",function(RequestService){ 2 | this.get = function () { 3 | return RequestService.getRequest('/blog/tag', cfg_form); 4 | }; 5 | this.getArtilces = function (name) { 6 | return RequestService.getRequest('/blog/tag/'+name, cfg_form); 7 | }; 8 | 9 | }); -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/info/info.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("InfoManageService", function(RequestService) { 2 | this.get = function () { 3 | return RequestService.getRequest('/manage/author', cfg_form); 4 | }; 5 | this.put = function(info){ 6 | return RequestService.putRequest("/manage/author", info, cfg_json) 7 | } 8 | }) -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/ExecuteSecurity.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 忽略安全性检查 7 | * 8 | * @author huangyong 9 | * @since 1.0.0 10 | */ 11 | @Documented 12 | @Target(ElementType.METHOD) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface ExecuteSecurity { 15 | } 16 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/manage.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("ManageController", function($scope,$location) { 2 | setScreenAvailHeight(); 3 | var t = sessionStorage.getItem("token") 4 | if(t==undefined || t=="" || t=="null" || t==null){ 5 | $location.path("/manage/sign"); 6 | }else{ 7 | $location.path("/manage/info"); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/TagVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | import studio.baxia.fo.pojo.Tag; 4 | 5 | public class TagVo extends Tag { 6 | private Integer counts; 7 | 8 | public Integer getCounts() { 9 | return counts; 10 | } 11 | 12 | public void setCounts(Integer counts) { 13 | this.counts = counts; 14 | } 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/archive/archive.service.js: -------------------------------------------------------------------------------- 1 | app.service("ArchiveService",function(RequestService){ 2 | this.get = function () { 3 | return RequestService.getRequest('/blog/archive', cfg_form); 4 | }; 5 | 6 | this.getArtilces = function (name) { 7 | return RequestService.getRequest('/blog/archive/'+name, cfg_form); 8 | }; 9 | 10 | }); -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"5.0.0", 4 | "main": ["lib/codemirror.js", "lib/codemirror.css"], 5 | "ignore": [ 6 | "**/.*", 7 | "node_modules", 8 | "components", 9 | "bin", 10 | "demo", 11 | "doc", 12 | "test", 13 | "index.html", 14 | "package.json" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/category/category.service.js: -------------------------------------------------------------------------------- 1 | app.service("CategoryService",function(RequestService){ 2 | this.get = function () { 3 | return RequestService.getRequest('/blog/category', cfg_form); 4 | }; 5 | 6 | this.getArtilces = function (code) { 7 | return RequestService.getRequest('/blog/category/'+code, cfg_form); 8 | }; 9 | 10 | }); -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/category/category.add.controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/11/22. 3 | */ 4 | app.controller("addCategoryCtrl",function($uibModalInstance,$scope){ 5 | $scope.confirmAddCategory = function(category){ 6 | $uibModalInstance.close(category); 7 | }; 8 | $scope.cancelAddCategory= function() { 9 | $uibModalInstance.dismiss('cancel'); 10 | } 11 | }) -------------------------------------------------------------------------------- /src/main/webapp/modules/project/project.service.js: -------------------------------------------------------------------------------- 1 | app.service("ProjectService",function(RequestService){ 2 | this.list = function (pageNumber, pageSize) { 3 | return RequestService.getRequest('/project' , cfg_form); 4 | }; 5 | this.hits = function(id){ 6 | return RequestService.postRequest('/project/hits' ,$.param({ 7 | "id": id 8 | }), cfg_form); 9 | } 10 | }) -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/TokenManagerUtil.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | /** 4 | * 令牌管理器 5 | * @author Fire.Pan. 6 | * @email panhainan@yeah.net 7 | * @date 2016年4月6日 8 | */ 9 | public interface TokenManagerUtil { 10 | 11 | String createToken(String username); 12 | 13 | boolean checkToken(String token); 14 | 15 | String getUserName(String token); 16 | 17 | boolean deleteToken(String username); 18 | } -------------------------------------------------------------------------------- /src/main/webapp/modules/about/about.view.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |

关于

6 |
7 |
8 |
9 |
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/webapp/modules/friendlink/friendlink.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | app.service("FriendlinkService", function ($http, $q,RequestService) { 5 | this.list = function () { 6 | return RequestService.getRequest('/friendlink', cfg_form); 7 | }; 8 | this.hits = function(id){ 9 | return RequestService.postRequest('/friendlink/hits' ,$.param({ 10 | "id": id 11 | }), cfg_form); 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/sign/sign.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("SignManageService", function(RequestService) { 2 | 3 | this.post=function(author){ 4 | return RequestService.postRequest("/manage/signin", author, cfg_json); 5 | } 6 | 7 | this.delete =function(){ 8 | return RequestService.deleteRequest("/manage/signout",cfg_form); 9 | } 10 | this.getCaptcha =function(){ 11 | return RequestService.deleteRequest("/manage/getCaptcha",cfg_form); 12 | } 13 | }) -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/manage.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | -------------------------------------------------------------------------------- /src/main/webapp/modules/recommend/recommend.service.js: -------------------------------------------------------------------------------- 1 | app.service("RecommendService", function(RequestService) { 2 | this.list = function (pageNumber, pageSize) { 3 | return RequestService.postRequest('/recommend' ,$.param({ 4 | "pageNumber": pageNumber, 5 | "pageSize":pageSize 6 | }), cfg_form); 7 | }; 8 | this.hits = function(id){ 9 | return RequestService.postRequest('/recommend/hits' ,$.param({ 10 | "id": id 11 | }), cfg_form); 12 | } 13 | 14 | }) -------------------------------------------------------------------------------- /src/main/resources/database.properties: -------------------------------------------------------------------------------- 1 | #MySQL 2 | #jdbc.driverClassName=com.mysql.jdbc.Driver 3 | #jdbc.url=jdbc:mysql://localhost:3306/foblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true 4 | #jdbc.username=root 5 | #jdbc.password=123456 6 | 7 | #MySQL 8 | jdbc.driverClassName=com.mysql.jdbc.Driver 9 | jdbc.url=jdbc:mysql://localhost:3306/foblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true 10 | jdbc.username=root 11 | jdbc.password=123456 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/webapp/modules/common/left-nav.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("leftNavController",function($scope){ 2 | $scope.blogNavStatus = true;//close 3 | $scope.clickBlogNav = function(){ 4 | //console.log("博客菜单") 5 | if($scope.blogNavStatus){ 6 | $scope.blogNavStatus = false; 7 | $("#blog-ul").collapse('show')//.css("display","block") 8 | }else{ 9 | $scope.blogNavStatus = true; 10 | $("#blog-ul").collapse('hide')//.css("display","none") 11 | } 12 | 13 | } 14 | }) -------------------------------------------------------------------------------- /src/main/webapp/plugins/jquery-jcryption/fo-jcryption-gen-keys.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/12/17. 3 | */ 4 | function genkeys(encryptionExponent, modulus, maxdigits) { 5 | setMaxDigits(parseInt(maxdigits, 10)); 6 | var ee = biFromHex(encryptionExponent) 7 | var mm = biFromHex(modulus); 8 | var cc = biHighIndex(mm) 9 | var bb = new BarrettMu(mm); 10 | var keys = { 11 | e : ee, 12 | m : mm, 13 | chunkSize : 2 * cc, 14 | radix :16, 15 | barrett : bb 16 | } 17 | return keys; 18 | }; -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/article/article.service.js: -------------------------------------------------------------------------------- 1 | app.service("ArticleService", function(RequestService) { 2 | this.list = function (pageNumber, pageSize,articleStatus) { 3 | return RequestService.postRequest('/blog/article' ,$.param({ 4 | "pageNumber": pageNumber, 5 | "pageSize":pageSize, 6 | "articleStatus":articleStatus 7 | }), cfg_form); 8 | }; 9 | this.get = function (code) { 10 | return RequestService.getRequest('/blog/article/' + code, cfg_form); 11 | }; 12 | 13 | 14 | 15 | 16 | }) -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/tag/tag.list.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("TagListController", function($window, $location, 2 | $routeParams, $rootScope, $scope, TagService) { 3 | setScreenAvailHeight(); 4 | $scope.loadingPath=loading_path; 5 | $scope.loaded = false; 6 | 7 | $scope.get = function() { 8 | TagService.get().then(function(data) { 9 | // console.log(data); 10 | $scope.tags = data.resultData; 11 | $scope.loaded = true; 12 | }); 13 | } 14 | 15 | $scope.init = function() { 16 | $scope.get(); 17 | } 18 | $scope.init(); 19 | }); 20 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/ruby/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "ruby"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("divide_equal_operator", 9 | "[variable bar] [operator /=] [variable foo]"); 10 | 11 | MT("divide_equal_operator_no_spacing", 12 | "[variable foo][operator /=][number 42]"); 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/fold/foldgutter.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-foldmarker { 2 | color: blue; 3 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; 4 | font-family: arial; 5 | line-height: .3; 6 | cursor: pointer; 7 | } 8 | .CodeMirror-foldgutter { 9 | width: .7em; 10 | } 11 | .CodeMirror-foldgutter-open, 12 | .CodeMirror-foldgutter-folded { 13 | cursor: pointer; 14 | } 15 | .CodeMirror-foldgutter-open:after { 16 | content: "\25BE"; 17 | } 18 | .CodeMirror-foldgutter-folded:after { 19 | content: "\25B8"; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFF; 3 | background-color: #900; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px ! important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IRecommendService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.common.PageConfig; 4 | import studio.baxia.fo.common.PageInfoResult; 5 | import studio.baxia.fo.pojo.Recommend; 6 | 7 | /** 8 | * Created by Pan on 2016/12/20. 9 | */ 10 | public interface IRecommendService { 11 | 12 | long add(Recommend recommendVo); 13 | long edit(Recommend recommendVo); 14 | boolean remove(long id); 15 | PageInfoResult list(PageConfig pageConfig,Recommend recommend); 16 | boolean hits(Long id); 17 | 18 | Recommend get(long id); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/common/TreeInfo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.common; 2 | 3 | /** 4 | * Created by Pan on 2016/10/15. 5 | * 实现类向TreeInfoResult类转换需要继承此类 6 | */ 7 | public class TreeInfo { 8 | private Integer id; 9 | private Integer parentId; 10 | 11 | public Integer getId() { 12 | return id; 13 | } 14 | 15 | public void setId(Integer id) { 16 | this.id = id; 17 | } 18 | 19 | public Integer getParentId() { 20 | return parentId; 21 | } 22 | 23 | public void setParentId(Integer parentId) { 24 | this.parentId = parentId; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/category/category.list.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("CategoryListController", function($window, $location, 2 | $routeParams, $rootScope, $scope, CategoryService) { 3 | setScreenAvailHeight(); 4 | $scope.loadingPath=loading_path; 5 | $scope.loaded = false; 6 | 7 | $scope.get = function() { 8 | CategoryService.get().then(function(data) { 9 | // console.log(data); 10 | $scope.categorys = data.resultData; 11 | $scope.loaded = true; 12 | }); 13 | } 14 | 15 | $scope.init = function() { 16 | $scope.get(); 17 | } 18 | $scope.init(); 19 | }); 20 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/info/info.manage.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("InfoManageController", function($scope,InfoManageService) { 2 | $scope.isInfoNav = true; 3 | setScreenAvailHeight(); 4 | var getInfo = function(){ 5 | InfoManageService.get().then(function(data){ 6 | //console.log(data); 7 | if(data.resultData!=null){ 8 | if(data.resultData.profile!=null && data.resultData.profile!=""){ 9 | data.resultData.profile = marked(data.resultData.profile); 10 | } 11 | $scope.info = data.resultData; 12 | } 13 | }) 14 | } 15 | getInfo(); 16 | }); -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/ReturnUtil.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | import studio.baxia.fo.common.CommonConstant; 4 | 5 | /** 6 | * Created by Pan on 2016/11/16. 7 | */ 8 | public class ReturnUtil { 9 | public static Boolean returnResult(Integer result) { 10 | if (result > 0) { 11 | return true; 12 | } else { 13 | return false; 14 | } 15 | } 16 | public static String returnResult(Boolean result){ 17 | if(result){ 18 | return CommonConstant.OPERATE_SUCCESS_MESSAGE; 19 | } 20 | return CommonConstant.OPERATE_FAIL_MESSAGE; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/webapp/modules/project/project.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("ProjectController",function(ProjectService,$scope){ 2 | setScreenAvailHeight(); 3 | $scope.loadingPath=loading_path; 4 | $scope.loaded = false; 5 | 6 | $scope.hit=function(url,id){ 7 | ProjectService.hits(id).then(function(data){ 8 | // console.log(data) 9 | }); 10 | window.open(url); 11 | } 12 | $scope.list = function(){ 13 | ProjectService.list().then(function(data){ 14 | // console.log(data) 15 | $scope.projects = data.resultData; 16 | $scope.loaded = true; 17 | }); 18 | } 19 | 20 | $scope.list(); 21 | }) -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IProjectService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.common.PageConfig; 4 | import studio.baxia.fo.common.PageInfoResult; 5 | import studio.baxia.fo.pojo.Project; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Pan on 2016/12/27. 11 | */ 12 | public interface IProjectService { 13 | long add(Project project); 14 | long edit(Project project); 15 | boolean remove(long id); 16 | List list(boolean status); 17 | PageInfoResult list(PageConfig pageConfig,Project project); 18 | boolean hits(Long id); 19 | 20 | Project get(long id,boolean status); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/webapp/css/modules/friend.view.css: -------------------------------------------------------------------------------- 1 | .friend-body{ 2 | padding:15px 8px; 3 | } 4 | .friend-body .col-sm-12{ 5 | padding:10px 10px; 6 | } 7 | .friend-body .col-md-6{ 8 | padding:10px 10px; 9 | } 10 | .friend-body .col-lg-4{ 11 | padding:10px 10px; 12 | } 13 | .friend-card { 14 | padding: 0px; 15 | margin-right: 0px; 16 | } 17 | 18 | .friend-card .panel-heading { 19 | /*border-radius: 0;*/ 20 | } 21 | 22 | .friend-card .panel-body { 23 | height: 70px; 24 | padding: 9px; 25 | font-size: 13px; 26 | overflow: hidden; 27 | } 28 | .friend-card .panel-footer{ 29 | text-align: right; 30 | padding:2px 16px; 31 | } -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/archive/archive.list.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("ArchiveListController", function($window, $location, 2 | $routeParams, $rootScope, $scope, ArchiveService) { 3 | setScreenAvailHeight(); 4 | $scope.loadingPath=loading_path; 5 | $scope.loaded = false; 6 | $scope.selectArchive = function(name) { 7 | $location.path("/blog/archive/" + name); 8 | } 9 | 10 | $scope.get = function() { 11 | ArchiveService.get().then(function(data) { 12 | $scope.archives = data.resultData; 13 | $scope.loaded = true; 14 | }); 15 | } 16 | $scope.init = function() { 17 | $scope.get(); 18 | } 19 | 20 | $scope.init(); 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /src/main/webapp/modules/common/article.list.summary.view.html: -------------------------------------------------------------------------------- 1 |
2 |

{{article.summary}}

3 | 4 |

5 | {{article.pubTime | date :'yyyy-MM-dd HH:ss'}} 6 | 阅读({{article.hits}}) 7 | 评论({{article.countMessages}}) 8 |

9 |
-------------------------------------------------------------------------------- /src/main/webapp/modules/common/sign-controller-service.js: -------------------------------------------------------------------------------- 1 | app.service("guestSignService",function(RequestService){ 2 | this.getGuestByEmail = function(email){ 3 | return RequestService.postRequest('/guest/getGuestByEmail', $.param({"email":email}),cfg_form); 4 | /*return RequestService.getRequest('/guest/getGuestByEmail/'+email,cfg_form);*/ 5 | }; 6 | 7 | this.getAllGuests = function(){ 8 | return RequestService.getRequest('/guest/getAllGuests',null,cfg_form); 9 | } 10 | 11 | this.addOrUpdateGuest = function(guest){ 12 | var url = guest.id?"/guest/updateGuest":"/guest/addGuest"; 13 | return RequestService.postRequest(url, $.param({"json":JSON.stringify(guest)}),cfg_form); 14 | } 15 | }) -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: white; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: #333; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IGuestService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.pojo.Guest; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * Created by 刘俊 on 2016/11/2. 10 | */ 11 | public interface IGuestService { 12 | 13 | /** 14 | * 15 | *查询所有游客信息 16 | */ 17 | List getAllGuests(); 18 | 19 | /** 20 | * @param condition 21 | * 根据条件查询游客信息 22 | */ 23 | Guest queryOneByCondition(Map condition); 24 | 25 | /** 26 | * 新增 27 | */ 28 | int addGuest(Guest guest); 29 | 30 | /** 31 | * 修改 32 | */ 33 | int updateGuest(Guest guest); 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fo-blog 2 | 响应式开源个人博客(简洁清爽风格),可以查看效果,点击进入http://panhainan.com 3 | # 使用手册 4 | 5 | 注意: 6 | 7 | 作者管理账户的登录地址为:http://ip:port(/project)/#!/manage/sign 8 | 这里需要到JUnit测试类 9 | ```studio.baxia.fo.service.IUserServiceTest``` 10 | 中运行`testAddAuthors`测试方法,根据自身情况设置用户名密码,然后运行即可。 11 | 这样就可以通过刚刚生成的用户名密码进行登录了。 12 | 13 | 14 | 15 | 16 | 待完善,后续补上。 17 | 若急需,联系博主 18 | QQ:1016593477 19 | Email:panhainan@yeah.net 20 | 21 | 22 | # 如果觉得好,就请支持一下,谢谢!   23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/pojo/RecommendContent.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.pojo; 2 | 3 | /** 4 | * Created by Pan on 2016/12/20. 5 | */ 6 | public class RecommendContent { 7 | private int id; 8 | private String content; 9 | 10 | public RecommendContent() { 11 | } 12 | 13 | public RecommendContent(String content) { 14 | this.content = content; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getContent() { 26 | return content; 27 | } 28 | 29 | public void setContent(String content) { 30 | this.content = content; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/pojo/Tag.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.pojo; 2 | 3 | /** 4 | * Created by FirePan on 2016/10/11. 文章标签实体信息. 5 | */ 6 | public class Tag { 7 | private Integer id; 8 | private String name; // 标签名称 9 | 10 | public Tag() { 11 | super(); 12 | } 13 | 14 | public Tag(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String toString() { 20 | return "Tag [id=" + id + ", name=" + name + "]"; 21 | } 22 | 23 | public Integer getId() { 24 | return id; 25 | } 26 | 27 | public void setId(Integer id) { 28 | this.id = id; 29 | } 30 | 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | public void setName(String name) { 36 | this.name = name; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/webapp/modules/friendlink/friendlink.controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | 5 | app.controller("FriendlinkController", function (FriendlinkService, $scope) { 6 | setScreenAvailHeight(); 7 | $scope.loadingPath=loading_path; 8 | $scope.loaded = false; 9 | 10 | $scope.clickLink = function(id,url){ 11 | FriendlinkService.hits(id).then(function(data){ 12 | // console.log(data) 13 | }); 14 | window.open(url); 15 | } 16 | $scope.list = function(){ 17 | FriendlinkService.list().then(function(data){ 18 | $scope.friendlinks = data.resultData; 19 | $scope.loaded = true; 20 | }) 21 | }; 22 | $scope.list(); 23 | }); -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/tag/tag.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("TagManageService", function(RequestService) { 2 | this.list = function () { 3 | return RequestService.getRequest('/manage/tag', cfg_form); 4 | }; 5 | this.put = function(tag){ 6 | return RequestService.putRequest("/manage/tag", tag, cfg_json); 7 | } 8 | this.deleteById = function(tagId){ 9 | return RequestService.deleteRequest("/manage/tag/"+tagId, cfg_form); 10 | } 11 | this.getArticles = function(tagId){ 12 | return RequestService.getRequest("/manage/tag/"+tagId, cfg_form); 13 | } 14 | this.deleteActicleTag = function(tagId,articleId){ 15 | return RequestService.deleteRequest("/manage/tag/"+tagId+"/"+articleId, cfg_form); 16 | } 17 | }) -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/AuthorSessionVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | public class AuthorSessionVo { 4 | private String account; 5 | private int id; 6 | 7 | public AuthorSessionVo(String account, int id) { 8 | super(); 9 | this.account = account; 10 | this.id = id; 11 | } 12 | 13 | public String getAccount() { 14 | return account; 15 | } 16 | 17 | public void setAccount(String account) { 18 | this.account = account; 19 | } 20 | 21 | public int getId() { 22 | return id; 23 | } 24 | 25 | public void setId(int id) { 26 | this.id = id; 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "AuthorSessionVo [account=" + account + ", id=" + id + "]"; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/category/category.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("CategoryManageService", function(RequestService) { 2 | this.list = function () { 3 | return RequestService.getRequest('/manage/category', cfg_form); 4 | }; 5 | this.getArticles = function(categoryId){ 6 | return RequestService.getRequest('/manage/category/'+categoryId, cfg_form); 7 | } 8 | this.post = function(category){ 9 | return RequestService.postRequest("/manage/category", category, cfg_json); 10 | } 11 | this.put = function(category){ 12 | return RequestService.putRequest("/manage/category", category, cfg_json); 13 | } 14 | this.deleteById = function(categoryId){ 15 | return RequestService.deleteRequest("/manage/category/"+categoryId, cfg_form); 16 | } 17 | }) -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta {color: #555;} 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | 11 | .cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;} 12 | .cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 13 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/bootstrap-validation/css/bootstrapValidator.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * BootstrapValidator (http://bootstrapvalidator.com) 3 | * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 4 | * 5 | * @version v0.5.3, built on 2014-11-05 9:14:18 PM 6 | * @author https://twitter.com/nghuuphuoc 7 | * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc 8 | * @license Commercial: http://bootstrapvalidator.com/license/ 9 | * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ 10 | */ 11 | 12 | .bv-form .help-block{margin-bottom:0}.bv-form .tooltip-inner{text-align:left}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442}.bv-form .bv-icon-no-label{top:0}.bv-form .bv-icon-input-group{top:0;z-index:100} -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/archive/archive.article.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("ArchiveArticleController", function($window, $location, 2 | $routeParams, $rootScope, $scope, ArchiveService) { 3 | setScreenAvailHeight(); 4 | $scope.loadingPath=loading_path; 5 | $scope.loaded = false; 6 | $scope.getArtilces = function(name) { 7 | ArchiveService.getArtilces(name).then(function(data) { 8 | console.log(data); 9 | $scope.archiveArticles = data.resultData; 10 | $scope.loaded = true; 11 | }); 12 | } 13 | 14 | $scope.init = function() { 15 | if($routeParams.archiveName!=null){ 16 | $scope.archiveName = $routeParams.archiveName; 17 | $scope.getArtilces($scope.archiveName); 18 | }else{ 19 | 20 | } 21 | } 22 | 23 | $scope.init(); 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /src/main/webapp/scripts/http.interceptor.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/12. 3 | */ 4 | app.factory('HttpInterceptor', function ($q,$location) { 5 | return { 6 | request: function (config) { 7 | // console.log("datetime:"+$filter('date')(new Date(),'yyyy-MM-dd HH:mm:ss')+",request url:"+config.url); 8 | return config; 9 | }, 10 | 11 | response: function (response) { 12 | //这里根据服务器端返回的response是否包含response.headers('x-login') === 'true'来进行决定是否跳转到登录页面 13 | if (response.headers('x-login') === 'true') { 14 | sessionStorage.removeItem("token"); 15 | $location.path('/manage/sign'); 16 | } 17 | return response || $q.when(response); 18 | } 19 | }; 20 | }); 21 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/IFriendDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.stereotype.Repository; 5 | import studio.baxia.fo.common.PageConfig; 6 | import studio.baxia.fo.pojo.Friendlink; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Pan on 2016/12/1. 12 | */ 13 | @Repository("iFriendDao") 14 | public interface IFriendDao { 15 | 16 | Friendlink selectById(@Param("id")Integer fId); 17 | 18 | int deleteById(@Param("id")Integer fId); 19 | 20 | int insert(Friendlink friendlink); 21 | 22 | int update(Friendlink friendlink); 23 | 24 | List selectBy(@Param("pageConfig")PageConfig pageConfig); 25 | 26 | int selectCountBy(); 27 | 28 | int updateHits(Friendlink friendlink); 29 | } 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 12 | hs_err_pid* 13 | 14 | # Android generated 15 | bin/ 16 | gen/ 17 | classes/ 18 | gen-external-apklibs/ 19 | 20 | # Ant 21 | local.properties 22 | 23 | # Maven 24 | **/target 25 | target/ 26 | target/** 27 | release.properties 28 | 29 | # Eclipse 30 | .classpath 31 | .project 32 | .tern-project 33 | .externalToolBuilders/ 34 | .metadata 35 | *.prefs 36 | **/.settings 37 | .settings/** 38 | 39 | # IntelliJ 40 | *.iml 41 | *.ipr 42 | *.iws 43 | **/.idea 44 | .idea/ 45 | .idea/** 46 | out/ 47 | 48 | 49 | # Mac 50 | .DS_Store 51 | 52 | # gitignore .gitignore -------------------------------------------------------------------------------- /src/main/webapp/modules/about/about.controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | 5 | app.controller("AboutController", function (AboutService, $scope) { 6 | //console.log("AboutController") 7 | setScreenAvailHeight(); 8 | $scope.loadingPath=loading_path; 9 | $scope.loaded = false; 10 | var getInfo = function(){ 11 | AboutService.get().then(function(data){ 12 | console.log(data); 13 | if(data.resultData!=null){ 14 | if(data.resultData.profile!=null && data.resultData.profile!=""){ 15 | data.resultData.profile = marked(data.resultData.profile); 16 | } 17 | $scope.info = data.resultData; 18 | $scope.loaded = true; 19 | } 20 | }) 21 | } 22 | getInfo(); 23 | }); -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} 2 | .cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} 3 | .cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} 4 | .cm-s-elegant span.cm-variable {color: black;} 5 | .cm-s-elegant span.cm-variable-2 {color: #b11;} 6 | .cm-s-elegant span.cm-qualifier {color: #555;} 7 | .cm-s-elegant span.cm-keyword {color: #730;} 8 | .cm-s-elegant span.cm-builtin {color: #30a;} 9 | .cm-s-elegant span.cm-link {color: #762;} 10 | .cm-s-elegant span.cm-error {background-color: #fdd;} 11 | 12 | .cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;} 13 | .cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 14 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/ArchiveVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author Pan 7 | * 没有明确对应的实体,主要用到Article实体中的部分数据,只是用来前台数据展示 8 | */ 9 | public class ArchiveVo { 10 | 11 | private String name;//导航的名称,如2016年10月 12 | private Integer counts;//文章数量 13 | 14 | private List childArchive; 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | public void setName(String name) { 20 | this.name = name; 21 | } 22 | public Integer getCounts() { 23 | return counts; 24 | } 25 | public void setCounts(Integer counts) { 26 | this.counts = counts; 27 | } 28 | public List getChildArchive() { 29 | return childArchive; 30 | } 31 | public void setChildArchive(List childArchive) { 32 | this.childArchive = childArchive; 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/recommend/recommend.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("RecommendManageService", function(RequestService) { 2 | this.list = function (pageNumber, pageSize) { 3 | return RequestService.postRequest('/manage/recommend' ,$.param({ 4 | "pageNumber": pageNumber, 5 | "pageSize":pageSize 6 | }), cfg_form); 7 | }; 8 | this.get = function (id) { 9 | return RequestService.getRequest('/manage/recommend/' + id, cfg_form); 10 | }; 11 | this.put = function(recommend){ 12 | return RequestService.putRequest('/manage/recommend/update' ,recommend, cfg_json); 13 | } 14 | this.post = function(recommend){ 15 | return RequestService.postRequest('/manage/recommend/save' ,recommend, cfg_json); 16 | } 17 | this.delete = function (id) { 18 | return RequestService.deleteRequest('/manage/recommend/' + id, cfg_form); 19 | }; 20 | 21 | 22 | 23 | }) -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/IProjectDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.stereotype.Repository; 5 | import studio.baxia.fo.common.PageConfig; 6 | import studio.baxia.fo.pojo.Project; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Pan on 2016/12/27. 12 | */ 13 | @Repository("iProjectDao") 14 | public interface IProjectDao { 15 | 16 | Integer insert(Project project); 17 | 18 | Integer delete(@Param("id") Long projectId); 19 | 20 | Integer update(Project project); 21 | 22 | Integer updateHits(Project project); 23 | 24 | List selectBy(@Param("project") Project project, 25 | @Param("pageConfig") PageConfig pageConfig); 26 | 27 | Integer selectCountBy(@Param("project")Project project); 28 | 29 | Project selectById(@Param("id")Long id,@Param("status")boolean status); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/IRecommendDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.stereotype.Repository; 5 | import studio.baxia.fo.common.PageConfig; 6 | import studio.baxia.fo.pojo.Recommend; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Pan on 2016/12/20. 12 | */ 13 | @Repository("iRecommendDao") 14 | public interface IRecommendDao { 15 | 16 | Integer insert(Recommend recommend); 17 | 18 | Integer delete(@Param("id") Long recommendId); 19 | 20 | Integer update(Recommend recommend); 21 | 22 | Integer updateHits(Recommend recommend); 23 | 24 | List selectBy(@Param("recommend") Recommend recommend, 25 | @Param("pageConfig") PageConfig pageConfig); 26 | 27 | Integer selectCountBy(@Param("recommend") Recommend recommend); 28 | 29 | Recommend selectById(@Param("id")Long id); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/friendlink/friendlink.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("FriendlinkManageService", function(RequestService) { 2 | this.list = function (pageNumber, pageSize) { 3 | return RequestService.postRequest('/manage/friendlink' ,$.param({ 4 | "pageNumber": pageNumber, 5 | "pageSize":pageSize 6 | }), cfg_form); 7 | }; 8 | this.post = function (friendlink){ 9 | return RequestService.postRequest('/manage/friendlink/save',friendlink,cfg_json); 10 | } 11 | this.put = function (friendlink){ 12 | return RequestService.putRequest('/manage/friendlink/update',friendlink,cfg_json); 13 | } 14 | this.delete=function(fId){ 15 | return RequestService.deleteRequest('/manage/friendlink/'+fId, cfg_form); 16 | } 17 | this.get=function(fId){ 18 | return RequestService.getRequest('/manage/friendlink/'+fId, cfg_form); 19 | } 20 | }) -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/project/project.manage.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/12/27. 3 | */ 4 | app.service("ProjectManageService",function(RequestService){ 5 | this.list = function (pageNumber, pageSize) { 6 | return RequestService.postRequest('/manage/project' ,$.param({ 7 | "pageNumber": pageNumber, 8 | "pageSize":pageSize 9 | }), cfg_form); 10 | }; 11 | this.post = function (project){ 12 | return RequestService.postRequest('/manage/project/save',project,cfg_json); 13 | } 14 | this.put = function (project){ 15 | return RequestService.putRequest('/manage/project/update',project,cfg_json); 16 | } 17 | this.delete=function(pId){ 18 | return RequestService.deleteRequest('/manage/project/'+pId, cfg_form); 19 | } 20 | this.get=function(pId){ 21 | return RequestService.getRequest('/manage/project/'+pId, cfg_form); 22 | } 23 | }); -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/AuthorVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | public class AuthorVo { 4 | private String account; 5 | private String password; 6 | private String captcha;//验证码 7 | 8 | public String getAccount() { 9 | return account; 10 | } 11 | 12 | public void setAccount(String account) { 13 | this.account = account; 14 | } 15 | 16 | public String getPassword() { 17 | return password; 18 | } 19 | 20 | public void setPassword(String password) { 21 | this.password = password; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return "AuthorVo [account=" + account + ", password=" + password + "]"; 27 | } 28 | 29 | public String getCaptcha() { 30 | return captcha; 31 | } 32 | 33 | public void setCaptcha(String captcha) { 34 | this.captcha = captcha; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IFriendlinkService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.common.PageConfig; 4 | import studio.baxia.fo.common.PageInfoResult; 5 | import studio.baxia.fo.pojo.Friendlink; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Pan on 2016/12/1. 11 | */ 12 | public interface IFriendlinkService { 13 | 14 | /** 15 | * 添加 16 | * @param friendlink 17 | * @return 操作结果 18 | */ 19 | boolean add(Friendlink friendlink); 20 | 21 | /** 22 | * 分页获取 23 | * @param pageConfig 24 | * @return 分页结果 25 | */ 26 | PageInfoResult pagingList(PageConfig pageConfig); 27 | 28 | /** 29 | * 获取所有 30 | * @return 所有记录 31 | */ 32 | List list(); 33 | 34 | Friendlink get(int fId); 35 | 36 | boolean delete(int fId); 37 | 38 | boolean update(Friendlink friendlink); 39 | 40 | boolean hits(int id); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/webapp/css/modules/category-tag.view.css: -------------------------------------------------------------------------------- 1 | .category-body,.tag-body { 2 | padding: 15px 10px; 3 | } 4 | .category-body .col-sm-12{ 5 | padding:10px 0; 6 | } 7 | .category-body .col-md-6{ 8 | padding:10px 0px; 9 | } 10 | .category-body .col-lg-6{ 11 | padding:10px 0px; 12 | } 13 | .tag-body .col-sm-6,.tag-body .col-md-4,.tag-body .col-lg-3{ 14 | padding:10px 10px 10px 10px; 15 | } 16 | .body-category-body,.body-tag-body{ 17 | margin: 0 10px; 18 | } 19 | .category-card { 20 | margin: 0 10px; 21 | padding: 0px; 22 | } 23 | 24 | .category-card li { 25 | cursor: pointer; 26 | } 27 | 28 | .category-card li:hover { 29 | background-color: #F2F2F2; 30 | } 31 | 32 | .category-card .panel-heading { 33 | /*border-radius: 0;*/ 34 | } 35 | 36 | .category-card .panel-body { 37 | height: 70px; 38 | padding: 9px; 39 | font-size: 13px; 40 | overflow: hidden; 41 | } 42 | .category-card .panel-footer{ 43 | text-align: right; 44 | padding:2px 16px; 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IBTagService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.pojo.Tag; 4 | import studio.baxia.fo.vo.TagVo; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Pan on 2016/12/4. 10 | */ 11 | public interface IBTagService { 12 | /** 13 | * 添加标签 14 | * 15 | * @param tag 16 | * 标签(name) 17 | * @return 18 | */ 19 | Boolean add(Tag tag); 20 | 21 | Boolean edit(Tag tag); 22 | 23 | /** 24 | * 通过标签id删除标签 25 | * 26 | * @param tagId 27 | * 标签id 28 | * @return 29 | */ 30 | Boolean deleteById(int tagId); 31 | 32 | /** 33 | * 通过标签id获取标签 34 | * 35 | * @param tagId 36 | * 标签id 37 | * @return 38 | */ 39 | Tag getById(int tagId); 40 | 41 | /** 42 | * 通过作者id获取所有标签 43 | * 44 | * @return 45 | */ 46 | List getAllBy(); 47 | 48 | List getAllVoBy(Integer articleStatus); 49 | } 50 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/article/message.service.js: -------------------------------------------------------------------------------- 1 | app.service("MessageService", function(RequestService) { 2 | this.getGuestInfoByEmail = function (email) { 3 | return RequestService.postRequest('/message/guest/email',$.param({email:email}), cfg_form); 4 | }; 5 | this.getGuestInfoByNickname = function (email,nickname) { 6 | return RequestService.postRequest('/message/guest/nickname',$.param({email:email,nickname:nickname}), cfg_form); 7 | }; 8 | 9 | this.comment = function(guest,messageContent,articleId){ 10 | return RequestService.postRequest("/message",{ 11 | email:guest.email, 12 | nickname:guest.nickname, 13 | personalWebsite:guest.personalWebsite, 14 | messageContent:messageContent, 15 | articleId:articleId 16 | },cfg_json); 17 | } 18 | this.list = function(articleId){ 19 | return RequestService.getRequest("/blog/article/"+articleId+"/messages",cfg_form); 20 | } 21 | 22 | 23 | }) -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/mode/multiplex_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | CodeMirror.defineMode("markdown_with_stex", function(){ 6 | var inner = CodeMirror.getMode({}, "stex"); 7 | var outer = CodeMirror.getMode({}, "markdown"); 8 | 9 | var innerOptions = { 10 | open: '$', 11 | close: '$', 12 | mode: inner, 13 | delimStyle: 'delim', 14 | innerStyle: 'inner' 15 | }; 16 | 17 | return CodeMirror.multiplexingMode(outer, innerOptions); 18 | }); 19 | 20 | var mode = CodeMirror.getMode({}, "markdown_with_stex"); 21 | 22 | function MT(name) { 23 | test.mode( 24 | name, 25 | mode, 26 | Array.prototype.slice.call(arguments, 1), 27 | 'multiplexing'); 28 | } 29 | 30 | MT( 31 | "stexInsideMarkdown", 32 | "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]"); 33 | })(); 34 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/tag/tag.article.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("TagArticleController", function ($location, $routeParams, $rootScope, $scope, TagService) { 2 | setScreenAvailHeight(); 3 | $scope.loadingPath=loading_path; 4 | $scope.loaded = false; 5 | $scope.getTagArticles = function (name) { 6 | TagService.getArtilces(name).then(function (data) { 7 | if(data.resultData!=null){ 8 | $scope.tagArticles = data.resultData; 9 | }else{ 10 | $scope.noSuchTag = true; 11 | } 12 | $scope.loaded = true; 13 | }); 14 | } 15 | $scope.selectTag = function (name) { 16 | $location.path("/blog/tag/" + name); 17 | } 18 | 19 | $scope.init = function () { 20 | if ($routeParams.tagName != undefined) { 21 | $scope.tagName = $routeParams.tagName; 22 | $scope.getTagArticles($scope.tagName); 23 | } 24 | } 25 | 26 | $scope.init(); 27 | }); -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"5.0.0", 4 | "main": "lib/codemirror.js", 5 | "description": "In-browser code editing made bearable", 6 | "licenses": [{"type": "MIT", 7 | "url": "http://codemirror.net/LICENSE"}], 8 | "directories": {"lib": "./lib"}, 9 | "scripts": {"test": "node ./test/run.js"}, 10 | "devDependencies": {"node-static": "0.6.0", 11 | "phantomjs": "1.9.2-5", 12 | "blint": ">=0.1.1"}, 13 | "bugs": "http://github.com/codemirror/CodeMirror/issues", 14 | "keywords": ["JavaScript", "CodeMirror", "Editor"], 15 | "homepage": "http://codemirror.net", 16 | "maintainers":[{"name": "Marijn Haverbeke", 17 | "email": "marijnh@gmail.com", 18 | "web": "http://marijnhaverbeke.nl"}], 19 | "repository": {"type": "git", 20 | "url": "https://github.com/codemirror/CodeMirror.git"} 21 | } 22 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/lint/yaml-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | // Depends on js-yaml.js from https://github.com/nodeca/js-yaml 15 | 16 | // declare global: jsyaml 17 | 18 | CodeMirror.registerHelper("lint", "yaml", function(text) { 19 | var found = []; 20 | try { jsyaml.load(text); } 21 | catch(e) { 22 | var loc = e.mark; 23 | found.push({ from: CodeMirror.Pos(loc.line, loc.column), to: CodeMirror.Pos(loc.line, loc.column), message: e.message }); 24 | } 25 | return found; 26 | }); 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/category/category.article.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("CategoryArticleController", function($window, $location, 2 | $routeParams, $rootScope, $scope, CategoryService) { 3 | setScreenAvailHeight(); 4 | $scope.loadingPath=loading_path; 5 | $scope.loaded = false; 6 | 7 | $scope.getCategoryArticles = function(code) { 8 | CategoryService.getArtilces(code).then(function(data) { 9 | // console.log(data); 10 | if(data.resultData.category!=null){ 11 | $scope.category = data.resultData.category; 12 | $scope.categoryArticles = data.resultData.listArticle; 13 | }else{ 14 | $scope.noSuchCategory = true; 15 | } 16 | $scope.loaded = true; 17 | }); 18 | } 19 | 20 | $scope.init = function() { 21 | if($routeParams.categoryCode!=null){ 22 | $scope.categoryCode = $routeParams.categoryCode; 23 | $scope.getCategoryArticles($scope.categoryCode); 24 | } 25 | 26 | } 27 | 28 | $scope.init(); 29 | 30 | }); 31 | -------------------------------------------------------------------------------- /src/test/java/studio/baxia/fo/service/IGuestServiceTest.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import org.junit.Test; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import studio.baxia.fo.BaseTest; 6 | import studio.baxia.fo.pojo.Guest; 7 | 8 | import java.util.HashMap; 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * Created by 刘俊 on 2016/11/2. 14 | */ 15 | public class IGuestServiceTest extends BaseTest { 16 | 17 | @Autowired 18 | private IGuestService iGuestService; 19 | 20 | @Test 21 | public void queryOneByCondition(){ 22 | Guest guest = new Guest(); 23 | Map condition = new HashMap<>(); 24 | condition.put("nickname","呵呵"); 25 | guest = iGuestService.queryOneByCondition(condition); 26 | printResultStr("queryOneByCondition",null,guest); 27 | } 28 | 29 | @Test 30 | public void queryAll(){ 31 | List guestList = iGuestService.getAllGuests(); 32 | printResultStr("queryAll",null,guestList); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/webapp/modules/recommend/recommend.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("RecommendController", function($uibModal,$scope,RecommendService) { 2 | setScreenAvailHeight(); 3 | $scope.loadingPath=loading_path; 4 | $scope.loaded = false; 5 | $scope.currentPage = 1; 6 | $scope.pageSize = 10; 7 | 8 | $scope.hit=function(articleUrl,id){ 9 | RecommendService.hits(id).then(function(data){ 10 | // console.log(data) 11 | }); 12 | window.open(articleUrl); 13 | } 14 | $scope.pageChanged = function() { 15 | //console.log('Page changed to: ' + $scope.currentPage); 16 | $scope.list($scope.currentPage, $scope.pageSize); 17 | }; 18 | 19 | $scope.list = function(currentPage,pageSize){ 20 | RecommendService.list(currentPage,pageSize).then(function(data){ 21 | // console.log(data) 22 | $scope.recommends = data.resultData.list; 23 | $scope.totalItems = data.resultData.pageConfig.allCount; 24 | $scope.loaded = true; 25 | }); 26 | } 27 | 28 | $scope.list($scope.currentPage, $scope.pageSize); 29 | }); 30 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/common/TreeInfoResult.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.common; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Pan on 2016/10/15. 7 | * 将一个继承了TreeInfo的类集合转换的结果 8 | */ 9 | public class TreeInfoResult { 10 | private List childrens; 11 | private TreeInfo data; 12 | 13 | private TreeInfoResult(){ 14 | 15 | } 16 | 17 | public TreeInfoResult(TreeInfo data) { 18 | this.data = data; 19 | } 20 | 21 | @Override 22 | public String toString() { 23 | return "TreeInfoResult{" + 24 | "\nchildrens=" + childrens + 25 | ", \ndata=" + data + 26 | "\n}"; 27 | } 28 | 29 | public List getChildrens() { 30 | return childrens; 31 | } 32 | 33 | public void setChildrens(List childrens) { 34 | this.childrens = childrens; 35 | } 36 | 37 | public TreeInfo getData() { 38 | return data; 39 | } 40 | 41 | public void setData(TreeInfo data) { 42 | this.data = data; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/fonts/editormd-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IMessageService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.pojo.Guest; 4 | import studio.baxia.fo.pojo.Message; 5 | import studio.baxia.fo.vo.ArticleMessageVo; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Pan on 2016/11/16. 11 | */ 12 | public interface IMessageService { 13 | 14 | 15 | /** 16 | * 游客评论操作 17 | * @param guest 18 | * @param message 19 | * @return 20 | */ 21 | boolean guestMessage(Guest guest, Message message); 22 | 23 | /** 24 | * 通过评论id删除评论 25 | * 26 | * @param messageId 评论id 27 | * @param authorId 操作的作者id 28 | * @return 29 | */ 30 | Boolean messageDeleteById(int messageId, int authorId); 31 | 32 | /** 33 | * 通过文章id删除相关评论 34 | * 35 | * @param messageArticleId 文章id 36 | * @return 37 | */ 38 | Boolean messageDeleteBy(int messageArticleId); 39 | 40 | 41 | /** 42 | * 获取所有留言信息 43 | * @param messageArticleId 文章id 44 | * @return 45 | */ 46 | List list(int messageArticleId); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/lint/json-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint 5 | 6 | // declare global: jsonlint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "json", function(text) { 19 | var found = []; 20 | jsonlint.parseError = function(str, hash) { 21 | var loc = hash.loc; 22 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), 23 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), 24 | message: str}); 25 | }; 26 | try { jsonlint.parse(text); } 27 | catch(e) {} 28 | return found; 29 | }); 30 | 31 | }); 32 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/CategoryVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | import studio.baxia.fo.pojo.Category; 4 | 5 | public class CategoryVo extends Category { 6 | private Integer counts; 7 | private int hits; 8 | private int countMessages; 9 | 10 | public CategoryVo categor2Vo(Category category){ 11 | if(category!=null){ 12 | this.setId(category.getId()); 13 | this.setName(category.getName()); 14 | this.setDescription(category.getDescription()); 15 | } 16 | return this; 17 | } 18 | 19 | public Integer getCounts() { 20 | return counts; 21 | } 22 | 23 | public void setCounts(Integer counts) { 24 | this.counts = counts; 25 | } 26 | 27 | public int getHits() { 28 | return hits; 29 | } 30 | 31 | public void setHits(int hits) { 32 | this.hits = hits; 33 | } 34 | 35 | public int getCountMessages() { 36 | return countMessages; 37 | } 38 | 39 | public void setCountMessages(int countMessages) { 40 | this.countMessages = countMessages; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/neo.css: -------------------------------------------------------------------------------- 1 | /* neo theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-neo.CodeMirror { 6 | background-color:#ffffff; 7 | color:#2e383c; 8 | line-height:1.4375; 9 | } 10 | .cm-s-neo .cm-comment {color:#75787b} 11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3} 12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a} 13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328} 14 | .cm-s-neo .cm-string {color:#b35e14} 15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65} 16 | 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-neo pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-neo .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-neo .CodeMirror-linenumber { 31 | padding:0; 32 | color:#e0e2e5; 33 | } 34 | 35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | 38 | .cm-s-neo div.CodeMirror-cursor { 39 | width: auto; 40 | border: 0; 41 | background: rgba(155,157,162,0.37); 42 | z-index: 1; 43 | } 44 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/edit/trailingspace.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) { 13 | if (prev == CodeMirror.Init) prev = false; 14 | if (prev && !val) 15 | cm.removeOverlay("trailingspace"); 16 | else if (!prev && val) 17 | cm.addOverlay({ 18 | token: function(stream) { 19 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {} 20 | if (i > stream.pos) { stream.pos = i; return null; } 21 | stream.pos = l; 22 | return "trailingspace"; 23 | }, 24 | name: "trailingspace" 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/IGuestDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.stereotype.Repository; 5 | import studio.baxia.fo.pojo.Guest; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /*@Repository*/ 11 | public interface IGuestDao { 12 | /** 13 | * 14 | * 通过主键删除 15 | */ 16 | int deleteByPrimaryKey(Integer id); 17 | 18 | /** 19 | * 20 | * 新增 21 | */ 22 | int insert(Guest record); 23 | 24 | /** 25 | * 26 | * 新增具体字段 27 | */ 28 | int insertSelective(Guest record); 29 | 30 | /** 31 | * 32 | * 主键查询 33 | */ 34 | Guest selectByPrimaryKey(Integer id); 35 | 36 | /** 37 | * 38 | * 根据某些条件更新 39 | */ 40 | int updateByPrimaryKeySelective(Guest record); 41 | 42 | /** 43 | * 44 | * 主键更新 45 | */ 46 | int updateByPrimaryKey(Guest record); 47 | 48 | /** 49 | * 50 | *通过给定条件查询 51 | */ 52 | Guest queryOneByCondition(Map condition); 53 | 54 | /** 55 | * 56 | *查询所有 57 | */ 58 | List queryAll(); 59 | } -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/manage-left-sub-nav.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 管理导航 5 |
6 | 18 |
19 | 20 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Marijn Haverbeke and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/impl/GuestServiceImpl.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | import studio.baxia.fo.dao.IGuestDao; 6 | import studio.baxia.fo.pojo.Guest; 7 | import studio.baxia.fo.service.IGuestService; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * Created by 刘俊 on 2016/11/2. 14 | */ 15 | @Service("guestService") 16 | public class GuestServiceImpl implements IGuestService{ 17 | 18 | @Autowired 19 | private IGuestDao guestDao; 20 | 21 | @Override 22 | public List getAllGuests() { 23 | return guestDao.queryAll(); 24 | } 25 | 26 | @Override 27 | public Guest queryOneByCondition(Map condition) { 28 | Guest g = guestDao.queryOneByCondition(condition); 29 | return g; 30 | } 31 | 32 | @Override 33 | public int addGuest(Guest guest) { 34 | return guestDao.insert(guest); 35 | } 36 | 37 | @Override 38 | public int updateGuest(Guest guest) { 39 | return guestDao.updateByPrimaryKeySelective(guest); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/article/article.detail.manage.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("ArticleDetailManageController", function($scope, $routeParams, 2 | ArticleManageService) { 3 | setScreenAvailHeight(); 4 | //console.log($routeParams.articleId) 5 | $scope.get = function(articleId) { 6 | ArticleManageService.get(articleId).then(function(data) { 7 | console.log(data); 8 | if(data.resultData!=null){ 9 | data.resultData.content = marked(data.resultData.content) 10 | $scope.article = data.resultData; 11 | } 12 | }); 13 | } 14 | $scope.changeToBlog= function(statusValue){ 15 | var article={ 16 | id:$scope.article.id, 17 | status:statusValue, 18 | onlyChangeStatus:true 19 | } 20 | ArticleManageService.put2(article).then(function(data){ 21 | // console.log(data) 22 | if (data.resultCode == 1) { 23 | if (data.resultData > 0) { 24 | $scope.get(data.resultData); 25 | } else { 26 | alert("修改操作失败,原因如下:"+data.resultMsg) 27 | } 28 | } else { 29 | alert("操作异常,原因如下:"+data.resultMsg) 30 | } 31 | }); 32 | } 33 | // 获取文章信息 34 | $scope.get($routeParams.articleId); 35 | }); -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta {color: #FF1717;} 2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } 3 | .cm-s-eclipse span.cm-atom {color: #219;} 4 | .cm-s-eclipse span.cm-number {color: #164;} 5 | .cm-s-eclipse span.cm-def {color: #00f;} 6 | .cm-s-eclipse span.cm-variable {color: black;} 7 | .cm-s-eclipse span.cm-variable-2 {color: #0000C0;} 8 | .cm-s-eclipse span.cm-variable-3 {color: #0000C0;} 9 | .cm-s-eclipse span.cm-property {color: black;} 10 | .cm-s-eclipse span.cm-operator {color: black;} 11 | .cm-s-eclipse span.cm-comment {color: #3F7F5F;} 12 | .cm-s-eclipse span.cm-string {color: #2A00FF;} 13 | .cm-s-eclipse span.cm-string-2 {color: #f50;} 14 | .cm-s-eclipse span.cm-qualifier {color: #555;} 15 | .cm-s-eclipse span.cm-builtin {color: #30a;} 16 | .cm-s-eclipse span.cm-bracket {color: #cc7;} 17 | .cm-s-eclipse span.cm-tag {color: #170;} 18 | .cm-s-eclipse span.cm-attribute {color: #00c;} 19 | .cm-s-eclipse span.cm-link {color: #219;} 20 | .cm-s-eclipse span.cm-error {color: #f00;} 21 | 22 | .cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;} 23 | .cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 24 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/common/CommonResult.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.common; 2 | 3 | /** 4 | * Created by FirePan on 2016/10/18. 5 | */ 6 | public class CommonResult { 7 | private Integer resultCode; 8 | private String resultMsg; 9 | private Object resultData; 10 | 11 | public CommonResult(Integer resultCode, String resultMsg) { 12 | this.resultCode = resultCode; 13 | this.resultMsg = resultMsg; 14 | } 15 | 16 | public CommonResult(Integer resultCode, String resultMsg, Object resultData) { 17 | this.resultCode = resultCode; 18 | this.resultMsg = resultMsg; 19 | this.resultData = resultData; 20 | } 21 | 22 | public Integer getResultCode() { 23 | return resultCode; 24 | } 25 | 26 | public void setResultCode(Integer resultCode) { 27 | this.resultCode = resultCode; 28 | } 29 | 30 | public String getResultMsg() { 31 | return resultMsg; 32 | } 33 | 34 | public void setResultMsg(String resultMsg) { 35 | this.resultMsg = resultMsg; 36 | } 37 | 38 | public Object getResultData() { 39 | return resultData; 40 | } 41 | 42 | public void setResultData(Object resultData) { 43 | this.resultData = resultData; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/ITagDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.stereotype.Repository; 5 | 6 | import studio.baxia.fo.pojo.Tag; 7 | import studio.baxia.fo.vo.TagVo; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Created by Pan on 2016/10/16. 13 | */ 14 | @Repository("iTagDao") 15 | public interface ITagDao { 16 | /** 17 | * 插入标签 18 | * @param tag 标签(name) 19 | * @return 受影响的行 20 | */ 21 | Integer insert(Tag tag); 22 | 23 | /** 24 | * 删除标签 25 | * @param tagId 标签id 26 | * @return 受影响的行 27 | */ 28 | Integer delete(@Param("id")Integer tagId); 29 | 30 | /** 31 | * 查找所有标签 32 | * @return List 33 | */ 34 | List selectBy(); 35 | 36 | /** 37 | * 通过id查找标签 38 | * @param tagId 标签id 39 | * @return Tag 40 | */ 41 | Tag selectById(@Param("id")Integer tagId); 42 | /** 43 | * 通过name查找标签 44 | * @param tagName 标签名 45 | * @return Tag 46 | */ 47 | Tag selectByName(@Param("name")String tagName); 48 | 49 | List selectVoBy(@Param("articleStatus")Integer articleStatus); 50 | 51 | List selectByIds(@Param("ids")List tagIdList); 52 | 53 | Integer update(Tag tag); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/common/PageInfoResult.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.common; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Pan on 2016/10/15. 7 | */ 8 | public class PageInfoResult { 9 | private List list; 10 | private PageConfig pageConfig; 11 | 12 | private PageInfoResult() { 13 | } 14 | 15 | /** 16 | * 唯一公有构造器,并完全初始化PageConfig的所有变量 17 | * @param list List 18 | * @param pageConfig PageConfig 19 | * @param infoCounts 总记录数 20 | */ 21 | public PageInfoResult(List list, PageConfig pageConfig,int infoCounts) { 22 | this.list = list; 23 | pageConfig.initAll(infoCounts); 24 | this.pageConfig = pageConfig; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "PageInfoResult{\n" + 30 | "list=" + list + 31 | ", \npageConfig=" + pageConfig + 32 | "\n}"; 33 | } 34 | 35 | public List getList() { 36 | return list; 37 | } 38 | 39 | public void setList(List list) { 40 | this.list = list; 41 | } 42 | 43 | public PageConfig getPageConfig() { 44 | return pageConfig; 45 | } 46 | 47 | public void setPageConfig(PageConfig pageConfig) { 48 | this.pageConfig = pageConfig; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/TokenManagerUtilImpl.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | 4 | import org.apache.log4j.Logger; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.Map; 8 | import java.util.concurrent.ConcurrentHashMap; 9 | 10 | 11 | /** 12 | * 默认令牌管理器 13 | */ 14 | @Component("tokenManager") 15 | public class TokenManagerUtilImpl implements TokenManagerUtil { 16 | 17 | final static Logger log = Logger.getLogger(TokenManagerUtilImpl.class); 18 | 19 | private static Map tokenMap = new ConcurrentHashMap<>(); 20 | 21 | @Override 22 | public String createToken(String username) { 23 | String token = CodecUtil.createUUID(); 24 | tokenMap.put(token, username); 25 | return token; 26 | } 27 | 28 | @Override 29 | public boolean checkToken(String token) { 30 | if(token == null || "".equals(token)) 31 | return false; 32 | return tokenMap.containsKey(token); 33 | } 34 | 35 | @Override 36 | public String getUserName(String token) { 37 | return tokenMap.get(token); 38 | } 39 | 40 | @Override 41 | public boolean deleteToken(String token) { 42 | String result = tokenMap.remove(token); 43 | log.info("deleteToken[result="+result+"]"); 44 | return true; 45 | } 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/lint/css-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on csslint.js from https://github.com/stubbornella/csslint 5 | 6 | // declare global: CSSLint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "css", function(text) { 19 | var found = []; 20 | if (!window.CSSLint) return found; 21 | var results = CSSLint.verify(text), messages = results.messages, message = null; 22 | for ( var i = 0; i < messages.length; i++) { 23 | message = messages[i]; 24 | var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col; 25 | found.push({ 26 | from: CodeMirror.Pos(startLine, startCol), 27 | to: CodeMirror.Pos(endLine, endCol), 28 | message: message.message, 29 | severity : message.type 30 | }); 31 | } 32 | return found; 33 | }); 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /src/main/resources/config/mybatis/GuestEx_SqlMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 29 | 30 | 31 | 36 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/article/article.manage.service.js: -------------------------------------------------------------------------------- 1 | app.service("ArticleManageService", function(RequestService) { 2 | this.list = function (pageNumber, pageSize,articleStatus) { 3 | return RequestService.postRequest('/manage/article' ,$.param({ 4 | "pageNumber": pageNumber, 5 | "pageSize":pageSize, 6 | "articleStatus":articleStatus 7 | }), cfg_form); 8 | }; 9 | this.get = function (id) { 10 | return RequestService.getRequest('/manage/article/' + id, cfg_form); 11 | }; 12 | this.put = function(article){ 13 | return RequestService.putRequest('/manage/article/update' ,article, cfg_json); 14 | } 15 | this.put2 = function(article){ 16 | return RequestService.putRequest('/manage/article/draft2article' ,article, cfg_json); 17 | } 18 | this.post = function(article){ 19 | return RequestService.postRequest('/manage/article/save' ,article, cfg_json); 20 | } 21 | this.delete = function (id) { 22 | return RequestService.deleteRequest('/manage/article/' + id, cfg_form); 23 | }; 24 | this.getCategorys = function () { 25 | return RequestService.getRequest('/manage/category', cfg_form); 26 | }; 27 | this.getTags = function () { 28 | return RequestService.getRequest('/manage/tag', cfg_form); 29 | }; 30 | 31 | 32 | 33 | }) -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode("diff", function() { 15 | 16 | var TOKEN_NAMES = { 17 | '+': 'positive', 18 | '-': 'negative', 19 | '@': 'meta' 20 | }; 21 | 22 | return { 23 | token: function(stream) { 24 | var tw_pos = stream.string.search(/[\t ]+?$/); 25 | 26 | if (!stream.sol() || tw_pos === 0) { 27 | stream.skipToEnd(); 28 | return ("error " + ( 29 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 30 | } 31 | 32 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 33 | 34 | if (tw_pos === -1) { 35 | stream.skipToEnd(); 36 | } else { 37 | stream.pos = tw_pos; 38 | } 39 | 40 | return token_name; 41 | } 42 | }; 43 | }); 44 | 45 | CodeMirror.defineMIME("text/x-diff", "diff"); 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /src/main/webapp/scripts/request.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/13. 3 | */ 4 | app.service("RequestService", function ($http, $q) { 5 | this.getRequest = function(url,paramsType){ 6 | var deferred = $q.defer(); 7 | $http.get(web_project_name+url,paramsType).success(function (data) { 8 | deferred.resolve(data); 9 | }); 10 | return deferred.promise; 11 | }; 12 | this.postRequest = function(url,params,paramsType){ 13 | var deferred = $q.defer(); 14 | $http.post(web_project_name+url,params,paramsType).success(function (data) { 15 | deferred.resolve(data); 16 | }).error(function(e){ 17 | console.info(e) 18 | }); 19 | return deferred.promise; 20 | }; 21 | this.putRequest = function(url,params,paramsType){ 22 | var deferred = $q.defer(); 23 | $http.put(web_project_name+url,params,paramsType).success(function (data) { 24 | deferred.resolve(data); 25 | }); 26 | return deferred.promise; 27 | }; 28 | this.deleteRequest = function(url,paramsType){ 29 | var deferred = $q.defer(); 30 | $http.delete(web_project_name + url, paramsType).success(function (data) { 31 | deferred.resolve(data); 32 | }); 33 | return deferred.promise; 34 | }; 35 | }); 36 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/service/IBCategoryService.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.service; 2 | 3 | import studio.baxia.fo.pojo.Category; 4 | import studio.baxia.fo.vo.CategoryVo; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Pan on 2016/12/4. 10 | */ 11 | public interface IBCategoryService { 12 | /** 13 | * 添加类别 14 | * 15 | * @param category 16 | * 类别(parent_id,name,author_id) 17 | * @return 18 | */ 19 | Boolean add(Category category); 20 | 21 | /** 22 | * 修改类别 23 | * 24 | * @param category 25 | * 类别(parent_id,name) 26 | * @return 27 | */ 28 | Boolean edit(Category category); 29 | 30 | /** 31 | * 通过类别id删除类别 32 | * 33 | * @param categoryId 34 | * 类别id 35 | * @return 36 | */ 37 | Boolean deleteById(int categoryId); 38 | 39 | /** 40 | * 通过作者id获取所有类别 41 | * 42 | * @return 43 | */ 44 | List getAllBy(); 45 | 46 | /** 47 | * 通过类别id获取类别 48 | * 49 | * @param categoryId 50 | * 类别id 51 | * @return 52 | */ 53 | Category getById(int categoryId,boolean status); 54 | 55 | /** 56 | * 通过类别类别状态和文章状态查询类别 57 | * @param articleStatus 58 | * @param status 59 | * @return 60 | */ 61 | List getAllVoBy(Integer articleStatus,boolean status); 62 | } 63 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/jquery.flowchart.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery.flowchart.js v1.1.0 | jquery.flowchart.min.js | jQuery plugin for flowchart.js. | MIT License | By: Pandao | https://github.com/pandao/jquery.flowchart.js | 2015-03-09 */ 2 | (function(factory){if(typeof require==="function"&&typeof exports==="object"&&typeof module==="object"){module.exports=factory}else{if(typeof define==="function"){factory(jQuery,flowchart)}else{factory($,flowchart)}}}(function(jQuery,flowchart){(function($){$.fn.flowChart=function(options){options=options||{};var defaults={"x":0,"y":0,"line-width":2,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black","fill":"white","yes-text":"yes","no-text":"no","arrow-end":"block","symbols":{"start":{"font-color":"black","element-color":"black","fill":"white"},"end":{"class":"end-element"}},"flowstate":{"past":{"fill":"#CCCCCC","font-size":12},"current":{"fill":"black","font-color":"white","font-weight":"bold"},"future":{"fill":"white"},"request":{"fill":"blue"},"invalid":{"fill":"#444444"},"approved":{"fill":"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},"rejected":{"fill":"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}}};return this.each(function(){var $this=$(this);var diagram=flowchart.parse($this.text());var settings=$.extend(true,defaults,options);$this.html("");diagram.drawSVG(this,settings)})}})(jQuery)})); -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/StringUtil.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | /** 4 | * Created by Pan on 2016/12/17. 5 | */ 6 | public class StringUtil { 7 | public static String byte2hex(byte[] buff) 8 | { 9 | if ((buff == null) || (buff.length <= 0)) { 10 | return ""; 11 | } 12 | 13 | String tmpStr = null; 14 | StringBuilder hexStr = new StringBuilder(); 15 | 16 | for (int n = 0; n < buff.length; n++) { 17 | tmpStr = Integer.toHexString(buff[n] & 0xFF); 18 | if (tmpStr.length() == 1) { 19 | hexStr.append("0"); 20 | } 21 | hexStr.append(tmpStr); 22 | } 23 | return hexStr.toString().toUpperCase(); 24 | } 25 | 26 | public static String byteToHex(byte[] b, boolean upper) 27 | { 28 | String result = ""; 29 | String stmp = ""; 30 | for (int n = 0; n < b.length; n++) { 31 | stmp = Integer.toHexString(b[n] & 0xFF); 32 | if (stmp.length() == 1) 33 | result = new StringBuilder().append(result).append("0").append(stmp).toString(); 34 | else { 35 | result = new StringBuilder().append(result).append(stmp).toString(); 36 | } 37 | } 38 | if (upper) { 39 | return result.toUpperCase(); 40 | } 41 | return result.toLowerCase(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/archive/archive.article.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 9 | 10 |
11 |
12 |
13 |

14 | {{article.title}} 16 | 17 | 阅读全文 19 | 20 |

21 | 22 |
23 |
24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/tern/worker.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // declare global: tern, server 5 | 6 | var server; 7 | 8 | this.onmessage = function(e) { 9 | var data = e.data; 10 | switch (data.type) { 11 | case "init": return startServer(data.defs, data.plugins, data.scripts); 12 | case "add": return server.addFile(data.name, data.text); 13 | case "del": return server.delFile(data.name); 14 | case "req": return server.request(data.body, function(err, reqData) { 15 | postMessage({id: data.id, body: reqData, err: err && String(err)}); 16 | }); 17 | case "getFile": 18 | var c = pending[data.id]; 19 | delete pending[data.id]; 20 | return c(data.err, data.text); 21 | default: throw new Error("Unknown message type: " + data.type); 22 | } 23 | }; 24 | 25 | var nextId = 0, pending = {}; 26 | function getFile(file, c) { 27 | postMessage({type: "getFile", name: file, id: ++nextId}); 28 | pending[nextId] = c; 29 | } 30 | 31 | function startServer(defs, plugins, scripts) { 32 | if (scripts) importScripts.apply(null, scripts); 33 | 34 | server = new tern.Server({ 35 | getFile: getFile, 36 | async: true, 37 | defs: defs, 38 | plugins: plugins 39 | }); 40 | } 41 | 42 | var console = { 43 | log: function(v) { postMessage({type: "debug", message: v}); } 44 | }; 45 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/lint/coffeescript-lint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js 5 | 6 | // declare global: coffeelint 7 | 8 | (function(mod) { 9 | if (typeof exports == "object" && typeof module == "object") // CommonJS 10 | mod(require("../../lib/codemirror")); 11 | else if (typeof define == "function" && define.amd) // AMD 12 | define(["../../lib/codemirror"], mod); 13 | else // Plain browser env 14 | mod(CodeMirror); 15 | })(function(CodeMirror) { 16 | "use strict"; 17 | 18 | CodeMirror.registerHelper("lint", "coffeescript", function(text) { 19 | var found = []; 20 | var parseError = function(err) { 21 | var loc = err.lineNumber; 22 | found.push({from: CodeMirror.Pos(loc-1, 0), 23 | to: CodeMirror.Pos(loc, 0), 24 | severity: err.level, 25 | message: err.message}); 26 | }; 27 | try { 28 | var res = coffeelint.lint(text); 29 | for(var i = 0; i < res.length; i++) { 30 | parseError(res[i]); 31 | } 32 | } catch(e) { 33 | found.push({from: CodeMirror.Pos(e.location.first_line, 0), 34 | to: CodeMirror.Pos(e.location.last_line, e.location.last_column), 35 | severity: 'error', 36 | message: e.message}); 37 | } 38 | return found; 39 | }); 40 | 41 | }); 42 | -------------------------------------------------------------------------------- /src/test/java/studio/baxia/fo/BaseControlTest.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo; 2 | 3 | import org.junit.Before; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.test.context.ContextConfiguration; 7 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 8 | import org.springframework.test.context.transaction.TransactionConfiguration; 9 | import org.springframework.test.context.web.WebAppConfiguration; 10 | import org.springframework.test.web.servlet.MockMvc; 11 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 12 | import org.springframework.transaction.annotation.Transactional; 13 | import org.springframework.web.context.WebApplicationContext; 14 | 15 | @RunWith(SpringJUnit4ClassRunner.class) 16 | //测试环境使用,用来表示测试环境使用的ApplicationContext将是WebApplicationContext类型的;value指定web应用的根; 17 | @WebAppConfiguration 18 | @ContextConfiguration(locations = { "classpath*:config/**/spring-mvc.xml", 19 | "classpath*:config/**/applicationContext.xml"}) 20 | // 配置事务的回滚,对数据库的增删改都会回滚,便于测试用例的循环利用 21 | @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 22 | @Transactional 23 | public class BaseControlTest { 24 | protected MockMvc mockMvc; 25 | 26 | @Autowired 27 | protected WebApplicationContext wac; 28 | 29 | @Before() 30 | // 这个方法在每个方法执行之前都会执行一遍 31 | public void setup() { 32 | mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); // 初始化MockMvc对象 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/runmode/colorize.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("./runmode")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "./runmode"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; 15 | 16 | function textContent(node, out) { 17 | if (node.nodeType == 3) return out.push(node.nodeValue); 18 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) { 19 | textContent(ch, out); 20 | if (isBlock.test(node.nodeType)) out.push("\n"); 21 | } 22 | } 23 | 24 | CodeMirror.colorize = function(collection, defaultMode) { 25 | if (!collection) collection = document.body.getElementsByTagName("pre"); 26 | 27 | for (var i = 0; i < collection.length; ++i) { 28 | var node = collection[i]; 29 | var mode = node.getAttribute("data-lang") || defaultMode; 30 | if (!mode) continue; 31 | 32 | var text = []; 33 | textContent(node, text); 34 | node.innerHTML = ""; 35 | CodeMirror.runMode(text.join(""), mode, node); 36 | 37 | node.className += " cm-s-default"; 38 | } 39 | }; 40 | }); 41 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/archive/archive.list.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 8 | 9 |
11 |
12 |
13 |
14 |

15 |   16 | {{archive.name}}(共计{{archive.counts}}篇) 17 |

18 |
19 |
    20 |
  • {{monthArchive.name}}({{monthArchive.counts}}) 24 |
  • 25 |
26 |
27 |
28 |
29 |
30 |
-------------------------------------------------------------------------------- /src/main/webapp/modules/blog/tag/tag.list.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 8 | 9 |
10 |
12 |
13 |
14 |
15 |

16 |  {{tag.name}} 17 | ({{tag.counts}}) 18 | 19 | 22 |

23 |
24 |
25 |
26 |
27 |
28 |
29 |
-------------------------------------------------------------------------------- /src/main/webapp/modules/manage/category/category.add.view.html: -------------------------------------------------------------------------------- 1 | 4 | 28 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/info/info.form.manage.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("InfoFormManageController", function($location,$scope,InfoManageService) { 2 | $scope.isInfoNav = true; 3 | setScreenAvailHeight(); 4 | var infoEditor; 5 | var getInfo = function(){ 6 | InfoManageService.get().then(function(data){ 7 | //console.log(data); 8 | if(data.resultData!=null){ 9 | $scope.info = data.resultData; 10 | } 11 | }) 12 | } 13 | $scope.updateInfo = function(info){ 14 | info.profile = infoEditor.getMarkdown(); 15 | InfoManageService.put(info).then(function(data){ 16 | //console.log(data) 17 | if(data.resultCode==1){ 18 | $location.path("/manage/info"); 19 | } 20 | }) 21 | } 22 | getInfo(); 23 | $(function () { 24 | infoEditor = editormd("info-editormd", { 25 | width: "100%", 26 | height: 520, 27 | watch: false, 28 | path: web_project_name + "/plugins/editor.md/lib/", 29 | toolbarIcons: function () { 30 | return editormd.toolbarModes["simple"]; 31 | }, 32 | onload: function () { 33 | this.setMarkdown(""); 34 | if ($scope.info != undefined && $scope.info != null) { 35 | this.setMarkdown($scope.info.profile); 36 | } 37 | }, 38 | saveHTMLToTextarea: true, 39 | autoFocus: false, 40 | toolbarAutoFixed: false 41 | }); 42 | }); 43 | }); -------------------------------------------------------------------------------- /src/main/webapp/scripts/constant.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Pan on 2016/9/11. 3 | */ 4 | var web_project_name = ""; 5 | var web_project_host = "http://localhost:8080"; 6 | var loading_path =web_project_name+"/images/loading.gif"; 7 | var cfg_form = { 8 | headers : { 9 | 'Content-Type' : 'application/x-www-form-urlencoded;charset=utf-8;' 10 | } 11 | }; 12 | var cfg_json = { 13 | headers : { 14 | 'Content-Type' : 'application/json;charset=utf-8;' 15 | } 16 | }; 17 | var cfg_file = { 18 | headers : { 19 | 'Content-Type' : undefined 20 | } 21 | }; 22 | var nav_index = "index"; 23 | var nav_archive = "archive"; 24 | var nav_category = "category"; 25 | var nav_tag = "tag"; 26 | var dialogwidth = window.screen.width*80/100; 27 | var dialogheight = window.screen.height*50/100; 28 | var setScreenAvailHeight=function(){ 29 | var availHeight= window.screen.availHeight; 30 | // console.log(availHeight) 31 | // $(".customNoMarginRightContainer").css("min-height", 32 | // availHeight + "px"); 33 | // $(".customManageContainer").css("min-height", 34 | // availHeight + "px"); 35 | // $(".customContainer").css("min-height", 36 | // availHeight + "px"); 37 | $("#sub-nav").css("height",availHeight+"px"); 38 | // $("#sub-nav").css("padding-bottom",availHeight*0.2+"px"); 39 | } 40 | 41 | 42 | 43 | var setSubNavData = function(data,typeCode,typeName){ 44 | var subNavDatas = { 45 | data:data, 46 | typeCode:typeCode, 47 | typeName:typeName 48 | } 49 | return subNavDatas; 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/test/java/studio/baxia/fo/BaseTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package studio.baxia.fo; 5 | 6 | import org.junit.runner.RunWith; 7 | import org.springframework.test.context.ContextConfiguration; 8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 9 | import org.springframework.test.context.transaction.TransactionConfiguration; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | /** 13 | * @author fireoct 14 | * @email panhainan@yeah.net 15 | * @date 2016-09-09 16 | */ 17 | @RunWith(SpringJUnit4ClassRunner.class) 18 | @ContextConfiguration(locations = {"classpath*:config/**/applicationContext.xml"}) 19 | // 配置事务的回滚,对数据库的增删改都会回滚,便于测试用例的循环利用 20 | @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 21 | @Transactional 22 | public class BaseTest { 23 | public String methodName; 24 | public String printResultStr(String methodName, String resultExplain, Object resultData) { 25 | StringBuffer resultStr = new StringBuffer("**************************************************************\n"); 26 | resultStr.append("测试类 '" + this.getClass() + "' 的测试方法 '" + methodName + "' 的测试结果为:\n"); 27 | if (null != resultExplain) { 28 | resultStr.append("(解释:" + resultExplain + ")\n"); 29 | } 30 | resultStr.append(resultData); 31 | resultStr.append("\n**************************************************************"); 32 | System.out.println(resultStr); 33 | return resultStr.toString(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/IAuthorsDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | import org.apache.ibatis.annotations.Param; 3 | import org.springframework.stereotype.Repository; 4 | import studio.baxia.fo.pojo.Authors; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by FirePan on 2016/10/11. 10 | */ 11 | @Repository(value = "iAuthorsDao") 12 | public interface IAuthorsDao { 13 | List list(@Param("pageIndex")Integer pageIndex ,@Param("pageSize")Integer pageSize); 14 | 15 | /** 16 | * 通过作者id获取作者信息 17 | * @param authorsId 作者id 18 | * @return Authors 作者信息 19 | */ 20 | Authors selectById(@Param("id")Integer authorsId); 21 | /** 22 | * 通过作者账户名获取作者信息 23 | * @param authorsAccount 作者账户名 24 | * @return Authors 作者信息 25 | */ 26 | Authors selectByAccount(@Param("account")String authorsAccount); 27 | 28 | /** 29 | * 通过作者邮箱获取作者信息 30 | * @param authorsEmail 作者邮箱 31 | * @return Authors 作者信息 32 | */ 33 | Authors selectByEmail(@Param("email")String authorsEmail); 34 | 35 | Integer deleteById(Integer id); 36 | 37 | /** 38 | * 添加作者账号 39 | * @param authors 作者信息(account,password,userStatus) 40 | * @return 受影响的行数 41 | */ 42 | Integer insert(Authors authors); 43 | 44 | /** 45 | * 更新作者账户的用户状态 46 | * @param authorsId 作者id 47 | * @param userStatus 作者账户状态 48 | */ 49 | void updateAuthorsStatus(@Param("id") Integer authorsId, @Param("userStatus")Integer userStatus); 50 | int update(Authors info); 51 | 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/category/category.list.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 8 | 9 |
11 |
12 |
13 |
14 |

15 |  {{category.name}} 16 | ({{category.counts}}) 17 | 18 | 21 |

22 |
23 |
24 |

25 | {{category.description}} 26 |

27 | 30 |
31 |
32 |
33 |
34 |
-------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/pojo/Category.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.pojo; 2 | 3 | import org.hibernate.validator.constraints.NotEmpty; 4 | import studio.baxia.fo.common.TreeInfo; 5 | 6 | /** 7 | * Created by FirePan on 2016/10/11. 8 | * 文章类别实体信息. 9 | * 注意:限制目录级别为两层 10 | */ 11 | public class Category extends TreeInfo { 12 | private Integer id; 13 | @NotEmpty(message = "名称不能为空") 14 | private String name;//名称 15 | @NotEmpty(message = "描述不能为空") 16 | private String description; 17 | private String code; 18 | /** 19 | * 类别状态 20 | */ 21 | private boolean status; 22 | 23 | @Override 24 | public Integer getId() { 25 | return id; 26 | } 27 | 28 | @Override 29 | public void setId(Integer id) { 30 | this.id = id; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | 41 | public String getDescription() { 42 | return description; 43 | } 44 | 45 | public void setDescription(String description) { 46 | this.description = description; 47 | } 48 | 49 | public boolean isStatus() { 50 | return status; 51 | } 52 | 53 | public void setStatus(boolean status) { 54 | this.status = status; 55 | } 56 | 57 | public String getCode() { 58 | return code; 59 | } 60 | 61 | public void setCode(String code) { 62 | this.code = code; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/ArticleVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | import studio.baxia.fo.common.CommonConstant; 4 | import studio.baxia.fo.pojo.Article; 5 | 6 | public class ArticleVo extends Article { 7 | private String categoryName; 8 | private String categoryCode; 9 | private String statusName; 10 | private String[] tagNames; 11 | private Boolean onlyChangeStatus=false; 12 | 13 | public String getCategoryName() { 14 | return categoryName; 15 | } 16 | 17 | public void setCategoryName(String categoryName) { 18 | this.categoryName = categoryName; 19 | } 20 | 21 | public String getStatusName() { 22 | return statusName; 23 | } 24 | 25 | public void setStatusName(int status) { 26 | if(status==CommonConstant.ACTICLE_STATUS_BLOG){ 27 | this.statusName=CommonConstant.ACTICLE_STATUS_BLOG_NAME; 28 | }else{ 29 | this.statusName=CommonConstant.ACTICLE_STATUS_DRAFT_NAME; 30 | } 31 | } 32 | 33 | public String[] getTagNames() { 34 | return tagNames; 35 | } 36 | 37 | public void setTagNames(String[] tagNames) { 38 | this.tagNames = tagNames; 39 | } 40 | 41 | public Boolean getOnlyChangeStatus() { 42 | return onlyChangeStatus; 43 | } 44 | 45 | public void setOnlyChangeStatus(Boolean onlyChangeStatus) { 46 | this.onlyChangeStatus = onlyChangeStatus; 47 | } 48 | 49 | public String getCategoryCode() { 50 | return categoryCode; 51 | } 52 | 53 | public void setCategoryCode(String categoryCode) { 54 | this.categoryCode = categoryCode; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/webapp/modules/friendlink/friendlink.view.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 8 | 9 |
10 |
11 |
12 |
13 |
14 |

15 |   16 | {{friendlink.name}} 17 |

18 |
19 |
20 |

21 | {{friendlink.description}} 22 |

23 | 26 |
27 |
28 |
29 |
30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/ntriples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: NTriples mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 28 | 29 |
30 |

NTriples mode

31 |
32 | 39 |
40 | 41 | 44 |

MIME types defined: text/n-triples.

45 |
46 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/spreadsheet/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Spreadsheet mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

Spreadsheet mode

28 |
29 | 30 | 37 | 38 |

MIME types defined: text/x-spreadsheet.

39 | 40 |

The Spreadsheet Mode

41 |

Created by Robert Plummer

42 |
43 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/http/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: HTTP mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

HTTP mode

27 | 28 | 29 |
39 | 40 | 43 | 44 |

MIME types defined: message/http.

45 |
46 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/cobalt.css: -------------------------------------------------------------------------------- 1 | .cm-s-cobalt.CodeMirror { background: #002240; color: white; } 2 | .cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; } 3 | .cm-s-cobalt.CodeMirror ::selection { background: rgba(179, 101, 57, .99); } 4 | .cm-s-cobalt.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); } 5 | .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 6 | .cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; } 7 | .cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 8 | .cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } 9 | .cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; } 10 | 11 | .cm-s-cobalt span.cm-comment { color: #08f; } 12 | .cm-s-cobalt span.cm-atom { color: #845dc4; } 13 | .cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } 14 | .cm-s-cobalt span.cm-keyword { color: #ffee80; } 15 | .cm-s-cobalt span.cm-string { color: #3ad900; } 16 | .cm-s-cobalt span.cm-meta { color: #ff9d00; } 17 | .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } 18 | .cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } 19 | .cm-s-cobalt span.cm-bracket { color: #d8d8d8; } 20 | .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } 21 | .cm-s-cobalt span.cm-link { color: #845dc4; } 22 | .cm-s-cobalt span.cm-error { color: #9d1e15; } 23 | 24 | .cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;} 25 | .cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} 26 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/css/editormd.logo.min.css: -------------------------------------------------------------------------------- 1 | /*! Editor.md v1.5.0 | editormd.logo.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ 2 | /*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3} -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/solr/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Solr mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 33 | 34 |
35 |

Solr mode

36 | 37 |
38 | 47 |
48 | 49 | 55 | 56 |

MIME types defined: text/x-solr.

57 |
58 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/z80/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Z80 assembly mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Z80 assembly mode

27 | 28 | 29 |
44 | 45 | 50 | 51 |

MIME type defined: text/x-z80.

52 |
53 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/ecl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: ECL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

ECL mode

27 |
45 | 48 | 49 |

Based on CodeMirror's clike mode. For more information see HPCC Systems web site.

50 |

MIME types defined: text/x-ecl.

51 | 52 |
53 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/pojo/Guest.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.pojo; 2 | 3 | /** 4 | * Created by FirePan on 2016/10/11. 5 | * 访客实体信息. 6 | */ 7 | public class Guest { 8 | private Integer id; 9 | private String email;//通讯邮箱 10 | private String nickname;//昵称 11 | private String personalWebsite;//个人网址 12 | private String accessIp;//访问IP 13 | 14 | @Override 15 | public String toString() { 16 | return "Guest{" + 17 | "id=" + id + 18 | ", email='" + email + '\'' + 19 | ", nickname='" + nickname + '\'' + 20 | ", personalWebsite='" + personalWebsite + '\'' + 21 | ", accessIp='" + accessIp + '\'' + 22 | '}'; 23 | } 24 | 25 | public Integer getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Integer id) { 30 | this.id = id; 31 | } 32 | 33 | public String getEmail() { 34 | return email; 35 | } 36 | 37 | public void setEmail(String email) { 38 | this.email = email; 39 | } 40 | 41 | public String getNickname() { 42 | return nickname; 43 | } 44 | 45 | public void setNickname(String nickname) { 46 | this.nickname = nickname; 47 | } 48 | 49 | public String getPersonalWebsite() { 50 | return personalWebsite; 51 | } 52 | 53 | public void setPersonalWebsite(String personalWebsite) { 54 | this.personalWebsite = personalWebsite; 55 | } 56 | 57 | public String getAccessIp() { 58 | return accessIp; 59 | } 60 | 61 | public void setAccessIp(String accessIp) { 62 | this.accessIp = accessIp; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/rust/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Rust mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Rust mode

27 | 28 | 29 |
52 | 53 | 58 | 59 |

MIME types defined: text/x-rustsrc.

60 |
61 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/monokai.css: -------------------------------------------------------------------------------- 1 | /* Based on Sublime Text's Monokai theme */ 2 | 3 | .cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} 4 | .cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} 5 | .cm-s-monokai.CodeMirror ::selection { background: rgba(73, 72, 62, .99); } 6 | .cm-s-monokai.CodeMirror ::-moz-selection { background: rgba(73, 72, 62, .99); } 7 | .cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} 8 | .cm-s-monokai .CodeMirror-guttermarker { color: white; } 9 | .cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; } 10 | .cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} 11 | .cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} 12 | 13 | .cm-s-monokai span.cm-comment {color: #75715e;} 14 | .cm-s-monokai span.cm-atom {color: #ae81ff;} 15 | .cm-s-monokai span.cm-number {color: #ae81ff;} 16 | 17 | .cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;} 18 | .cm-s-monokai span.cm-keyword {color: #f92672;} 19 | .cm-s-monokai span.cm-string {color: #e6db74;} 20 | 21 | .cm-s-monokai span.cm-variable {color: #a6e22e;} 22 | .cm-s-monokai span.cm-variable-2 {color: #9effff;} 23 | .cm-s-monokai span.cm-def {color: #fd971f;} 24 | .cm-s-monokai span.cm-bracket {color: #f8f8f2;} 25 | .cm-s-monokai span.cm-tag {color: #f92672;} 26 | .cm-s-monokai span.cm-link {color: #ae81ff;} 27 | .cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;} 28 | 29 | .cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;} 30 | .cm-s-monokai .CodeMirror-matchingbracket { 31 | text-decoration: underline; 32 | color: white !important; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/rubyblue.css: -------------------------------------------------------------------------------- 1 | .cm-s-rubyblue.CodeMirror { background: #112435; color: white; } 2 | .cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; } 3 | .cm-s-rubyblue.CodeMirror ::selection { background: rgba(56, 86, 111, 0.99); } 4 | .cm-s-rubyblue.CodeMirror ::-moz-selection { background: rgba(56, 86, 111, 0.99); } 5 | .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } 6 | .cm-s-rubyblue .CodeMirror-guttermarker { color: white; } 7 | .cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; } 8 | .cm-s-rubyblue .CodeMirror-linenumber { color: white; } 9 | .cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; } 10 | 11 | .cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } 12 | .cm-s-rubyblue span.cm-atom { color: #F4C20B; } 13 | .cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } 14 | .cm-s-rubyblue span.cm-keyword { color: #F0F; } 15 | .cm-s-rubyblue span.cm-string { color: #F08047; } 16 | .cm-s-rubyblue span.cm-meta { color: #F0F; } 17 | .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } 18 | .cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } 19 | .cm-s-rubyblue span.cm-bracket { color: #F0F; } 20 | .cm-s-rubyblue span.cm-link { color: #F4C20B; } 21 | .cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } 22 | .cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } 23 | .cm-s-rubyblue span.cm-error { color: #AF2018; } 24 | 25 | .cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;} 26 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/scroll/simplescrollbars.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div { 2 | position: absolute; 3 | background: #ccc; 4 | -moz-box-sizing: border-box; 5 | box-sizing: border-box; 6 | border: 1px solid #bbb; 7 | border-radius: 2px; 8 | } 9 | 10 | .CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical { 11 | position: absolute; 12 | z-index: 6; 13 | background: #eee; 14 | } 15 | 16 | .CodeMirror-simplescroll-horizontal { 17 | bottom: 0; left: 0; 18 | height: 8px; 19 | } 20 | .CodeMirror-simplescroll-horizontal div { 21 | bottom: 0; 22 | height: 100%; 23 | } 24 | 25 | .CodeMirror-simplescroll-vertical { 26 | right: 0; top: 0; 27 | width: 8px; 28 | } 29 | .CodeMirror-simplescroll-vertical div { 30 | right: 0; 31 | width: 100%; 32 | } 33 | 34 | 35 | .CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler { 36 | display: none; 37 | } 38 | 39 | .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { 40 | position: absolute; 41 | background: #bcd; 42 | border-radius: 3px; 43 | } 44 | 45 | .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { 46 | position: absolute; 47 | z-index: 6; 48 | } 49 | 50 | .CodeMirror-overlayscroll-horizontal { 51 | bottom: 0; left: 0; 52 | height: 6px; 53 | } 54 | .CodeMirror-overlayscroll-horizontal div { 55 | bottom: 0; 56 | height: 100%; 57 | } 58 | 59 | .CodeMirror-overlayscroll-vertical { 60 | right: 0; top: 0; 61 | width: 6px; 62 | } 63 | .CodeMirror-overlayscroll-vertical div { 64 | right: 0; 65 | width: 100%; 66 | } 67 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/display/fullscreen.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineOption("fullScreen", false, function(cm, val, old) { 15 | if (old == CodeMirror.Init) old = false; 16 | if (!old == !val) return; 17 | if (val) setFullscreen(cm); 18 | else setNormal(cm); 19 | }); 20 | 21 | function setFullscreen(cm) { 22 | var wrap = cm.getWrapperElement(); 23 | cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, 24 | width: wrap.style.width, height: wrap.style.height}; 25 | wrap.style.width = ""; 26 | wrap.style.height = "auto"; 27 | wrap.className += " CodeMirror-fullscreen"; 28 | document.documentElement.style.overflow = "hidden"; 29 | cm.refresh(); 30 | } 31 | 32 | function setNormal(cm) { 33 | var wrap = cm.getWrapperElement(); 34 | wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); 35 | document.documentElement.style.overflow = ""; 36 | var info = cm.state.fullScreenRestore; 37 | wrap.style.width = info.width; wrap.style.height = info.height; 38 | window.scrollTo(info.scrollLeft, info.scrollTop); 39 | cm.refresh(); 40 | } 41 | }); 42 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/night.css: -------------------------------------------------------------------------------- 1 | /* Loosely based on the Midnight Textmate theme */ 2 | 3 | .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } 4 | .cm-s-night div.CodeMirror-selected { background: #447 !important; } 5 | .cm-s-night.CodeMirror ::selection { background: rgba(68, 68, 119, .99); } 6 | .cm-s-night.CodeMirror ::-moz-selection { background: rgba(68, 68, 119, .99); } 7 | .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 8 | .cm-s-night .CodeMirror-guttermarker { color: white; } 9 | .cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; } 10 | .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } 11 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } 12 | 13 | .cm-s-night span.cm-comment { color: #6900a1; } 14 | .cm-s-night span.cm-atom { color: #845dc4; } 15 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } 16 | .cm-s-night span.cm-keyword { color: #599eff; } 17 | .cm-s-night span.cm-string { color: #37f14a; } 18 | .cm-s-night span.cm-meta { color: #7678e2; } 19 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } 20 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } 21 | .cm-s-night span.cm-bracket { color: #8da6ce; } 22 | .cm-s-night span.cm-comment { color: #6900a1; } 23 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } 24 | .cm-s-night span.cm-link { color: #845dc4; } 25 | .cm-s-night span.cm-error { color: #9d1e15; } 26 | 27 | .cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;} 28 | .cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} 29 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/turtle/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Turtle mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Turtle mode

27 |
41 | 47 | 48 |

MIME types defined: text/turtle.

49 | 50 |
51 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/scroll/scrollpastend.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) { 15 | if (old && old != CodeMirror.Init) { 16 | cm.off("change", onChange); 17 | cm.off("refresh", updateBottomMargin); 18 | cm.display.lineSpace.parentNode.style.paddingBottom = ""; 19 | cm.state.scrollPastEndPadding = null; 20 | } 21 | if (val) { 22 | cm.on("change", onChange); 23 | cm.on("refresh", updateBottomMargin); 24 | updateBottomMargin(cm); 25 | } 26 | }); 27 | 28 | function onChange(cm, change) { 29 | if (CodeMirror.changeEnd(change).line == cm.lastLine()) 30 | updateBottomMargin(cm); 31 | } 32 | 33 | function updateBottomMargin(cm) { 34 | var padding = ""; 35 | if (cm.lineCount() > 1) { 36 | var totalH = cm.display.scroller.clientHeight - 30, 37 | lastLineH = cm.getLineHandle(cm.lastLine()).height; 38 | padding = (totalH - lastLineH) + "px"; 39 | } 40 | if (cm.state.scrollPastEndPadding != padding) { 41 | cm.state.scrollPastEndPadding = padding; 42 | cm.display.lineSpace.parentNode.style.paddingBottom = padding; 43 | cm.setSize(); 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /src/main/webapp/modules/manage/info/info.manage.view.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 | 10 |
11 |
12 |
13 |
14 |

15 | 个人信息 16 | 编辑 17 |

18 |
19 |
20 |
21 | 笔名:{{info.penName}}
22 | 常用邮箱:{{info.email}} 23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/pascal/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Pascal mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Pascal mode

27 | 28 | 29 |
52 | 53 | 59 | 60 |

MIME types defined: text/x-pascal.

61 |
62 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/vo/ArticleMessageVo.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.vo; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by Pan on 2016/11/20. 7 | */ 8 | public class ArticleMessageVo { 9 | private String guestNickname;//昵称 10 | private String guestWebsite;//个人网址 11 | private String messageId; 12 | private String messageContent;//留言内容 13 | private Date messagePubTime; 14 | private int messageSupportCount; 15 | 16 | public String getGuestNickname() { 17 | return guestNickname; 18 | } 19 | 20 | public void setGuestNickname(String guestNickname) { 21 | this.guestNickname = guestNickname; 22 | } 23 | 24 | public String getGuestWebsite() { 25 | return guestWebsite; 26 | } 27 | 28 | public void setGuestWebsite(String guestWebsite) { 29 | this.guestWebsite = guestWebsite; 30 | } 31 | 32 | public String getMessageId() { 33 | return messageId; 34 | } 35 | 36 | public void setMessageId(String messageId) { 37 | this.messageId = messageId; 38 | } 39 | 40 | public String getMessageContent() { 41 | return messageContent; 42 | } 43 | 44 | public void setMessageContent(String messageContent) { 45 | this.messageContent = messageContent; 46 | } 47 | 48 | public Date getMessagePubTime() { 49 | return messagePubTime; 50 | } 51 | 52 | public void setMessagePubTime(Date messagePubTime) { 53 | this.messagePubTime = messagePubTime; 54 | } 55 | 56 | public int getMessageSupportCount() { 57 | return messageSupportCount; 58 | } 59 | 60 | public void setMessageSupportCount(int messageSupportCount) { 61 | this.messageSupportCount = messageSupportCount; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/pig/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Pig Latin mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Pig Latin mode

27 |
39 | 40 | 47 | 48 |

49 | Simple mode that handles Pig Latin language. 50 |

51 | 52 |

MIME type defined: text/x-pig 53 | (PIG code) 54 | 55 |

56 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/plugins/test-plugin/test-plugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Test plugin for Editor.md 3 | * 4 | * @file test-plugin.js 5 | * @author pandao 6 | * @version 1.2.0 7 | * @updateTime 2015-03-07 8 | * {@link https://github.com/pandao/editor.md} 9 | * @license MIT 10 | */ 11 | 12 | (function() { 13 | 14 | var factory = function (exports) { 15 | 16 | var $ = jQuery; // if using module loader(Require.js/Sea.js). 17 | 18 | exports.testPlugin = function(){ 19 | alert("testPlugin"); 20 | }; 21 | 22 | exports.fn.testPluginMethodA = function() { 23 | /* 24 | var _this = this; // this == the current instance object of Editor.md 25 | var lang = _this.lang; 26 | var settings = _this.settings; 27 | var editor = this.editor; 28 | var cursor = cm.getCursor(); 29 | var selection = cm.getSelection(); 30 | var classPrefix = this.classPrefix; 31 | 32 | cm.focus(); 33 | */ 34 | //.... 35 | 36 | alert("testPluginMethodA"); 37 | }; 38 | 39 | }; 40 | 41 | // CommonJS/Node.js 42 | if (typeof require === "function" && typeof exports === "object" && typeof module === "object") 43 | { 44 | module.exports = factory; 45 | } 46 | else if (typeof define === "function") // AMD/CMD/Sea.js 47 | { 48 | if (define.amd) { // for Require.js 49 | 50 | define(["editormd"], function(editormd) { 51 | factory(editormd); 52 | }); 53 | 54 | } else { // for Sea.js 55 | define(function(require) { 56 | var editormd = require("./../../editormd"); 57 | factory(editormd); 58 | }); 59 | } 60 | } 61 | else 62 | { 63 | factory(window.editormd); 64 | } 65 | 66 | })(); 67 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/vbscript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: VBScript mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

VBScript mode

27 | 28 | 29 |
46 | 47 | 53 | 54 |

MIME types defined: text/vbscript.

55 |
56 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/the-matrix.css: -------------------------------------------------------------------------------- 1 | .cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; } 2 | .cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; } 3 | .cm-s-the-matrix.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); } 4 | .cm-s-the-matrix.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); } 5 | .cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; } 6 | .cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; } 7 | .cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; } 8 | .cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; } 9 | .cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; } 10 | 11 | .cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;} 12 | .cm-s-the-matrix span.cm-atom {color: #3FF;} 13 | .cm-s-the-matrix span.cm-number {color: #FFB94F;} 14 | .cm-s-the-matrix span.cm-def {color: #99C;} 15 | .cm-s-the-matrix span.cm-variable {color: #F6C;} 16 | .cm-s-the-matrix span.cm-variable-2 {color: #C6F;} 17 | .cm-s-the-matrix span.cm-variable-3 {color: #96F;} 18 | .cm-s-the-matrix span.cm-property {color: #62FFA0;} 19 | .cm-s-the-matrix span.cm-operator {color: #999} 20 | .cm-s-the-matrix span.cm-comment {color: #CCCCCC;} 21 | .cm-s-the-matrix span.cm-string {color: #39C;} 22 | .cm-s-the-matrix span.cm-meta {color: #C9F;} 23 | .cm-s-the-matrix span.cm-qualifier {color: #FFF700;} 24 | .cm-s-the-matrix span.cm-builtin {color: #30a;} 25 | .cm-s-the-matrix span.cm-bracket {color: #cc7;} 26 | .cm-s-the-matrix span.cm-tag {color: #FFBD40;} 27 | .cm-s-the-matrix span.cm-attribute {color: #FFF700;} 28 | .cm-s-the-matrix span.cm-error {color: #FF0000;} 29 | 30 | .cm-s-the-matrix .CodeMirror-activeline-background {background: #040;} 31 | -------------------------------------------------------------------------------- /src/main/webapp/css/modules/archive.view.css: -------------------------------------------------------------------------------- 1 | .archive-body { 2 | padding: 15px 10px; 3 | } 4 | 5 | .archive-body .col-lg-1, 6 | .archive-body .col-lg-10, 7 | .archive-body .col-lg-11, 8 | .archive-body .col-lg-12, 9 | .archive-body .col-lg-2, 10 | .archive-body .col-lg-3, 11 | .archive-body .col-lg-4, 12 | .archive-body .col-lg-5, 13 | .archive-body .col-lg-6, 14 | .archive-body .col-lg-7, 15 | .archive-body .col-lg-8, 16 | .archive-body .col-lg-9, 17 | .archive-body .col-md-1, 18 | .archive-body .col-md-10, 19 | .archive-body .col-md-11, 20 | .archive-body .col-md-12, 21 | .archive-body .col-md-2, 22 | .archive-body .col-md-3, 23 | .archive-body .col-md-4, 24 | .archive-body .col-md-5, 25 | .archive-body .col-md-6, 26 | .archive-body .col-md-7, 27 | .archive-body .col-md-8, .archive-body .col-md-9, .archive-body .col-sm-1, .archive-body .col-sm-10, .archive-body .col-sm-11, .archive-body .col-sm-12, 28 | .archive-body .col-sm-2, .archive-body .col-sm-3, .archive-body .col-sm-4, .archive-body .col-sm-5, .archive-body .col-sm-6, .archive-body .col-sm-7, .archive-body .col-sm-8, .archive-body .col-sm-9, 29 | .archive-body .col-xs-1, .archive-body .col-xs-10, .archive-body .col-xs-11, .archive-body .col-xs-12, .archive-body .col-xs-2, .archive-body .col-xs-3, .archive-body .col-xs-4, .archive-body .col-xs-5, 30 | .archive-body .col-xs-6, .archive-body .col-xs-7, .archive-body .col-xs-8, .archive-body .col-xs-9 { 31 | padding:0 10px; 32 | } 33 | .body-archive-body{ 34 | margin: 0 10px; 35 | } 36 | .archive-card { 37 | padding: 10px 0px; 38 | margin-right: 0px; 39 | } 40 | 41 | .archive-card li { 42 | cursor: pointer; 43 | } 44 | 45 | .archive-card li:hover { 46 | background-color: #EDF0F2; 47 | } 48 | 49 | .panel-heading { 50 | border-radius: 0; 51 | } -------------------------------------------------------------------------------- /src/main/webapp/modules/blog/article/article.controller.js: -------------------------------------------------------------------------------- 1 | app.controller("ArticleController", function($rootScope,$routeParams,$location,$uibModal,$scope,ArticleService) { 2 | setScreenAvailHeight(); 3 | $scope.loadingPath=loading_path; 4 | $scope.loaded = false; 5 | var p = $location.search().page; 6 | $scope.currentPage = p?p:1; 7 | //console.info($scope.currentPage) 8 | $scope.pageSize = 10; 9 | 10 | $scope.selectedValue = "/blog" 11 | 12 | $scope.goUrl = function(url){ 13 | //console.log(url) 14 | $location.path(url) 15 | } 16 | $scope.pageChanged = function(currentPage) { 17 | //console.log('Page changed to: ' + $scope.currentPage); 18 | $location.search({page:currentPage}); 19 | //$scope.list($scope.currentPage, $scope.pageSize); 20 | }; 21 | 22 | $scope.list = function(currentPage,pageSize){ 23 | //console.log(currentPage) 24 | if(currentPage>$scope.totalItems || currentPage<=0){ 25 | $location.search({page:1}); 26 | }else{ 27 | ArticleService.list(currentPage,pageSize,null).then(function(data){ 28 | //console.log(data) 29 | if(data.resultCode==1){ 30 | $scope.articles = data.resultData.list; 31 | $scope.totalItems = data.resultData.pageConfig.allCount; 32 | $scope.currentPage=currentPage; 33 | $scope.loaded = true; 34 | }else{ 35 | $scope.error = true; 36 | $scope.errorMessage = data.resultMsg; 37 | $scope.loaded = true; 38 | } 39 | }); 40 | } 41 | } 42 | 43 | $scope.list($scope.currentPage, $scope.pageSize); 44 | }); 45 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/gherkin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Gherkin mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Gherkin mode

27 |
42 | 45 | 46 |

MIME types defined: text/x-feature.

47 | 48 |
49 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/dao/ICategoryDao.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.stereotype.Repository; 5 | 6 | import studio.baxia.fo.pojo.Category; 7 | import studio.baxia.fo.vo.CategoryVo; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Created by Pan on 2016/10/16. 13 | */ 14 | @Repository("iCategoryDao") 15 | public interface ICategoryDao { 16 | 17 | /** 18 | * 插入类别 19 | * 20 | * @param category 类别(name,description) 21 | * @return 受影响的行数 22 | */ 23 | Integer insert(Category category); 24 | 25 | /** 26 | * 更新类别 27 | * 28 | * @param category 类别(id,name,description) 29 | * @return 受影响的行数 30 | */ 31 | Integer update(Category category); 32 | 33 | /** 34 | * 删除类别 35 | * 36 | * @param categoryIds 类别id集合 37 | * @return 受影响的行数 38 | */ 39 | Integer delete(@Param("ids") List categoryIds); 40 | 41 | /** 42 | * 通过id删除类别 43 | * 44 | * @param categoryId 类别id 45 | * @return 受影响的行数 46 | */ 47 | Integer deleteById(@Param("id") Integer categoryId); 48 | 49 | 50 | /** 51 | * 通过类别id查找 52 | * 53 | * @param categoryId 类别id 54 | * @return Category 55 | */ 56 | Category selectById(@Param("id") Integer categoryId,@Param("status")Boolean status); 57 | 58 | /** 59 | * 查找所有 60 | * 61 | * @return 62 | */ 63 | List selectBy(); 64 | Category selectByCode(@Param("code") String categoryCode,@Param("status")Boolean status); 65 | 66 | Category selectByName(@Param("name") String categoryName,@Param("status")Boolean status); 67 | 68 | List selectVoBy(@Param("articleStatus") Integer articleStatus, @Param("status") Boolean status); 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/pojo/Recommend.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.pojo; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by Pan on 2016/12/20. 7 | */ 8 | public class Recommend { 9 | private long id; 10 | private String title; 11 | private String articleUrl; 12 | private String summary; 13 | private Date pubTime;; 14 | private int hits; 15 | 16 | @Override 17 | public String toString() { 18 | return "RecommendVo{" + 19 | "id=" + id + 20 | ", title='" + title + '\'' + 21 | ", articleUrl='" + articleUrl + '\'' + 22 | ", summary='" + summary + '\'' + 23 | ", pubTime=" + pubTime + 24 | ", hits=" + hits + 25 | '}'; 26 | } 27 | 28 | public long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getTitle() { 37 | return title; 38 | } 39 | 40 | public void setTitle(String title) { 41 | this.title = title; 42 | } 43 | 44 | public String getArticleUrl() { 45 | return articleUrl; 46 | } 47 | 48 | public void setArticleUrl(String articleUrl) { 49 | this.articleUrl = articleUrl; 50 | } 51 | 52 | public String getSummary() { 53 | return summary; 54 | } 55 | 56 | public void setSummary(String summary) { 57 | this.summary = summary; 58 | } 59 | 60 | public Date getPubTime() { 61 | return pubTime; 62 | } 63 | 64 | public void setPubTime(Date pubTime) { 65 | this.pubTime = pubTime; 66 | } 67 | 68 | public int getHits() { 69 | return hits; 70 | } 71 | 72 | public void setHits(int hits) { 73 | this.hits = hits; 74 | } 75 | } -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/properties/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Properties files mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Properties files mode

27 |
46 | 49 | 50 |

MIME types defined: text/x-properties, 51 | text/x-ini.

52 | 53 |
54 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/colorforth.css: -------------------------------------------------------------------------------- 1 | .cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; } 2 | .cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 3 | .cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; } 4 | .cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; } 5 | .cm-s-colorforth .CodeMirror-linenumber { color: #bababa; } 6 | .cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white !important; } 7 | 8 | .cm-s-colorforth span.cm-comment { color: #ededed; } 9 | .cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; } 10 | .cm-s-colorforth span.cm-keyword { color: #ffd900; } 11 | .cm-s-colorforth span.cm-builtin { color: #00d95a; } 12 | .cm-s-colorforth span.cm-variable { color: #73ff00; } 13 | .cm-s-colorforth span.cm-string { color: #007bff; } 14 | .cm-s-colorforth span.cm-number { color: #00c4ff; } 15 | .cm-s-colorforth span.cm-atom { color: #606060; } 16 | 17 | .cm-s-colorforth span.cm-variable-2 { color: #EEE; } 18 | .cm-s-colorforth span.cm-variable-3 { color: #DDD; } 19 | .cm-s-colorforth span.cm-property {} 20 | .cm-s-colorforth span.cm-operator {} 21 | 22 | .cm-s-colorforth span.cm-meta { color: yellow; } 23 | .cm-s-colorforth span.cm-qualifier { color: #FFF700; } 24 | .cm-s-colorforth span.cm-bracket { color: #cc7; } 25 | .cm-s-colorforth span.cm-tag { color: #FFBD40; } 26 | .cm-s-colorforth span.cm-attribute { color: #FFF700; } 27 | .cm-s-colorforth span.cm-error { color: #f00; } 28 | 29 | .cm-s-colorforth .CodeMirror-selected { background: #333d53 !important; } 30 | 31 | .cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); } 32 | 33 | .cm-s-colorforth .CodeMirror-activeline-background {background: #253540 !important;} 34 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/fold/indent-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerHelper("fold", "indent", function(cm, start) { 15 | var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); 16 | if (!/\S/.test(firstLine)) return; 17 | var getIndent = function(line) { 18 | return CodeMirror.countColumn(line, null, tabSize); 19 | }; 20 | var myIndent = getIndent(firstLine); 21 | var lastLineInFold = null; 22 | // Go through lines until we find a line that definitely doesn't belong in 23 | // the block we're folding, or to the end. 24 | for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) { 25 | var curLine = cm.getLine(i); 26 | var curIndent = getIndent(curLine); 27 | if (curIndent > myIndent) { 28 | // Lines with a greater indent are considered part of the block. 29 | lastLineInFold = i; 30 | } else if (!/\S/.test(curLine)) { 31 | // Empty lines might be breaks within the block we're trying to fold. 32 | } else { 33 | // A non-empty line at an indent equal to or less than ours marks the 34 | // start of another block. 35 | break; 36 | } 37 | } 38 | if (lastLineInFold) return { 39 | from: CodeMirror.Pos(start.line, firstLine.length), 40 | to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length) 41 | }; 42 | }); 43 | 44 | }); 45 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/fold/markdown-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerHelper("fold", "markdown", function(cm, start) { 15 | var maxDepth = 100; 16 | 17 | function isHeader(lineNo) { 18 | var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0)); 19 | return tokentype && /\bheader\b/.test(tokentype); 20 | } 21 | 22 | function headerLevel(lineNo, line, nextLine) { 23 | var match = line && line.match(/^#+/); 24 | if (match && isHeader(lineNo)) return match[0].length; 25 | match = nextLine && nextLine.match(/^[=\-]+\s*$/); 26 | if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2; 27 | return maxDepth; 28 | } 29 | 30 | var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1); 31 | var level = headerLevel(start.line, firstLine, nextLine); 32 | if (level === maxDepth) return undefined; 33 | 34 | var lastLineNo = cm.lastLine(); 35 | var end = start.line, nextNextLine = cm.getLine(end + 2); 36 | while (end < lastLineNo) { 37 | if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break; 38 | ++end; 39 | nextLine = nextNextLine; 40 | nextNextLine = cm.getLine(end + 2); 41 | } 42 | 43 | return { 44 | from: CodeMirror.Pos(start.line, firstLine.length), 45 | to: CodeMirror.Pos(end, cm.getLine(end).length) 46 | }; 47 | }); 48 | 49 | }); 50 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/javascript/typescript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: TypeScript mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

TypeScript mode

27 | 28 | 29 |
51 | 52 | 59 | 60 |

This is a specialization of the JavaScript mode.

61 |
62 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/blackboard.css: -------------------------------------------------------------------------------- 1 | /* Port of TextMate's Blackboard theme */ 2 | 3 | .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } 4 | .cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; } 5 | .cm-s-blackboard.CodeMirror ::selection { background: rgba(37, 59, 118, .99); } 6 | .cm-s-blackboard.CodeMirror ::-moz-selection { background: rgba(37, 59, 118, .99); } 7 | .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } 8 | .cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; } 9 | .cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; } 10 | .cm-s-blackboard .CodeMirror-linenumber { color: #888; } 11 | .cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } 12 | 13 | .cm-s-blackboard .cm-keyword { color: #FBDE2D; } 14 | .cm-s-blackboard .cm-atom { color: #D8FA3C; } 15 | .cm-s-blackboard .cm-number { color: #D8FA3C; } 16 | .cm-s-blackboard .cm-def { color: #8DA6CE; } 17 | .cm-s-blackboard .cm-variable { color: #FF6400; } 18 | .cm-s-blackboard .cm-operator { color: #FBDE2D;} 19 | .cm-s-blackboard .cm-comment { color: #AEAEAE; } 20 | .cm-s-blackboard .cm-string { color: #61CE3C; } 21 | .cm-s-blackboard .cm-string-2 { color: #61CE3C; } 22 | .cm-s-blackboard .cm-meta { color: #D8FA3C; } 23 | .cm-s-blackboard .cm-builtin { color: #8DA6CE; } 24 | .cm-s-blackboard .cm-tag { color: #8DA6CE; } 25 | .cm-s-blackboard .cm-attribute { color: #8DA6CE; } 26 | .cm-s-blackboard .cm-header { color: #FF6400; } 27 | .cm-s-blackboard .cm-hr { color: #AEAEAE; } 28 | .cm-s-blackboard .cm-link { color: #8DA6CE; } 29 | .cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } 30 | 31 | .cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;} 32 | .cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/hint/anyword-hint.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var WORD = /[\w$]+/, RANGE = 500; 15 | 16 | CodeMirror.registerHelper("hint", "anyword", function(editor, options) { 17 | var word = options && options.word || WORD; 18 | var range = options && options.range || RANGE; 19 | var cur = editor.getCursor(), curLine = editor.getLine(cur.line); 20 | var end = cur.ch, start = end; 21 | while (start && word.test(curLine.charAt(start - 1))) --start; 22 | var curWord = start != end && curLine.slice(start, end); 23 | 24 | var list = [], seen = {}; 25 | var re = new RegExp(word.source, "g"); 26 | for (var dir = -1; dir <= 1; dir += 2) { 27 | var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir; 28 | for (; line != endLine; line += dir) { 29 | var text = editor.getLine(line), m; 30 | while (m = re.exec(text)) { 31 | if (line == cur.line && m[0] === curWord) continue; 32 | if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) { 33 | seen[m[0]] = true; 34 | list.push(m[0]); 35 | } 36 | } 37 | } 38 | } 39 | return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)}; 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/common/CommonConstant.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.common; 2 | 3 | /** 4 | * Created by Pan on 2016/10/13. 5 | */ 6 | public class CommonConstant { 7 | public static final int AUTHOR_ID =1;//设定作者在数据库中的id为1 8 | public static final int ACTICLE_STATUS_DRAFT = 0; 9 | public static final int ACTICLE_STATUS_BLOG = 1; 10 | 11 | public static final String OPERATE_SUCCESS_MESSAGE = "操作成功"; 12 | public static final String OPERATE_FAIL_MESSAGE = "操作失败"; 13 | 14 | public static final String ACTICLE_STATUS_DRAFT_NAME = "草稿"; 15 | public static final String ACTICLE_STATUS_BLOG_NAME = "博客"; 16 | 17 | /** 18 | * 类别不展示 19 | */ 20 | public static final boolean CATEGORY_ALL = false; 21 | /** 22 | * 类别展示 23 | */ 24 | public static final boolean CATEGORY_SHOW = true; 25 | 26 | public static final boolean PROJECT_ALL = false; 27 | public static final boolean PROJECT_PUBLIC = true; 28 | public static final int USER_TYPE_GUEST = 0; 29 | public static final int USER_TYPE_AUTHOR = 1; 30 | 31 | public static final int CORRECT_ORDER = 0; 32 | public static final int REVERSE_ORDER = 1; 33 | 34 | public static final int MESSAGE_DEFAULT_PARENT_ID = 0; 35 | public static final Integer MESSAGE_NULL_PARENT_ID=null; 36 | 37 | public static final int CATEGORY_DEFAULT_PARENT_ID = 0; 38 | 39 | public static final int SUCCESS_CODE = 1; 40 | public static final int FAIL_CODE=0; 41 | 42 | public static final String USER_IS_NO_EXIST = "用户不存在!"; 43 | 44 | public static final String NEW_NO_NAME_CATEGORY = "默认分类"; 45 | 46 | public static final String ARCHIVE_TYPE_YEAR = "%Y年"; 47 | public static final String ARCHIVE_TYPE_YEAR_MONTH = "%Y-%m"; 48 | 49 | public static final int USER_TIME_OUT = 30*60*1000; 50 | } 51 | -------------------------------------------------------------------------------- /src/main/webapp/fonts/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/sass/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Sass mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | 26 |
27 |

Sass mode

28 |
58 | 64 | 65 |

MIME types defined: text/x-sass.

66 |
67 | -------------------------------------------------------------------------------- /src/main/java/studio/baxia/fo/util/MDUtil.java: -------------------------------------------------------------------------------- 1 | package studio.baxia.fo.util; 2 | 3 | import java.nio.charset.StandardCharsets; 4 | import java.security.MessageDigest; 5 | import java.security.NoSuchAlgorithmException; 6 | 7 | /** 8 | * Created by FirePan on 2016/12/15. 9 | */ 10 | public class MDUtil { 11 | 12 | /** 13 | * 通过用户名和密码明文生成作者的账号加密密码 14 | * @param userName 15 | * @param userPass 16 | * @return 加密密码 17 | * @throws NoSuchAlgorithmException 18 | */ 19 | public static String generatePass(String userName,String userPass) throws NoSuchAlgorithmException { 20 | return encodeMD5ToStr(userName + userPass); 21 | } 22 | 23 | 24 | public static byte[] encodeMD5ToByte(String data) throws NoSuchAlgorithmException { 25 | MessageDigest messageDigest = MessageDigest.getInstance("MD5"); 26 | byte[] encryptData = messageDigest.digest(data.getBytes()); 27 | return encryptData; 28 | } 29 | 30 | public static String encodeMD5ToStr(String data) throws NoSuchAlgorithmException { 31 | MessageDigest messageDigest = MessageDigest.getInstance("MD5"); 32 | String encryptData = StringUtil.byte2hex(messageDigest.digest(data.getBytes(StandardCharsets.UTF_8))); 33 | return encryptData; 34 | } 35 | 36 | public static byte[] encodeMD2ToByte(String data) throws NoSuchAlgorithmException { 37 | MessageDigest messageDigest = MessageDigest.getInstance("MD2"); 38 | byte[] encryptData = messageDigest.digest(data.getBytes(StandardCharsets.UTF_8)); 39 | return encryptData; 40 | } 41 | 42 | public static String encodeMD2ToStr(String data) throws NoSuchAlgorithmException { 43 | MessageDigest messageDigest = MessageDigest.getInstance("MD2"); 44 | String encryptData = StringUtil.byte2hex(messageDigest.digest(data.getBytes(StandardCharsets.UTF_8))); 45 | return encryptData; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/perl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Perl mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Perl mode

27 | 28 | 29 |
67 | 68 | 73 | 74 |

MIME types defined: text/x-perl.

75 |
76 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/3024-day.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: 3024 day 4 | Author: Jan T. Sott (http://github.com/idleberg) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;} 12 | .cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;} 13 | .cm-s-3024-day.CodeMirror ::selection { background: #d6d5d4; } 14 | .cm-s-3024-day.CodeMirror ::-moz-selection { background: #d9d9d9; } 15 | 16 | .cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;} 17 | .cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; } 18 | .cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; } 19 | .cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;} 20 | 21 | .cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;} 22 | 23 | .cm-s-3024-day span.cm-comment {color: #cdab53;} 24 | .cm-s-3024-day span.cm-atom {color: #a16a94;} 25 | .cm-s-3024-day span.cm-number {color: #a16a94;} 26 | 27 | .cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;} 28 | .cm-s-3024-day span.cm-keyword {color: #db2d20;} 29 | .cm-s-3024-day span.cm-string {color: #fded02;} 30 | 31 | .cm-s-3024-day span.cm-variable {color: #01a252;} 32 | .cm-s-3024-day span.cm-variable-2 {color: #01a0e4;} 33 | .cm-s-3024-day span.cm-def {color: #e8bbd0;} 34 | .cm-s-3024-day span.cm-bracket {color: #3a3432;} 35 | .cm-s-3024-day span.cm-tag {color: #db2d20;} 36 | .cm-s-3024-day span.cm-link {color: #a16a94;} 37 | .cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;} 38 | 39 | .cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;} 40 | .cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important;} 41 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/idl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: IDL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

IDL mode

27 | 28 |
52 | 62 | 63 |

MIME types defined: text/x-idl.

64 |
65 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Tomorrow Night - Bright 4 | Author: Chris Kempson 5 | 6 | Port done by Gerard Braad 7 | 8 | */ 9 | 10 | .cm-s-tomorrow-night-bright.CodeMirror {background: #000000; color: #eaeaea;} 11 | .cm-s-tomorrow-night-bright div.CodeMirror-selected {background: #424242 !important;} 12 | .cm-s-tomorrow-night-bright .CodeMirror-gutters {background: #000000; border-right: 0px;} 13 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; } 14 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; } 15 | .cm-s-tomorrow-night-bright .CodeMirror-linenumber {color: #424242;} 16 | .cm-s-tomorrow-night-bright .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;} 17 | 18 | .cm-s-tomorrow-night-bright span.cm-comment {color: #d27b53;} 19 | .cm-s-tomorrow-night-bright span.cm-atom {color: #a16a94;} 20 | .cm-s-tomorrow-night-bright span.cm-number {color: #a16a94;} 21 | 22 | .cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute {color: #99cc99;} 23 | .cm-s-tomorrow-night-bright span.cm-keyword {color: #d54e53;} 24 | .cm-s-tomorrow-night-bright span.cm-string {color: #e7c547;} 25 | 26 | .cm-s-tomorrow-night-bright span.cm-variable {color: #b9ca4a;} 27 | .cm-s-tomorrow-night-bright span.cm-variable-2 {color: #7aa6da;} 28 | .cm-s-tomorrow-night-bright span.cm-def {color: #e78c45;} 29 | .cm-s-tomorrow-night-bright span.cm-bracket {color: #eaeaea;} 30 | .cm-s-tomorrow-night-bright span.cm-tag {color: #d54e53;} 31 | .cm-s-tomorrow-night-bright span.cm-link {color: #a16a94;} 32 | .cm-s-tomorrow-night-bright span.cm-error {background: #d54e53; color: #6A6A6A;} 33 | 34 | .cm-s-tomorrow-night-bright .CodeMirror-activeline-background {background: #2a2a2a !important;} 35 | .cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 36 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/dart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Dart mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Dart mode

27 |
28 | 62 |
63 | 64 | 70 | 71 |
72 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Paraíso (Light) 4 | Author: Jan T. Sott 5 | 6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) 7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 8 | 9 | */ 10 | 11 | .cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;} 12 | .cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;} 13 | .cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; } 14 | .cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; } 15 | .cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;} 16 | .cm-s-paraiso-light .CodeMirror-guttermarker { color: black; } 17 | .cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; } 18 | .cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;} 19 | .cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;} 20 | 21 | .cm-s-paraiso-light span.cm-comment {color: #e96ba8;} 22 | .cm-s-paraiso-light span.cm-atom {color: #815ba4;} 23 | .cm-s-paraiso-light span.cm-number {color: #815ba4;} 24 | 25 | .cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;} 26 | .cm-s-paraiso-light span.cm-keyword {color: #ef6155;} 27 | .cm-s-paraiso-light span.cm-string {color: #fec418;} 28 | 29 | .cm-s-paraiso-light span.cm-variable {color: #48b685;} 30 | .cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;} 31 | .cm-s-paraiso-light span.cm-def {color: #f99b15;} 32 | .cm-s-paraiso-light span.cm-bracket {color: #41323f;} 33 | .cm-s-paraiso-light span.cm-tag {color: #ef6155;} 34 | .cm-s-paraiso-light span.cm-link {color: #815ba4;} 35 | .cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;} 36 | 37 | .cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;} 38 | .cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 39 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/addon/edit/continuelist.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\s*)/, 15 | emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)\.)(\s*)$/, 16 | unorderedListRE = /[*+-]\s/; 17 | 18 | CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { 19 | if (cm.getOption("disableInput")) return CodeMirror.Pass; 20 | var ranges = cm.listSelections(), replacements = []; 21 | for (var i = 0; i < ranges.length; i++) { 22 | var pos = ranges[i].head, match; 23 | var eolState = cm.getStateAfter(pos.line); 24 | var inList = eolState.list !== false; 25 | var inQuote = eolState.quote !== false; 26 | 27 | if (!ranges[i].empty() || (!inList && !inQuote) || !(match = cm.getLine(pos.line).match(listRE))) { 28 | cm.execCommand("newlineAndIndent"); 29 | return; 30 | } 31 | if (cm.getLine(pos.line).match(emptyListRE)) { 32 | cm.replaceRange("", { 33 | line: pos.line, ch: 0 34 | }, { 35 | line: pos.line, ch: pos.ch + 1 36 | }); 37 | replacements[i] = "\n"; 38 | 39 | } else { 40 | var indent = match[1], after = match[4]; 41 | var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0 42 | ? match[2] 43 | : (parseInt(match[3], 10) + 1) + "."; 44 | 45 | replacements[i] = "\n" + indent + bullet + after; 46 | } 47 | } 48 | 49 | cm.replaceSelections(replacements); 50 | }; 51 | }); 52 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/xml/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml"; 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); } 7 | 8 | MT("matching", 9 | "[tag&bracket <][tag top][tag&bracket >]", 10 | " text", 11 | " [tag&bracket <][tag inner][tag&bracket />]", 12 | "[tag&bracket ]"); 13 | 14 | MT("nonmatching", 15 | "[tag&bracket <][tag top][tag&bracket >]", 16 | " [tag&bracket <][tag inner][tag&bracket />]", 17 | " [tag&bracket ]"); 18 | 19 | MT("doctype", 20 | "[meta ]", 21 | "[tag&bracket <][tag top][tag&bracket />]"); 22 | 23 | MT("cdata", 24 | "[tag&bracket <][tag top][tag&bracket >]", 25 | " [atom ]", 27 | "[tag&bracket ]"); 28 | 29 | // HTML tests 30 | mode = CodeMirror.getMode({indentUnit: 2}, "text/html"); 31 | 32 | MT("selfclose", 33 | "[tag&bracket <][tag html][tag&bracket >]", 34 | " [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]", 35 | "[tag&bracket ]"); 36 | 37 | MT("list", 38 | "[tag&bracket <][tag ol][tag&bracket >]", 39 | " [tag&bracket <][tag li][tag&bracket >]one", 40 | " [tag&bracket <][tag li][tag&bracket >]two", 41 | "[tag&bracket ]"); 42 | 43 | MT("valueless", 44 | "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]"); 45 | 46 | MT("pThenArticle", 47 | "[tag&bracket <][tag p][tag&bracket >]", 48 | " foo", 49 | "[tag&bracket <][tag article][tag&bracket >]bar"); 50 | 51 | })(); 52 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Paraíso (Dark) 4 | Author: Jan T. Sott 5 | 6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) 7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 8 | 9 | */ 10 | 11 | .cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;} 12 | .cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;} 13 | .cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); } 14 | .cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); } 15 | .cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;} 16 | .cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; } 17 | .cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; } 18 | .cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;} 19 | .cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;} 20 | 21 | .cm-s-paraiso-dark span.cm-comment {color: #e96ba8;} 22 | .cm-s-paraiso-dark span.cm-atom {color: #815ba4;} 23 | .cm-s-paraiso-dark span.cm-number {color: #815ba4;} 24 | 25 | .cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;} 26 | .cm-s-paraiso-dark span.cm-keyword {color: #ef6155;} 27 | .cm-s-paraiso-dark span.cm-string {color: #fec418;} 28 | 29 | .cm-s-paraiso-dark span.cm-variable {color: #48b685;} 30 | .cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;} 31 | .cm-s-paraiso-dark span.cm-def {color: #f99b15;} 32 | .cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;} 33 | .cm-s-paraiso-dark span.cm-tag {color: #ef6155;} 34 | .cm-s-paraiso-dark span.cm-link {color: #815ba4;} 35 | .cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;} 36 | 37 | .cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;} 38 | .cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 39 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/theme/3024-night.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: 3024 night 4 | Author: Jan T. Sott (http://github.com/idleberg) 5 | 6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | 11 | .cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;} 12 | .cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;} 13 | .cm-s-3024-night.CodeMirror ::selection { background: rgba(58, 52, 50, .99); } 14 | .cm-s-3024-night.CodeMirror ::-moz-selection { background: rgba(58, 52, 50, .99); } 15 | .cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;} 16 | .cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; } 17 | .cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; } 18 | .cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;} 19 | 20 | .cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;} 21 | 22 | .cm-s-3024-night span.cm-comment {color: #cdab53;} 23 | .cm-s-3024-night span.cm-atom {color: #a16a94;} 24 | .cm-s-3024-night span.cm-number {color: #a16a94;} 25 | 26 | .cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;} 27 | .cm-s-3024-night span.cm-keyword {color: #db2d20;} 28 | .cm-s-3024-night span.cm-string {color: #fded02;} 29 | 30 | .cm-s-3024-night span.cm-variable {color: #01a252;} 31 | .cm-s-3024-night span.cm-variable-2 {color: #01a0e4;} 32 | .cm-s-3024-night span.cm-def {color: #e8bbd0;} 33 | .cm-s-3024-night span.cm-bracket {color: #d6d5d4;} 34 | .cm-s-3024-night span.cm-tag {color: #db2d20;} 35 | .cm-s-3024-night span.cm-link {color: #a16a94;} 36 | .cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;} 37 | 38 | .cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;} 39 | .cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} 40 | -------------------------------------------------------------------------------- /src/main/webapp/plugins/editor.md/lib/codemirror/mode/jinja2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Jinja2 mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 |
26 |

Jinja2 mode

27 |
49 | 54 |
55 | --------------------------------------------------------------------------------