├── .gitignore ├── LICENSE ├── README.md ├── screenshoot ├── 1.png ├── 2.png ├── 3.png ├── 4.png └── 5.png ├── server ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── README.md ├── hexo-blog.sql ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── movefeng │ │ │ └── hexoblogadmin │ │ │ ├── ServerApplication.java │ │ │ ├── config │ │ │ ├── CORSFilter.java │ │ │ ├── CustomProperties.java │ │ │ ├── SessionFilter.java │ │ │ ├── ThreadPoolConfig.java │ │ │ ├── WebMvcConfig.java │ │ │ ├── initRunner │ │ │ │ ├── ArticleDirectoryWatcherInitRunner.java │ │ │ │ └── SystemConfigInitRunner.java │ │ │ └── interceptor │ │ │ │ └── AdminInterceptor.java │ │ │ ├── controller │ │ │ ├── AdminController.java │ │ │ ├── ArticleController.java │ │ │ ├── CommentController.java │ │ │ ├── SystemController.java │ │ │ └── UserController.java │ │ │ ├── dao │ │ │ ├── AdminDao.java │ │ │ ├── ArticleDao.java │ │ │ ├── CommentDao.java │ │ │ ├── SystemConfigDao.java │ │ │ └── UserDao.java │ │ │ ├── model │ │ │ ├── Admin.java │ │ │ ├── Article.java │ │ │ ├── Comment.java │ │ │ ├── SystemConfig.java │ │ │ ├── User.java │ │ │ └── VisitRecord.java │ │ │ ├── service │ │ │ ├── AdminService.java │ │ │ ├── ArticleService.java │ │ │ ├── CommentService.java │ │ │ ├── SystemService.java │ │ │ └── UserService.java │ │ │ ├── utils │ │ │ ├── AESUtil.java │ │ │ ├── EncryptUtils.java │ │ │ ├── OkHttpUtil.java │ │ │ └── SendMail.java │ │ │ └── vo │ │ │ ├── Analysis.java │ │ │ ├── ArticleVO.java │ │ │ ├── CommentResult.java │ │ │ ├── CommentVO.java │ │ │ ├── CommentVOs.java │ │ │ ├── Result.java │ │ │ └── UserVO.java │ └── resources │ │ ├── META-INF │ │ └── spring-configuration-metadata.json │ │ ├── application.yml │ │ ├── log4j2.xml │ │ └── mybatis-mappers │ │ ├── ArticleMapper.xml │ │ ├── CommentMapper.xml │ │ ├── SystemConfigMapper.xml │ │ └── UserMapper.xml │ └── test │ └── java │ └── com │ └── movefeng │ └── hexoblogadmin │ ├── HexoblogadminApplicationTests.java │ └── service │ ├── ArticleServiceTest.java │ └── CommentServiceTest.java └── web ├── .editorconfig ├── .env.development ├── .env.production ├── .env.staging ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .travis.yml ├── babel.config.js ├── build └── index.js ├── jest.config.js ├── package.json ├── postcss.config.js ├── public ├── favicon.ico ├── index.html └── static │ ├── editor.md │ ├── BUGS.md │ ├── CHANGE.md │ ├── Gulpfile.js │ ├── LICENSE │ ├── README.md │ ├── css │ │ ├── editormd.css │ │ ├── editormd.logo.css │ │ ├── editormd.logo.min.css │ │ ├── editormd.min.css │ │ ├── editormd.preview.css │ │ └── editormd.preview.min.css │ ├── docs │ │ ├── editormd.js.html │ │ ├── fonts │ │ │ ├── OpenSans-Bold-webfont.eot │ │ │ ├── OpenSans-Bold-webfont.svg │ │ │ ├── OpenSans-Bold-webfont.woff │ │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ │ ├── OpenSans-Italic-webfont.eot │ │ │ ├── OpenSans-Italic-webfont.svg │ │ │ ├── OpenSans-Italic-webfont.woff │ │ │ ├── OpenSans-Light-webfont.eot │ │ │ ├── OpenSans-Light-webfont.svg │ │ │ ├── OpenSans-Light-webfont.woff │ │ │ ├── OpenSans-LightItalic-webfont.eot │ │ │ ├── OpenSans-LightItalic-webfont.svg │ │ │ ├── OpenSans-LightItalic-webfont.woff │ │ │ ├── OpenSans-Regular-webfont.eot │ │ │ ├── OpenSans-Regular-webfont.svg │ │ │ └── OpenSans-Regular-webfont.woff │ │ ├── index.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ └── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ ├── editormd.amd.js │ ├── editormd.amd.min.js │ ├── editormd.js │ ├── editormd.min.js │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── editormd-logo.eot │ │ ├── editormd-logo.svg │ │ ├── editormd-logo.ttf │ │ ├── editormd-logo.woff │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── images │ │ ├── loading.gif │ │ ├── loading@2x.gif │ │ ├── loading@3x.gif │ │ └── logos │ │ │ ├── editormd-favicon-16x16.ico │ │ │ ├── editormd-favicon-24x24.ico │ │ │ ├── editormd-favicon-32x32.ico │ │ │ ├── editormd-favicon-48x48.ico │ │ │ ├── editormd-favicon-64x64.ico │ │ │ ├── editormd-logo-114x114.png │ │ │ ├── editormd-logo-120x120.png │ │ │ ├── editormd-logo-144x144.png │ │ │ ├── editormd-logo-16x16.png │ │ │ ├── editormd-logo-180x180.png │ │ │ ├── editormd-logo-240x240.png │ │ │ ├── editormd-logo-24x24.png │ │ │ ├── editormd-logo-320x320.png │ │ │ ├── editormd-logo-32x32.png │ │ │ ├── editormd-logo-48x48.png │ │ │ ├── editormd-logo-57x57.png │ │ │ ├── editormd-logo-64x64.png │ │ │ ├── editormd-logo-72x72.png │ │ │ ├── editormd-logo-96x96.png │ │ │ └── vi.png │ ├── languages │ │ ├── en.js │ │ └── zh-tw.js │ ├── lib │ │ ├── codemirror │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── addon │ │ │ │ ├── comment │ │ │ │ │ ├── comment.js │ │ │ │ │ └── continuecomment.js │ │ │ │ ├── dialog │ │ │ │ │ ├── dialog.css │ │ │ │ │ └── dialog.js │ │ │ │ ├── display │ │ │ │ │ ├── fullscreen.css │ │ │ │ │ ├── fullscreen.js │ │ │ │ │ ├── panel.js │ │ │ │ │ ├── placeholder.js │ │ │ │ │ └── rulers.js │ │ │ │ ├── edit │ │ │ │ │ ├── closebrackets.js │ │ │ │ │ ├── closetag.js │ │ │ │ │ ├── continuelist.js │ │ │ │ │ ├── matchbrackets.js │ │ │ │ │ ├── matchtags.js │ │ │ │ │ └── trailingspace.js │ │ │ │ ├── fold │ │ │ │ │ ├── brace-fold.js │ │ │ │ │ ├── comment-fold.js │ │ │ │ │ ├── foldcode.js │ │ │ │ │ ├── foldgutter.css │ │ │ │ │ ├── foldgutter.js │ │ │ │ │ ├── indent-fold.js │ │ │ │ │ ├── markdown-fold.js │ │ │ │ │ └── xml-fold.js │ │ │ │ ├── hint │ │ │ │ │ ├── anyword-hint.js │ │ │ │ │ ├── css-hint.js │ │ │ │ │ ├── html-hint.js │ │ │ │ │ ├── javascript-hint.js │ │ │ │ │ ├── show-hint.css │ │ │ │ │ ├── show-hint.js │ │ │ │ │ ├── sql-hint.js │ │ │ │ │ └── xml-hint.js │ │ │ │ ├── lint │ │ │ │ │ ├── coffeescript-lint.js │ │ │ │ │ ├── css-lint.js │ │ │ │ │ ├── javascript-lint.js │ │ │ │ │ ├── json-lint.js │ │ │ │ │ ├── lint.css │ │ │ │ │ ├── lint.js │ │ │ │ │ └── yaml-lint.js │ │ │ │ ├── merge │ │ │ │ │ ├── merge.css │ │ │ │ │ └── merge.js │ │ │ │ ├── mode │ │ │ │ │ ├── loadmode.js │ │ │ │ │ ├── multiplex.js │ │ │ │ │ ├── multiplex_test.js │ │ │ │ │ ├── overlay.js │ │ │ │ │ └── simple.js │ │ │ │ ├── runmode │ │ │ │ │ ├── colorize.js │ │ │ │ │ ├── runmode-standalone.js │ │ │ │ │ ├── runmode.js │ │ │ │ │ └── runmode.node.js │ │ │ │ ├── scroll │ │ │ │ │ ├── annotatescrollbar.js │ │ │ │ │ ├── scrollpastend.js │ │ │ │ │ ├── simplescrollbars.css │ │ │ │ │ └── simplescrollbars.js │ │ │ │ ├── search │ │ │ │ │ ├── match-highlighter.js │ │ │ │ │ ├── matchesonscrollbar.css │ │ │ │ │ ├── matchesonscrollbar.js │ │ │ │ │ ├── search.js │ │ │ │ │ └── searchcursor.js │ │ │ │ ├── selection │ │ │ │ │ ├── active-line.js │ │ │ │ │ ├── mark-selection.js │ │ │ │ │ └── selection-pointer.js │ │ │ │ ├── tern │ │ │ │ │ ├── tern.css │ │ │ │ │ ├── tern.js │ │ │ │ │ └── worker.js │ │ │ │ └── wrap │ │ │ │ │ └── hardwrap.js │ │ │ ├── addons.min.js │ │ │ ├── bower.json │ │ │ ├── codemirror.min.css │ │ │ ├── codemirror.min.js │ │ │ ├── lib │ │ │ │ ├── codemirror.css │ │ │ │ └── codemirror.js │ │ │ ├── mode │ │ │ │ ├── apl │ │ │ │ │ ├── apl.js │ │ │ │ │ └── index.html │ │ │ │ ├── asterisk │ │ │ │ │ ├── asterisk.js │ │ │ │ │ └── index.html │ │ │ │ ├── clike │ │ │ │ │ ├── clike.js │ │ │ │ │ ├── index.html │ │ │ │ │ └── scala.html │ │ │ │ ├── clojure │ │ │ │ │ ├── clojure.js │ │ │ │ │ └── index.html │ │ │ │ ├── cobol │ │ │ │ │ ├── cobol.js │ │ │ │ │ └── index.html │ │ │ │ ├── coffeescript │ │ │ │ │ ├── coffeescript.js │ │ │ │ │ └── index.html │ │ │ │ ├── commonlisp │ │ │ │ │ ├── commonlisp.js │ │ │ │ │ └── index.html │ │ │ │ ├── css │ │ │ │ │ ├── css.js │ │ │ │ │ ├── index.html │ │ │ │ │ ├── less.html │ │ │ │ │ ├── less_test.js │ │ │ │ │ ├── scss.html │ │ │ │ │ ├── scss_test.js │ │ │ │ │ └── test.js │ │ │ │ ├── cypher │ │ │ │ │ ├── cypher.js │ │ │ │ │ └── index.html │ │ │ │ ├── d │ │ │ │ │ ├── d.js │ │ │ │ │ └── index.html │ │ │ │ ├── dart │ │ │ │ │ ├── dart.js │ │ │ │ │ └── index.html │ │ │ │ ├── diff │ │ │ │ │ ├── diff.js │ │ │ │ │ └── index.html │ │ │ │ ├── django │ │ │ │ │ ├── django.js │ │ │ │ │ └── index.html │ │ │ │ ├── dockerfile │ │ │ │ │ ├── dockerfile.js │ │ │ │ │ └── index.html │ │ │ │ ├── dtd │ │ │ │ │ ├── dtd.js │ │ │ │ │ └── index.html │ │ │ │ ├── dylan │ │ │ │ │ ├── dylan.js │ │ │ │ │ └── index.html │ │ │ │ ├── ebnf │ │ │ │ │ ├── ebnf.js │ │ │ │ │ └── index.html │ │ │ │ ├── ecl │ │ │ │ │ ├── ecl.js │ │ │ │ │ └── index.html │ │ │ │ ├── eiffel │ │ │ │ │ ├── eiffel.js │ │ │ │ │ └── index.html │ │ │ │ ├── erlang │ │ │ │ │ ├── erlang.js │ │ │ │ │ └── index.html │ │ │ │ ├── forth │ │ │ │ │ ├── forth.js │ │ │ │ │ └── index.html │ │ │ │ ├── fortran │ │ │ │ │ ├── fortran.js │ │ │ │ │ └── index.html │ │ │ │ ├── gas │ │ │ │ │ ├── gas.js │ │ │ │ │ └── index.html │ │ │ │ ├── gfm │ │ │ │ │ ├── gfm.js │ │ │ │ │ ├── index.html │ │ │ │ │ └── test.js │ │ │ │ ├── gherkin │ │ │ │ │ ├── gherkin.js │ │ │ │ │ └── index.html │ │ │ │ ├── go │ │ │ │ │ ├── go.js │ │ │ │ │ └── index.html │ │ │ │ ├── groovy │ │ │ │ │ ├── groovy.js │ │ │ │ │ └── index.html │ │ │ │ ├── haml │ │ │ │ │ ├── haml.js │ │ │ │ │ ├── index.html │ │ │ │ │ └── test.js │ │ │ │ ├── haskell │ │ │ │ │ ├── haskell.js │ │ │ │ │ └── index.html │ │ │ │ ├── haxe │ │ │ │ │ ├── haxe.js │ │ │ │ │ └── index.html │ │ │ │ ├── htmlembedded │ │ │ │ │ ├── htmlembedded.js │ │ │ │ │ └── index.html │ │ │ │ ├── htmlmixed │ │ │ │ │ ├── htmlmixed.js │ │ │ │ │ └── index.html │ │ │ │ ├── http │ │ │ │ │ ├── http.js │ │ │ │ │ └── index.html │ │ │ │ ├── idl │ │ │ │ │ ├── idl.js │ │ │ │ │ └── index.html │ │ │ │ ├── index.html │ │ │ │ ├── jade │ │ │ │ │ ├── index.html │ │ │ │ │ └── jade.js │ │ │ │ ├── javascript │ │ │ │ │ ├── index.html │ │ │ │ │ ├── javascript.js │ │ │ │ │ ├── json-ld.html │ │ │ │ │ ├── test.js │ │ │ │ │ └── typescript.html │ │ │ │ ├── jinja2 │ │ │ │ │ ├── index.html │ │ │ │ │ └── jinja2.js │ │ │ │ ├── julia │ │ │ │ │ ├── index.html │ │ │ │ │ └── julia.js │ │ │ │ ├── kotlin │ │ │ │ │ ├── index.html │ │ │ │ │ └── kotlin.js │ │ │ │ ├── livescript │ │ │ │ │ ├── index.html │ │ │ │ │ └── livescript.js │ │ │ │ ├── lua │ │ │ │ │ ├── index.html │ │ │ │ │ └── lua.js │ │ │ │ ├── markdown │ │ │ │ │ ├── index.html │ │ │ │ │ ├── markdown.js │ │ │ │ │ └── test.js │ │ │ │ ├── meta.js │ │ │ │ ├── mirc │ │ │ │ │ ├── index.html │ │ │ │ │ └── mirc.js │ │ │ │ ├── mllike │ │ │ │ │ ├── index.html │ │ │ │ │ └── mllike.js │ │ │ │ ├── modelica │ │ │ │ │ ├── index.html │ │ │ │ │ └── modelica.js │ │ │ │ ├── nginx │ │ │ │ │ ├── index.html │ │ │ │ │ └── nginx.js │ │ │ │ ├── ntriples │ │ │ │ │ ├── index.html │ │ │ │ │ └── ntriples.js │ │ │ │ ├── octave │ │ │ │ │ ├── index.html │ │ │ │ │ └── octave.js │ │ │ │ ├── pascal │ │ │ │ │ ├── index.html │ │ │ │ │ └── pascal.js │ │ │ │ ├── pegjs │ │ │ │ │ ├── index.html │ │ │ │ │ └── pegjs.js │ │ │ │ ├── perl │ │ │ │ │ ├── index.html │ │ │ │ │ └── perl.js │ │ │ │ ├── php │ │ │ │ │ ├── index.html │ │ │ │ │ ├── php.js │ │ │ │ │ └── test.js │ │ │ │ ├── pig │ │ │ │ │ ├── index.html │ │ │ │ │ └── pig.js │ │ │ │ ├── properties │ │ │ │ │ ├── index.html │ │ │ │ │ └── properties.js │ │ │ │ ├── puppet │ │ │ │ │ ├── index.html │ │ │ │ │ └── puppet.js │ │ │ │ ├── python │ │ │ │ │ ├── index.html │ │ │ │ │ └── python.js │ │ │ │ ├── q │ │ │ │ │ ├── index.html │ │ │ │ │ └── q.js │ │ │ │ ├── r │ │ │ │ │ ├── index.html │ │ │ │ │ └── r.js │ │ │ │ ├── rpm │ │ │ │ │ ├── changes │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── index.html │ │ │ │ │ └── rpm.js │ │ │ │ ├── rst │ │ │ │ │ ├── index.html │ │ │ │ │ └── rst.js │ │ │ │ ├── ruby │ │ │ │ │ ├── index.html │ │ │ │ │ ├── ruby.js │ │ │ │ │ └── test.js │ │ │ │ ├── rust │ │ │ │ │ ├── index.html │ │ │ │ │ └── rust.js │ │ │ │ ├── sass │ │ │ │ │ ├── index.html │ │ │ │ │ └── sass.js │ │ │ │ ├── scheme │ │ │ │ │ ├── index.html │ │ │ │ │ └── scheme.js │ │ │ │ ├── shell │ │ │ │ │ ├── index.html │ │ │ │ │ ├── shell.js │ │ │ │ │ └── test.js │ │ │ │ ├── sieve │ │ │ │ │ ├── index.html │ │ │ │ │ └── sieve.js │ │ │ │ ├── slim │ │ │ │ │ ├── index.html │ │ │ │ │ ├── slim.js │ │ │ │ │ └── test.js │ │ │ │ ├── smalltalk │ │ │ │ │ ├── index.html │ │ │ │ │ └── smalltalk.js │ │ │ │ ├── smarty │ │ │ │ │ ├── index.html │ │ │ │ │ └── smarty.js │ │ │ │ ├── smartymixed │ │ │ │ │ ├── index.html │ │ │ │ │ └── smartymixed.js │ │ │ │ ├── solr │ │ │ │ │ ├── index.html │ │ │ │ │ └── solr.js │ │ │ │ ├── soy │ │ │ │ │ ├── index.html │ │ │ │ │ └── soy.js │ │ │ │ ├── sparql │ │ │ │ │ ├── index.html │ │ │ │ │ └── sparql.js │ │ │ │ ├── spreadsheet │ │ │ │ │ ├── index.html │ │ │ │ │ └── spreadsheet.js │ │ │ │ ├── sql │ │ │ │ │ ├── index.html │ │ │ │ │ └── sql.js │ │ │ │ ├── stex │ │ │ │ │ ├── index.html │ │ │ │ │ ├── stex.js │ │ │ │ │ └── test.js │ │ │ │ ├── stylus │ │ │ │ │ ├── index.html │ │ │ │ │ └── stylus.js │ │ │ │ ├── tcl │ │ │ │ │ ├── index.html │ │ │ │ │ └── tcl.js │ │ │ │ ├── textile │ │ │ │ │ ├── index.html │ │ │ │ │ ├── test.js │ │ │ │ │ └── textile.js │ │ │ │ ├── tiddlywiki │ │ │ │ │ ├── index.html │ │ │ │ │ ├── tiddlywiki.css │ │ │ │ │ └── tiddlywiki.js │ │ │ │ ├── tiki │ │ │ │ │ ├── index.html │ │ │ │ │ ├── tiki.css │ │ │ │ │ └── tiki.js │ │ │ │ ├── toml │ │ │ │ │ ├── index.html │ │ │ │ │ └── toml.js │ │ │ │ ├── tornado │ │ │ │ │ ├── index.html │ │ │ │ │ └── tornado.js │ │ │ │ ├── turtle │ │ │ │ │ ├── index.html │ │ │ │ │ └── turtle.js │ │ │ │ ├── vb │ │ │ │ │ ├── index.html │ │ │ │ │ └── vb.js │ │ │ │ ├── vbscript │ │ │ │ │ ├── index.html │ │ │ │ │ └── vbscript.js │ │ │ │ ├── velocity │ │ │ │ │ ├── index.html │ │ │ │ │ └── velocity.js │ │ │ │ ├── verilog │ │ │ │ │ ├── index.html │ │ │ │ │ ├── test.js │ │ │ │ │ └── verilog.js │ │ │ │ ├── xml │ │ │ │ │ ├── index.html │ │ │ │ │ ├── test.js │ │ │ │ │ └── xml.js │ │ │ │ ├── xquery │ │ │ │ │ ├── index.html │ │ │ │ │ ├── test.js │ │ │ │ │ └── xquery.js │ │ │ │ ├── yaml │ │ │ │ │ ├── index.html │ │ │ │ │ └── yaml.js │ │ │ │ └── z80 │ │ │ │ │ ├── index.html │ │ │ │ │ └── z80.js │ │ │ ├── modes.min.js │ │ │ ├── package.json │ │ │ └── theme │ │ │ │ ├── 3024-day.css │ │ │ │ ├── 3024-night.css │ │ │ │ ├── ambiance-mobile.css │ │ │ │ ├── ambiance.css │ │ │ │ ├── base16-dark.css │ │ │ │ ├── base16-light.css │ │ │ │ ├── blackboard.css │ │ │ │ ├── cobalt.css │ │ │ │ ├── colorforth.css │ │ │ │ ├── eclipse.css │ │ │ │ ├── elegant.css │ │ │ │ ├── erlang-dark.css │ │ │ │ ├── lesser-dark.css │ │ │ │ ├── mbo.css │ │ │ │ ├── mdn-like.css │ │ │ │ ├── midnight.css │ │ │ │ ├── monokai.css │ │ │ │ ├── neat.css │ │ │ │ ├── neo.css │ │ │ │ ├── night.css │ │ │ │ ├── paraiso-dark.css │ │ │ │ ├── paraiso-light.css │ │ │ │ ├── pastel-on-dark.css │ │ │ │ ├── rubyblue.css │ │ │ │ ├── solarized.css │ │ │ │ ├── the-matrix.css │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ ├── twilight.css │ │ │ │ ├── vibrant-ink.css │ │ │ │ ├── xq-dark.css │ │ │ │ ├── xq-light.css │ │ │ │ └── zenburn.css │ │ ├── flowchart.min.js │ │ ├── jquery.flowchart.min.js │ │ ├── marked.min.js │ │ ├── prettify.min.js │ │ ├── raphael.min.js │ │ ├── sequence-diagram.min.js │ │ └── underscore.min.js │ ├── plugins │ │ ├── code-block-dialog │ │ │ └── code-block-dialog.js │ │ ├── emoji-dialog │ │ │ ├── emoji-dialog.js │ │ │ └── emoji.json │ │ ├── goto-line-dialog │ │ │ └── goto-line-dialog.js │ │ ├── help-dialog │ │ │ ├── help-dialog.js │ │ │ └── help.md │ │ ├── html-entities-dialog │ │ │ ├── html-entities-dialog.js │ │ │ └── html-entities.json │ │ ├── image-dialog │ │ │ └── image-dialog.js │ │ ├── link-dialog │ │ │ └── link-dialog.js │ │ ├── plugin-template.js │ │ ├── preformatted-text-dialog │ │ │ └── preformatted-text-dialog.js │ │ ├── reference-link-dialog │ │ │ └── reference-link-dialog.js │ │ ├── table-dialog │ │ │ └── table-dialog.js │ │ └── test-plugin │ │ │ └── test-plugin.js │ ├── scss │ │ ├── editormd.codemirror.scss │ │ ├── editormd.dialog.scss │ │ ├── editormd.form.scss │ │ ├── editormd.grid.scss │ │ ├── editormd.logo.scss │ │ ├── editormd.menu.scss │ │ ├── editormd.preview.scss │ │ ├── editormd.preview.themes.scss │ │ ├── editormd.scss │ │ ├── editormd.tab.scss │ │ ├── editormd.themes.scss │ │ ├── font-awesome.scss │ │ ├── github-markdown.scss │ │ ├── lib │ │ │ ├── prefixes.scss │ │ │ └── variables.scss │ │ └── prettify.scss │ ├── src │ │ └── editormd.js │ └── tests │ │ ├── bootstrap-test.html │ │ ├── codemirror-searchbox-test.html │ │ ├── codemirror-test.html │ │ ├── css │ │ ├── bootstrap-theme.min.css │ │ └── bootstrap.min.css │ │ ├── js │ │ ├── bootstrap.min.js │ │ └── searchbox.js │ │ ├── katex-tests.html │ │ ├── marked-@at-test.html │ │ ├── marked-emoji-test.html │ │ ├── marked-heading-link-test.html │ │ ├── marked-todo-list-test.html │ │ └── qunit │ │ ├── qunit-1.16.0.css │ │ └── qunit-1.16.0.js │ ├── jquery.min.js │ ├── xss.min.js │ └── zepto.min.js ├── src ├── App.vue ├── api │ ├── table.js │ └── user.js ├── assets │ ├── 404_images │ │ ├── 404.png │ │ └── 404_cloud.png │ └── avator │ │ └── default-avator.png ├── components │ ├── Breadcrumb │ │ └── index.vue │ ├── Hamburger │ │ └── index.vue │ ├── LangSelect │ │ └── index.vue │ └── SvgIcon │ │ └── index.vue ├── icons │ ├── index.js │ ├── svg │ │ ├── article.svg │ │ ├── comment.svg │ │ ├── dashboard.svg │ │ ├── edit.svg │ │ ├── example.svg │ │ ├── eye-open.svg │ │ ├── eye.svg │ │ ├── form.svg │ │ ├── international.svg │ │ ├── language.svg │ │ ├── link.svg │ │ ├── nested.svg │ │ ├── password.svg │ │ ├── system.svg │ │ ├── table.svg │ │ ├── tree.svg │ │ └── user.svg │ └── svgo.yml ├── lang │ ├── en.js │ ├── index.js │ └── zh.js ├── layout │ ├── components │ │ ├── AppMain.vue │ │ ├── Editormd.vue │ │ ├── Navbar.vue │ │ ├── Sidebar │ │ │ ├── FixiOSBug.js │ │ │ ├── Item.vue │ │ │ ├── Link.vue │ │ │ ├── Logo.vue │ │ │ ├── SidebarItem.vue │ │ │ └── index.vue │ │ ├── TagsView │ │ │ ├── ScrollPane.vue │ │ │ └── index.vue │ │ └── index.js │ ├── index.vue │ └── mixin │ │ └── ResizeHandler.js ├── main.js ├── permission.js ├── router │ └── index.js ├── settings.js ├── store │ ├── getters.js │ ├── index.js │ └── modules │ │ ├── app.js │ │ ├── permission.js │ │ ├── settings.js │ │ ├── tagsView.js │ │ └── user.js ├── styles │ ├── element-ui.scss │ ├── index.scss │ ├── mixin.scss │ ├── sidebar.scss │ ├── transition.scss │ └── variables.scss ├── utils │ ├── auth.js │ ├── const.js │ ├── directives.js │ ├── get-page-title.js │ ├── i18n.js │ ├── index.js │ ├── request.js │ ├── uiUtils.js │ └── validate.js └── views │ ├── 404.vue │ ├── SystemSettings │ └── index.vue │ ├── article │ ├── add.vue │ ├── edit.vue │ └── index.vue │ ├── comment │ └── index.vue │ ├── dashboard │ └── index.vue │ ├── login │ └── index.vue │ └── user │ └── list.vue ├── tests └── unit │ ├── .eslintrc.js │ ├── components │ ├── Breadcrumb.spec.js │ ├── Hamburger.spec.js │ └── SvgIcon.spec.js │ └── utils │ ├── formatTime.spec.js │ ├── parseTime.spec.js │ └── validate.spec.js ├── vue.config.js └── web.iml /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | logs -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-present yiyingcanfeng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /screenshoot/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/screenshoot/1.png -------------------------------------------------------------------------------- /screenshoot/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/screenshoot/2.png -------------------------------------------------------------------------------- /screenshoot/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/screenshoot/3.png -------------------------------------------------------------------------------- /screenshoot/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/screenshoot/4.png -------------------------------------------------------------------------------- /screenshoot/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/screenshoot/5.png -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | 8 | ### IntelliJ IDEA ### 9 | .idea 10 | *.iml 11 | 12 | logs/ 13 | src/main/resources/rebel.xml 14 | src/main/resources/application-dev.yml 15 | 16 | src/test/**/Test*.java -------------------------------------------------------------------------------- /server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | # Hexo Blog Admin 2 | > [Hexo Blog Admin](https://github.com/yiyingcanfeng/hexo-blog-admin) hexo博客后台管理项目的服务端,基于SpringBoot+MyBatis 3 | 4 | ## 如何构建 5 | 6 | ```bash 7 | git clone https://github.com/yiyingcanfeng/hexo-blog-admin-server.git 8 | 9 | cd hexo-blog-admin-server 10 | 11 | mvn package -DskipTests 12 | 13 | java -jar hexo-blog-admin-server.jar 14 | ``` 15 | 16 | ### 开发环境 17 | 18 | 工具 | 版本号 | 下载 19 | ----|----|---- 20 | JDK | 11 | https://www.oracle.com/technetwork/java/javase/downloads/index.html 21 | Mysql | 8.0 | https://dev.mysql.com/downloads/mysql/ 22 | ### TIPS 23 | 24 | - 可以将 application.yml 复制到启动命令所在的目录,springboot启动时就会放弃读取jar中的 application.yml,而是读取这个配置文件里的信息。 25 | - 建议将 application.yml 中部分敏感信息配置在 application-dev.yml 中,并将 application-dev.yml 添加到 .gitignore 文件中。 26 | 27 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/ServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin; 2 | 3 | import com.movefeng.hexoblogadmin.config.CustomProperties; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.builder.SpringApplicationBuilder; 7 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 8 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 9 | 10 | import javax.servlet.ServletContext; 11 | import javax.servlet.ServletException; 12 | import javax.servlet.SessionCookieConfig; 13 | import javax.servlet.SessionTrackingMode; 14 | import java.util.HashSet; 15 | import java.util.Set; 16 | 17 | @EnableConfigurationProperties({ CustomProperties.class }) 18 | @SpringBootApplication 19 | public class ServerApplication extends SpringBootServletInitializer { 20 | 21 | @Override 22 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 23 | return application.sources(ServerApplication.class); 24 | } 25 | 26 | @Override 27 | public void onStartup(ServletContext servletContext) throws ServletException { 28 | super.onStartup(servletContext); 29 | Set set = new HashSet<>(); 30 | set.add(SessionTrackingMode.COOKIE); 31 | set.add(SessionTrackingMode.URL); 32 | servletContext.setSessionTrackingModes(set); 33 | SessionCookieConfig sessionCookieConfig=servletContext.getSessionCookieConfig(); 34 | sessionCookieConfig.setHttpOnly(true); 35 | } 36 | 37 | public static void main(String[] args) { 38 | SpringApplication.run(ServerApplication.class, args); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/config/CORSFilter.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.config; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.stereotype.Component; 6 | 7 | import javax.servlet.*; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import java.io.IOException; 11 | 12 | /** 13 | * @author z 14 | */ 15 | @Component 16 | @Slf4j 17 | public class CORSFilter implements Filter { 18 | 19 | @Value("${config.corsDomain}") 20 | private String corsDomain; 21 | 22 | @Override 23 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { 24 | HttpServletResponse response = (HttpServletResponse) res; 25 | HttpServletRequest request = (HttpServletRequest) req; 26 | log.info(String.format("访问信息ip:%s,uri:%s,port:%s", req.getRemoteAddr(), request.getRequestURI(), req.getRemotePort())); 27 | response.setHeader("Access-Control-Allow-Origin", corsDomain); 28 | response.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE"); 29 | response.setHeader("Access-Control-Max-Age", "3600"); 30 | response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, token, login-token, jsessionid"); 31 | chain.doFilter(req, res); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/config/CustomProperties.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.config; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * @author z 8 | */ 9 | @Data 10 | @ConfigurationProperties(prefix = "config") 11 | public class CustomProperties { 12 | 13 | private String corsDomain; 14 | private String uploadPath; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/config/ThreadPoolConfig.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.config; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.core.task.TaskExecutor; 9 | import org.springframework.scheduling.annotation.EnableAsync; 10 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 11 | 12 | import java.util.concurrent.ThreadPoolExecutor; 13 | 14 | @Configuration 15 | @EnableAsync 16 | @Slf4j 17 | public class ThreadPoolConfig { 18 | 19 | @Bean 20 | public TaskExecutor taskExecutor() { 21 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 22 | //配置核心线程数 23 | executor.setCorePoolSize(5); 24 | //配置最大线程数 25 | executor.setMaxPoolSize(5); 26 | //配置队列大小 27 | executor.setQueueCapacity(30); 28 | //配置线程池中的线程的名称前缀 29 | executor.setThreadNamePrefix("async-service-"); 30 | 31 | // rejection-policy:当pool已经达到max size的时候,如何处理新任务 32 | // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 33 | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); 34 | //执行初始化 35 | executor.initialize(); 36 | return executor; 37 | } 38 | } -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/config/initRunner/SystemConfigInitRunner.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.config.initRunner; 2 | 3 | import com.movefeng.hexoblogadmin.dao.SystemConfigDao; 4 | import com.movefeng.hexoblogadmin.model.SystemConfig; 5 | import org.springframework.boot.ApplicationArguments; 6 | import org.springframework.boot.ApplicationRunner; 7 | import org.springframework.core.annotation.Order; 8 | import org.springframework.mail.javamail.JavaMailSender; 9 | import org.springframework.stereotype.Component; 10 | 11 | import javax.annotation.Resource; 12 | 13 | /** 14 | * 初始化全局系统参数 15 | * 16 | * @author z 17 | */ 18 | @Order(1) 19 | @Component 20 | public class SystemConfigInitRunner implements ApplicationRunner { 21 | 22 | @Resource 23 | private SystemConfigDao systemConfigDao; 24 | 25 | @Resource 26 | private SystemConfig systemConfig; 27 | 28 | @Override 29 | public void run(ApplicationArguments args) { 30 | SystemConfig config = systemConfigDao.select(); 31 | systemConfig.setArticlePath(config.getArticlePath()); 32 | systemConfig.setHexoPath(config.getHexoPath()); 33 | systemConfig.setPublicPath(config.getPublicPath()); 34 | systemConfig.setSmtpSender(config.getSmtpSender()); 35 | systemConfig.setAdminMailReport(config.getAdminMailReport()); 36 | systemConfig.setUserMailReport(config.getUserMailReport()); 37 | systemConfig.setHexoVisitUrl(config.getHexoVisitUrl()); 38 | systemConfig.setHexoAdminUrl(config.getHexoAdminUrl()); 39 | systemConfig.setAdminMailReport(config.getAdminMailReport()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/controller/SystemController.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.controller; 2 | 3 | import com.movefeng.hexoblogadmin.model.SystemConfig; 4 | import com.movefeng.hexoblogadmin.service.SystemService; 5 | import com.movefeng.hexoblogadmin.vo.Result; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import javax.annotation.Resource; 11 | 12 | /** 13 | * @author z 14 | */ 15 | @RestController 16 | @RequestMapping("/system") 17 | public class SystemController { 18 | 19 | @Resource 20 | private SystemService systemService; 21 | 22 | /** 23 | * 查看系统设置 24 | * 25 | * @return 26 | */ 27 | @RequestMapping("listSettings") 28 | public Result listSettings() { 29 | return systemService.listSettings(); 30 | } 31 | 32 | /** 33 | * 更新系统配置信息 34 | * 35 | * @param systemConfig 36 | * @return 37 | */ 38 | @RequestMapping("updateSettings") 39 | public Result updateSettings(@RequestBody SystemConfig systemConfig) { 40 | return systemService.updateSettings(systemConfig); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/dao/AdminDao.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.dao; 2 | 3 | import com.movefeng.hexoblogadmin.model.Admin; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Select; 6 | 7 | /** 8 | * @author z 9 | */ 10 | @Mapper 11 | public interface AdminDao { 12 | 13 | /** 14 | * 根据名称查询管理员信息 15 | * 16 | * @param admin 17 | * @return 18 | */ 19 | @Select("select * from admin where username = #{username} and password=#{password}") 20 | Admin selectAdminByUsernameAndPassword(Admin admin); 21 | 22 | /** 23 | * 根据名称查询管理员信息 24 | * 25 | * @param admin 26 | * @return 27 | */ 28 | @Select("select * from admin where username = #{username}") 29 | Admin selectAdminByUsername(Admin admin); 30 | 31 | /** 32 | * 查询第一个管理员的信息 33 | * 34 | * @return 35 | */ 36 | @Select("select * from admin limit 1;") 37 | Admin selectFirstOne(); 38 | 39 | /** 40 | * 根据邮箱获取管理员 41 | * 42 | * @param smtpSender 43 | * @return 44 | */ 45 | @Select("select * from admin where email = #{smtpSender} ;") 46 | Admin selectAdminByEmail(String smtpSender); 47 | } 48 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/dao/SystemConfigDao.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.dao; 2 | 3 | import com.movefeng.hexoblogadmin.model.SystemConfig; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Select; 6 | import org.apache.ibatis.annotations.Update; 7 | 8 | /** 9 | * 全局的配置信息,只处理数据库表中id为1的记录 10 | * 11 | * @author z 12 | */ 13 | @Mapper 14 | public interface SystemConfigDao { 15 | 16 | /** 17 | * 查询配置信息 18 | * 19 | * @return 20 | */ 21 | @Select("select * from sys_config where id = 1;") 22 | SystemConfig select(); 23 | 24 | /** 25 | * 更新配置信息 26 | * 27 | * @param systemConfig 28 | * @return 29 | */ 30 | Integer update(SystemConfig systemConfig); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.dao; 2 | 3 | import com.github.pagehelper.Page; 4 | import com.movefeng.hexoblogadmin.model.User; 5 | import com.movefeng.hexoblogadmin.vo.CommentVO; 6 | import org.apache.ibatis.annotations.*; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | * @author z 13 | */ 14 | @Mapper 15 | public interface UserDao { 16 | 17 | /** 18 | * 插入用户 19 | * 20 | * @param user 21 | */ 22 | void insertUser(User user); 23 | 24 | /** 25 | * 根据email查询用户信息 26 | * 27 | * @param email 28 | * @return 29 | */ 30 | @Select("select * from user where email = #{email}") 31 | User selectUserByEmail(String email); 32 | 33 | /** 34 | * 根据用户名查询用户信息 35 | * 36 | * @param username 37 | * @return 38 | */ 39 | @Select("select * from user where username = #{username}") 40 | User selectUserByUsername(String username); 41 | 42 | /** 43 | * 根据email更新用户信息 44 | * 45 | * @param commentVO 46 | */ 47 | @Update("update user set username = #{username} where email = #{userMail}") 48 | void updateUserByEmail(CommentVO commentVO); 49 | 50 | /** 51 | * 查询所有用户,带模糊查询 52 | * 53 | * @param param 54 | * @return 55 | */ 56 | Page selectUserAll(@Param("param") Map param); 57 | 58 | /** 59 | * 根据id删除用户 60 | * 61 | * @param id 62 | * @return 63 | */ 64 | @Delete("delete from user where id = #{id}") 65 | Integer deleteById(Integer id); 66 | 67 | /** 68 | * 根据id批量删除用户 69 | * 70 | * @param idList 71 | */ 72 | void deleteBatchById(List idList); 73 | 74 | /** 75 | * 根据id查询user信息 76 | * 77 | * @param replyUserId 78 | * @return 79 | */ 80 | @Select("select * from user where id=#{replyUserId} ;") 81 | User selectUserById(Integer replyUserId); 82 | } 83 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/model/Admin.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.model; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.Data; 5 | import lombok.experimental.Accessors; 6 | 7 | /** 8 | * @author z 9 | */ 10 | @Data 11 | @Accessors(chain = true) 12 | public class Admin { 13 | 14 | private String username; 15 | private String nickname; 16 | private String email; 17 | private String avatar; 18 | /** 19 | * password字段的值不包含在序列化中。 20 | */ 21 | @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) 22 | private String secret; 23 | @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) 24 | private String password; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/model/Article.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.model; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | @EqualsAndHashCode 10 | public class Article { 11 | 12 | private String content; 13 | private Date createTime; 14 | private String title; 15 | 16 | @EqualsAndHashCode.Exclude 17 | private Integer id; 18 | @EqualsAndHashCode.Exclude 19 | private String path; 20 | @EqualsAndHashCode.Exclude 21 | private Date updateTime; 22 | @EqualsAndHashCode.Exclude 23 | private Integer visitCount; 24 | } 25 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/model/Comment.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | 7 | @Data 8 | public class Comment { 9 | 10 | private Integer id; 11 | private String content; 12 | private Date createTime; 13 | private Integer userId; 14 | private Integer articleId; 15 | private String articleTitle; 16 | private Integer parentId; 17 | private Integer replyUserId; 18 | private Integer auditStatus; 19 | 20 | public interface AuditStatus{ 21 | int AUDIT_SUCCESS = 1; 22 | int WAIT_AUDIT = 0; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/model/SystemConfig.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.model; 2 | 3 | import lombok.Data; 4 | import org.springframework.core.annotation.Order; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * 全局配置信息 9 | * 10 | * @author z 11 | */ 12 | @Data 13 | @Component 14 | @Order(3) 15 | public class SystemConfig { 16 | 17 | /** 18 | * hexo的访问url,例: http://127.0.0.1/blog/ 19 | */ 20 | private String hexoVisitUrl; 21 | 22 | /** 23 | * 博客后台管理的访问url,例: http://127.0.0.1/admin/ 24 | */ 25 | private String hexoAdminUrl; 26 | 27 | /** 28 | * 文章目录 29 | */ 30 | private String articlePath; 31 | 32 | /** 33 | * hexo目录 34 | */ 35 | private String hexoPath; 36 | 37 | /** 38 | * 博客的发布目录 39 | */ 40 | private String publicPath; 41 | 42 | /** 43 | * 默认发信人 44 | */ 45 | private String smtpSender; 46 | 47 | /** 48 | * 是否启用管理员邮件通知(比如用户发表评论时) 1:启用 0:不启用 49 | */ 50 | private Integer adminMailReport; 51 | 52 | /** 53 | * 是否启用用户邮件通知(比如用户评论审核通过、评论被回复时) 1:启用 0:不启用 54 | */ 55 | private Integer userMailReport; 56 | 57 | public interface MailReport { 58 | int START = 1; 59 | int STOP = 0; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/model/User.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class User { 7 | 8 | private Integer id; 9 | private String username; 10 | private String email; 11 | private String website; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/model/VisitRecord.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.model; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | @Data 7 | @Accessors(chain = true) 8 | public class VisitRecord { 9 | 10 | private Integer id; 11 | private java.util.Date visitTime; 12 | private String visitUrl; 13 | private String articleTitle; 14 | private String remoteIp; 15 | private Integer remotePort; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.service; 2 | 3 | import com.movefeng.hexoblogadmin.dao.AdminDao; 4 | import com.movefeng.hexoblogadmin.model.Admin; 5 | import com.movefeng.hexoblogadmin.utils.AESUtil; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.stereotype.Service; 8 | 9 | import javax.annotation.Resource; 10 | 11 | /** 12 | * @author z 13 | */ 14 | @Service 15 | @Slf4j 16 | public class AdminService { 17 | 18 | @Resource 19 | private AdminDao adminDao; 20 | 21 | public boolean adminLogin(Admin admin) { 22 | String password = admin.getPassword(); 23 | Admin adminByUsername = adminDao.selectAdminByUsername(admin); 24 | if (adminByUsername == null) { 25 | return false; 26 | } 27 | admin.setPassword(AESUtil.encryptBase64(password, adminByUsername.getSecret())); 28 | 29 | Admin admin1 = adminDao.selectAdminByUsernameAndPassword(admin); 30 | return admin1 != null; 31 | 32 | } 33 | 34 | public Admin adminInfo(Admin admin) { 35 | return adminDao.selectAdminByUsername(admin); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/service/SystemService.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.service; 2 | 3 | import com.movefeng.hexoblogadmin.dao.SystemConfigDao; 4 | import com.movefeng.hexoblogadmin.model.SystemConfig; 5 | import com.movefeng.hexoblogadmin.vo.Result; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.beans.BeanUtils; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | import javax.annotation.Resource; 12 | 13 | /** 14 | * @author z 15 | */ 16 | @Slf4j 17 | @Service 18 | public class SystemService { 19 | 20 | @Resource 21 | private SystemConfigDao systemConfigDao; 22 | 23 | @Resource 24 | private SystemConfig systemConfig; 25 | 26 | /** 27 | * 更新系统配置信息 28 | * 29 | * @param systemConfig 30 | * @return 31 | */ 32 | @Transactional(rollbackFor = Exception.class) 33 | public Result updateSettings(SystemConfig systemConfig) { 34 | String hexoVisitUrl = systemConfig.getHexoVisitUrl(); 35 | if (hexoVisitUrl.lastIndexOf("/") != hexoVisitUrl.length() - 1 || (!hexoVisitUrl.startsWith("http://") && !hexoVisitUrl.startsWith("https://"))) { 36 | return new Result(Result.Code.ERROR, "url输入不正确!"); 37 | } 38 | BeanUtils.copyProperties(systemConfig, this.systemConfig); 39 | systemConfigDao.update(systemConfig); 40 | return new Result(Result.Code.SUCCESS); 41 | } 42 | 43 | /** 44 | * 查询系统设置 45 | * 46 | * @return 47 | */ 48 | public Result listSettings() { 49 | SystemConfig systemConfig = systemConfigDao.select(); 50 | return new Result<>(Result.Code.SUCCESS, systemConfig); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/utils/SendMail.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.utils; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.mail.SimpleMailMessage; 5 | import org.springframework.mail.javamail.JavaMailSender; 6 | import org.springframework.mail.javamail.MimeMessageHelper; 7 | 8 | import javax.mail.MessagingException; 9 | import javax.mail.internet.MimeMessage; 10 | 11 | /** 12 | * @author z 13 | */ 14 | @Slf4j 15 | public class SendMail { 16 | 17 | public static void sendSimpleMail(JavaMailSender javaMailSender,String from,String to,String subject,String text) { 18 | SimpleMailMessage message = new SimpleMailMessage(); 19 | message.setFrom(from); 20 | message.setTo(to); 21 | message.setSubject(subject); 22 | message.setText(text); 23 | javaMailSender.send(message); 24 | } 25 | 26 | public static void sendHtmlMail(JavaMailSender mailSender,String from,String to,String subject,String text) { 27 | try { 28 | MimeMessage message = mailSender.createMimeMessage(); 29 | MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(message); 30 | mimeMessageHelper.setFrom(from); 31 | mimeMessageHelper.setTo(to); 32 | mimeMessageHelper.setSubject(subject); 33 | mimeMessageHelper.setText(text, true); 34 | mailSender.send(message); 35 | } catch (MessagingException e) { 36 | log.error(String.format("邮件发送失败:Exception:%s,%s", e, e.getMessage())); 37 | e.printStackTrace(); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/Analysis.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @author z 7 | */ 8 | @Data 9 | public class Analysis { 10 | 11 | public Integer articleCount; 12 | public Integer commentCount; 13 | public Integer userCount; 14 | public Integer pageView; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/ArticleVO.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | @EqualsAndHashCode(exclude = {"id"}) 10 | public class ArticleVO { 11 | 12 | private Integer id; 13 | private String title; 14 | private String path; 15 | private String content; 16 | private Date createTime; 17 | private Integer visitCount; 18 | private int commentCount; 19 | } 20 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/CommentResult.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author z 9 | */ 10 | 11 | @Data 12 | public class CommentResult { 13 | 14 | private Integer commentCount; 15 | private List commentVOs; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/CommentVO.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * @author z 9 | */ 10 | 11 | @Data 12 | public class CommentVO { 13 | 14 | private Integer id; 15 | private String content; 16 | private Date createTime; 17 | private Integer userId; 18 | private String username; 19 | private String userMail; 20 | private String userWebsite; 21 | private String articleTitle; 22 | private Integer parentId; 23 | private Integer replyUserId; 24 | private String replyUserName; 25 | private Integer auditStatus; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/CommentVOs.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author z 9 | */ 10 | @Data 11 | public class CommentVOs { 12 | 13 | private CommentVO comment; 14 | private int childCommentCount; 15 | private List childComment; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/Result.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class Result implements Serializable { 9 | 10 | private static final long serialVersionUID = 1L; 11 | private int code; 12 | private String message; 13 | private T data; 14 | 15 | public Result(int code) { 16 | this.code = code; 17 | this.message = ""; 18 | } 19 | 20 | public Result(int code, String message) { 21 | this.code = code; 22 | this.message = message; 23 | } 24 | 25 | public Result(int code, T data) { 26 | this.code = code; 27 | this.message = ""; 28 | this.data = data; 29 | } 30 | 31 | public Result(int code, String message, T data) { 32 | this.code = code; 33 | this.message = message; 34 | this.data = data; 35 | } 36 | 37 | public interface Code { 38 | /** 39 | * 请求成功 40 | */ 41 | int SUCCESS = 0; 42 | /** 43 | * 系统出现异常 44 | */ 45 | int ERROR = -1; 46 | /** 47 | * 登录信息过期 48 | */ 49 | int LOGIN_INFO_EXPIRE = -2; 50 | /** 51 | * 登录信息不正确 52 | */ 53 | int LOGIN_INFO_INCORRECT = -3; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /server/src/main/java/com/movefeng/hexoblogadmin/vo/UserVO.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin.vo; 2 | 3 | import com.movefeng.hexoblogadmin.model.User; 4 | import lombok.Data; 5 | 6 | /** 7 | * @author z 8 | */ 9 | @Data 10 | public class UserVO extends User { 11 | 12 | private Integer commentCount; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /server/src/main/resources/META-INF/spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "corsDomain", 5 | "type": "java.lang.String", 6 | "description": "Description for corsDomain." 7 | } 8 | ] } -------------------------------------------------------------------------------- /server/src/main/resources/mybatis-mappers/SystemConfigMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | update sys_config set 6 | hexo_admin_url = #{hexoAdminUrl}, 7 | hexo_visit_url = #{hexoVisitUrl}, 8 | hexo_path = #{hexoPath}, 9 | article_path = #{articlePath}, 10 | public_path = #{publicPath}, 11 | user_mail_report = #{userMailReport}, 12 | admin_mail_report = #{adminMailReport}, 13 | smtp_sender = #{smtpSender} 14 | where id = 1; 15 | 16 | 17 | -------------------------------------------------------------------------------- /server/src/main/resources/mybatis-mappers/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | insert into user (username, email, website) 8 | values (#{username}, #{email}, #{website}) 9 | 10 | 11 | 12 | delete from user where id in 13 | 14 | #{item} 15 | 16 | 17 | 18 | 19 | 39 | -------------------------------------------------------------------------------- /server/src/test/java/com/movefeng/hexoblogadmin/HexoblogadminApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.movefeng.hexoblogadmin; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | public class HexoblogadminApplicationTests { 8 | 9 | @Test 10 | public void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /web/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | insert_final_newline = false 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /web/.env.development: -------------------------------------------------------------------------------- 1 | # just a flag 2 | ENV = 'development' 3 | 4 | # base api 5 | VUE_APP_BASE_API = '/blog/api' 6 | 7 | # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, 8 | # to control whether the babel-plugin-dynamic-import-node plugin is enabled. 9 | # It only does one thing by converting all import() to require(). 10 | # This configuration can significantly increase the speed of hot updates, 11 | # when you have a large number of pages. 12 | # Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js 13 | 14 | VUE_CLI_BABEL_TRANSPILE_MODULES = true 15 | -------------------------------------------------------------------------------- /web/.env.production: -------------------------------------------------------------------------------- 1 | # just a flag 2 | ENV = 'production' 3 | 4 | # base api 5 | VUE_APP_BASE_API = '/blog/api' 6 | 7 | -------------------------------------------------------------------------------- /web/.env.staging: -------------------------------------------------------------------------------- 1 | NODE_ENV = production 2 | 3 | # just a flag 4 | ENV = 'staging' 5 | 6 | # base api 7 | VUE_APP_BASE_API = '/stage-api' 8 | 9 | -------------------------------------------------------------------------------- /web/.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | src/assets 3 | public 4 | dist 5 | -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | package-lock.json 8 | tests/**/coverage/ 9 | 10 | # Editor directories and files 11 | .idea 12 | .vscode 13 | *.suo 14 | *.ntvs* 15 | *.njsproj 16 | *.sln 17 | -------------------------------------------------------------------------------- /web/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 10 3 | script: npm run test 4 | notifications: 5 | email: false 6 | -------------------------------------------------------------------------------- /web/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /web/build/index.js: -------------------------------------------------------------------------------- 1 | const { run } = require('runjs') 2 | const chalk = require('chalk') 3 | const config = require('../vue.config.js') 4 | const rawArgv = process.argv.slice(2) 5 | const args = rawArgv.join(' ') 6 | 7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) { 8 | const report = rawArgv.includes('--report') 9 | 10 | run(`vue-cli-service build ${args}`) 11 | 12 | const port = 9526 13 | const publicPath = config.publicPath 14 | 15 | var connect = require('connect') 16 | var serveStatic = require('serve-static') 17 | const app = connect() 18 | 19 | app.use( 20 | publicPath, 21 | serveStatic('./dist', { 22 | index: ['index.html', '/'] 23 | }) 24 | ) 25 | 26 | app.listen(port, function () { 27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) 28 | if (report) { 29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) 30 | } 31 | 32 | }) 33 | } else { 34 | run(`vue-cli-service build ${args}`) 35 | } 36 | -------------------------------------------------------------------------------- /web/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | moduleFileExtensions: ['js', 'jsx', 'json', 'vue'], 3 | transform: { 4 | '^.+\\.vue$': 'vue-jest', 5 | '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 6 | 'jest-transform-stub', 7 | '^.+\\.jsx?$': 'babel-jest' 8 | }, 9 | moduleNameMapper: { 10 | '^@/(.*)$': '/src/$1' 11 | }, 12 | snapshotSerializers: ['jest-serializer-vue'], 13 | testMatch: [ 14 | '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' 15 | ], 16 | collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'], 17 | coverageDirectory: '/tests/unit/coverage', 18 | // 'collectCoverage': true, 19 | 'coverageReporters': [ 20 | 'lcov', 21 | 'text-summary' 22 | ], 23 | testURL: 'http://localhost/' 24 | } 25 | -------------------------------------------------------------------------------- /web/postcss.config.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | 'plugins': { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | 'autoprefixer': {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/favicon.ico -------------------------------------------------------------------------------- /web/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <% for(var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> 11 | 12 | <% } %> 13 | <%= webpackConfig.name %> 14 | 15 | 16 | 19 |
20 | 21 | <% for(var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %> 22 | 23 | <% } %> 24 | 25 | 26 | -------------------------------------------------------------------------------- /web/public/static/editor.md/BUGS.md: -------------------------------------------------------------------------------- 1 | #Bugs 2 | 3 | > 说明:删除线表示已经解决。 4 | 5 | ####IE8 6 | 7 | - ~~不能加载;~~ 8 | - flowChart(流程图)、sequenceDiagram(序列图)不支持IE8; 9 | - ~~不支持Markdown转HTML页面解析预览;~~ 10 | 11 | ####IE8 & IE9 & IE10 12 | 13 | - KaTeX会出现解析错误,但不影响程序运行; 14 | 15 | ####Sea.js 16 | 17 | - ~~Raphael.js无法加载;~~ 18 | 19 | ####Require.js 20 | 21 | - ~~CodeMirror编辑器的代码无法高亮;~~ 22 | - ~~sequenceDiagram不支持: `Uncaught TypeError: Cannot call method 'isArray' of undefined.`~~ 23 | -------------------------------------------------------------------------------- /web/public/static/editor.md/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 pandao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /web/public/static/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} -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/docs/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Home 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |

Home

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |

30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 55 | 56 |
57 | 58 |
59 | Documentation generated by JSDoc 3.3.0 on Mon Jun 08 2015 01:07:40 GMT+0800 (中国标准时间) 60 |
61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /web/public/static/editor.md/docs/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/editormd-logo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/editormd-logo.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/editormd-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/editormd-logo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/editormd-logo.ttf -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/editormd-logo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/editormd-logo.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /web/public/static/editor.md/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /web/public/static/editor.md/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/loading.gif -------------------------------------------------------------------------------- /web/public/static/editor.md/images/loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/loading@2x.gif -------------------------------------------------------------------------------- /web/public/static/editor.md/images/loading@3x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/loading@3x.gif -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-favicon-16x16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-favicon-16x16.ico -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-favicon-24x24.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-favicon-24x24.ico -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-favicon-32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-favicon-32x32.ico -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-favicon-48x48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-favicon-48x48.ico -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-favicon-64x64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-favicon-64x64.ico -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-114x114.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-120x120.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-144x144.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-16x16.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-180x180.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-240x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-240x240.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-24x24.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-320x320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-320x320.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-32x32.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-48x48.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-57x57.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-64x64.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-72x72.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/editormd-logo-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/editormd-logo-96x96.png -------------------------------------------------------------------------------- /web/public/static/editor.md/images/logos/vi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/public/static/editor.md/images/logos/vi.png -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/editor.md/lib/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror 2 | [![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror) 3 | [![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror) 4 | [Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png)](https://marijnhaverbeke.nl/fund/) 5 | 6 | CodeMirror is a JavaScript component that provides a code editor in 7 | the browser. When a mode is available for the language you are coding 8 | in, it will color your code, and optionally help with indentation. 9 | 10 | The project page is http://codemirror.net 11 | The manual is at http://codemirror.net/doc/manual.html 12 | The contributing guidelines are in [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md) 13 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | } -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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.7.1", 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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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} -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/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)})); -------------------------------------------------------------------------------- /web/public/static/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 | -------------------------------------------------------------------------------- /web/public/static/editor.md/scss/editormd.grid.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .editormd-grid-table { 4 | width: 99%; 5 | display: table; 6 | border: 1px solid #ddd; 7 | border-collapse: collapse; 8 | } 9 | 10 | .editormd-grid-table-row { 11 | width: 100%; 12 | display: table-row; 13 | 14 | a { 15 | font-size: 1.4em; 16 | width: 5%; 17 | height: 36px; 18 | color: #999; 19 | text-align: center; 20 | display: table-cell; 21 | vertical-align: middle; 22 | border: 1px solid #ddd; 23 | text-decoration: none; 24 | @include transition(background-color 300ms ease-out, color 100ms ease-in); 25 | 26 | &.selected { 27 | color: #666; 28 | background-color: #eee; 29 | } 30 | 31 | &:hover { 32 | color: #777; 33 | background-color: #f6f6f6; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /web/public/static/editor.md/scss/editormd.tab.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .editormd-tab { 4 | } 5 | 6 | .editormd-tab-head { 7 | list-style: none; 8 | border-bottom: 1px solid #ddd; 9 | 10 | li { 11 | display: inline-block; 12 | 13 | a { 14 | color: #999; 15 | display: block; 16 | padding: 6px 12px 5px; 17 | text-align: center; 18 | text-decoration: none; 19 | margin-bottom: -1px; 20 | border: 1px solid #ddd; 21 | @include border-top-left-radius(3px); 22 | @include border-top-right-radius(3px); 23 | background: #f6f6f6; 24 | @include transition(all 300ms ease-out); 25 | 26 | &:hover { 27 | color: #666; 28 | background: #eee; 29 | } 30 | } 31 | 32 | &.active a { 33 | color: #666; 34 | background: #fff; 35 | border-bottom-color: #fff; 36 | } 37 | } 38 | 39 | li + li { 40 | margin-left: 3px; 41 | } 42 | } 43 | 44 | .editormd-tab-container { 45 | } 46 | 47 | .editormd-tab-box { 48 | padding: 20px 0; 49 | } -------------------------------------------------------------------------------- /web/public/static/editor.md/scss/editormd.themes.scss: -------------------------------------------------------------------------------- 1 | /* Editor.md Dark theme */ 2 | 3 | #{$prefix}theme-dark { 4 | border-color: #1a1a17; 5 | 6 | #{$prefix}toolbar { 7 | background: #1A1A17; 8 | border-color: #1a1a17; 9 | } 10 | 11 | #{$prefix}menu > li > a { 12 | color: #777; 13 | border-color: #1a1a17; 14 | 15 | &:hover, &.active { 16 | border-color: #333; 17 | background: #333; 18 | } 19 | } 20 | 21 | #{$prefix}menu > li.divider { 22 | border-right: 1px solid #111; 23 | } 24 | 25 | .CodeMirror { 26 | border-right: 1px solid rgba(0,0,0,0.1); 27 | } 28 | } -------------------------------------------------------------------------------- /web/public/static/editor.md/scss/lib/variables.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | // Global Variables 4 | 5 | $prefix : ".editormd-"; 6 | $color : #666; 7 | $mainColor : #2196F3; 8 | $primaryColor : $mainColor; 9 | $secondColor : #33CC66; 10 | $thirdColor : #999999; 11 | $borderColor : #ddd; -------------------------------------------------------------------------------- /web/public/static/editor.md/scss/prettify.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /*! Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | .pln { color: #000 } /* plain text */ 6 | 7 | @media screen { 8 | .str { color: #080 } /* string content */ 9 | .kwd { color: #008 } /* a keyword */ 10 | .com { color: #800 } /* a comment */ 11 | .typ { color: #606 } /* a type name */ 12 | .lit { color: #066 } /* a literal value */ 13 | /* punctuation, lisp open bracket, lisp close bracket */ 14 | .pun, .opn, .clo { color: #660 } 15 | .tag { color: #008 } /* a markup tag name */ 16 | .atn { color: #606 } /* a markup attribute name */ 17 | .atv { color: #080 } /* a markup attribute value */ 18 | .dec, .var { color: #606 } /* a declaration; a variable name */ 19 | .fun { color: red } /* a function name */ 20 | } 21 | 22 | /* Use higher contrast and text-weight for printable form. */ 23 | @media print, projection { 24 | .str { color: #060 } 25 | .kwd { color: #006; font-weight: bold } 26 | .com { color: #600; font-style: italic } 27 | .typ { color: #404; font-weight: bold } 28 | .lit { color: #044 } 29 | .pun, .opn, .clo { color: #440 } 30 | .tag { color: #006; font-weight: bold } 31 | .atn { color: #404 } 32 | .atv { color: #060 } 33 | } 34 | 35 | /* Put a border around prettyprinted code snippets. */ 36 | pre.prettyprint { padding: 2px; border: 1px solid #888 } 37 | 38 | /* Specify class=linenums on a pre to get line numbering */ 39 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 40 | li.L0, 41 | li.L1, 42 | li.L2, 43 | li.L3, 44 | li.L5, 45 | li.L6, 46 | li.L7, 47 | li.L8 { list-style-type: none } 48 | /* Alternate shading for lines */ 49 | li.L1, 50 | li.L3, 51 | li.L5, 52 | li.L7, 53 | li.L9 { background: #eee } -------------------------------------------------------------------------------- /web/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /web/src/api/table.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getList(params) { 4 | return request({ 5 | url: '/table/list', 6 | method: 'get', 7 | params 8 | }) 9 | } 10 | -------------------------------------------------------------------------------- /web/src/api/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function login(data) { 4 | const headers = {} 5 | if (data.jsessionid) { 6 | headers.jsessionid = data.jsessionid 7 | } 8 | return request({ 9 | url: '/admin/login', 10 | method: 'post', 11 | data: { 12 | username: data.username, 13 | password: data.password 14 | }, 15 | headers: headers 16 | }) 17 | } 18 | 19 | export function getInfo(username) { 20 | return request({ 21 | url: '/admin/info', 22 | method: 'get', 23 | params: { username } 24 | }) 25 | } 26 | 27 | export function logout() { 28 | return request({ 29 | url: '/admin/logout', 30 | method: 'post' 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /web/src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/src/assets/404_images/404.png -------------------------------------------------------------------------------- /web/src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /web/src/assets/avator/default-avator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiyingcanfeng/hexo-blog-admin/75ac1e0f6245a40583a385072bee8695e8dafd88/web/src/assets/avator/default-avator.png -------------------------------------------------------------------------------- /web/src/components/Hamburger/index.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 32 | 33 | 45 | -------------------------------------------------------------------------------- /web/src/components/LangSelect/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 36 | -------------------------------------------------------------------------------- /web/src/components/SvgIcon/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 47 | 48 | 63 | -------------------------------------------------------------------------------- /web/src/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon'// svg component 3 | 4 | // register globally 5 | Vue.component('svg-icon', SvgIcon) 6 | 7 | const req = require.context('./svg', false, /\.svg$/) 8 | const requireAll = requireContext => requireContext.keys().map(requireContext) 9 | requireAll(req) 10 | -------------------------------------------------------------------------------- /web/src/icons/svg/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/eye-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/international.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/language.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/nested.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/password.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/tree.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/src/icons/svgo.yml: -------------------------------------------------------------------------------- 1 | # replace default config 2 | 3 | # multipass: true 4 | # full: true 5 | 6 | plugins: 7 | 8 | # - name 9 | # 10 | # or: 11 | # - name: false 12 | # - name: true 13 | # 14 | # or: 15 | # - name: 16 | # param1: 1 17 | # param2: 2 18 | 19 | - removeAttrs: 20 | attrs: 21 | - 'fill' 22 | - 'fill-rule' 23 | -------------------------------------------------------------------------------- /web/src/lang/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueI18n from 'vue-i18n' 3 | import Cookies from 'js-cookie' 4 | import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang 5 | import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang 6 | import enLocale from './en' 7 | import zhLocale from './zh' 8 | 9 | Vue.use(VueI18n) 10 | 11 | const messages = { 12 | en: { 13 | ...enLocale, 14 | ...elementEnLocale 15 | }, 16 | zh: { 17 | ...zhLocale, 18 | ...elementZhLocale 19 | } 20 | } 21 | export function getLanguage() { 22 | const chooseLanguage = Cookies.get('language') 23 | if (chooseLanguage) return chooseLanguage 24 | 25 | // if has not choose language 26 | const language = (navigator.language || navigator.browserLanguage).toLowerCase() 27 | const locales = Object.keys(messages) 28 | for (const locale of locales) { 29 | if (language.indexOf(locale) > -1) { 30 | return locale 31 | } 32 | } 33 | return 'en' 34 | } 35 | const i18n = new VueI18n({ 36 | // set locale 37 | // options: en | zh | es 38 | locale: getLanguage(), 39 | // set locale messages 40 | messages 41 | }) 42 | 43 | export default i18n 44 | -------------------------------------------------------------------------------- /web/src/layout/components/AppMain.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 19 | 20 | 32 | 33 | 41 | -------------------------------------------------------------------------------- /web/src/layout/components/Sidebar/FixiOSBug.js: -------------------------------------------------------------------------------- 1 | export default { 2 | computed: { 3 | device() { 4 | return this.$store.state.app.device 5 | } 6 | }, 7 | mounted() { 8 | // In order to fix the click on menu on the ios device will trigger the mouseleave bug 9 | // https://github.com/PanJiaChen/vue-element-admin/issues/1135 10 | this.fixBugIniOS() 11 | }, 12 | methods: { 13 | fixBugIniOS() { 14 | const $subMenu = this.$refs.subMenu 15 | if ($subMenu) { 16 | const handleMouseleave = $subMenu.handleMouseleave 17 | $subMenu.handleMouseleave = (e) => { 18 | if (this.device === 'mobile') { 19 | return 20 | } 21 | handleMouseleave(e) 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /web/src/layout/components/Sidebar/Item.vue: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /web/src/layout/components/Sidebar/Link.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 37 | -------------------------------------------------------------------------------- /web/src/layout/components/Sidebar/index.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 58 | -------------------------------------------------------------------------------- /web/src/layout/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Navbar } from './Navbar' 2 | export { default as Sidebar } from './Sidebar' 3 | export { default as AppMain } from './AppMain' 4 | export { default as TagsView } from './TagsView' 5 | -------------------------------------------------------------------------------- /web/src/layout/mixin/ResizeHandler.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | 3 | const { body } = document 4 | const WIDTH = 992 // refer to Bootstrap's responsive design 5 | 6 | export default { 7 | watch: { 8 | $route(route) { 9 | if (this.device === 'mobile' && this.sidebar.opened) { 10 | store.dispatch('app/closeSideBar', { withoutAnimation: false }) 11 | } 12 | } 13 | }, 14 | beforeMount() { 15 | window.addEventListener('resize', this.$_resizeHandler) 16 | }, 17 | beforeDestroy() { 18 | window.removeEventListener('resize', this.$_resizeHandler) 19 | }, 20 | mounted() { 21 | const isMobile = this.$_isMobile() 22 | if (isMobile) { 23 | store.dispatch('app/toggleDevice', 'mobile') 24 | store.dispatch('app/closeSideBar', { withoutAnimation: true }) 25 | } 26 | }, 27 | methods: { 28 | // use $_ for mixins properties 29 | // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential 30 | $_isMobile() { 31 | const rect = body.getBoundingClientRect() 32 | return rect.width - 1 < WIDTH 33 | }, 34 | $_resizeHandler() { 35 | if (!document.hidden) { 36 | const isMobile = this.$_isMobile() 37 | store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') 38 | 39 | if (isMobile) { 40 | store.dispatch('app/closeSideBar', { withoutAnimation: true }) 41 | } 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /web/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import 'normalize.css/normalize.css' // A modern alternative to CSS resets 4 | 5 | import ElementUI from 'element-ui' 6 | import 'element-ui/lib/theme-chalk/index.css' 7 | import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n 8 | 9 | import '@/styles/index.scss' // global css 10 | 11 | import App from './App' 12 | import store from './store' 13 | import router from './router' 14 | 15 | import '@/icons' // icon 16 | import '@/permission' // permission control 17 | import i18n from './lang' 18 | import '@/utils/directives.js' 19 | import utils from '@/utils' 20 | import uiUtils from '@/utils/uiUtils' 21 | 22 | Vue.use(ElementUI, { i18n: (key, value) => i18n.t(key, value) }) 23 | Vue.prototype.$uiUtils = uiUtils 24 | Vue.prototype.$utils = utils 25 | 26 | Vue.config.productionTip = false 27 | if (process.env.NODE_ENV === 'development') { 28 | Vue.config.devtools = true 29 | } 30 | new Vue({ 31 | el: '#app', 32 | router, 33 | store, 34 | i18n, 35 | render: h => h(App) 36 | }) 37 | -------------------------------------------------------------------------------- /web/src/settings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | title: 'hexo blog admin', 4 | 5 | /** 6 | * @type {boolean} true | false 7 | * @description Whether fix the header 8 | */ 9 | fixedHeader: false, 10 | 11 | /** 12 | * @type {boolean} true | false 13 | * @description Whether show the logo in sidebar 14 | */ 15 | sidebarLogo: false, 16 | tagsView: true 17 | } 18 | -------------------------------------------------------------------------------- /web/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | sidebar: state => state.app.sidebar, 3 | language: state => state.app.language, 4 | visitedViews: state => state.tagsView.visitedViews, 5 | cachedViews: state => state.tagsView.cachedViews, 6 | permission_routes: state => state.permission.routes, 7 | roles: state => state.user.roles, 8 | device: state => state.app.device, 9 | token: state => state.user.token, 10 | avatar: state => state.user.avatar, 11 | username: state => state.user.username, 12 | nickname: state => state.user.nickname, 13 | email: state => state.user.email 14 | } 15 | export default getters 16 | -------------------------------------------------------------------------------- /web/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import getters from './getters' 4 | 5 | Vue.use(Vuex) 6 | 7 | // https://webpack.js.org/guides/dependency-management/#requirecontext 8 | const modulesFiles = require.context('./modules', true, /\.js$/) 9 | 10 | // you do not need `import app from './modules/app'` 11 | // it will auto require all vuex module from modules file 12 | const modules = modulesFiles.keys().reduce((modules, modulePath) => { 13 | // set './app.js' => 'app' 14 | const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') 15 | const value = modulesFiles(modulePath) 16 | modules[moduleName] = value.default 17 | return modules 18 | }, {}) 19 | 20 | const store = new Vuex.Store({ 21 | modules, 22 | getters 23 | }) 24 | 25 | export default store 26 | -------------------------------------------------------------------------------- /web/src/store/modules/app.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | import { getLanguage } from '@/lang' 3 | 4 | const state = { 5 | sidebar: { 6 | opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, 7 | withoutAnimation: false 8 | }, 9 | device: 'desktop', 10 | language: getLanguage() 11 | } 12 | 13 | const mutations = { 14 | TOGGLE_SIDEBAR: state => { 15 | state.sidebar.opened = !state.sidebar.opened 16 | state.sidebar.withoutAnimation = false 17 | if (state.sidebar.opened) { 18 | Cookies.set('sidebarStatus', 1) 19 | } else { 20 | Cookies.set('sidebarStatus', 0) 21 | } 22 | }, 23 | CLOSE_SIDEBAR: (state, withoutAnimation) => { 24 | Cookies.set('sidebarStatus', 0) 25 | state.sidebar.opened = false 26 | state.sidebar.withoutAnimation = withoutAnimation 27 | }, 28 | TOGGLE_DEVICE: (state, device) => { 29 | state.device = device 30 | }, 31 | SET_LANGUAGE: (state, language) => { 32 | state.language = language 33 | Cookies.set('language', language) 34 | } 35 | } 36 | 37 | const actions = { 38 | toggleSideBar({ commit }) { 39 | commit('TOGGLE_SIDEBAR') 40 | }, 41 | closeSideBar({ commit }, { withoutAnimation }) { 42 | commit('CLOSE_SIDEBAR', withoutAnimation) 43 | }, 44 | toggleDevice({ commit }, device) { 45 | commit('TOGGLE_DEVICE', device) 46 | }, 47 | setLanguage({ commit }, language) { 48 | commit('SET_LANGUAGE', language) 49 | } 50 | } 51 | 52 | export default { 53 | namespaced: true, 54 | state, 55 | mutations, 56 | actions 57 | } 58 | -------------------------------------------------------------------------------- /web/src/store/modules/permission.js: -------------------------------------------------------------------------------- 1 | import { asyncRoutes, constantRoutes } from '@/router' 2 | 3 | /** 4 | * Use meta.role to determine if the current user has permission 5 | * @param roles 6 | * @param route 7 | */ 8 | function hasPermission(roles, route) { 9 | if (route.meta && route.meta.roles) { 10 | return roles.some(role => route.meta.roles.includes(role)) 11 | } else { 12 | return true 13 | } 14 | } 15 | 16 | /** 17 | * Filter asynchronous routing tables by recursion 18 | * @param routes asyncRoutes 19 | * @param roles 20 | */ 21 | export function filterAsyncRoutes(routes, roles) { 22 | const res = [] 23 | 24 | routes.forEach(route => { 25 | const tmp = { ...route } 26 | if (hasPermission(roles, tmp)) { 27 | if (tmp.children) { 28 | tmp.children = filterAsyncRoutes(tmp.children, roles) 29 | } 30 | res.push(tmp) 31 | } 32 | }) 33 | 34 | return res 35 | } 36 | 37 | const state = { 38 | routes: [], 39 | addRoutes: [] 40 | } 41 | 42 | const mutations = { 43 | SET_ROUTES: (state, routes) => { 44 | state.addRoutes = routes 45 | state.routes = constantRoutes.concat(routes) 46 | } 47 | } 48 | 49 | const actions = { 50 | generateRoutes({ commit }, roles) { 51 | return new Promise(resolve => { 52 | const accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) 53 | commit('SET_ROUTES', accessedRoutes) 54 | resolve(accessedRoutes) 55 | }) 56 | } 57 | } 58 | 59 | export default { 60 | namespaced: true, 61 | state, 62 | mutations, 63 | actions 64 | } 65 | -------------------------------------------------------------------------------- /web/src/store/modules/settings.js: -------------------------------------------------------------------------------- 1 | import defaultSettings from '@/settings' 2 | 3 | const { showSettings, fixedHeader, sidebarLogo, tagsView } = defaultSettings 4 | 5 | const state = { 6 | showSettings: showSettings, 7 | fixedHeader: fixedHeader, 8 | sidebarLogo: sidebarLogo, 9 | tagsView: tagsView 10 | } 11 | 12 | const mutations = { 13 | CHANGE_SETTING: (state, { key, value }) => { 14 | if (state.hasOwnProperty(key)) { 15 | state[key] = value 16 | } 17 | } 18 | } 19 | 20 | const actions = { 21 | changeSetting({ commit }, data) { 22 | commit('CHANGE_SETTING', data) 23 | } 24 | } 25 | 26 | export default { 27 | namespaced: true, 28 | state, 29 | mutations, 30 | actions 31 | } 32 | 33 | -------------------------------------------------------------------------------- /web/src/styles/element-ui.scss: -------------------------------------------------------------------------------- 1 | // cover some element-ui styles 2 | 3 | .el-breadcrumb__inner, 4 | .el-breadcrumb__inner a { 5 | font-weight: 400 !important; 6 | } 7 | 8 | .el-upload { 9 | input[type="file"] { 10 | display: none !important; 11 | } 12 | } 13 | 14 | .el-upload__input { 15 | display: none; 16 | } 17 | 18 | 19 | // to fixed https://github.com/ElemeFE/element/issues/2461 20 | .el-dialog { 21 | transform: none; 22 | left: 0; 23 | position: relative; 24 | margin: 0 auto; 25 | } 26 | 27 | // refine element ui upload 28 | .upload-container { 29 | .el-upload { 30 | width: 100%; 31 | 32 | .el-upload-dragger { 33 | width: 100%; 34 | height: 200px; 35 | } 36 | } 37 | } 38 | 39 | // dropdown 40 | .el-dropdown-menu { 41 | a { 42 | display: block 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /web/src/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import './variables.scss'; 2 | @import './mixin.scss'; 3 | @import './transition.scss'; 4 | @import './element-ui.scss'; 5 | @import './sidebar.scss'; 6 | 7 | body { 8 | height: 100%; 9 | -moz-osx-font-smoothing: grayscale; 10 | -webkit-font-smoothing: antialiased; 11 | text-rendering: optimizeLegibility; 12 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; 13 | } 14 | 15 | label { 16 | font-weight: 700; 17 | } 18 | 19 | html { 20 | height: 100%; 21 | box-sizing: border-box; 22 | } 23 | 24 | #app { 25 | height: 100%; 26 | } 27 | 28 | *, 29 | *:before, 30 | *:after { 31 | box-sizing: inherit; 32 | } 33 | 34 | a:focus, 35 | a:active { 36 | outline: none; 37 | } 38 | 39 | a, 40 | a:focus, 41 | a:hover { 42 | cursor: pointer; 43 | color: inherit; 44 | text-decoration: none; 45 | } 46 | 47 | div:focus { 48 | outline: none; 49 | } 50 | 51 | .clearfix { 52 | &:after { 53 | visibility: hidden; 54 | display: block; 55 | font-size: 0; 56 | content: " "; 57 | clear: both; 58 | height: 0; 59 | } 60 | } 61 | 62 | // main-container global css 63 | .app-container { 64 | font-family: "Microsoft YaHei", STXihei, serif; 65 | padding: 20px; 66 | } 67 | 68 | .container-head-button { 69 | padding-bottom: 20px; 70 | } 71 | 72 | .pagination{ 73 | margin-top: 10px; 74 | } 75 | 76 | .search-container{ 77 | margin-bottom: 10px; 78 | } 79 | -------------------------------------------------------------------------------- /web/src/styles/mixin.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix { 2 | &:after { 3 | content: ""; 4 | display: table; 5 | clear: both; 6 | } 7 | } 8 | 9 | @mixin scrollBar { 10 | &::-webkit-scrollbar-track-piece { 11 | background: #d3dce6; 12 | } 13 | 14 | &::-webkit-scrollbar { 15 | width: 6px; 16 | } 17 | 18 | &::-webkit-scrollbar-thumb { 19 | background: #99a9bf; 20 | border-radius: 20px; 21 | } 22 | } 23 | 24 | @mixin relative { 25 | position: relative; 26 | width: 100%; 27 | height: 100%; 28 | } 29 | -------------------------------------------------------------------------------- /web/src/styles/transition.scss: -------------------------------------------------------------------------------- 1 | // global transition css 2 | 3 | /* fade */ 4 | .fade-enter-active, 5 | .fade-leave-active { 6 | transition: opacity 0.28s; 7 | } 8 | 9 | .fade-enter, 10 | .fade-leave-active { 11 | opacity: 0; 12 | } 13 | 14 | /* fade-transform */ 15 | .fade-transform-leave-active, 16 | .fade-transform-enter-active { 17 | transition: all .5s; 18 | } 19 | 20 | .fade-transform-enter { 21 | opacity: 0; 22 | transform: translateX(-30px); 23 | } 24 | 25 | .fade-transform-leave-to { 26 | opacity: 0; 27 | transform: translateX(30px); 28 | } 29 | 30 | /* breadcrumb transition */ 31 | .breadcrumb-enter-active, 32 | .breadcrumb-leave-active { 33 | transition: all .5s; 34 | } 35 | 36 | .breadcrumb-enter, 37 | .breadcrumb-leave-active { 38 | opacity: 0; 39 | transform: translateX(20px); 40 | } 41 | 42 | .breadcrumb-move { 43 | transition: all .5s; 44 | } 45 | 46 | .breadcrumb-leave-active { 47 | position: absolute; 48 | } 49 | -------------------------------------------------------------------------------- /web/src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | // sidebar 2 | $menuText:#bfcbd9; 3 | $menuActiveText:#409EFF; 4 | $subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951 5 | 6 | $menuBg:#304156; 7 | $menuHover:#263445; 8 | 9 | $subMenuBg:#1f2d3d; 10 | $subMenuHover:#001528; 11 | 12 | $sideBarWidth: 210px; 13 | 14 | // the :export directive is the magic sauce for webpack 15 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass 16 | :export { 17 | menuText: $menuText; 18 | menuActiveText: $menuActiveText; 19 | subMenuActiveText: $subMenuActiveText; 20 | menuBg: $menuBg; 21 | menuHover: $menuHover; 22 | subMenuBg: $subMenuBg; 23 | subMenuHover: $subMenuHover; 24 | sideBarWidth: $sideBarWidth; 25 | } 26 | -------------------------------------------------------------------------------- /web/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'hexoBlogAdminToken' 4 | const adminInfoKey = 'hexoBlogAdminInfo' 5 | 6 | export function getToken() { 7 | return Cookies.get(TokenKey) 8 | } 9 | 10 | export function setToken(token) { 11 | return Cookies.set(TokenKey, token) 12 | } 13 | 14 | export function removeToken() { 15 | return Cookies.remove(TokenKey) 16 | } 17 | 18 | export function getUsername() { 19 | return Cookies.get(adminInfoKey) ? JSON.parse(Cookies.get(adminInfoKey)).username : '' 20 | } 21 | 22 | export function setAdminInfo(adminInfo) { 23 | return Cookies.set(adminInfoKey, JSON.stringify(adminInfo), { expires: 3 }) 24 | } 25 | 26 | export function getAdminInfo() { 27 | return Cookies.get(adminInfoKey) ? JSON.parse(Cookies.get(adminInfoKey)) : {} 28 | } 29 | 30 | export function removeAdminInfo() { 31 | return Cookies.remove(adminInfoKey) 32 | } 33 | -------------------------------------------------------------------------------- /web/src/utils/const.js: -------------------------------------------------------------------------------- 1 | const AuditStatus = { 2 | AUDIT_SUCCESS: 1, 3 | WAIT_AUDIT: 0 4 | } 5 | 6 | export default AuditStatus 7 | -------------------------------------------------------------------------------- /web/src/utils/get-page-title.js: -------------------------------------------------------------------------------- 1 | import defaultSettings from '@/settings' 2 | 3 | const title = defaultSettings.title || 'Vue Admin Template' 4 | 5 | export default function getPageTitle(pageTitle) { 6 | if (pageTitle) { 7 | return `${pageTitle} - ${title}` 8 | } 9 | return `${title}` 10 | } 11 | -------------------------------------------------------------------------------- /web/src/utils/i18n.js: -------------------------------------------------------------------------------- 1 | // translate router.meta.title, be used in breadcrumb sidebar tagsview 2 | export function generateTitle(title) { 3 | const hasKey = this.$te('route.' + title) 4 | 5 | if (hasKey) { 6 | // $t :this method from vue-i18n, inject in @/lang/index.js 7 | const translatedTitle = this.$t('route.' + title) 8 | 9 | return translatedTitle 10 | } 11 | return title 12 | } 13 | -------------------------------------------------------------------------------- /web/src/utils/uiUtils.js: -------------------------------------------------------------------------------- 1 | import { Message } from 'element-ui' 2 | 3 | export function showSuccessMessage(msg) { 4 | Message({ 5 | message: msg, 6 | type: 'success', 7 | duration: 3 * 1000, 8 | showClose: true 9 | }) 10 | } 11 | 12 | export function showErrorMessage(msg) { 13 | Message({ 14 | message: msg, 15 | type: 'error', 16 | duration: 3 * 1000, 17 | showClose: true 18 | }) 19 | } 20 | 21 | export default { 22 | showSuccessMessage, 23 | showErrorMessage 24 | } 25 | 26 | -------------------------------------------------------------------------------- /web/src/utils/validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by PanJiaChen on 16/11/18. 3 | */ 4 | 5 | /** 6 | * @param {string} path 7 | * @returns {Boolean} 8 | */ 9 | export function isExternal(path) { 10 | return /^(https?:|mailto:|tel:)/.test(path) 11 | } 12 | 13 | /** 14 | * @param {string} str 15 | * @returns {Boolean} 16 | */ 17 | export function validUsername(str) { 18 | const valid_map = ['admin', 'editor'] 19 | return valid_map.indexOf(str.trim()) >= 0 20 | } 21 | -------------------------------------------------------------------------------- /web/src/views/article/add.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 57 | 58 | 61 | -------------------------------------------------------------------------------- /web/src/views/dashboard/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | 22 | 33 | -------------------------------------------------------------------------------- /web/tests/unit/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | jest: true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /web/tests/unit/components/Hamburger.spec.js: -------------------------------------------------------------------------------- 1 | import { shallowMount } from '@vue/test-utils' 2 | import Hamburger from '@/components/Hamburger/index.vue' 3 | describe('Hamburger.vue', () => { 4 | it('toggle click', () => { 5 | const wrapper = shallowMount(Hamburger) 6 | const mockFn = jest.fn() 7 | wrapper.vm.$on('toggleClick', mockFn) 8 | wrapper.find('.hamburger').trigger('click') 9 | expect(mockFn).toBeCalled() 10 | }) 11 | it('prop isActive', () => { 12 | const wrapper = shallowMount(Hamburger) 13 | wrapper.setProps({ isActive: true }) 14 | expect(wrapper.contains('.is-active')).toBe(true) 15 | wrapper.setProps({ isActive: false }) 16 | expect(wrapper.contains('.is-active')).toBe(false) 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /web/tests/unit/components/SvgIcon.spec.js: -------------------------------------------------------------------------------- 1 | import { shallowMount } from '@vue/test-utils' 2 | import SvgIcon from '@/components/SvgIcon/index.vue' 3 | describe('SvgIcon.vue', () => { 4 | it('iconClass', () => { 5 | const wrapper = shallowMount(SvgIcon, { 6 | propsData: { 7 | iconClass: 'test' 8 | } 9 | }) 10 | expect(wrapper.find('use').attributes().href).toBe('#icon-test') 11 | }) 12 | it('className', () => { 13 | const wrapper = shallowMount(SvgIcon, { 14 | propsData: { 15 | iconClass: 'test' 16 | } 17 | }) 18 | expect(wrapper.classes().length).toBe(1) 19 | wrapper.setProps({ className: 'test' }) 20 | expect(wrapper.classes().includes('test')).toBe(true) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /web/tests/unit/utils/formatTime.spec.js: -------------------------------------------------------------------------------- 1 | import { formatTime } from '@/utils/index.js' 2 | 3 | describe('Utils:formatTime', () => { 4 | const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" 5 | const retrofit = 5 * 1000 6 | 7 | it('ten digits timestamp', () => { 8 | expect(formatTime((d / 1000).toFixed(0))).toBe('7月13日17时54分') 9 | }) 10 | it('test now', () => { 11 | expect(formatTime(+new Date() - 1)).toBe('刚刚') 12 | }) 13 | it('less two minute', () => { 14 | expect(formatTime(+new Date() - 60 * 2 * 1000 + retrofit)).toBe('2分钟前') 15 | }) 16 | it('less two hour', () => { 17 | expect(formatTime(+new Date() - 60 * 60 * 2 * 1000 + retrofit)).toBe('2小时前') 18 | }) 19 | it('less one day', () => { 20 | expect(formatTime(+new Date() - 60 * 60 * 24 * 1 * 1000)).toBe('1天前') 21 | }) 22 | it('more than one day', () => { 23 | expect(formatTime(d)).toBe('7月13日17时54分') 24 | }) 25 | it('format', () => { 26 | expect(formatTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') 27 | expect(formatTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') 28 | expect(formatTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') 29 | }) 30 | }) 31 | -------------------------------------------------------------------------------- /web/tests/unit/utils/parseTime.spec.js: -------------------------------------------------------------------------------- 1 | import { parseTime } from '@/utils/index.js' 2 | 3 | describe('Utils:parseTime', () => { 4 | const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" 5 | it('timestamp', () => { 6 | expect(parseTime(d)).toBe('2018-07-13 17:54:01') 7 | }) 8 | it('ten digits timestamp', () => { 9 | expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01') 10 | }) 11 | it('new Date', () => { 12 | expect(parseTime(new Date(d))).toBe('2018-07-13 17:54:01') 13 | }) 14 | it('format', () => { 15 | expect(parseTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') 16 | expect(parseTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') 17 | expect(parseTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') 18 | }) 19 | it('get the day of the week', () => { 20 | expect(parseTime(d, '{a}')).toBe('五') // 星期五 21 | }) 22 | it('get the day of the week', () => { 23 | expect(parseTime(+d + 1000 * 60 * 60 * 24 * 2, '{a}')).toBe('日') // 星期日 24 | }) 25 | it('empty argument', () => { 26 | expect(parseTime()).toBeNull() 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /web/tests/unit/utils/validate.spec.js: -------------------------------------------------------------------------------- 1 | import { validUsername, isExternal } from '@/utils/validate.js' 2 | 3 | describe('Utils:validate', () => { 4 | it('validUsername', () => { 5 | expect(validUsername('admin')).toBe(true) 6 | expect(validUsername('editor')).toBe(true) 7 | expect(validUsername('xxxx')).toBe(false) 8 | }) 9 | it('isExternal', () => { 10 | expect(isExternal('https://github.com/PanJiaChen/vue-element-admin')).toBe(true) 11 | expect(isExternal('http://github.com/PanJiaChen/vue-element-admin')).toBe(true) 12 | expect(isExternal('github.com/PanJiaChen/vue-element-admin')).toBe(false) 13 | expect(isExternal('/dashboard')).toBe(false) 14 | expect(isExternal('./dashboard')).toBe(false) 15 | expect(isExternal('dashboard')).toBe(false) 16 | }) 17 | }) 18 | -------------------------------------------------------------------------------- /web/web.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------