├── .gitignore ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── HELP.md ├── README.md ├── mvnw ├── mvnw.cmd ├── nest.sql ├── pom.xml └── src └── main ├── java └── cn │ └── fengyunxiao │ └── nest │ ├── NestApplication.java │ ├── config │ ├── Config.java │ ├── ConfigI.java │ ├── CorsConfig.java │ ├── ExceptionHandlerForJson.java │ ├── ExceptionHandlerForPage.java │ ├── FirstPage.java │ ├── JsonResult.java │ └── run.sh │ ├── controller │ ├── AdminController.java │ ├── BlogController.java │ ├── ChatController.java │ ├── ChatSocketController.java │ ├── ImageController.java │ ├── InstallController.java │ ├── IpController.java │ ├── LetterController.java │ ├── TimelineController.java │ └── ViewController.java │ ├── dao │ ├── BlogDao.java │ ├── ChatDao.java │ ├── ImageDao.java │ ├── InstallDao.java │ ├── IpDao.java │ ├── LetterDao.java │ ├── LinkDao.java │ ├── ReplyDao.java │ └── TimelineDao.java │ ├── entity │ ├── Blog.java │ ├── Chart.java │ ├── Chat.java │ ├── Image.java │ ├── Install.java │ ├── Ip.java │ ├── Letter.java │ ├── LetterAndReply.java │ ├── Link.java │ ├── Reply.java │ └── Timeline.java │ ├── service │ ├── AdminService.java │ ├── BlogService.java │ ├── ChatService.java │ ├── ImageService.java │ ├── IndexService.java │ ├── InstallService.java │ ├── IpService.java │ ├── LetterService.java │ ├── LinkService.java │ ├── MailService.java │ └── TimelineService.java │ ├── task │ ├── AsyncTaskConfig.java │ ├── DataInitListener.java │ └── TimeTask.java │ └── util │ ├── GoogleAuthenticator.java │ ├── ImageUtil.java │ ├── IpUtil.java │ ├── Jackson.java │ ├── RobotUtil.java │ ├── TokenUtil.java │ ├── Util.java │ └── XssUtil.java ├── resources ├── META-INF │ └── MANIFEST.MF ├── application.yml ├── static │ ├── css │ │ ├── admin_commen.css │ │ ├── chat.css │ │ ├── commen.css │ │ ├── falls.css │ │ ├── index.css │ │ ├── ip.css │ │ └── timeline.css │ ├── editormd │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .jshintrc │ │ ├── CHANGE.md │ │ ├── Gulpfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── TODOs.md │ │ ├── bower.json │ │ ├── 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 │ │ ├── package.json │ │ └── 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 │ ├── error │ │ ├── 4xx.html │ │ └── error.html │ ├── favicon.ico │ ├── image │ │ ├── beiantubiao.png │ │ ├── boy.gif │ │ ├── chat │ │ │ ├── avatar_chen.jpg │ │ │ └── avatar_xiao.jpg │ │ ├── falls │ │ │ ├── closelabel.gif │ │ │ ├── cur-left1.png │ │ │ ├── cur-right1.png │ │ │ └── loading.gif │ │ ├── girl.gif │ │ ├── heart.jpg │ │ ├── heart.webm │ │ └── index │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ ├── 5.jpg │ │ │ ├── 6.jpg │ │ │ ├── 7.jpg │ │ │ ├── 8.jpg │ │ │ └── swirl.png │ ├── js │ │ ├── chat.js │ │ ├── falls.js │ │ ├── geoCoordMap.js │ │ ├── index.js │ │ ├── ip.js │ │ └── lib │ │ │ ├── arttmpl.js │ │ │ ├── blocksit.min.js │ │ │ ├── pagetool.js │ │ │ ├── pagetool.min.js │ │ │ ├── scrolltag.js │ │ │ └── scrolltag.min.js │ └── robots.txt ├── templates │ ├── admin │ │ ├── blog.ftl │ │ ├── blogs.ftl │ │ ├── header.ftl │ │ ├── image.ftl │ │ ├── image2.ftl │ │ ├── index.ftl │ │ ├── install.ftl │ │ ├── link.ftl │ │ └── login.ftl │ ├── index.ftl │ └── pages │ │ ├── blog.ftl │ │ ├── blogs.ftl │ │ ├── chart.ftl │ │ ├── chat.ftl │ │ ├── error.ftl │ │ ├── falls.ftl │ │ ├── falls2.ftl │ │ ├── footer.ftl │ │ ├── header.ftl │ │ ├── ip.ftl │ │ └── timeline.ftl └── www.fengyunxiao.cn.jks └── www.fengyunxiao.cn.jks /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /src/main/resources/application-prod.yml 27 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### 项目说明 2 | 3 | 4 | http 地址(address of http ):http://www.fengyunxiao.cn 5 | 6 | https地址(address of https):https://www.fengyunxiao.cn 7 | 8 | 9 | 目标(goal):部署简单,安全高效,只需修改配置,即可搭建自己的情侣网站,属于你们的小窝。 10 | 11 | 语言(language) :java(jdk11) 12 | 13 | 数据库(database):mysql 8 14 | 15 | 缓存技术(cache redis):redis5 16 | 17 | 框架技术(framework): SpringBoot2.3,Mybatis,Freemarker,Websocket 18 | 19 | 分布式存储:阿里云 OSS 20 | 21 | 集成开发环境(IDE):IntelliJ IDEA 22 | 23 | 模块(modular):聊天(chat),博客(blog),留言(message),相册(album),故事(story),ip 统计(ip statistics),邮件通知(mail notification).... 24 | 25 | --- 26 | 27 | ### 捐赠(donation) 28 | 29 | | name | address | 30 | -:|:- 31 | | btc | 19ipzAnQ2ZebbLukbpaebgSukXbK3FkicS | 32 | | eth | 0x99b896244e6f9dc4d49b4a1dce6a3971c40310f8 | 33 | | ltc | LYEwf8TvMikNdZEbZVbPmZ11yAydffoDdX | 34 | 35 | --- 36 | 37 | ### 部署说明 38 | 39 | 数据库:nest.sql,同时修改 application.yml 中的配置 40 | 41 | redis:安装好以后,同时修改 application.yml 中的配置 42 | 43 | 密码、密钥等配置:nest.sql 中的 install 表 44 | 45 | 数据库、邮箱等配置:application.yml 46 | 47 | --- 48 | 49 | ### 运行说明 50 | 51 | 52 | 问:如何运行? 53 | 54 | 答:运行前请确保配置文件和数据库配置正确,运行入口类中的main方法,src\main\java\cn\fengyunxiao\nest\NestApplication.java 55 | 56 | 57 | 问:如何访问? 58 | 59 | 答:默认以http方式访问,浏览器输入地址:http://127.0.0.1 60 | 61 | 62 | 问:如何使用自己的域名SSL证书? 63 | 64 | 答:需要将 www.fengyunxiao.cn.jks 换成自己域名的SSL证书, 65 | 同时修改 application.yml 中的 server 部分 66 | 67 | ### 联系 68 | 69 | > 扫码关注微信公众号联系我 70 | 71 | ![扫码关注微信公众号联系我](https://fengyunxiao.oss-cn-shanghai.aliyuncs.com/nest/photos/gongzhonghao.jpg) -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/config/ConfigI.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.config; 2 | 3 | public interface ConfigI { 4 | String servletFirstpage = "firstPage"; 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/config/CorsConfig.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.cors.CorsConfiguration; 6 | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; 7 | import org.springframework.web.filter.CorsFilter; 8 | 9 | @Configuration 10 | public class CorsConfig { 11 | private CorsConfiguration buildConfig() { 12 | CorsConfiguration corsConfiguration = new CorsConfiguration(); 13 | corsConfiguration.addAllowedOrigin("*"); // 1允许任何域名使用 14 | corsConfiguration.addAllowedHeader("*"); // 2允许任何头 15 | corsConfiguration.addAllowedMethod("*"); // 3允许任何方法(post、get等) 16 | return corsConfiguration; 17 | } 18 | 19 | @Bean 20 | public CorsFilter corsFilter() { 21 | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); 22 | source.registerCorsConfiguration("/**", buildConfig()); // 4 23 | return new CorsFilter(source); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/config/ExceptionHandlerForJson.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.config; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.web.bind.annotation.ExceptionHandler; 6 | import org.springframework.web.bind.annotation.ResponseBody; 7 | import org.springframework.web.bind.annotation.RestControllerAdvice; 8 | import org.springframework.web.multipart.MultipartException; 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | @RestControllerAdvice 13 | public class ExceptionHandlerForJson { 14 | 15 | private static final Logger logger = LoggerFactory.getLogger(ExceptionHandlerForJson.class); 16 | 17 | // 图片大小超过指定大小,抛异常 18 | @ResponseBody 19 | @ExceptionHandler(value = MultipartException.class) 20 | public Map resolveFileUploadException(MultipartException e) { 21 | logger.warn("MultipartMessage:" + e.getMessage()); 22 | logger.warn("MultipartgetCause:" + e.getCause()); 23 | Map map = new HashMap<>(); 24 | map.put("success", 0); 25 | map.put("message", "上传错误:图片大小超过指定值。建议10M以内"); 26 | return map; 27 | } 28 | 29 | @ResponseBody 30 | @ExceptionHandler(value = Exception.class) 31 | public JsonResult resolveException(Exception e) { 32 | logger.warn("ExceptionMessage:" + e.getMessage()); 33 | logger.warn("ExceptionCause:" + e.getCause()); 34 | JsonResult result = new JsonResult<>(); 35 | return result.error(-1, "thinkphp遇到错误,请查看日志"); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/config/ExceptionHandlerForPage.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.config; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.web.bind.annotation.ControllerAdvice; 6 | import org.springframework.web.bind.annotation.ExceptionHandler; 7 | import org.springframework.web.bind.annotation.ResponseBody; 8 | 9 | @ControllerAdvice 10 | public class ExceptionHandlerForPage { 11 | 12 | private static final Logger logger = LoggerFactory.getLogger(ExceptionHandlerForJson.class); 13 | 14 | @ResponseBody 15 | @ExceptionHandler(value = Exception.class) 16 | public JsonResult resolveException(Exception e) { 17 | logger.warn("ExceptionMessage:" + e.getMessage()); 18 | logger.warn("ExceptionCause:" + e.getCause()); 19 | JsonResult result = new JsonResult<>(); 20 | return result.error(-1, "thinkphp遇到错误,请查看日志"); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/config/JsonResult.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.config; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * json 返回的结构 7 | */ 8 | public class JsonResult implements Serializable { 9 | // code=0表示成功,返回数据data。code!=0,表示错误,返回错误信息msg 10 | private int code; 11 | private T data; 12 | private String msg; 13 | 14 | public JsonResult() { 15 | code = 0; 16 | } 17 | 18 | public JsonResult ok(T data, String msg) { 19 | this.code = 0; 20 | this.data = data; 21 | this.msg = msg; 22 | return this; 23 | } 24 | 25 | public JsonResult error(int code, String msg) { 26 | this.code = code; 27 | this.msg = msg; 28 | return this; 29 | } 30 | 31 | public T getData() { 32 | return data; 33 | } 34 | 35 | public void setData(T data) { 36 | this.data = data; 37 | } 38 | 39 | public int getCode() { 40 | return code; 41 | } 42 | 43 | public void setCode(int code) { 44 | this.code = code; 45 | } 46 | 47 | public String getMsg() { 48 | return msg; 49 | } 50 | 51 | public void setMsg(String msg) { 52 | this.msg = msg; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/config/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 查找运行的项目 4 | pid=`ps -ef | grep java | grep -v grep | grep 'nest.jar' | awk '{print $2}'` 5 | 6 | # 结束运行的项目 7 | if [ "$pid" == "" ]; then 8 | echo "项目未运行" 9 | else 10 | echo "进程:$pid" 11 | kill -9 $pid 12 | echo "项目已关闭" 13 | fi 14 | 15 | # 部署新项目 16 | if [ ! -f "/home/nest.jar" ];then 17 | echo "不需要更新项目" 18 | else 19 | echo "需要更新项目,删除原项目" 20 | rm -f /home/jar_nest/nest.jar 21 | echo "原项目已删除,部署新项目" 22 | mv /home/nest.jar /home/jar_nest/nest.jar 23 | fi 24 | 25 | echo "启动项目中..." 26 | 27 | # 启动程序 28 | nohup java -jar /home/jar_nest/nest.jar > /home/nest.log 2>&1 & 29 | 30 | echo "项目已启动,打开运行日志" 31 | 32 | tail -200f nest.log 33 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/controller/BlogController.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.controller; 2 | 3 | import cn.fengyunxiao.nest.config.JsonResult; 4 | import cn.fengyunxiao.nest.entity.Blog; 5 | import cn.fengyunxiao.nest.service.BlogService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpSession; 13 | 14 | @Controller 15 | @RequestMapping("/blog") 16 | public class BlogController { 17 | @Autowired private BlogService blogService; 18 | @Autowired private HttpSession session; 19 | 20 | @RequestMapping("/get") 21 | @ResponseBody 22 | public JsonResult get(Integer bid, HttpServletRequest request) { 23 | return blogService.get(bid, request); 24 | } 25 | 26 | @RequestMapping("/update") 27 | @ResponseBody 28 | public JsonResult update(Blog blog) { 29 | return blogService.update(blog, (String)session.getAttribute("admin")); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/controller/ChatController.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.controller; 2 | 3 | import cn.fengyunxiao.nest.config.JsonResult; 4 | import cn.fengyunxiao.nest.entity.Chat; 5 | import cn.fengyunxiao.nest.service.ChatService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import java.util.List; 13 | 14 | @Controller 15 | @RequestMapping("/chat") 16 | public class ChatController { 17 | @Autowired private ChatService chatService; 18 | 19 | @PostMapping("/listChat") 20 | @ResponseBody 21 | public List listChat(Integer cid, Integer number) { 22 | return chatService.list(cid, number); 23 | } 24 | 25 | @PostMapping("/updateChat") 26 | @ResponseBody 27 | public JsonResult updateChat(Chat chat, String sign) { 28 | return chatService.updateChat(chat, sign); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/controller/ImageController.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.controller; 2 | 3 | import cn.fengyunxiao.nest.entity.Image; 4 | import cn.fengyunxiao.nest.service.ImageService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import java.util.List; 11 | 12 | @Controller 13 | @RequestMapping("/image") 14 | public class ImageController { 15 | @Autowired private ImageService imageService; 16 | 17 | @RequestMapping("/list") 18 | @ResponseBody 19 | public List list(Integer iid, Integer per) { 20 | return imageService.list(iid, per); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/controller/InstallController.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.controller; 2 | 3 | import cn.fengyunxiao.nest.config.Config; 4 | import cn.fengyunxiao.nest.config.FirstPage; 5 | import cn.fengyunxiao.nest.config.JsonResult; 6 | import cn.fengyunxiao.nest.entity.Link; 7 | import cn.fengyunxiao.nest.service.InstallService; 8 | import cn.fengyunxiao.nest.service.LinkService; 9 | import cn.fengyunxiao.nest.util.TokenUtil; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.redis.core.StringRedisTemplate; 12 | import org.springframework.stereotype.Controller; 13 | import org.springframework.web.bind.annotation.PostMapping; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | import javax.servlet.http.HttpServletRequest; 17 | import java.util.List; 18 | 19 | @Controller 20 | @RequestMapping({ "/install" }) 21 | public class InstallController { 22 | @Autowired 23 | private InstallService installService; 24 | @Autowired 25 | private LinkService linkService; 26 | @Autowired 27 | private StringRedisTemplate stringRedisTemplate; 28 | 29 | @PostMapping({ "/reset_Config_Servlet_Redis" }) 30 | @ResponseBody 31 | public JsonResult resetConfigAndServlet(HttpServletRequest request, String sign) { 32 | final JsonResult result = new JsonResult(); 33 | if (sign == null || !TokenUtil.isRightSign(sign)) { 34 | return result.error(-1, "sign error"); 35 | } 36 | this.installService.initConfig(); 37 | List links = this.linkService.getLink(); 38 | request.getServletContext().setAttribute(Config.servletFirstpage, new FirstPage(links)); 39 | this.stringRedisTemplate.delete("*"); 40 | return result.ok("", "ok"); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/controller/IpController.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.controller; 2 | 3 | import cn.fengyunxiao.nest.entity.Ip; 4 | import cn.fengyunxiao.nest.service.IpService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | @Controller 14 | @RequestMapping("/ip") 15 | public class IpController { 16 | @Autowired private IpService ipService; 17 | 18 | @PostMapping("/chartStatic") 19 | @ResponseBody 20 | public Map chartStatic() { 21 | return ipService.getCharts(); 22 | } 23 | 24 | @PostMapping("/listIp") 25 | @ResponseBody 26 | public List listIp(Integer page, Integer per) { 27 | return ipService.listIp(page, per); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/controller/TimelineController.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.controller; 2 | 3 | import org.springframework.stereotype.*; 4 | import cn.fengyunxiao.nest.service.*; 5 | import org.springframework.beans.factory.annotation.*; 6 | import cn.fengyunxiao.nest.entity.*; 7 | import cn.fengyunxiao.nest.config.*; 8 | import org.springframework.web.bind.annotation.*; 9 | import java.util.*; 10 | 11 | @Controller 12 | @RequestMapping({ "/timeline" }) 13 | public class TimelineController { 14 | @Autowired private TimelineService timelineService; 15 | 16 | @RequestMapping({ "/insertOrUpdate" }) 17 | @ResponseBody 18 | public JsonResult insertOrUpdate(final Timeline timeline, final String sign) { 19 | return this.timelineService.insertOrUpdate(timeline, sign); 20 | } 21 | 22 | @RequestMapping({ "/list" }) 23 | @ResponseBody 24 | public List listTimeline() { 25 | return this.timelineService.listTimeline(); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/BlogDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Blog; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | import java.util.List; 7 | 8 | @Mapper 9 | @Repository 10 | public interface BlogDao { 11 | @Options(useGeneratedKeys = true, keyProperty = "bid", keyColumn = "bid") 12 | @Insert({ "insert into blog(`rank`,title,keyword,content,modtime,url) values(#{rank},#{title},#{keyword},#{content},#{modtime},#{url})" }) 13 | int insert(final Blog blog); 14 | 15 | @Update({ "update blog set `rank`=#{rank},title=#{title},keyword=#{keyword}, content=#{content},modtime=#{modtime},url=#{url} where bid=#{bid}" }) 16 | int update(final Blog blog); 17 | 18 | @Delete("delete from `blog` where `bid`=#{bid}") 19 | int delete(@Param("bid") int bid); 20 | 21 | @Select({ "select * from blog where `bid`=#{bid}" }) 22 | Blog get(@Param("bid") int bid); 23 | 24 | @Select({ "select bid from blog where `rank`<0 order by bid desc limit 1" }) 25 | Integer getLastDraft(); 26 | 27 | @Select({ "SELECT t1.bid,t1.title FROM blog AS t1 JOIN (SELECT ROUND(RAND() * (SELECT MAX(bid)-#{number} FROM blog)) AS bid) AS t2 WHERE t1.bid >= t2.bid ORDER BY t1.bid ASC LIMIT #{number}" }) 28 | List listRand(@Param("number") final int number); 29 | 30 | @Select({ "select bid,`rank`,title,keyword,modtime from blog where MATCH (title,keyword) AGAINST (#{key} IN NATURAL LANGUAGE MODE) limit #{cur},#{per}" }) 31 | List searchByKey2(@Param("key") final String key, @Param("cur") final int cur, @Param("per") final int per); 32 | 33 | @Select({ "select bid,`rank`,title,keyword,modtime from blog order by bid desc limit #{cur},#{per}" }) 34 | List listByPage(@Param("cur") final int cur, @Param("per") final int per); 35 | 36 | @Select({ "select count(*) from blog" }) 37 | int countAll(); 38 | 39 | @Select({ "select bid from blog where url = #{url}" }) 40 | Integer getBidByUrl(@Param("url") final String url); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/ChatDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Chat; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | import java.util.List; 7 | 8 | @Mapper 9 | @Repository 10 | public interface ChatDao { 11 | @Select({ "select * from `chat` where cid<#{cid} order by cid desc limit #{number}" }) 12 | List list(@Param("cid") final int cid, @Param("number") final int number); 13 | 14 | @Insert({ "insert into `chat`(male,content,pubtime) values(#{male},#{content},now())" }) 15 | int insertChat(final Chat message); 16 | 17 | @Update({ "update `chat` set `content`=#{content} where cid=#{cid}" }) 18 | int updateChat(final Chat chat); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/ImageDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Image; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | @Repository 11 | public interface ImageDao { 12 | @Insert({ "insert into image(bid,name,pubtime) values(#{bid},#{name},now())" }) 13 | int insertImage(final Image image); 14 | 15 | @Select({ "select * from image where bid=-1 and iid<#{iid} order by iid desc limit #{number}" }) 16 | List listUploadImage(@Param("iid") final long iid, @Param("number") final int number); 17 | 18 | @Select({ "select * from image order by iid desc limit #{cur},#{number}" }) 19 | List listImageByPage(@Param("cur") final int cur, @Param("number") final int number); 20 | 21 | @Delete({ "delete from image where iid = #{iid}" }) 22 | int deleteImage(@Param("iid") final int iid); 23 | 24 | @Select({ "select * from image where iid = #{iid}" }) 25 | Image queryImage(@Param("iid") final int iid); 26 | 27 | @Select({ "select count(*) from image" }) 28 | int getTotal(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/InstallDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Install; 4 | import org.apache.ibatis.annotations.Insert; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Select; 7 | import org.springframework.stereotype.Repository; 8 | import java.sql.Timestamp; 9 | import java.util.List; 10 | 11 | @Mapper 12 | @Repository 13 | public interface InstallDao { 14 | @Insert({ "insert into install(`key`, `value`, `intro`) VALUES (#{key},#{value},#{intro}) ON DUPLICATE KEY UPDATE `value`=#{value},`intro`=#{intro}" }) 15 | int insertOrupdate(final Install install); 16 | 17 | @Select({ "select * from install" }) 18 | List listInstall(); 19 | 20 | @Select({ "select now()" }) 21 | Timestamp getCurrentTime(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/IpDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Chart; 4 | import cn.fengyunxiao.nest.entity.Ip; 5 | import org.apache.ibatis.annotations.Insert; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.Select; 9 | import org.springframework.stereotype.Repository; 10 | 11 | import java.sql.Timestamp; 12 | import java.util.List; 13 | 14 | @Mapper 15 | @Repository 16 | public interface IpDao { 17 | @Select({ "select * from ip order by iid desc limit #{current},#{per}" }) 18 | List listIp(@Param("current") final int current, @Param("per") final int per); 19 | 20 | @Select({ "select count(*) as total from ip" }) 21 | int total(); 22 | 23 | @Select({ "select * from ip where ip=#{ip}" }) 24 | Ip get(final String ip); 25 | 26 | @Insert({ "insert into ip(ip,region,city,isp,curtime) values(#{ip},#{region},#{city},#{isp},now())" }) 27 | int insertIp(final Ip ip); 28 | 29 | @Select({ "select city as name,count(*) as num from ip group by city order by num desc limit 5" }) 30 | List listTop5City(); 31 | 32 | @Select({ "select isp as name,count(*) as num from ip group by isp order by num desc limit 5" }) 33 | List listTop5Isp(); 34 | 35 | @Select({ "select DATE_FORMAT(curtime,'%Y-%m') as name,count(*) as num from ip where curtime>#{time} group by name order by name desc limit 5" }) 36 | List listMonth5(@Param("time") final Timestamp time); 37 | 38 | @Select({ "select DATE_FORMAT(curtime,'%Y-%m-%d') as name,count(*) as num from ip where curtime>#{time} group by name order by name desc limit 5" }) 39 | List listDay5(@Param("time") final Timestamp time); 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/LetterDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Letter; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | import java.util.List; 7 | 8 | @Mapper 9 | @Repository 10 | public interface LetterDao { 11 | @Select({ "select * from letter where lid<#{lid} order by lid desc limit #{number}" }) 12 | List listLetter(@Param("lid") final int lid, @Param("number") final int number); 13 | 14 | @Select({ "SELECT * FROM letter AS t1 JOIN (SELECT ROUND(RAND() * (SELECT MAX(lid)-#{number} FROM letter)) AS lid) AS t2 WHERE t1.lid >= t2.lid ORDER BY t1.lid ASC LIMIT #{number}" }) 15 | List listByRand(@Param("number") final int number); 16 | 17 | @Insert({ "insert into letter(nickname,content,ip,email,pubtime) values(#{nickname},#{content},#{ip},#{email},now())" }) 18 | int insertLetter(final Letter letter); 19 | 20 | @Update({ "update `letter` set nickname=#{nickname},content=#{content} where lid=#{lid}" }) 21 | int updateLetter(final Letter letter); 22 | 23 | @Update({ "update letter set zan=zan+1 where lid=#{lid}" }) 24 | int zanLetter(@Param("lid") final int lid); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/LinkDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Link; 4 | import cn.fengyunxiao.nest.entity.Reply; 5 | import org.apache.ibatis.annotations.*; 6 | import org.springframework.stereotype.Repository; 7 | import java.util.List; 8 | 9 | @Mapper 10 | @Repository 11 | public interface LinkDao { 12 | @Insert({ "insert into `link`(`href`,`title`,`rank`) " + 13 | " values(#{href},#{title},#{rank})" }) 14 | int insert(Link link); 15 | 16 | @Select({ "select * from `link` order by `rank` asc" }) 17 | List listLink(); 18 | 19 | @Select({ "select * from `link` where href=#{href} limit 1" }) 20 | Link getLink(@Param("href") String href); 21 | 22 | @Delete({"delete from `link` where `href` = #{href}"}) 23 | int delete(@Param("href") String href); 24 | 25 | @Update("update `link` set `rank`=#{rank},`title`=#{title} " + 26 | "where `href`=#{href}") 27 | int update(Link link); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/ReplyDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Reply; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | import java.util.List; 7 | 8 | @Mapper 9 | @Repository 10 | public interface ReplyDao { 11 | @Insert({ "insert into reply(lid,nickname,content,ip,curtime) values(#{lid},#{nickname},#{content},#{ip},#{curtime})" }) 12 | int insert(final Reply reply); 13 | 14 | @Select({ "" }) 15 | List listByLid(@Param("lids") final List lids); 16 | 17 | @Select({ "select * from reply where replyid<#{replyid} order by replyid desc limit #{number}" }) 18 | List listReply(@Param("replyid") final int replyid, @Param("number") final int number); 19 | 20 | @Update({ "update `reply` set nickname=#{nickname},content=#{content} where replyid=#{replyid}" }) 21 | int updateReply(final Reply reply); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/dao/TimelineDao.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.dao; 2 | 3 | import cn.fengyunxiao.nest.entity.Timeline; 4 | import org.springframework.stereotype.*; 5 | import org.apache.ibatis.annotations.*; 6 | import java.util.List; 7 | 8 | @Mapper 9 | @Repository 10 | public interface TimelineDao { 11 | @Insert({ "insert into `timeline`(year,title,content1,content2,content3) values(#{year},#{title},#{content1},#{content2},#{content3})" }) 12 | int insertTimeline(final Timeline timeline); 13 | 14 | @Update({ "update `timeline` set year=#{year},title=#{title},content1=#{content1},content2=#{content2},content3=#{content3} where lineid=#{lineid}" }) 15 | int updateTimeline(final Timeline timeline); 16 | 17 | @Select({ "select * from `timeline` order by year desc" }) 18 | List listTimeline(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Blog.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.io.Serializable; 4 | import java.sql.Timestamp; 5 | 6 | public class Blog implements Serializable { 7 | private Integer bid; 8 | private Byte rank; 9 | private String title; 10 | private String keyword; 11 | private String content; 12 | private Timestamp modtime; 13 | private String url; 14 | 15 | public Integer getBid() { 16 | return bid; 17 | } 18 | 19 | public void setBid(Integer bid) { 20 | this.bid = bid; 21 | } 22 | 23 | public Byte getRank() { 24 | return rank; 25 | } 26 | 27 | public void setRank(Byte rank) { 28 | this.rank = rank; 29 | } 30 | 31 | public String getTitle() { 32 | return title; 33 | } 34 | 35 | public void setTitle(String title) { 36 | this.title = title; 37 | } 38 | 39 | public String getKeyword() { 40 | return keyword; 41 | } 42 | 43 | public void setKeyword(String keyword) { 44 | this.keyword = keyword; 45 | } 46 | 47 | public String getContent() { 48 | return content; 49 | } 50 | 51 | public void setContent(String content) { 52 | this.content = content; 53 | } 54 | 55 | public Timestamp getModtime() { 56 | return modtime; 57 | } 58 | 59 | public void setModtime(Timestamp modtime) { 60 | this.modtime = modtime; 61 | } 62 | 63 | public String getUrl() { 64 | return url; 65 | } 66 | 67 | public void setUrl(String url) { 68 | this.url = url; 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Chart.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | /** 4 | * name 名称 5 | * value 数量 6 | */ 7 | public class Chart { 8 | private String name; 9 | private Integer num; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | 19 | public Integer getNum() { 20 | return num; 21 | } 22 | 23 | public void setNum(Integer num) { 24 | this.num = num; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "Chart{" + 30 | "name='" + name + '\'' + 31 | ", num=" + num + 32 | '}'; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Chat.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class Chat { 6 | private Integer cid; 7 | private Byte male; // 性别,0宝宝,1我,2游客 8 | private String content; 9 | private Timestamp pubtime; 10 | 11 | public Integer getCid() { 12 | return cid; 13 | } 14 | 15 | public void setCid(Integer cid) { 16 | this.cid = cid; 17 | } 18 | 19 | public Byte getMale() { 20 | return male; 21 | } 22 | 23 | public void setMale(Byte male) { 24 | this.male = male; 25 | } 26 | 27 | public String getContent() { 28 | return content; 29 | } 30 | 31 | public void setContent(String content) { 32 | this.content = content; 33 | } 34 | 35 | public Timestamp getPubtime() { 36 | return pubtime; 37 | } 38 | 39 | public void setPubtime(Timestamp pubtime) { 40 | this.pubtime = pubtime; 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | return "Chat{" + 46 | "cid=" + cid + 47 | '}'; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Image.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.sql.Timestamp; 4 | 5 | public class Image { 6 | private Integer iid; 7 | private Integer bid; // <0 bid,-1小相册 8 | private String name; 9 | private Timestamp pubtime; 10 | 11 | public Integer getIid() { 12 | return iid; 13 | } 14 | 15 | public void setIid(Integer iid) { 16 | this.iid = iid; 17 | } 18 | 19 | public Integer getBid() { 20 | return bid; 21 | } 22 | 23 | public void setBid(Integer bid) { 24 | this.bid = bid; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | 35 | public Timestamp getPubtime() { 36 | return pubtime; 37 | } 38 | 39 | public void setPubtime(Timestamp pubtime) { 40 | this.pubtime = pubtime; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Install.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | public class Install { 4 | private String key; 5 | private String value; 6 | private String intro; 7 | 8 | public String getKey() { 9 | return key; 10 | } 11 | 12 | public void setKey(String key) { 13 | this.key = key; 14 | } 15 | 16 | public String getValue() { 17 | return value; 18 | } 19 | 20 | public void setValue(String value) { 21 | this.value = value; 22 | } 23 | 24 | public String getIntro() { 25 | return intro; 26 | } 27 | 28 | public void setIntro(String intro) { 29 | this.intro = intro; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Ip.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.io.Serializable; 4 | import java.sql.Timestamp; 5 | 6 | public class Ip implements Serializable { 7 | private Integer iid; 8 | private String ip; 9 | private String region; 10 | private String city; 11 | private String isp; 12 | private Timestamp curtime; 13 | 14 | public Integer getIid() { 15 | return iid; 16 | } 17 | 18 | public void setIid(Integer iid) { 19 | this.iid = iid; 20 | } 21 | 22 | public String getIp() { 23 | return ip; 24 | } 25 | 26 | public void setIp(String ip) { 27 | this.ip = ip; 28 | } 29 | 30 | public String getRegion() { 31 | return region; 32 | } 33 | 34 | public void setRegion(String region) { 35 | this.region = region; 36 | } 37 | 38 | public String getCity() { 39 | return city; 40 | } 41 | 42 | public void setCity(String city) { 43 | this.city = city; 44 | } 45 | 46 | public String getIsp() { 47 | return isp; 48 | } 49 | 50 | public void setIsp(String isp) { 51 | this.isp = isp; 52 | } 53 | 54 | public Timestamp getCurtime() { 55 | return curtime; 56 | } 57 | 58 | public void setCurtime(Timestamp curtime) { 59 | this.curtime = curtime; 60 | } 61 | 62 | @Override 63 | public String toString() { 64 | return "Ip{" + 65 | "iid=" + iid + 66 | ", ip='" + ip + '\'' + 67 | ", region='" + region + '\'' + 68 | ", city='" + city + '\'' + 69 | ", isp='" + isp + '\'' + 70 | ", curtime=" + curtime + 71 | '}'; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Letter.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.io.Serializable; 4 | import java.sql.Timestamp; 5 | 6 | public class Letter implements Serializable { 7 | private Integer lid; 8 | private Integer zan; 9 | private String nickname; 10 | private String content; 11 | private String ip; 12 | private String email; 13 | private Timestamp pubtime; 14 | 15 | public Integer getLid() { 16 | return lid; 17 | } 18 | 19 | public void setLid(Integer lid) { 20 | this.lid = lid; 21 | } 22 | 23 | public Integer getZan() { 24 | return zan; 25 | } 26 | 27 | public void setZan(Integer zan) { 28 | this.zan = zan; 29 | } 30 | 31 | public String getNickname() { 32 | return nickname; 33 | } 34 | 35 | public void setNickname(String nickname) { 36 | this.nickname = nickname; 37 | } 38 | 39 | public String getContent() { 40 | return content; 41 | } 42 | 43 | public void setContent(String content) { 44 | this.content = content; 45 | } 46 | 47 | public String getIp() { 48 | return ip; 49 | } 50 | 51 | public void setIp(String ip) { 52 | this.ip = ip; 53 | } 54 | 55 | public String getEmail() { return email; } 56 | 57 | public void setEmail(String email) { this.email = email; } 58 | 59 | public Timestamp getPubtime() { 60 | return pubtime; 61 | } 62 | 63 | public void setPubtime(Timestamp pubtime) { 64 | this.pubtime = pubtime; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/LetterAndReply.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | public class LetterAndReply implements Serializable { 8 | private Letter letter; 9 | private List replies = new ArrayList<>(); 10 | 11 | public Letter getLetter() { 12 | return letter; 13 | } 14 | public void setLetter(Letter letter) { 15 | this.letter = letter; 16 | } 17 | public List getReplies() { 18 | return replies; 19 | } 20 | public void setReplies(List replies) { 21 | this.replies = replies; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Link.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | public class Link { 4 | private String title; 5 | private String href; 6 | private Integer rank; 7 | 8 | public String getTitle() { 9 | return title; 10 | } 11 | 12 | public void setTitle(String title) { 13 | this.title = title; 14 | } 15 | 16 | public String getHref() { return href; } 17 | 18 | public void setHref(String href) { this.href = href; } 19 | 20 | public Integer getRank() { return rank; } 21 | 22 | public void setRank(Integer rank) { this.rank = rank; } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Reply.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.io.Serializable; 4 | import java.sql.Timestamp; 5 | 6 | public class Reply implements Serializable { 7 | private Integer replyid; 8 | private Integer lid; 9 | private String nickname; 10 | private String content; 11 | private String ip; 12 | private Timestamp curtime; 13 | 14 | public Integer getReplyid() { 15 | return replyid; 16 | } 17 | 18 | public void setReplyid(Integer replyid) { 19 | this.replyid = replyid; 20 | } 21 | 22 | public Integer getLid() { 23 | return lid; 24 | } 25 | 26 | public void setLid(Integer lid) { 27 | this.lid = lid; 28 | } 29 | 30 | public String getNickname() { 31 | return nickname; 32 | } 33 | 34 | public void setNickname(String nickname) { 35 | this.nickname = nickname; 36 | } 37 | 38 | public String getContent() { 39 | return content; 40 | } 41 | 42 | public void setContent(String content) { 43 | this.content = content; 44 | } 45 | 46 | public String getIp() { 47 | return ip; 48 | } 49 | 50 | public void setIp(String ip) { 51 | this.ip = ip; 52 | } 53 | 54 | public Timestamp getCurtime() { 55 | return curtime; 56 | } 57 | 58 | public void setCurtime(Timestamp curtime) { 59 | this.curtime = curtime; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/entity/Timeline.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Timeline implements Serializable { 6 | private Integer lineid; 7 | private Integer year; 8 | private String title; 9 | private String content1; 10 | private String content2; 11 | private String content3; 12 | 13 | public Integer getLineid() { 14 | return this.lineid; 15 | } 16 | 17 | public void setLineid(final Integer lineid) { 18 | this.lineid = lineid; 19 | } 20 | 21 | public Integer getYear() { 22 | return this.year; 23 | } 24 | 25 | public void setYear(final Integer year) { 26 | this.year = year; 27 | } 28 | 29 | public String getTitle() { 30 | return this.title; 31 | } 32 | 33 | public void setTitle(final String title) { 34 | this.title = title; 35 | } 36 | 37 | public String getContent1() { 38 | return this.content1; 39 | } 40 | 41 | public void setContent1(final String content1) { 42 | this.content1 = content1; 43 | } 44 | 45 | public String getContent2() { 46 | return this.content2; 47 | } 48 | 49 | public void setContent2(final String content2) { 50 | this.content2 = content2; 51 | } 52 | 53 | public String getContent3() { 54 | return this.content3; 55 | } 56 | 57 | public void setContent3(final String content3) { 58 | this.content3 = content3; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/service/ImageService.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.service; 2 | 3 | import cn.fengyunxiao.nest.config.Config; 4 | import cn.fengyunxiao.nest.dao.ImageDao; 5 | import cn.fengyunxiao.nest.entity.Image; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Propagation; 9 | import org.springframework.transaction.annotation.Transactional; 10 | import java.util.List; 11 | 12 | @Service 13 | public class ImageService { 14 | @Autowired 15 | private ImageDao imageDao; 16 | 17 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 18 | public List list(Integer iid, Integer per) { 19 | if (iid == null || iid <= 0) { 20 | iid = Integer.MAX_VALUE; 21 | } 22 | if (per == null || per > 16) { 23 | per = 16; 24 | } 25 | final List images = this.imageDao.listUploadImage(iid, per); 26 | for (final Image image : images) { 27 | image.setName(Config.ossUrlPrefix + image.getName()); 28 | } 29 | return images; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/service/IndexService.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | @Service 6 | public class IndexService { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/service/LinkService.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.service; 2 | 3 | import cn.fengyunxiao.nest.dao.LinkDao; 4 | import cn.fengyunxiao.nest.entity.Link; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Propagation; 8 | import org.springframework.transaction.annotation.Transactional; 9 | import java.util.List; 10 | 11 | @Service 12 | public class LinkService { 13 | @Autowired 14 | private LinkDao linkDao; 15 | 16 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 17 | public List getLink() { 18 | return this.linkDao.listLink(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/task/AsyncTaskConfig.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.task; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.scheduling.annotation.EnableAsync; 6 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 7 | import java.util.concurrent.Executor; 8 | 9 | @Configuration 10 | @EnableAsync 11 | public class AsyncTaskConfig { 12 | 13 | @Bean 14 | public Executor taskExecutor() { 15 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 16 | executor.setCorePoolSize(5); 17 | executor.setKeepAliveSeconds(1800); 18 | executor.setMaxPoolSize(20); 19 | executor.setQueueCapacity(10); 20 | executor.initialize(); 21 | return executor; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/task/TimeTask.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.task; 2 | 3 | import cn.fengyunxiao.nest.config.Config; 4 | import cn.fengyunxiao.nest.config.FirstPage; 5 | import cn.fengyunxiao.nest.entity.Link; 6 | import cn.fengyunxiao.nest.service.IpService; 7 | import cn.fengyunxiao.nest.service.LinkService; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.scheduling.annotation.Async; 12 | import org.springframework.scheduling.annotation.Scheduled; 13 | import org.springframework.stereotype.Component; 14 | import javax.servlet.ServletContext; 15 | import java.util.List; 16 | import java.util.Timer; 17 | import java.util.TimerTask; 18 | 19 | @Component 20 | public class TimeTask { 21 | private static final Logger logger = LoggerFactory.getLogger(TimeTask.class); 22 | @Autowired private IpService ipService; 23 | @Autowired private LinkService linkService; 24 | @Autowired private ServletContext servletContext; 25 | 26 | @Async 27 | @Scheduled(fixedDelay = 3600000L) 28 | public void do1hour() { 29 | new Timer().schedule(new TimerTask() { 30 | @Override 31 | public void run() { 32 | ipService.resetChart(); 33 | } 34 | }, 3000L); 35 | } 36 | 37 | @Async 38 | @Scheduled(fixedDelay = 86400000L) 39 | public void do1Day() { 40 | if (servletContext != null) { 41 | List links = this.linkService.getLink(); 42 | servletContext.setAttribute(Config.servletFirstpage, new FirstPage(links)); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/util/Jackson.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.util; 2 | 3 | import com.fasterxml.jackson.core.JsonProcessingException; 4 | import com.fasterxml.jackson.databind.ObjectMapper; 5 | import java.io.IOException; 6 | 7 | public class Jackson { 8 | private static final ObjectMapper mapper = new ObjectMapper(); 9 | 10 | private Jackson() { 11 | } 12 | 13 | public static ObjectMapper getObjectMapper() { 14 | return mapper; 15 | } 16 | 17 | public static String toJson(Object object) throws JsonProcessingException { 18 | return mapper.writeValueAsString(object); 19 | } 20 | 21 | public static T toObject(String string, Class T) throws IOException { 22 | return mapper.readValue(string, T); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/util/Util.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.util; 2 | 3 | import java.util.UUID; 4 | 5 | public class Util { 6 | 7 | public static boolean isBlank(String str) { 8 | return str == null || str.trim().equals(""); 9 | } 10 | 11 | public static void main(String[] args) { 12 | System.out.println(UUID.randomUUID().toString()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/cn/fengyunxiao/nest/util/XssUtil.java: -------------------------------------------------------------------------------- 1 | package cn.fengyunxiao.nest.util; 2 | 3 | public class XssUtil { 4 | 5 | // html 英文字符过滤成中文 6 | public static String replaceHtmlToFull(String chars) { 7 | if (chars == null || chars.trim().isEmpty()) { 8 | return null; 9 | } 10 | 11 | chars = chars.replace("<", "<"); 12 | chars = chars.replace(">", ">"); 13 | chars = chars.replace("&", "﹠"); 14 | chars = chars.replace("\"", """); 15 | chars = chars.replace("/", "/"); 16 | chars = chars.replace("\\", "\"); 17 | return chars; 18 | } 19 | 20 | // 将 html 标签进行转义 21 | public static String replaceHtmlToEsc(String chars) { 22 | if (chars == null) { 23 | return ""; 24 | } 25 | 26 | chars = chars.replace("<", "<"); 27 | chars = chars.replace(">", ">"); 28 | return chars; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | # profiles: 3 | # active: prod 4 | datasource: 5 | username: root 6 | password: root 7 | driver-class-name: com.mysql.cj.jdbc.Driver 8 | url: jdbc:mysql://127.0.0.1:3306/nest?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8 9 | freemarker: 10 | cache: true 11 | settings: 12 | number_format: 0.###### 13 | suffix: .ftl 14 | servlet: 15 | multipart: 16 | max-file-size: 10MB 17 | max-request-size: 20MB 18 | jackson: 19 | date-format: yyyy-MM-dd HH:mm:ss 20 | time-zone: GMT+8 21 | redis: 22 | port: 6379 23 | host: 127.0.0.1 24 | database: 1 25 | 26 | mail: 27 | port: 465 28 | host: smtp.ym.163.com 29 | username: xxxx@fengyunxiao.cn 30 | password: password 31 | default-encoding: UTF-8 32 | properties: 33 | mail: 34 | smtp: 35 | ssl: 36 | enable: true 37 | socketFactory: 38 | port: 465 39 | class: javax.net.ssl.SSLSocketFactory 40 | auth: true 41 | starttls: 42 | enable: true 43 | required: true 44 | 45 | mybatis: 46 | type-aliases-package: cn.fengyunxiao.nest.entity 47 | configuration: 48 | map-underscore-to-camel-case: false 49 | 50 | # 用到 ssl 可以根据自己的配置 51 | #server: 52 | # port: 443 53 | # ssl: 54 | # key-store: classpath:www.fengyunxiao.cn.jks 55 | # key-store-password: love13625 56 | # key-store-type: JKS 57 | # key-alias: 1 58 | # compression: 59 | # enabled: true 60 | # min-response-size: 512 61 | # max-http-header-size: 102400 62 | 63 | logging: 64 | level: 65 | root: info 66 | -------------------------------------------------------------------------------- /src/main/resources/static/css/admin_commen.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .container {padding-top: 1.6rem;padding-bottom: 1.6rem;} 4 | 5 | .row-between { 6 | display: flex;flex-direction: row;justify-content: space-between; 7 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/commen.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .main { 4 | padding-bottom: 20px; 5 | } 6 | 7 | .bg-pink { 8 | background-color: #FCC; 9 | } 10 | 11 | .text-pink { 12 | color: #F66; 13 | } 14 | 15 | .footer { 16 | color: #AAA; 17 | padding: 40px 0; 18 | } 19 | 20 | .footer h4 { 21 | text-align: center; 22 | color: #FFF; 23 | } 24 | 25 | .footer ul li, footer p { 26 | text-align: center; 27 | font-size: 1em; 28 | } 29 | 30 | .footer h4 { 31 | font-size: 1.4rem; 32 | } 33 | 34 | .footer a { 35 | color: #AAA 36 | } 37 | 38 | .footer-top .about > div { 39 | height: 110px; 40 | margin-bottom: 10px; 41 | } 42 | 43 | .text-center { 44 | width: 100%; 45 | } 46 | 47 | .jumbotron_linear { 48 | border-radius: 0; 49 | background-color: #F99; 50 | margin-bottom: 0; 51 | background: linear-gradient(to bottom right, #F66, #FFF); 52 | } -------------------------------------------------------------------------------- /src/main/resources/static/css/ip.css: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | border-radius: 0; 3 | background-color: #F99; 4 | background: linear-gradient(to bottom right, #F66, #FFF); 5 | margin-bottom: 0; 6 | } 7 | 8 | .main {padding-top: 3.5rem;} 9 | 10 | /* 表格分红背景色 */ 11 | .table-pink {margin-bottom: 3rem;background-color: #FCC;} 12 | 13 | .table thead th { 14 | border-bottom: #F55; 15 | } 16 | 17 | .table-pink td, .table-pink th { 18 | border: 1.4px solid #F55; 19 | } 20 | 21 | .table-pink:hover > td, .table-pink:hover > th { 22 | background-color: #F55 23 | } 24 | 25 | .table-pink.table-striped tbody tr:nth-of-type(odd) { 26 | background-color: rgba(255, 255, 255, .15) 27 | } 28 | 29 | .table-pink.table-hover tbody tr:hover { 30 | background-color: rgba(255, 255, 255, .25) 31 | } 32 | 33 | .page-item.active .page-link { 34 | color: #fff; 35 | background-color: #FAA; 36 | border-color: #F88 37 | } 38 | 39 | .page-link { 40 | color: #F55; 41 | background-color: #fff; 42 | border: 1px solid #FCC 43 | } 44 | 45 | .page-link:hover { 46 | color: #F55; 47 | background-color: #FEE; 48 | border-color: #F88 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | *.pid 4 | *.seed 5 | node_modules/ 6 | .sass-cache/ 7 | research/ 8 | test/ 9 | backup/ 10 | examples/uploads/**/* 11 | *.bat 12 | *.sh 13 | .project 14 | .url 15 | css/*.map -------------------------------------------------------------------------------- /src/main/resources/static/editormd/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi": true, 3 | "esnext": true, 4 | "bitwise": true, 5 | "camelcase": true, 6 | "curly": true, 7 | "eqeqeq": true, 8 | "immed": true, 9 | "indent": 2, 10 | "latedef": true, 11 | "newcap": true, 12 | "noarg": true, 13 | "quotmark": "singlequote", 14 | "regexp": true, 15 | "undef": false, 16 | "unused": false, 17 | "strict": true, 18 | "trailing": true, 19 | "smarttabs": true, 20 | "white": true, 21 | "laxbreak": true 22 | } 23 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/TODOs.md: -------------------------------------------------------------------------------- 1 | 1. 增加链接为新页面打开的配置项 2 | 2. 处理上传图片接受的文件类型 3 | 3. 增加粘贴图片上传功能 #524/#519 4 | 4. 点击事件判断错误 #526 5 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "editor.md", 3 | "version": "1.5.0", 4 | "homepage": "https://github.com/pandao/editor.md", 5 | "authors": [ 6 | "Pandao " 7 | ], 8 | "description": "Open source online markdown editor.", 9 | "keywords": [ 10 | "editor.md", 11 | "markdown", 12 | "editor" 13 | ], 14 | "license": "MIT", 15 | "ignore": [ 16 | "**/.*", 17 | "research", 18 | "docs", 19 | "node_modules", 20 | "bower_components", 21 | "test", 22 | "tests" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/css/editormd.logo.min.css: -------------------------------------------------------------------------------- 1 | /*! Editor.md v2.0.1 | editormd.logo.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2018-03-29 */ 2 | /*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h) format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h) format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h) format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon) format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3} -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/docs/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/docs/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | 31 | 32 |
33 | 34 |
35 | Documentation generated by JSDoc 3.3.0 on Mon Jun 08 2015 01:07:40 36 | GMT+0800 (中国标准时间) 37 |
38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/editormd-logo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/editormd-logo.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/editormd-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/editormd-logo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/editormd-logo.ttf -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/editormd-logo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/editormd-logo.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/editormd/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/loading@2x.gif -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/loading@3x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/loading@3x.gif -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-favicon-16x16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-favicon-16x16.ico -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-favicon-24x24.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-favicon-24x24.ico -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-favicon-32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-favicon-32x32.ico -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-favicon-48x48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-favicon-48x48.ico -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-favicon-64x64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-favicon-64x64.ico -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-114x114.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-120x120.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-144x144.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-16x16.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-180x180.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-240x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-240x240.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-24x24.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-320x320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-320x320.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-32x32.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-48x48.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-57x57.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-64x64.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-72x72.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/editormd-logo-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/editormd-logo-96x96.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/images/logos/vi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/editormd/images/logos/vi.png -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Marijn Haverbeke and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; 4 | right: 0; 5 | background: white; 6 | z-index: 15; 7 | padding: .1em .8em; 8 | overflow: hidden; 9 | color: #333; 10 | } 11 | 12 | .CodeMirror-dialog-top { 13 | border-bottom: 1px solid #eee; 14 | top: 0; 15 | } 16 | 17 | .CodeMirror-dialog-bottom { 18 | border-top: 1px solid #eee; 19 | bottom: 0; 20 | } 21 | 22 | .CodeMirror-dialog input { 23 | border: none; 24 | outline: none; 25 | background: transparent; 26 | width: 20em; 27 | color: inherit; 28 | font-family: monospace; 29 | } 30 | 31 | .CodeMirror-dialog button { 32 | font-size: 70%; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | right: 0; 6 | bottom: 0; 7 | height: auto; 8 | z-index: 9; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 = { 24 | scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, 25 | width: wrap.style.width, height: wrap.style.height 26 | }; 27 | wrap.style.width = ""; 28 | wrap.style.height = "auto"; 29 | wrap.className += " CodeMirror-fullscreen"; 30 | document.documentElement.style.overflow = "hidden"; 31 | cm.refresh(); 32 | } 33 | 34 | function setNormal(cm) { 35 | var wrap = cm.getWrapperElement(); 36 | wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); 37 | document.documentElement.style.overflow = ""; 38 | var info = cm.state.fullScreenRestore; 39 | wrap.style.width = info.width; 40 | wrap.style.height = info.height; 41 | window.scrollTo(info.scrollLeft, info.scrollTop); 42 | cm.refresh(); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/edit/continuelist.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\s*)/, 15 | emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)\.)(\s*)$/, 16 | unorderedListRE = /[*+-]\s/; 17 | 18 | CodeMirror.commands.newlineAndIndentContinueMarkdownList = function (cm) { 19 | if (cm.getOption("disableInput")) return CodeMirror.Pass; 20 | var ranges = cm.listSelections(), replacements = []; 21 | for (var i = 0; i < ranges.length; i++) { 22 | var pos = ranges[i].head, match; 23 | var eolState = cm.getStateAfter(pos.line); 24 | var inList = eolState.list !== false; 25 | var inQuote = eolState.quote !== false; 26 | 27 | if (!ranges[i].empty() || (!inList && !inQuote) || !(match = cm.getLine(pos.line).match(listRE))) { 28 | cm.execCommand("newlineAndIndent"); 29 | return; 30 | } 31 | if (cm.getLine(pos.line).match(emptyListRE)) { 32 | cm.replaceRange("", { 33 | line: pos.line, ch: 0 34 | }, { 35 | line: pos.line, ch: pos.ch + 1 36 | }); 37 | replacements[i] = "\n"; 38 | 39 | } else { 40 | var indent = match[1], after = match[4]; 41 | var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0 42 | ? match[2] 43 | : (parseInt(match[3], 10) + 1) + "."; 44 | 45 | replacements[i] = "\n" + indent + bullet + after; 46 | } 47 | } 48 | 49 | cm.replaceSelections(replacements); 50 | }; 51 | }); 52 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | } 21 | if (i > stream.pos) { 22 | stream.pos = i; 23 | return null; 24 | } 25 | stream.pos = l; 26 | return "trailingspace"; 27 | }, 28 | name: "trailingspace" 29 | }); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | 9 | .CodeMirror-foldgutter { 10 | width: .7em; 11 | } 12 | 13 | .CodeMirror-foldgutter-open, 14 | .CodeMirror-foldgutter-folded { 15 | cursor: pointer; 16 | } 17 | 18 | .CodeMirror-foldgutter-open:after { 19 | content: "\25BE"; 20 | } 21 | 22 | .CodeMirror-foldgutter-folded:after { 23 | content: "\25B8"; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/fold/indent-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerHelper("fold", "indent", function (cm, start) { 15 | var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); 16 | if (!/\S/.test(firstLine)) return; 17 | var getIndent = function (line) { 18 | return CodeMirror.countColumn(line, null, tabSize); 19 | }; 20 | var myIndent = getIndent(firstLine); 21 | var lastLineInFold = null; 22 | // Go through lines until we find a line that definitely doesn't belong in 23 | // the block we're folding, or to the end. 24 | for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) { 25 | var curLine = cm.getLine(i); 26 | var curIndent = getIndent(curLine); 27 | if (curIndent > myIndent) { 28 | // Lines with a greater indent are considered part of the block. 29 | lastLineInFold = i; 30 | } else if (!/\S/.test(curLine)) { 31 | // Empty lines might be breaks within the block we're trying to fold. 32 | } else { 33 | // A non-empty line at an indent equal to or less than ours marks the 34 | // start of another block. 35 | break; 36 | } 37 | } 38 | if (lastLineInFold) return { 39 | from: CodeMirror.Pos(start.line, firstLine.length), 40 | to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length) 41 | }; 42 | }); 43 | 44 | }); 45 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/fold/markdown-fold.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.registerHelper("fold", "markdown", function (cm, start) { 15 | var maxDepth = 100; 16 | 17 | function isHeader(lineNo) { 18 | var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0)); 19 | return tokentype && /\bheader\b/.test(tokentype); 20 | } 21 | 22 | function headerLevel(lineNo, line, nextLine) { 23 | var match = line && line.match(/^#+/); 24 | if (match && isHeader(lineNo)) return match[0].length; 25 | match = nextLine && nextLine.match(/^[=\-]+\s*$/); 26 | if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2; 27 | return maxDepth; 28 | } 29 | 30 | var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1); 31 | var level = headerLevel(start.line, firstLine, nextLine); 32 | if (level === maxDepth) return undefined; 33 | 34 | var lastLineNo = cm.lastLine(); 35 | var end = start.line, nextNextLine = cm.getLine(end + 2); 36 | while (end < lastLineNo) { 37 | if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break; 38 | ++end; 39 | nextLine = nextNextLine; 40 | nextNextLine = cm.getLine(end + 2); 41 | } 42 | 43 | return { 44 | from: CodeMirror.Pos(start.line, firstLine.length), 45 | to: CodeMirror.Pos(end, cm.getLine(end).length) 46 | }; 47 | }); 48 | 49 | }); 50 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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, 28 | endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir; 29 | for (; line != endLine; line += dir) { 30 | var text = editor.getLine(line), m; 31 | while (m = re.exec(text)) { 32 | if (line == cur.line && m[0] === curWord) continue; 33 | if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) { 34 | seen[m[0]] = true; 35 | list.push(m[0]); 36 | } 37 | } 38 | } 39 | } 40 | return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)}; 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); 12 | box-shadow: 2px 3px 5px rgba(0, 0, 0, .2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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({ 23 | from: CodeMirror.Pos(loc - 1, 0), 24 | to: CodeMirror.Pos(loc, 0), 25 | severity: err.level, 26 | message: err.message 27 | }); 28 | }; 29 | try { 30 | var res = coffeelint.lint(text); 31 | for (var i = 0; i < res.length; i++) { 32 | parseError(res[i]); 33 | } 34 | } catch (e) { 35 | found.push({ 36 | from: CodeMirror.Pos(e.location.first_line, 0), 37 | to: CodeMirror.Pos(e.location.last_line, e.location.last_column), 38 | severity: 'error', 39 | message: e.message 40 | }); 41 | } 42 | return found; 43 | }); 44 | 45 | }); 46 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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, 25 | endCol = message.col; 26 | found.push({ 27 | from: CodeMirror.Pos(startLine, startCol), 28 | to: CodeMirror.Pos(endLine, endCol), 29 | message: message.message, 30 | severity: message.type 31 | }); 32 | } 33 | return found; 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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({ 23 | from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), 24 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), 25 | message: str 26 | }); 27 | }; 28 | try { 29 | jsonlint.parse(text); 30 | } catch (e) { 31 | } 32 | return found; 33 | }); 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 { 21 | jsyaml.load(text); 22 | } catch (e) { 23 | var loc = e.mark; 24 | found.push({ 25 | from: CodeMirror.Pos(loc.line, loc.column), 26 | to: CodeMirror.Pos(loc.line, loc.column), 27 | message: e.message 28 | }); 29 | } 30 | return found; 31 | }); 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/mode/multiplex_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function () { 5 | CodeMirror.defineMode("markdown_with_stex", function () { 6 | var inner = CodeMirror.getMode({}, "stex"); 7 | var outer = CodeMirror.getMode({}, "markdown"); 8 | 9 | var innerOptions = { 10 | open: '$', 11 | close: '$', 12 | mode: inner, 13 | delimStyle: 'delim', 14 | innerStyle: 'inner' 15 | }; 16 | 17 | return CodeMirror.multiplexingMode(outer, innerOptions); 18 | }); 19 | 20 | var mode = CodeMirror.getMode({}, "markdown_with_stex"); 21 | 22 | function MT(name) { 23 | test.mode( 24 | name, 25 | mode, 26 | Array.prototype.slice.call(arguments, 1), 27 | 'multiplexing'); 28 | } 29 | 30 | MT( 31 | "stexInsideMarkdown", 32 | "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]"); 33 | })(); 34 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/runmode/colorize.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("./runmode")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "./runmode"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; 15 | 16 | function textContent(node, out) { 17 | if (node.nodeType == 3) return out.push(node.nodeValue); 18 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) { 19 | textContent(ch, out); 20 | if (isBlock.test(node.nodeType)) out.push("\n"); 21 | } 22 | } 23 | 24 | CodeMirror.colorize = function (collection, defaultMode) { 25 | if (!collection) collection = document.body.getElementsByTagName("pre"); 26 | 27 | for (var i = 0; i < collection.length; ++i) { 28 | var node = collection[i]; 29 | var mode = node.getAttribute("data-lang") || defaultMode; 30 | if (!mode) continue; 31 | 32 | var text = []; 33 | textContent(node, text); 34 | node.innerHTML = ""; 35 | CodeMirror.runMode(text.join(""), mode, node); 36 | 37 | node.className += " cm-s-default"; 38 | } 39 | }; 40 | }); 41 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/scroll/scrollpastend.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineOption("scrollPastEnd", false, function (cm, val, old) { 15 | if (old && old != CodeMirror.Init) { 16 | cm.off("change", onChange); 17 | cm.off("refresh", updateBottomMargin); 18 | cm.display.lineSpace.parentNode.style.paddingBottom = ""; 19 | cm.state.scrollPastEndPadding = null; 20 | } 21 | if (val) { 22 | cm.on("change", onChange); 23 | cm.on("refresh", updateBottomMargin); 24 | updateBottomMargin(cm); 25 | } 26 | }); 27 | 28 | function onChange(cm, change) { 29 | if (CodeMirror.changeEnd(change).line == cm.lastLine()) 30 | updateBottomMargin(cm); 31 | } 32 | 33 | function updateBottomMargin(cm) { 34 | var padding = ""; 35 | if (cm.lineCount() > 1) { 36 | var totalH = cm.display.scroller.clientHeight - 30, 37 | lastLineH = cm.getLineHandle(cm.lastLine()).height; 38 | padding = (totalH - lastLineH) + "px"; 39 | } 40 | if (cm.state.scrollPastEndPadding != padding) { 41 | cm.state.scrollPastEndPadding = padding; 42 | cm.display.lineSpace.parentNode.style.paddingBottom = padding; 43 | cm.setSize(); 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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; 18 | left: 0; 19 | height: 8px; 20 | } 21 | 22 | .CodeMirror-simplescroll-horizontal div { 23 | bottom: 0; 24 | height: 100%; 25 | } 26 | 27 | .CodeMirror-simplescroll-vertical { 28 | right: 0; 29 | top: 0; 30 | width: 8px; 31 | } 32 | 33 | .CodeMirror-simplescroll-vertical div { 34 | right: 0; 35 | width: 100%; 36 | } 37 | 38 | 39 | .CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler { 40 | display: none; 41 | } 42 | 43 | .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { 44 | position: absolute; 45 | background: #bcd; 46 | border-radius: 3px; 47 | } 48 | 49 | .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { 50 | position: absolute; 51 | z-index: 6; 52 | } 53 | 54 | .CodeMirror-overlayscroll-horizontal { 55 | bottom: 0; 56 | left: 0; 57 | height: 6px; 58 | } 59 | 60 | .CodeMirror-overlayscroll-horizontal div { 61 | bottom: 0; 62 | height: 100%; 63 | } 64 | 65 | .CodeMirror-overlayscroll-vertical { 66 | right: 0; 67 | top: 0; 68 | width: 6px; 69 | } 70 | 71 | .CodeMirror-overlayscroll-vertical div { 72 | right: 0; 73 | width: 100%; 74 | } 75 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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": 12 | return startServer(data.defs, data.plugins, data.scripts); 13 | case "add": 14 | return server.addFile(data.name, data.text); 15 | case "del": 16 | return server.delFile(data.name); 17 | case "req": 18 | return server.request(data.body, function (err, reqData) { 19 | postMessage({id: data.id, body: reqData, err: err && String(err)}); 20 | }); 21 | case "getFile": 22 | var c = pending[data.id]; 23 | delete pending[data.id]; 24 | return c(data.err, data.text); 25 | default: 26 | throw new Error("Unknown message type: " + data.type); 27 | } 28 | }; 29 | 30 | var nextId = 0, pending = {}; 31 | 32 | function getFile(file, c) { 33 | postMessage({type: "getFile", name: file, id: ++nextId}); 34 | pending[nextId] = c; 35 | } 36 | 37 | function startServer(defs, plugins, scripts) { 38 | if (scripts) importScripts.apply(null, scripts); 39 | 40 | server = new tern.Server({ 41 | getFile: getFile, 42 | async: true, 43 | defs: defs, 44 | plugins: plugins 45 | }); 46 | } 47 | 48 | var console = { 49 | log: function (v) { 50 | postMessage({type: "debug", message: v}); 51 | } 52 | }; 53 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version": "5.0.0", 4 | "main": [ 5 | "lib/codemirror.js", 6 | "lib/codemirror.css" 7 | ], 8 | "ignore": [ 9 | "**/.*", 10 | "node_modules", 11 | "components", 12 | "bin", 13 | "demo", 14 | "doc", 15 | "test", 16 | "index.html", 17 | "package.json" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/css/less_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 | "use strict"; 6 | 7 | var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less"); 8 | 9 | function MT(name) { 10 | test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); 11 | } 12 | 13 | MT("variable", 14 | "[variable-2 @base]: [atom #f04615];", 15 | "[qualifier .class] {", 16 | " [property width]: [variable percentage]([number 0.5]); [comment // returns `50%`]", 17 | " [property color]: [variable saturate]([variable-2 @base], [number 5%]);", 18 | "}"); 19 | 20 | MT("amp", 21 | "[qualifier .child], [qualifier .sibling] {", 22 | " [qualifier .parent] [atom &] {", 23 | " [property color]: [keyword black];", 24 | " }", 25 | " [atom &] + [atom &] {", 26 | " [property color]: [keyword red];", 27 | " }", 28 | "}"); 29 | 30 | MT("mixin", 31 | "[qualifier .mixin] ([variable dark]; [variable-2 @color]) {", 32 | " [property color]: [variable darken]([variable-2 @color], [number 10%]);", 33 | "}", 34 | "[qualifier .mixin] ([variable light]; [variable-2 @color]) {", 35 | " [property color]: [variable lighten]([variable-2 @color], [number 10%]);", 36 | "}", 37 | "[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {", 38 | " [property display]: [atom block];", 39 | "}", 40 | "[variable-2 @switch]: [variable light];", 41 | "[qualifier .class] {", 42 | " [qualifier .mixin]([variable-2 @switch]; [atom #888]);", 43 | "}"); 44 | 45 | MT("nest", 46 | "[qualifier .one] {", 47 | " [def @media] ([property width]: [number 400px]) {", 48 | " [property font-size]: [number 1.2em];", 49 | " [def @media] [attribute print] [keyword and] [property color] {", 50 | " [property color]: [keyword blue];", 51 | " }", 52 | " }", 53 | "}"); 54 | })(); 55 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/dart/dart.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("../clike/clike")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "../clike/clike"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | var keywords = ("this super static final const abstract class extends external factory " + 15 | "implements get native operator set typedef with enum throw rethrow " + 16 | "assert break case continue default in return new deferred async await " + 17 | "try catch finally do else for if switch while import library export " + 18 | "part of show hide is").split(" "); 19 | var blockKeywords = "try catch finally do else for if switch while".split(" "); 20 | var atoms = "true false null".split(" "); 21 | var builtins = "void bool num int double dynamic var String".split(" "); 22 | 23 | function set(words) { 24 | var obj = {}; 25 | for (var i = 0; i < words.length; ++i) obj[words[i]] = true; 26 | return obj; 27 | } 28 | 29 | CodeMirror.defineMIME("application/dart", { 30 | name: "clike", 31 | keywords: set(keywords), 32 | multiLineStrings: true, 33 | blockKeywords: set(blockKeywords), 34 | builtin: set(builtins), 35 | atoms: set(atoms), 36 | hooks: { 37 | "@": function (stream) { 38 | stream.eatWhile(/[\w\$_]/); 39 | return "meta"; 40 | } 41 | } 42 | }); 43 | 44 | CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins)); 45 | 46 | // This is needed to make loading through meta.js work. 47 | CodeMirror.defineMode("dart", function (conf) { 48 | return CodeMirror.getMode(conf, "application/dart"); 49 | }, "clike"); 50 | }); 51 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/dart/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Dart mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 26 | 27 |
28 |

Dart mode

29 |
30 | 64 |
65 | 66 | 72 | 73 |
74 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function (mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function (CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode("diff", function () { 15 | 16 | var TOKEN_NAMES = { 17 | '+': 'positive', 18 | '-': 'negative', 19 | '@': 'meta' 20 | }; 21 | 22 | return { 23 | token: function (stream) { 24 | var tw_pos = stream.string.search(/[\t ]+?$/); 25 | 26 | if (!stream.sol() || tw_pos === 0) { 27 | stream.skipToEnd(); 28 | return ("error " + ( 29 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 30 | } 31 | 32 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 33 | 34 | if (tw_pos === -1) { 35 | stream.skipToEnd(); 36 | } else { 37 | stream.pos = tw_pos; 38 | } 39 | 40 | return token_name; 41 | } 42 | }; 43 | }); 44 | 45 | CodeMirror.defineMIME("text/x-diff", "diff"); 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/django/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Django template mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 30 | 31 |
32 |

Django template mode

33 |
53 | 54 | 62 | 63 |

Mode for HTML with embedded Django template markup.

64 | 65 |

MIME types defined: text/x-django

66 |
67 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/ecl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: ECL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 26 | 27 |
28 |

ECL mode

29 |
47 | 50 | 51 |

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

53 |

MIME types defined: text/x-ecl.

54 | 55 |
56 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/gas/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Gas mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 26 | 27 |
28 |

Gas mode

29 |
30 | 52 |
53 | 54 | 60 | 61 |

Handles AT&T assembler syntax (more specifically this handles 62 | the GNU Assembler (gas) syntax.) 63 | It takes a single optional configuration parameter: 64 | architecture, which can be one of "ARM", 65 | "ARMv6" or "x86". 66 | Including the parameter adds syntax for the registers and special 67 | directives for the supplied architecture. 68 | 69 |

MIME types defined: text/x-gas

70 |
71 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/gherkin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Gherkin mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Gherkin mode

30 |
45 | 48 | 49 |

MIME types defined: text/x-feature.

50 | 51 |
52 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/http/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: HTTP mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

HTTP mode

30 | 31 | 32 |
42 | 43 | 46 | 47 |

MIME types defined: message/http.

48 |
49 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/idl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: IDL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

IDL mode

30 | 31 |
55 | 67 | 68 |

MIME types defined: text/x-idl.

69 |
70 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/javascript/typescript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: TypeScript mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

TypeScript mode

30 | 31 | 32 |
54 | 55 | 62 | 63 |

This is a specialization of the JavaScript mode.

64 |
65 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/jinja2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Jinja2 mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Jinja2 mode

30 |
52 | 59 |
60 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/ntriples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: NTriples mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 28 | 29 |
30 |

NTriples mode

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

MIME types defined: text/n-triples.

45 |
46 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/pascal/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Pascal mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Pascal mode

30 | 31 | 32 |
55 | 56 | 62 | 63 |

MIME types defined: text/x-pascal.

64 |
65 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/pegjs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CodeMirror: PEG.js Mode 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 31 | 32 |
33 |

PEG.js Mode

34 |
59 | 65 |

The PEG.js Mode

66 |

Created by Forbes Lindesay.

67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/perl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Perl mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Perl mode

30 | 31 | 32 |
70 | 71 | 76 | 77 |

MIME types defined: text/x-perl.

78 |
79 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/pig/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Pig Latin mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 26 | 27 |
28 |

Pig Latin mode

29 |
41 | 42 | 49 | 50 |

51 | Simple mode that handles Pig Latin language. 52 |

53 | 54 |

MIME type defined: text/x-pig 55 | (PIG code) 56 | 57 |

58 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/properties/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Properties files mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Properties files mode

30 |
49 | 52 | 53 |

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

55 | 56 |
57 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | 7 | function MT(name) { 8 | test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); 9 | } 10 | 11 | MT("divide_equal_operator", 12 | "[variable bar] [operator /=] [variable foo]"); 13 | 14 | MT("divide_equal_operator_no_spacing", 15 | "[variable foo][operator /=][number 42]"); 16 | 17 | })(); 18 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/rust/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Rust mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Rust mode

30 | 31 | 32 |
55 | 56 | 61 | 62 |

MIME types defined: text/x-rustsrc.

63 |
64 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/sass/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Sass mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 29 | 30 |
31 |

Sass mode

32 |
62 | 68 | 69 |

MIME types defined: text/x-sass.

70 |
71 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/shell/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Shell mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 30 | 31 |
32 |

Shell mode

33 | 34 | 35 | 59 | 60 | 67 | 68 |

MIME types defined: text/x-sh.

69 |
70 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/shell/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({}, "shell"); 6 | 7 | function MT(name) { 8 | test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); 9 | } 10 | 11 | MT("var", 12 | "text [def $var] text"); 13 | MT("varBraces", 14 | "text[def ${var}]text"); 15 | MT("varVar", 16 | "text [def $a$b] text"); 17 | MT("varBracesVarBraces", 18 | "text[def ${a}${b}]text"); 19 | 20 | MT("singleQuotedVar", 21 | "[string 'text $var text']"); 22 | MT("singleQuotedVarBraces", 23 | "[string 'text ${var} text']"); 24 | 25 | MT("doubleQuotedVar", 26 | '[string "text ][def $var][string text"]'); 27 | MT("doubleQuotedVarBraces", 28 | '[string "text][def ${var}][string text"]'); 29 | MT("doubleQuotedVarPunct", 30 | '[string "text ][def $@][string text"]'); 31 | MT("doubleQuotedVarVar", 32 | '[string "][def $a$b][string "]'); 33 | MT("doubleQuotedVarBracesVarBraces", 34 | '[string "][def ${a}${b}][string "]'); 35 | 36 | MT("notAString", 37 | "text\\'text"); 38 | MT("escapes", 39 | "outside\\'\\\"\\`\\\\[string \"inside\\`\\'\\\"\\\\`\\$notAVar\"]outside\\$\\(notASubShell\\)"); 40 | 41 | MT("subshell", 42 | "[builtin echo] [quote $(whoami)] s log, stardate [quote `date`]."); 43 | MT("doubleQuotedSubshell", 44 | "[builtin echo] [string \"][quote $(whoami)][string 's log, stardate `date`.\"]"); 45 | 46 | MT("hashbang", 47 | "[meta #!/bin/bash]"); 48 | MT("comment", 49 | "text [comment # Blurb]"); 50 | 51 | MT("numbers", 52 | "[number 0] [number 1] [number 2]"); 53 | MT("keywords", 54 | "[keyword while] [atom true]; [keyword do]", 55 | " [builtin sleep] [number 3]", 56 | "[keyword done]"); 57 | MT("options", 58 | "[builtin ls] [attribute -l] [attribute --human-readable]"); 59 | MT("operator", 60 | "[def var][operator =]value"); 61 | })(); 62 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/solr/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Solr mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 33 | 34 |
35 |

Solr mode

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

MIME types defined: text/x-solr.

57 |
58 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/sparql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: SPARQL mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 28 | 29 |
30 |

SPARQL mode

31 |
55 | 61 | 62 |

MIME types defined: application/sparql-query.

63 | 64 |
65 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/spreadsheet/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Spreadsheet mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 28 | 29 |
30 |

Spreadsheet mode

31 |
32 | 33 | 40 | 41 |

MIME types defined: text/x-spreadsheet.

42 | 43 |

The Spreadsheet Mode

44 |

Created by Robert Plummer

45 |
46 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | 5 | span.cm-strikethrough { 6 | text-decoration: line-through; 7 | } 8 | 9 | span.cm-brace { 10 | color: #170; 11 | font-weight: bold; 12 | } 13 | 14 | span.cm-table { 15 | color: blue; 16 | font-weight: bold; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | 14 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 15 | padding-left: 10px; 16 | } 17 | 18 | .cm-tw-box { 19 | border-top-width: 0px ! important; 20 | border-style: solid; 21 | border-width: 1px; 22 | border-color: inherit; 23 | } 24 | 25 | .cm-tw-underline { 26 | text-decoration: underline; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/tornado/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Tornado template mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 30 | 31 |
32 |

Tornado template mode

33 |
53 | 54 | 62 | 63 |

Mode for HTML with embedded Tornado template markup.

64 | 65 |

MIME types defined: text/x-tornado

66 |
67 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/turtle/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Turtle mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Turtle mode

30 |
44 | 50 | 51 |

MIME types defined: text/turtle.

52 | 53 |
54 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/vbscript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: VBScript mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

VBScript mode

30 | 31 | 32 |
49 | 50 | 56 | 57 |

MIME types defined: text/vbscript.

58 |
59 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | 7 | function MT(name) { 8 | test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); 9 | } 10 | 11 | MT("matching", 12 | "[tag&bracket <][tag top][tag&bracket >]", 13 | " text", 14 | " [tag&bracket <][tag inner][tag&bracket />]", 15 | "[tag&bracket ]"); 16 | 17 | MT("nonmatching", 18 | "[tag&bracket <][tag top][tag&bracket >]", 19 | " [tag&bracket <][tag inner][tag&bracket />]", 20 | " [tag&bracket ]"); 21 | 22 | MT("doctype", 23 | "[meta ]", 24 | "[tag&bracket <][tag top][tag&bracket />]"); 25 | 26 | MT("cdata", 27 | "[tag&bracket <][tag top][tag&bracket >]", 28 | " [atom ]", 30 | "[tag&bracket ]"); 31 | 32 | // HTML tests 33 | mode = CodeMirror.getMode({indentUnit: 2}, "text/html"); 34 | 35 | MT("selfclose", 36 | "[tag&bracket <][tag html][tag&bracket >]", 37 | " [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]", 38 | "[tag&bracket ]"); 39 | 40 | MT("list", 41 | "[tag&bracket <][tag ol][tag&bracket >]", 42 | " [tag&bracket <][tag li][tag&bracket >]one", 43 | " [tag&bracket <][tag li][tag&bracket >]two", 44 | "[tag&bracket ]"); 45 | 46 | MT("valueless", 47 | "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]"); 48 | 49 | MT("pThenArticle", 50 | "[tag&bracket <][tag p][tag&bracket >]", 51 | " foo", 52 | "[tag&bracket <][tag article][tag&bracket >]bar"); 53 | 54 | })(); 55 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/mode/z80/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Z80 assembly mode 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 27 | 28 |
29 |

Z80 assembly mode

30 | 31 | 32 |
47 | 48 | 53 | 54 |

MIME type defined: text/x-z80.

55 |
56 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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": [ 7 | { 8 | "type": "MIT", 9 | "url": "http://codemirror.net/LICENSE" 10 | } 11 | ], 12 | "directories": { 13 | "lib": "./lib" 14 | }, 15 | "scripts": { 16 | "test": "node ./test/run.js" 17 | }, 18 | "devDependencies": { 19 | "node-static": "0.6.0", 20 | "phantomjs": "1.9.2-5", 21 | "blint": ">=0.1.1" 22 | }, 23 | "bugs": "http://github.com/codemirror/CodeMirror/issues", 24 | "keywords": [ 25 | "JavaScript", 26 | "CodeMirror", 27 | "Editor" 28 | ], 29 | "homepage": "http://codemirror.net", 30 | "maintainers": [ 31 | { 32 | "name": "Marijn Haverbeke", 33 | "email": "marijnh@gmail.com", 34 | "web": "http://marijnhaverbeke.nl" 35 | } 36 | ], 37 | "repository": { 38 | "type": "git", 39 | "url": "https://github.com/codemirror/CodeMirror.git" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/theme/cobalt.css: -------------------------------------------------------------------------------- 1 | .cm-s-cobalt.CodeMirror { 2 | background: #002240; 3 | color: white; 4 | } 5 | 6 | .cm-s-cobalt div.CodeMirror-selected { 7 | background: #b36539 !important; 8 | } 9 | 10 | .cm-s-cobalt.CodeMirror ::selection { 11 | background: rgba(179, 101, 57, .99); 12 | } 13 | 14 | .cm-s-cobalt.CodeMirror ::-moz-selection { 15 | background: rgba(179, 101, 57, .99); 16 | } 17 | 18 | .cm-s-cobalt .CodeMirror-gutters { 19 | background: #002240; 20 | border-right: 1px solid #aaa; 21 | } 22 | 23 | .cm-s-cobalt .CodeMirror-guttermarker { 24 | color: #ffee80; 25 | } 26 | 27 | .cm-s-cobalt .CodeMirror-guttermarker-subtle { 28 | color: #d0d0d0; 29 | } 30 | 31 | .cm-s-cobalt .CodeMirror-linenumber { 32 | color: #d0d0d0; 33 | } 34 | 35 | .cm-s-cobalt .CodeMirror-cursor { 36 | border-left: 1px solid white !important; 37 | } 38 | 39 | .cm-s-cobalt span.cm-comment { 40 | color: #08f; 41 | } 42 | 43 | .cm-s-cobalt span.cm-atom { 44 | color: #845dc4; 45 | } 46 | 47 | .cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { 48 | color: #ff80e1; 49 | } 50 | 51 | .cm-s-cobalt span.cm-keyword { 52 | color: #ffee80; 53 | } 54 | 55 | .cm-s-cobalt span.cm-string { 56 | color: #3ad900; 57 | } 58 | 59 | .cm-s-cobalt span.cm-meta { 60 | color: #ff9d00; 61 | } 62 | 63 | .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { 64 | color: #9effff; 65 | } 66 | 67 | .cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { 68 | color: white; 69 | } 70 | 71 | .cm-s-cobalt span.cm-bracket { 72 | color: #d8d8d8; 73 | } 74 | 75 | .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { 76 | color: #ff9e59; 77 | } 78 | 79 | .cm-s-cobalt span.cm-link { 80 | color: #845dc4; 81 | } 82 | 83 | .cm-s-cobalt span.cm-error { 84 | color: #9d1e15; 85 | } 86 | 87 | .cm-s-cobalt .CodeMirror-activeline-background { 88 | background: #002D57 !important; 89 | } 90 | 91 | .cm-s-cobalt .CodeMirror-matchingbracket { 92 | outline: 1px solid grey; 93 | color: white !important 94 | } 95 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta { 2 | color: #FF1717; 3 | } 4 | 5 | .cm-s-eclipse span.cm-keyword { 6 | line-height: 1em; 7 | font-weight: bold; 8 | color: #7F0055; 9 | } 10 | 11 | .cm-s-eclipse span.cm-atom { 12 | color: #219; 13 | } 14 | 15 | .cm-s-eclipse span.cm-number { 16 | color: #164; 17 | } 18 | 19 | .cm-s-eclipse span.cm-def { 20 | color: #00f; 21 | } 22 | 23 | .cm-s-eclipse span.cm-variable { 24 | color: black; 25 | } 26 | 27 | .cm-s-eclipse span.cm-variable-2 { 28 | color: #0000C0; 29 | } 30 | 31 | .cm-s-eclipse span.cm-variable-3 { 32 | color: #0000C0; 33 | } 34 | 35 | .cm-s-eclipse span.cm-property { 36 | color: black; 37 | } 38 | 39 | .cm-s-eclipse span.cm-operator { 40 | color: black; 41 | } 42 | 43 | .cm-s-eclipse span.cm-comment { 44 | color: #3F7F5F; 45 | } 46 | 47 | .cm-s-eclipse span.cm-string { 48 | color: #2A00FF; 49 | } 50 | 51 | .cm-s-eclipse span.cm-string-2 { 52 | color: #f50; 53 | } 54 | 55 | .cm-s-eclipse span.cm-qualifier { 56 | color: #555; 57 | } 58 | 59 | .cm-s-eclipse span.cm-builtin { 60 | color: #30a; 61 | } 62 | 63 | .cm-s-eclipse span.cm-bracket { 64 | color: #cc7; 65 | } 66 | 67 | .cm-s-eclipse span.cm-tag { 68 | color: #170; 69 | } 70 | 71 | .cm-s-eclipse span.cm-attribute { 72 | color: #00c; 73 | } 74 | 75 | .cm-s-eclipse span.cm-link { 76 | color: #219; 77 | } 78 | 79 | .cm-s-eclipse span.cm-error { 80 | color: #f00; 81 | } 82 | 83 | .cm-s-eclipse .CodeMirror-activeline-background { 84 | background: #e8f2ff !important; 85 | } 86 | 87 | .cm-s-eclipse .CodeMirror-matchingbracket { 88 | outline: 1px solid grey; 89 | color: black !important; 90 | } 91 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { 2 | color: #762; 3 | } 4 | 5 | .cm-s-elegant span.cm-comment { 6 | color: #262; 7 | font-style: italic; 8 | line-height: 1em; 9 | } 10 | 11 | .cm-s-elegant span.cm-meta { 12 | color: #555; 13 | font-style: italic; 14 | line-height: 1em; 15 | } 16 | 17 | .cm-s-elegant span.cm-variable { 18 | color: black; 19 | } 20 | 21 | .cm-s-elegant span.cm-variable-2 { 22 | color: #b11; 23 | } 24 | 25 | .cm-s-elegant span.cm-qualifier { 26 | color: #555; 27 | } 28 | 29 | .cm-s-elegant span.cm-keyword { 30 | color: #730; 31 | } 32 | 33 | .cm-s-elegant span.cm-builtin { 34 | color: #30a; 35 | } 36 | 37 | .cm-s-elegant span.cm-link { 38 | color: #762; 39 | } 40 | 41 | .cm-s-elegant span.cm-error { 42 | background-color: #fdd; 43 | } 44 | 45 | .cm-s-elegant .CodeMirror-activeline-background { 46 | background: #e8f2ff !important; 47 | } 48 | 49 | .cm-s-elegant .CodeMirror-matchingbracket { 50 | outline: 1px solid grey; 51 | color: black !important; 52 | } 53 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { 2 | color: #a86; 3 | } 4 | 5 | .cm-s-neat span.cm-keyword { 6 | line-height: 1em; 7 | font-weight: bold; 8 | color: blue; 9 | } 10 | 11 | .cm-s-neat span.cm-string { 12 | color: #a22; 13 | } 14 | 15 | .cm-s-neat span.cm-builtin { 16 | line-height: 1em; 17 | font-weight: bold; 18 | color: #077; 19 | } 20 | 21 | .cm-s-neat span.cm-special { 22 | line-height: 1em; 23 | font-weight: bold; 24 | color: #0aa; 25 | } 26 | 27 | .cm-s-neat span.cm-variable { 28 | color: black; 29 | } 30 | 31 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { 32 | color: #3a3; 33 | } 34 | 35 | .cm-s-neat span.cm-meta { 36 | color: #555; 37 | } 38 | 39 | .cm-s-neat span.cm-link { 40 | color: #3a3; 41 | } 42 | 43 | .cm-s-neat .CodeMirror-activeline-background { 44 | background: #e8f2ff !important; 45 | } 46 | 47 | .cm-s-neat .CodeMirror-matchingbracket { 48 | outline: 1px solid grey; 49 | color: black !important; 50 | } 51 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | 11 | .cm-s-neo .cm-comment { 12 | color: #75787b 13 | } 14 | 15 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property { 16 | color: #1d75b3 17 | } 18 | 19 | .cm-s-neo .cm-atom, .cm-s-neo .cm-number { 20 | color: #75438a 21 | } 22 | 23 | .cm-s-neo .cm-node, .cm-s-neo .cm-tag { 24 | color: #9c3328 25 | } 26 | 27 | .cm-s-neo .cm-string { 28 | color: #b35e14 29 | } 30 | 31 | .cm-s-neo .cm-variable, .cm-s-neo .cm-qualifier { 32 | color: #047d65 33 | } 34 | 35 | 36 | /* Editor styling */ 37 | 38 | .cm-s-neo pre { 39 | padding: 0; 40 | } 41 | 42 | .cm-s-neo .CodeMirror-gutters { 43 | border: none; 44 | border-right: 10px solid transparent; 45 | background-color: transparent; 46 | } 47 | 48 | .cm-s-neo .CodeMirror-linenumber { 49 | padding: 0; 50 | color: #e0e2e5; 51 | } 52 | 53 | .cm-s-neo .CodeMirror-guttermarker { 54 | color: #1d75b3; 55 | } 56 | 57 | .cm-s-neo .CodeMirror-guttermarker-subtle { 58 | color: #e0e2e5; 59 | } 60 | 61 | .cm-s-neo div.CodeMirror-cursor { 62 | width: auto; 63 | border: 0; 64 | background: rgba(155, 157, 162, 0.37); 65 | z-index: 1; 66 | } 67 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/codemirror/theme/rubyblue.css: -------------------------------------------------------------------------------- 1 | .cm-s-rubyblue.CodeMirror { 2 | background: #112435; 3 | color: white; 4 | } 5 | 6 | .cm-s-rubyblue div.CodeMirror-selected { 7 | background: #38566F !important; 8 | } 9 | 10 | .cm-s-rubyblue.CodeMirror ::selection { 11 | background: rgba(56, 86, 111, 0.99); 12 | } 13 | 14 | .cm-s-rubyblue.CodeMirror ::-moz-selection { 15 | background: rgba(56, 86, 111, 0.99); 16 | } 17 | 18 | .cm-s-rubyblue .CodeMirror-gutters { 19 | background: #1F4661; 20 | border-right: 7px solid #3E7087; 21 | } 22 | 23 | .cm-s-rubyblue .CodeMirror-guttermarker { 24 | color: white; 25 | } 26 | 27 | .cm-s-rubyblue .CodeMirror-guttermarker-subtle { 28 | color: #3E7087; 29 | } 30 | 31 | .cm-s-rubyblue .CodeMirror-linenumber { 32 | color: white; 33 | } 34 | 35 | .cm-s-rubyblue .CodeMirror-cursor { 36 | border-left: 1px solid white !important; 37 | } 38 | 39 | .cm-s-rubyblue span.cm-comment { 40 | color: #999; 41 | font-style: italic; 42 | line-height: 1em; 43 | } 44 | 45 | .cm-s-rubyblue span.cm-atom { 46 | color: #F4C20B; 47 | } 48 | 49 | .cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { 50 | color: #82C6E0; 51 | } 52 | 53 | .cm-s-rubyblue span.cm-keyword { 54 | color: #F0F; 55 | } 56 | 57 | .cm-s-rubyblue span.cm-string { 58 | color: #F08047; 59 | } 60 | 61 | .cm-s-rubyblue span.cm-meta { 62 | color: #F0F; 63 | } 64 | 65 | .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { 66 | color: #7BD827; 67 | } 68 | 69 | .cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { 70 | color: white; 71 | } 72 | 73 | .cm-s-rubyblue span.cm-bracket { 74 | color: #F0F; 75 | } 76 | 77 | .cm-s-rubyblue span.cm-link { 78 | color: #F4C20B; 79 | } 80 | 81 | .cm-s-rubyblue span.CodeMirror-matchingbracket { 82 | color: #F0F !important; 83 | } 84 | 85 | .cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { 86 | color: #FF9D00; 87 | } 88 | 89 | .cm-s-rubyblue span.cm-error { 90 | color: #AF2018; 91 | } 92 | 93 | .cm-s-rubyblue .CodeMirror-activeline-background { 94 | background: #173047 !important; 95 | } 96 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/lib/jquery.flowchart.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery.flowchart.js v1.1.0 | jquery.flowchart.min.js | jQuery plugin for flowchart.js. | MIT License | By: Pandao | https://github.com/pandao/jquery.flowchart.js | 2015-03-09 */ 2 | (function(factory){if(typeof require==="function"&&typeof exports==="object"&&typeof module==="object"){module.exports=factory}else{if(typeof define==="function"){factory(jQuery,flowchart)}else{factory($,flowchart)}}}(function(jQuery,flowchart){(function($){$.fn.flowChart=function(options){options=options||{};var defaults={"x":0,"y":0,"line-width":2,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black","fill":"white","yes-text":"yes","no-text":"no","arrow-end":"block","symbols":{"start":{"font-color":"black","element-color":"black","fill":"white"},"end":{"class":"end-element"}},"flowstate":{"past":{"fill":"#CCCCCC","font-size":12},"current":{"fill":"black","font-color":"white","font-weight":"bold"},"future":{"fill":"white"},"request":{"fill":"blue"},"invalid":{"fill":"#444444"},"approved":{"fill":"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},"rejected":{"fill":"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}}};return this.each(function(){var $this=$(this);var diagram=flowchart.parse($this.text());var settings=$.extend(true,defaults,options);$this.html("");diagram.drawSVG(this,settings)})}})(jQuery)})); -------------------------------------------------------------------------------- /src/main/resources/static/editormd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "editor.md", 3 | "version": "2.0.1", 4 | "description": "Open source online markdown editor.", 5 | "directories": { 6 | "doc": "docs", 7 | "example": "examples", 8 | "test": "tests" 9 | }, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/pandao/editor.md.git" 16 | }, 17 | "keywords": [ 18 | "editor.md", 19 | "markdown", 20 | "editor" 21 | ], 22 | "author": "Pandao", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/pandao/editor.md/issues" 26 | }, 27 | "homepage": "https://github.com/pandao/editor.md", 28 | "devDependencies": { 29 | "@babel/core": "7.0.0-beta.42", 30 | "@babel/preset-env": "7.0.0-beta.42", 31 | "babel": "6.23.0", 32 | "babel-preset-es2015": "6.24.1", 33 | "dateformatter": "^0.1.0", 34 | "eslint": "4.18.2", 35 | "gulp": "^3.8.11", 36 | "gulp-babel": "8.0.0-beta.2", 37 | "gulp-concat": "^2.4.2", 38 | "gulp-eslint": "4.0.2", 39 | "gulp-header": "^1.2.2", 40 | "gulp-jshint": "^1.9.0", 41 | "gulp-minify-css": "^0.4.4", 42 | "gulp-notify": "^2.1.0", 43 | "gulp-rename": "^1.2.0", 44 | "gulp-replace": "^0.5.3", 45 | "gulp-ruby-sass": "^1.0.1", 46 | "gulp-uglifyjs": "^0.6.1", 47 | "gulp-util": "^3.0.1" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/static/editormd/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 | module.exports = factory; 44 | } else if (typeof define === "function") // AMD/CMD/Sea.js 45 | { 46 | if (define.amd) { // for Require.js 47 | 48 | define(["editormd"], function (editormd) { 49 | factory(editormd); 50 | }); 51 | 52 | } else { // for Sea.js 53 | define(function (require) { 54 | var editormd = require("./../../editormd"); 55 | factory(editormd); 56 | }); 57 | } 58 | } else { 59 | factory(window.editormd); 60 | } 61 | 62 | })(); 63 | -------------------------------------------------------------------------------- /src/main/resources/static/error/4xx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 错误报告 12 | 13 | 14 | 15 | 16 |
17 |

没有该页面

18 |
你的操作已被记录,恶意操作 经审核后会被接入 征信系统,从而降低你的 信用

20 |
低信用 会被限制:坐飞机,坐火车,坐轮船,住宿,上不了高速,不能去银行贷款。

21 |
更严重的还会影响到你的 下一代,我们还会通知你的 户籍所在地,让你 名声受损

23 |
这样对你是没有好处的。 点击返回首页
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/static/error/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 错误报告 12 | 13 | 14 | 15 | 16 |
17 |

发生错误

18 |
你的操作已被记录,恶意操作 经审核后会被接入 征信系统,从而降低你的 信用

20 |
低信用 会被限制:坐飞机,坐火车,坐轮船,住宿,上不了高速,不能去银行贷款。

21 |
更严重的还会影响到你的 下一代,我们还会通知你的 户籍所在地,让你 名声受损

23 |
这样对你是没有好处的。 点击返回首页
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/image/beiantubiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/beiantubiao.png -------------------------------------------------------------------------------- /src/main/resources/static/image/boy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/boy.gif -------------------------------------------------------------------------------- /src/main/resources/static/image/chat/avatar_chen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/chat/avatar_chen.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/chat/avatar_xiao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/chat/avatar_xiao.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/falls/closelabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/falls/closelabel.gif -------------------------------------------------------------------------------- /src/main/resources/static/image/falls/cur-left1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/falls/cur-left1.png -------------------------------------------------------------------------------- /src/main/resources/static/image/falls/cur-right1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/falls/cur-right1.png -------------------------------------------------------------------------------- /src/main/resources/static/image/falls/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/falls/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/image/girl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/girl.gif -------------------------------------------------------------------------------- /src/main/resources/static/image/heart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/heart.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/heart.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/heart.webm -------------------------------------------------------------------------------- /src/main/resources/static/image/index/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/6.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/7.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/8.jpg -------------------------------------------------------------------------------- /src/main/resources/static/image/index/swirl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/static/image/index/swirl.png -------------------------------------------------------------------------------- /src/main/resources/static/js/ip.js: -------------------------------------------------------------------------------- 1 | // 找ip的id,0代表long.maxValue,找比它小的 number 个 id 2 | var iplist; 3 | 4 | function initIp() { 5 | iplist = $('#ip-list');getMsg(1); 6 | } 7 | 8 | function getIp(p) { 9 | $.post("ip/listIp", {"page": p, "per": perpage}, function (data) { 10 | if (!data || data.length < 1) {return;} 11 | iplist.empty(); 12 | for (var i = 0; i < data.length; i++) { 13 | var content = getCards(data[i]); 14 | iplist.append(content); 15 | } 16 | }, "json"); 17 | } 18 | 19 | function getMsg(p) { 20 | getIp(p); 21 | setPage(p, allpage, "getMsg"); 22 | } 23 | 24 | function getCards(ip) { 25 | return ''+ip.region+'-'+ip.city+'
'+ip.isp+''+ip.ip+'
'+ip.curtime+''; 26 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/lib/blocksit.min.js: -------------------------------------------------------------------------------- 1 | (function(a){var b={numOfCol:5,offsetX:5,offsetY:5,blockElement:"div"};var c,d;var e=[];if(!Array.prototype.indexOf){Array.prototype.indexOf=function(a){var b=this.length>>>0;var c=Number(arguments[1])||0;c=c<0?Math.ceil(c):Math.floor(c);if(c<0)c+=b;for(;c1){var b=e.length-a;var c=false;var d,f;for(var g=0;g=0&&i<=b){var k=j(i,a);if(!c){c=true;d=k;f=i}else{if(k[1]b.numOfCol){a.data("size",b.numOfCol)}var e=k(a.data("size"));var f=d*a.data("size")-(a.outerWidth()-a.width());a.css({width:f-b.offsetX*2,left:e[0]*d,top:e[1],position:"absolute"});var i=a.outerHeight();h(e[0],a.data("size"));g(a.attr("id"),e[0],e[1],a.data("size"),i)};a.fn.BlocksIt=function(g){if(g&&typeof g==="object"){a.extend(b,g)}c=a(this);d=c.width()/b.numOfCol;f();c.children(b.blockElement).each(function(b){l(a(this),b)});var h=j(0,e.length);c.height(h[1]+b.offsetY);return this}})(jQuery) -------------------------------------------------------------------------------- /src/main/resources/static/js/lib/pagetool.min.js: -------------------------------------------------------------------------------- 1 | "use strict";function setPage(a,i,e){return pagi.find(".head a").attr("href","javascript:"+e+"(1);"),pagi.find(".lastpage a").attr("href","javascript:"+e+"("+(a-1)+")"),pagi.find(".currentpage a").text(a),pagi.find(".nextpage a").attr("href","javascript:"+e+"("+(a+1)+")"),pagi.find(".tail a").attr("href","javascript:"+e+"("+i+")"),pagi.find(".head").removeClass("disabled"),pagi.find(".lastpage").removeClass("disabled"),pagi.find(".nextpage").removeClass("disabled"),pagi.find(".tail").removeClass("disabled"),a-3>0?pagi.find(".morehead").show():pagi.find(".morehead").hide(),a-2>0?(pagi.find(".page-2").show(),pagi.find(".page-2 a").attr("href","javascript:"+e+"("+(a-2)+")"),pagi.find(".page-2 a").text(a-2)):pagi.find(".page-2").hide(),a-1>0?(pagi.find(".page-1").show(),pagi.find(".page-1 a").attr("href","javascript:"+e+"("+(a-1)+")"),pagi.find(".page-1 a").text(a-1)):pagi.find(".page-1").hide(),a+1<=i?(pagi.find(".page_1").show(),pagi.find(".page_1 a").attr("href","javascript:"+e+"("+(a+1)+")"),pagi.find(".page_1 a").text(a+1)):pagi.find(".page_1").hide(),a+2<=i?(pagi.find(".page_2").show(),pagi.find(".page_2 a").attr("href","javascript:"+e+"("+(a+2)+")"),pagi.find(".page_2 a").text(a+2)):pagi.find(".page_2").hide(),a+3<=i?pagi.find(".moretail").show():pagi.find(".moretail").hide(),a<=1&&(pagi.find(".head").addClass("disabled"),pagi.find(".lastpage").addClass("disabled"),pagi.find(".lastpage a").removeAttr("href")),a>=i&&(pagi.find(".tail").addClass("disabled"),pagi.find(".nextpage").addClass("disabled"),pagi.find(".nextpage a").removeAttr("href")),a}var pagi=$("#pagination"); -------------------------------------------------------------------------------- /src/main/resources/static/js/lib/scrolltag.min.js: -------------------------------------------------------------------------------- 1 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('4 L,K,M,H,O,Q,d,m,3=[],p=1r;e 17(){G(4 i=0;i<3.I;i++){B(3[i].R){13}4 U=3[i].D;4 15=3[i].w*K+3[i].E*(-L);4 W=3[i].w*L+3[i].E*K;4 T=U*H+W*M;4 X=15;4 1h=U*(-M)+W*H;4 12=T*Q+X*(-O);4 V=T*O+X*Q;4 Z=1h;3[i].D=12;3[i].w=V;3[i].E=Z;4 h=s/(s+Z);3[i].x=(12*h)-2;3[i].y=V*h;3[i].1m=h;h=(h-0.6)*(10/6);3[i].g=h*h*h-0.2;3[i].k=5.1o(P-5.1n(3[i].E))}1f()}e 1c(){4 q=0;4 J=0;4 z=3.I;G(4 i=0;i0.1){B(f.N!=\'\')f.N=\'\'}1q{B(f.N!=\'1a\')f.N=\'1a\';13}f.19=3[i].D+l-3[i].u/2+\'F\';f.18=3[i].w+t-3[i].v/2+\'F\';f.14="g(A="+P*3[i].g+")";f.k=3[i].k;f.A=3[i].g}}e 1d(){4 a=(5.1b(5.z(-8,-s),s)/p)*11,b=(-5.1b(5.z(-0,-s),s)/p)*11,c=0,n=5.16/1E;L=5.r(a*n);K=5.C(a*n);M=5.r(b*n);H=5.C(b*n);O=5.r(c*n);Q=5.C(c*n)}(e(){4 i=0;4 o=1H;m=1g.1j(\'1D\');d=m.1w(\'a\');G(i=0;i 2 | 小窝后台 3 | 7 | 8 | 41 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/index.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 小窝后台-首页 12 | 13 | 14 | 15 | 16 | <#include "header.ftl" > 17 | 18 |
19 | 20 | 21 | 安全退出 22 | 23 |
24 | 25 |

开发者文档

26 | bootstrap4 文档 27 |
28 | jquery3.2.1 文档 29 |
30 | 阿里云 oss 文档 31 | 32 |
33 | 34 | 35 | 36 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/login.ftl: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 小窝-后台-登录 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 | 20 |
21 | 22 | 23 |
24 |
25 | 26 | 27 |
28 |
29 | 30 | 31 |
32 | 33 |
34 |
35 | 36 | 37 | 38 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/templates/pages/chat.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 我们的小窝-聊天室 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |

chat (聊天窗口)

20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 32 | 35 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/templates/pages/error.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 错误报告 12 | 13 | 14 | 15 | 16 |
17 |

你的操作已被记录,恶意操作 经审核后会被接入 征信系统,从而降低你的 信用


19 |

低信用 会被限制:坐飞机,坐火车,坐轮船,住宿,上不了高速,不能去银行贷款。


20 |

更严重的还会影响到你的 下一代,我们还会通知你的 户籍所在地,让你 名声受损


22 |

这样对你是没有好处的。 点击返回首页

23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/pages/falls2.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 我们的小窝-小相册 12 | 13 | 14 | 15 | 16 | 17 | <#include "header.ftl" > 18 | 19 |
20 |
21 | 22 |
23 |
24 | 25 | <#include "footer.ftl" > 26 | 27 | 28 | 29 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/templates/pages/footer.ftl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/templates/pages/header.ftl: -------------------------------------------------------------------------------- 1 |
2 | 24 | 38 |
-------------------------------------------------------------------------------- /src/main/resources/templates/pages/timeline.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 我们的小窝-时间线 12 | 13 | 14 | 15 | 16 | 17 | 18 | <#include "header.ftl" > 19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 | <#include "footer.ftl" > 31 | 32 | 33 | 34 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/www.fengyunxiao.cn.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/resources/www.fengyunxiao.cn.jks -------------------------------------------------------------------------------- /src/main/www.fengyunxiao.cn.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/katanala/lovers-website/cb4515bf66419d8f3db70269615cf573ac25b64b/src/main/www.fengyunxiao.cn.jks --------------------------------------------------------------------------------