├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── build.sh ├── change.log ├── docker-compose.yml ├── docs ├── .nojekyll ├── README.md ├── _navbar.md ├── _sidebar.md ├── base.md ├── email.md ├── getting-started.md ├── index.html ├── oauth.md ├── ready.md └── upload.md ├── pom.xml ├── run.sh └── src ├── main ├── java │ └── com │ │ └── mtons │ │ └── mblog │ │ ├── BootApplication.java │ │ ├── base │ │ ├── lang │ │ │ ├── Consts.java │ │ │ ├── EntityStatus.java │ │ │ ├── MtonsException.java │ │ │ ├── Result.java │ │ │ └── Theme.java │ │ ├── oauth │ │ │ ├── APIConfig.java │ │ │ ├── Oauth.java │ │ │ ├── OauthBaidu.java │ │ │ ├── OauthDouban.java │ │ │ ├── OauthGithub.java │ │ │ ├── OauthOsc.java │ │ │ ├── OauthQQ.java │ │ │ ├── OauthRenren.java │ │ │ ├── OauthSina.java │ │ │ └── utils │ │ │ │ ├── Display.java │ │ │ │ ├── EnumOauthTypeBean.java │ │ │ │ ├── HttpKit.java │ │ │ │ ├── MyX509TrustManager.java │ │ │ │ ├── OathConfig.java │ │ │ │ ├── OpenOauthBean.java │ │ │ │ ├── TokenUtil.java │ │ │ │ └── TrustAnyHostnameVerifier.java │ │ ├── storage │ │ │ ├── Storage.java │ │ │ ├── StorageFactory.java │ │ │ └── impl │ │ │ │ ├── AbstractStorage.java │ │ │ │ ├── AliyunStorageImpl.java │ │ │ │ ├── NativeStorageImpl.java │ │ │ │ ├── QiniuStorageImpl.java │ │ │ │ └── UpYunStorageImpl.java │ │ └── utils │ │ │ ├── BeanMapUtils.java │ │ │ ├── BlogUtils.java │ │ │ ├── FileKit.java │ │ │ ├── FilePathUtils.java │ │ │ ├── HttpUtils.java │ │ │ ├── ImageUtils.java │ │ │ ├── MD5.java │ │ │ ├── MarkdownUtils.java │ │ │ ├── PreviewTextUtils.java │ │ │ ├── Printer.java │ │ │ ├── ResourceLock.java │ │ │ ├── SpringUtils.java │ │ │ └── ZipUtils.java │ │ ├── config │ │ ├── ContextStartup.java │ │ ├── ShiroConfiguration.java │ │ ├── SiteConfiguration.java │ │ ├── SiteOptions.java │ │ └── WebMvcConfiguration.java │ │ ├── modules │ │ ├── aspect │ │ │ ├── HibernateFilterAspect.java │ │ │ └── PostStatusFilter.java │ │ ├── data │ │ │ ├── AccountProfile.java │ │ │ ├── BadgesCount.java │ │ │ ├── CommentVO.java │ │ │ ├── FavoriteVO.java │ │ │ ├── MessageVO.java │ │ │ ├── OpenOauthVO.java │ │ │ ├── PermissionTree.java │ │ │ ├── PostTagVO.java │ │ │ ├── PostVO.java │ │ │ ├── TagVO.java │ │ │ └── UserVO.java │ │ ├── entity │ │ │ ├── Channel.java │ │ │ ├── Comment.java │ │ │ ├── Favorite.java │ │ │ ├── Links.java │ │ │ ├── Message.java │ │ │ ├── Options.java │ │ │ ├── Permission.java │ │ │ ├── Post.java │ │ │ ├── PostAttribute.java │ │ │ ├── PostResource.java │ │ │ ├── PostTag.java │ │ │ ├── Resource.java │ │ │ ├── Role.java │ │ │ ├── RolePermission.java │ │ │ ├── SecurityCode.java │ │ │ ├── Tag.java │ │ │ ├── User.java │ │ │ ├── UserOauth.java │ │ │ └── UserRole.java │ │ ├── event │ │ │ ├── MessageEvent.java │ │ │ ├── PostUpdateEvent.java │ │ │ └── handler │ │ │ │ ├── MessageEventHandler.java │ │ │ │ └── PostUpdateEventHandler.java │ │ ├── hook │ │ │ ├── Hook.java │ │ │ └── interceptor │ │ │ │ ├── InterceptorHook.java │ │ │ │ ├── InterceptorHookManager.java │ │ │ │ ├── InterceptorHookSupport.java │ │ │ │ └── impl │ │ │ │ ├── HidenContentPugin.java │ │ │ │ └── ViewCopyrightPugin.java │ │ ├── repository │ │ │ ├── ChannelRepository.java │ │ │ ├── CommentRepository.java │ │ │ ├── FavoriteRepository.java │ │ │ ├── LinksRepository.java │ │ │ ├── MessageRepository.java │ │ │ ├── OptionsRepository.java │ │ │ ├── PermissionRepository.java │ │ │ ├── PostAttributeRepository.java │ │ │ ├── PostRepository.java │ │ │ ├── PostResourceRepository.java │ │ │ ├── PostTagRepository.java │ │ │ ├── ResourceRepository.java │ │ │ ├── RolePermissionRepository.java │ │ │ ├── RoleRepository.java │ │ │ ├── SecurityCodeRepository.java │ │ │ ├── TagRepository.java │ │ │ ├── UserOauthRepository.java │ │ │ ├── UserRepository.java │ │ │ └── UserRoleRepository.java │ │ ├── service │ │ │ ├── ChannelService.java │ │ │ ├── CommentService.java │ │ │ ├── FavoriteService.java │ │ │ ├── LinksService.java │ │ │ ├── MailService.java │ │ │ ├── MessageService.java │ │ │ ├── OpenOauthService.java │ │ │ ├── OptionsService.java │ │ │ ├── PermissionService.java │ │ │ ├── PostSearchService.java │ │ │ ├── PostService.java │ │ │ ├── RolePermissionService.java │ │ │ ├── RoleService.java │ │ │ ├── SecurityCodeService.java │ │ │ ├── TagService.java │ │ │ ├── UserEventService.java │ │ │ ├── UserRoleService.java │ │ │ ├── UserService.java │ │ │ ├── complementor │ │ │ │ └── CommentComplementor.java │ │ │ └── impl │ │ │ │ ├── ChannelServiceImpl.java │ │ │ │ ├── CommentServiceImpl.java │ │ │ │ ├── FavoriteServiceImpl.java │ │ │ │ ├── LinksServiceImpl.java │ │ │ │ ├── MailServiceImpl.java │ │ │ │ ├── MessageServiceImpl.java │ │ │ │ ├── OpenOauthServiceImpl.java │ │ │ │ ├── OptionsServiceImpl.java │ │ │ │ ├── PermissionServiceImpl.java │ │ │ │ ├── PostSearchServiceImpl.java │ │ │ │ ├── PostServiceImpl.java │ │ │ │ ├── RolePermissionServiceImpl.java │ │ │ │ ├── RoleServiceImpl.java │ │ │ │ ├── SecurityCodeServiceImpl.java │ │ │ │ ├── TagServiceImpl.java │ │ │ │ ├── UserEventServiceImpl.java │ │ │ │ ├── UserRoleServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ └── template │ │ │ ├── BaseMethod.java │ │ │ ├── DirectiveHandler.java │ │ │ ├── TemplateDirective.java │ │ │ ├── TemplateModelUtils.java │ │ │ ├── directive │ │ │ ├── ChannelDirective.java │ │ │ ├── ContentsDirective.java │ │ │ ├── ControlsDirective.java │ │ │ ├── LinksDirective.java │ │ │ ├── NumberDirective.java │ │ │ ├── ResourceDirective.java │ │ │ ├── SidebarDirective.java │ │ │ ├── UserCommentsDirective.java │ │ │ ├── UserContentsDirective.java │ │ │ ├── UserFavoritesDirective.java │ │ │ └── UserMessagesDirective.java │ │ │ ├── layout │ │ │ ├── BlockDirective.java │ │ │ ├── ExtendsDirective.java │ │ │ ├── PutDirective.java │ │ │ └── PutType.java │ │ │ └── method │ │ │ └── TimeAgoMethod.java │ │ ├── shiro │ │ ├── AccountRealm.java │ │ ├── AccountSubjectFactory.java │ │ ├── AuthenticatedFilter.java │ │ └── tags │ │ │ ├── AuthenticatedTag.java │ │ │ ├── GuestTag.java │ │ │ ├── HasAnyRolesTag.java │ │ │ ├── HasPermissionTag.java │ │ │ ├── HasRoleTag.java │ │ │ ├── LacksPermissionTag.java │ │ │ ├── LacksRoleTag.java │ │ │ ├── NotAuthenticatedTag.java │ │ │ ├── PermissionTag.java │ │ │ ├── PrincipalTag.java │ │ │ ├── RoleTag.java │ │ │ ├── SecureTag.java │ │ │ ├── ShiroTags.java │ │ │ └── UserTag.java │ │ └── web │ │ ├── controller │ │ ├── BaseController.java │ │ ├── admin │ │ │ ├── AdminController.java │ │ │ ├── ChannelController.java │ │ │ ├── CommentController.java │ │ │ ├── OptionsController.java │ │ │ ├── PermissionController.java │ │ │ ├── PostController.java │ │ │ ├── RoleController.java │ │ │ ├── ThemeController.java │ │ │ └── UserController.java │ │ ├── api │ │ │ ├── ApiController.java │ │ │ └── package-info.java │ │ └── site │ │ │ ├── ChannelController.java │ │ │ ├── IndexController.java │ │ │ ├── SearchController.java │ │ │ ├── TagController.java │ │ │ ├── Views.java │ │ │ ├── auth │ │ │ ├── CallbackController.java │ │ │ ├── EmailController.java │ │ │ ├── ForgotController.java │ │ │ ├── LoginController.java │ │ │ ├── LogoutController.java │ │ │ └── RegisterController.java │ │ │ ├── comment │ │ │ └── CommentController.java │ │ │ ├── posts │ │ │ ├── PostController.java │ │ │ └── UploadController.java │ │ │ └── user │ │ │ ├── FavorController.java │ │ │ ├── SettingsController.java │ │ │ └── UsersController.java │ │ ├── exceptions │ │ └── DefaultExceptionHandler.java │ │ ├── filter │ │ └── RequestCostFilter.java │ │ ├── formatter │ │ ├── JsonUtils.java │ │ └── StringEscapeEditor.java │ │ ├── interceptor │ │ └── BaseInterceptor.java │ │ └── menu │ │ ├── Menu.java │ │ ├── MenuJsonUtils.java │ │ └── MenusDirective.java └── resources │ ├── application-dev.yml │ ├── application-docker.yml │ ├── application-h2.yml │ ├── application.yml │ ├── banner.txt │ ├── ehcache.xml │ ├── logback-spring.xml │ ├── scripts │ ├── menu.json │ ├── migration │ │ └── V3.2__update.sql │ └── schema.sql │ ├── static │ ├── dist │ │ ├── css │ │ │ ├── editor.css │ │ │ └── plugins.css │ │ ├── images │ │ │ ├── ava │ │ │ │ └── default.png │ │ │ ├── btn │ │ │ │ ├── add_img.png │ │ │ │ ├── icon_top.png │ │ │ │ └── play-button-large.png │ │ │ ├── first │ │ │ │ ├── bg-1.jpg │ │ │ │ ├── bg-10.jpg │ │ │ │ ├── bg-11.jpg │ │ │ │ ├── bg-4.jpg │ │ │ │ ├── bg-5.jpg │ │ │ │ ├── bg-6.jpg │ │ │ │ ├── bg-7.jpg │ │ │ │ ├── bg-8.jpg │ │ │ │ ├── bg-9.jpg │ │ │ │ ├── party.1037.jpg │ │ │ │ ├── party.1040.jpg │ │ │ │ ├── qq.png │ │ │ │ └── weibo.png │ │ │ ├── image-overlay-icon.png │ │ │ ├── image-overlay-view-icon.png │ │ │ ├── logo │ │ │ │ ├── logo.png │ │ │ │ ├── m.png │ │ │ │ └── m42.png │ │ │ ├── spinner-overlay.png │ │ │ └── spinner.gif │ │ ├── js │ │ │ ├── app.markdown.js │ │ │ ├── jquery.form.min.js │ │ │ ├── jquery.min.js │ │ │ ├── modules │ │ │ │ ├── authc.js │ │ │ │ ├── avatar.js │ │ │ │ ├── comment.js │ │ │ │ ├── editor.js │ │ │ │ ├── main.js │ │ │ │ ├── markdown.js │ │ │ │ ├── post.js │ │ │ │ ├── validate.js │ │ │ │ └── view.js │ │ │ ├── plugins.js │ │ │ ├── sea.config.js │ │ │ └── sea.js │ │ └── vendors │ │ │ ├── animate │ │ │ ├── animate.css │ │ │ └── animate.min.css │ │ │ ├── bootstrap-tagsinput │ │ │ ├── bootstrap-tagsinput.css │ │ │ └── bootstrap-tagsinput.js │ │ │ ├── bootstrap │ │ │ ├── css │ │ │ │ └── bootstrap.min.css │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ │ └── bootstrap.min.js │ │ │ ├── codemirror │ │ │ ├── addon │ │ │ │ ├── comment │ │ │ │ │ ├── comment.js │ │ │ │ │ └── continuecomment.js │ │ │ │ ├── dialog │ │ │ │ │ ├── dialog.css │ │ │ │ │ └── dialog.js │ │ │ │ ├── display │ │ │ │ │ ├── autorefresh.js │ │ │ │ │ ├── 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 │ │ │ │ │ ├── html-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 │ │ │ │ │ ├── jump-to-line.js │ │ │ │ │ ├── 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 │ │ │ ├── keymap │ │ │ │ ├── emacs.js │ │ │ │ ├── sublime.js │ │ │ │ └── vim.js │ │ │ ├── lib │ │ │ │ ├── codemirror.css │ │ │ │ └── codemirror.js │ │ │ ├── mode │ │ │ │ └── markdown │ │ │ │ │ ├── index.html │ │ │ │ │ ├── markdown.js │ │ │ │ │ └── test.js │ │ │ └── theme │ │ │ │ ├── eclipse.css │ │ │ │ ├── github-markdown.css │ │ │ │ └── idea.css │ │ │ ├── font-awesome │ │ │ ├── HELP-US-OUT.txt │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── less │ │ │ │ ├── animated.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── screen-reader.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ └── scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ │ ├── highlight │ │ │ ├── CHANGES.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── README.ru.md │ │ │ ├── highlight.pack.js │ │ │ └── styles │ │ │ │ ├── agate.css │ │ │ │ ├── androidstudio.css │ │ │ │ ├── arduino-light.css │ │ │ │ ├── arta.css │ │ │ │ ├── ascetic.css │ │ │ │ ├── atelier-cave-dark.css │ │ │ │ ├── atelier-cave-light.css │ │ │ │ ├── atelier-dune-dark.css │ │ │ │ ├── atelier-dune-light.css │ │ │ │ ├── atelier-estuary-dark.css │ │ │ │ ├── atelier-estuary-light.css │ │ │ │ ├── atelier-forest-dark.css │ │ │ │ ├── atelier-forest-light.css │ │ │ │ ├── atelier-heath-dark.css │ │ │ │ ├── atelier-heath-light.css │ │ │ │ ├── atelier-lakeside-dark.css │ │ │ │ ├── atelier-lakeside-light.css │ │ │ │ ├── atelier-plateau-dark.css │ │ │ │ ├── atelier-plateau-light.css │ │ │ │ ├── atelier-savanna-dark.css │ │ │ │ ├── atelier-savanna-light.css │ │ │ │ ├── atelier-seaside-dark.css │ │ │ │ ├── atelier-seaside-light.css │ │ │ │ ├── atelier-sulphurpool-dark.css │ │ │ │ ├── atelier-sulphurpool-light.css │ │ │ │ ├── atom-one-dark.css │ │ │ │ ├── atom-one-light.css │ │ │ │ ├── brown-paper.css │ │ │ │ ├── brown-papersq.png │ │ │ │ ├── codepen-embed.css │ │ │ │ ├── color-brewer.css │ │ │ │ ├── darcula.css │ │ │ │ ├── dark.css │ │ │ │ ├── darkula.css │ │ │ │ ├── default.css │ │ │ │ ├── docco.css │ │ │ │ ├── dracula.css │ │ │ │ ├── far.css │ │ │ │ ├── foundation.css │ │ │ │ ├── github-gist.css │ │ │ │ ├── github.css │ │ │ │ ├── googlecode.css │ │ │ │ ├── grayscale.css │ │ │ │ ├── gruvbox-dark.css │ │ │ │ ├── gruvbox-light.css │ │ │ │ ├── hopscotch.css │ │ │ │ ├── hybrid.css │ │ │ │ ├── idea.css │ │ │ │ ├── ir-black.css │ │ │ │ ├── kimbie.dark.css │ │ │ │ ├── kimbie.light.css │ │ │ │ ├── magula.css │ │ │ │ ├── mono-blue.css │ │ │ │ ├── monokai-sublime.css │ │ │ │ ├── monokai.css │ │ │ │ ├── obsidian.css │ │ │ │ ├── ocean.css │ │ │ │ ├── paraiso-dark.css │ │ │ │ ├── paraiso-light.css │ │ │ │ ├── pojoaque.css │ │ │ │ ├── pojoaque.jpg │ │ │ │ ├── purebasic.css │ │ │ │ ├── qtcreator_dark.css │ │ │ │ ├── qtcreator_light.css │ │ │ │ ├── railscasts.css │ │ │ │ ├── rainbow.css │ │ │ │ ├── routeros.css │ │ │ │ ├── school-book.css │ │ │ │ ├── school-book.png │ │ │ │ ├── solarized-dark.css │ │ │ │ ├── solarized-light.css │ │ │ │ ├── sunburst.css │ │ │ │ ├── tomorrow-night-blue.css │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ ├── tomorrow-night.css │ │ │ │ ├── tomorrow.css │ │ │ │ ├── vs.css │ │ │ │ ├── vs2015.css │ │ │ │ ├── xcode.css │ │ │ │ ├── xt256.css │ │ │ │ └── zenburn.css │ │ │ ├── jquery-validation │ │ │ ├── additional-methods.js │ │ │ ├── additional-methods.min.js │ │ │ ├── jquery.validate.js │ │ │ ├── jquery.validate.min.js │ │ │ └── localization │ │ │ │ ├── messages_zh.js │ │ │ │ └── messages_zh.min.js │ │ │ ├── layer │ │ │ ├── extend │ │ │ │ └── layer.ext.js │ │ │ ├── layer.js │ │ │ └── skin │ │ │ │ ├── default │ │ │ │ ├── icon-ext.png │ │ │ │ ├── icon.png │ │ │ │ ├── loading-0.gif │ │ │ │ ├── loading-1.gif │ │ │ │ └── loading-2.gif │ │ │ │ ├── layer.css │ │ │ │ └── layer.ext.css │ │ │ ├── lazyload │ │ │ └── jquery.lazyload.js │ │ │ ├── marked │ │ │ ├── marked.js │ │ │ ├── marked.min.js │ │ │ └── md.html │ │ │ ├── owo │ │ │ ├── OwO.json │ │ │ ├── OwO.min.css │ │ │ ├── OwO.min.js │ │ │ └── OwO.min.js.map │ │ │ ├── pace │ │ │ ├── pace.min.js │ │ │ └── themes │ │ │ │ └── pace-theme-minimal.css │ │ │ ├── pjax │ │ │ └── pjax.min.js │ │ │ ├── share.js │ │ │ ├── css │ │ │ │ └── share.min.css │ │ │ ├── fonts │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.svg │ │ │ │ ├── iconfont.ttf │ │ │ │ └── iconfont.woff │ │ │ └── js │ │ │ │ ├── jquery.share.min.js │ │ │ │ └── social-share.min.js │ │ │ ├── simple-line-icons │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── History.md │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── css │ │ │ │ └── simple-line-icons.css │ │ │ ├── fonts │ │ │ │ ├── Simple-Line-Icons.eot │ │ │ │ ├── Simple-Line-Icons.svg │ │ │ │ ├── Simple-Line-Icons.ttf │ │ │ │ ├── Simple-Line-Icons.woff │ │ │ │ └── Simple-Line-Icons.woff2 │ │ │ ├── gulpfile.js │ │ │ ├── less │ │ │ │ └── simple-line-icons.less │ │ │ ├── package.json │ │ │ ├── scss │ │ │ │ └── simple-line-icons.scss │ │ │ └── yarn.lock │ │ │ ├── tinymce │ │ │ ├── jquery.tinymce.min.js │ │ │ ├── langs │ │ │ │ ├── readme.md │ │ │ │ └── zh_CN.js │ │ │ ├── license.txt │ │ │ ├── plugins │ │ │ │ ├── advlist │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── anchor │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── autolink │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── autoresize │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── autosave │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── bbcode │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── charmap │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── code │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── codesample │ │ │ │ │ ├── css │ │ │ │ │ │ └── prism.css │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── colorpicker │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── contextmenu │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── directionality │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── emoticons │ │ │ │ │ ├── img │ │ │ │ │ │ ├── smiley-cool.gif │ │ │ │ │ │ ├── smiley-cry.gif │ │ │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ │ │ ├── smiley-frown.gif │ │ │ │ │ │ ├── smiley-innocent.gif │ │ │ │ │ │ ├── smiley-kiss.gif │ │ │ │ │ │ ├── smiley-laughing.gif │ │ │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ │ │ ├── smiley-sealed.gif │ │ │ │ │ │ ├── smiley-smile.gif │ │ │ │ │ │ ├── smiley-surprised.gif │ │ │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ │ │ ├── smiley-undecided.gif │ │ │ │ │ │ ├── smiley-wink.gif │ │ │ │ │ │ └── smiley-yell.gif │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── fullpage │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── fullscreen │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── help │ │ │ │ │ ├── img │ │ │ │ │ │ └── logo.png │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── hr │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── image │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── imagetools │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── importcss │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── insertdatetime │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── legacyoutput │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── link │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── lists │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── media │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── nonbreaking │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── noneditable │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── pagebreak │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── paste │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── preview │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── print │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── save │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── searchreplace │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── spellchecker │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── tabfocus │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── table │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── template │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── textcolor │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── textpattern │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── toc │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── uploadimage │ │ │ │ │ ├── plugin.js │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── visualblocks │ │ │ │ │ ├── css │ │ │ │ │ │ └── visualblocks.css │ │ │ │ │ └── plugin.min.js │ │ │ │ ├── visualchars │ │ │ │ │ └── plugin.min.js │ │ │ │ └── wordcount │ │ │ │ │ └── plugin.min.js │ │ │ ├── skins │ │ │ │ └── lightgray │ │ │ │ │ ├── content.inline.min.css │ │ │ │ │ ├── content.min.css │ │ │ │ │ ├── content.mobile.min.css │ │ │ │ │ ├── fonts │ │ │ │ │ ├── tinymce-mobile.woff │ │ │ │ │ ├── tinymce-small.eot │ │ │ │ │ ├── tinymce-small.svg │ │ │ │ │ ├── tinymce-small.ttf │ │ │ │ │ ├── tinymce-small.woff │ │ │ │ │ ├── tinymce.eot │ │ │ │ │ ├── tinymce.svg │ │ │ │ │ ├── tinymce.ttf │ │ │ │ │ └── tinymce.woff │ │ │ │ │ ├── img │ │ │ │ │ ├── anchor.gif │ │ │ │ │ ├── loader.gif │ │ │ │ │ ├── object.gif │ │ │ │ │ └── trans.gif │ │ │ │ │ ├── skin.min.css │ │ │ │ │ └── skin.mobile.min.css │ │ │ ├── themes │ │ │ │ ├── inlite │ │ │ │ │ └── theme.min.js │ │ │ │ ├── mobile │ │ │ │ │ └── theme.min.js │ │ │ │ └── modern │ │ │ │ │ └── theme.min.js │ │ │ └── tinymce.min.js │ │ │ └── treetable │ │ │ ├── css │ │ │ ├── jquery.treetable.css │ │ │ ├── jquery.treetable.theme.default.css │ │ │ └── screen.css │ │ │ └── jquery.treetable.js │ └── error │ │ ├── 403.html │ │ ├── 404.html │ │ ├── 500.html │ │ └── reject.html │ └── templates │ ├── admin │ ├── channel │ │ ├── list.ftl │ │ └── view.ftl │ ├── comment │ │ └── list.ftl │ ├── dist │ │ ├── css │ │ │ ├── site.addons.css │ │ │ ├── site.css │ │ │ └── skins │ │ │ │ └── skin-blue.css │ │ ├── images │ │ │ └── btn-add-image.png │ │ └── js │ │ │ ├── site.base.js │ │ │ └── site.js │ ├── editor │ │ ├── markdown.ftl │ │ └── tinymce.ftl │ ├── index.ftl │ ├── message.ftl │ ├── options │ │ ├── index.ftl │ │ ├── mail.ftl │ │ ├── oauths.ftl │ │ ├── sites.ftl │ │ └── storages.ftl │ ├── post │ │ ├── list.ftl │ │ └── view.ftl │ ├── role │ │ ├── list.ftl │ │ └── view.ftl │ ├── theme │ │ └── index.ftl │ ├── user │ │ ├── list.ftl │ │ ├── pwd.ftl │ │ └── view.ftl │ └── utils │ │ └── ui.ftl │ ├── classic │ ├── about.json │ ├── auth │ │ ├── forgot.ftl │ │ ├── login.ftl │ │ ├── oauth_register.ftl │ │ └── register.ftl │ ├── channel │ │ ├── editing.ftl │ │ ├── editor │ │ │ ├── markdown.ftl │ │ │ └── tinymce.ftl │ │ ├── index.ftl │ │ └── view.ftl │ ├── dist │ │ ├── css │ │ │ └── style.css │ │ └── images │ │ │ ├── btn-add-image.png │ │ │ └── preview │ │ │ └── 1.png │ ├── inc │ │ ├── action_message.ftl │ │ ├── footer.ftl │ │ ├── header.ftl │ │ ├── layout.ftl │ │ ├── posts_item.ftl │ │ ├── right.ftl │ │ └── user_sidebar.ftl │ ├── index.ftl │ ├── search.ftl │ ├── settings │ │ ├── avatar.ftl │ │ ├── email.ftl │ │ ├── password.ftl │ │ └── profile.ftl │ ├── tag │ │ ├── index.ftl │ │ └── view.ftl │ └── user │ │ ├── method_comments.ftl │ │ ├── method_favorites.ftl │ │ ├── method_messages.ftl │ │ └── method_posts.ftl │ ├── default │ ├── about.json │ ├── auth │ │ ├── forgot.ftl │ │ ├── login.ftl │ │ ├── oauth_register.ftl │ │ └── register.ftl │ ├── channel │ │ ├── editing.ftl │ │ ├── editor │ │ │ ├── markdown.ftl │ │ │ └── tinymce.ftl │ │ ├── index.ftl │ │ └── view.ftl │ ├── dist │ │ ├── css │ │ │ └── style.css │ │ └── images │ │ │ ├── btn-add-image.png │ │ │ ├── icon_top.png │ │ │ ├── image-overlay-audio-icon.png │ │ │ ├── image-overlay-icon.png │ │ │ ├── image-overlay-play-icon.png │ │ │ ├── image-overlay-view-icon.png │ │ │ ├── logo.png │ │ │ ├── preview │ │ │ └── 1.png │ │ │ ├── qq.png │ │ │ └── weibo.png │ ├── inc │ │ ├── action_message.ftl │ │ ├── footer.ftl │ │ ├── header.ftl │ │ ├── layout.ftl │ │ ├── right.ftl │ │ └── user_sidebar.ftl │ ├── index.ftl │ ├── search.ftl │ ├── settings │ │ ├── avatar.ftl │ │ ├── email.ftl │ │ ├── password.ftl │ │ └── profile.ftl │ ├── tag │ │ ├── index.ftl │ │ └── view.ftl │ └── user │ │ ├── method_comments.ftl │ │ ├── method_favorites.ftl │ │ ├── method_messages.ftl │ │ └── method_posts.ftl │ ├── email_code.ftl │ ├── error.ftl │ └── utils.ftl └── test └── java └── com └── mtons └── mblog ├── AliyunOSSTest.java ├── Base64Test.java ├── ImageUtilsTest.java ├── QiniuOSSTest.java └── modules ├── repository └── ResourceRepositoryTest.java └── service └── impl └── PostServiceImplTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Package Files # 4 | *.war 5 | *.ear 6 | .idea 7 | 8 | indexes 9 | storage 10 | logs 11 | 12 | # project settings 13 | *.project 14 | *.classpath 15 | .settings/ 16 | target 17 | .externalToolBuilders 18 | *.iml 19 | 20 | # rebel 21 | rebel.xml 22 | 23 | *.db 24 | 25 | !/src/main/java/com/mtons/mblog/base/storage/ 26 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.5.4-jdk-8 2 | MAINTAINER mtons 3 | 4 | WORKDIR /app/mblog 5 | ADD . /build 6 | 7 | ENV TZ=Asia/Shanghai 8 | RUN ln -sf /usr/share/zoneinfo/{TZ} /etc/localtime && echo "{TZ}" > /etc/timezone 9 | 10 | RUN cd /build && mvn package -Dmaven.test.skip=true -Pdocker \ 11 | && cp -f target/mblog-latest.jar /app/mblog && rm -rf /build/* 12 | 13 | EXPOSE 8080 14 | 15 | ENTRYPOINT ["java","-jar","/app/mblog/mblog-latest.jar"] -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | # 拉取最新的源码 2 | # git pull 3 | 4 | # 停止已运行的服务 5 | # sh run.sh stop 6 | 7 | # 执行打包 8 | mvn clean package -Dmaven.test.skip=true 9 | 10 | # 运行 11 | # sh run.sh start 12 | 13 | echo "mblog打包完毕, 可使用sh run.sh start进行启动" -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | mysql: 4 | container_name: mblog-mysql 5 | image: mysql/mysql-server:5.7 6 | environment: 7 | MYSQL_DATABASE: db_mblog 8 | MYSQL_ROOT_PASSWORD: 12345 9 | MYSQL_ROOT_HOST: '%' 10 | TZ: Asia/Shanghai 11 | expose: 12 | - "3306" 13 | volumes: 14 | - /data/mblog/mysql/mysql_data:/var/lib/mysql 15 | restart: always 16 | 17 | server: 18 | container_name: mblog-server 19 | image: langhsu/mblog:latest 20 | build: . 21 | working_dir: /app/mblog 22 | environment: 23 | TZ: Asia/Shanghai 24 | ports: 25 | - "8080:8080" 26 | volumes: 27 | - /data/mblog/storage:/app/mblog/storage 28 | - /data/mblog/logs:/app/mblog/logs 29 | depends_on: 30 | - mysql 31 | restart: always -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/docs/.nojekyll -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | Welcome to mblog -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | - [中文](/) 2 | - [英文](/en/) -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - 开始 2 | - [准备工作](/ready) 3 | - [快速开始](/getting-started) 4 | 5 | - 网站配置 6 | - [网站基本配置](/base) 7 | - [配置Email](/email) 8 | - [上传配置](/upload) 9 | - [OAuth2登录配置](/oauth) 10 | -------------------------------------------------------------------------------- /docs/base.md: -------------------------------------------------------------------------------- 1 | 网站基本配置 2 | 3 | h2用户我想说的是你下载就可以运行了, 所以请你忽略下面的数据库配置, 如何选择h2见 [上传配置](/getting-started) 4 | 5 | 数据库配置修改如下 6 | - 新建`db_mblog`数据库, 数据库编码设置为`utf8`/`utf8mb4` 7 | - `src/main/resources/application-mysql.yml` 8 | 9 | ```yml 10 | spring.datasource.url: jdbc:mysql://localhost/db_mblog?useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2B8 11 | spring.datasource.username: root 12 | spring.datasource.password: root 13 | ``` 14 | * 如果mysql运行在本机localhost位置不需要修改, 将`username` `password`修改为你的数据库账号和密码 15 | 16 | 关于其他配置启动后访问 `http://localhost:8080/admin/options`进行配置 17 | 18 | 19 | 开关控制 20 | - `src/main/resources/application.yml` 21 | 22 | ```yml 23 | site: 24 | controls: 25 | # 注册开关 26 | register: true 27 | # 注册开启邮箱验证 28 | register_email_validate: false 29 | # 发布文章开关 30 | post: true 31 | # 评论开关 32 | comment: true 33 | 34 | ``` -------------------------------------------------------------------------------- /docs/email.md: -------------------------------------------------------------------------------- 1 | 一、邮箱验证码需要使用发送邮件功能 2 | - 可在后台系统配置->邮件服务 中进行配置 3 | 4 | 二、注册邮箱认证功能 5 | - 注册时可开启邮箱认证, 开启方法见 6 | 7 | ```yaml 8 | site: 9 | controls: 10 | # 注册开启邮箱验证 11 | register_email_validate: false 12 | ``` 13 | -------------------------------------------------------------------------------- /docs/getting-started.md: -------------------------------------------------------------------------------- 1 | 快速开始 2 | 3 | ## 开发人员搭建 4 | 5 | - git clone https://github.com/langhsu/mblog 6 | - 使用idea打开(如果使用的Eclipse请以maven项目导入) 7 | - idea打开它会自动构建项目,构建工具是maven 8 | - 修改配置文件 `src/main/resources/application-mysql.yml` 里的数据库相关配置 9 | - 找到`com.mtons.mblog.BootApplication`类,直接运行main方法即可启动 10 | - 浏览器运行 `http://localhost:8080` , 后台地址 `http://localhost:8080/admin` 管理员账号 admin 密码 12345 11 | 12 | * 如需要使用H2数据库可以在Maven面板选择 Profiles > h2, maven编译打包可以加 `-Ph2` (默认为mysql) 13 | 14 | ## docker运行 15 | 16 | - 安装docker和docker-compose环境 17 | - `git clone https://github.com/langhsu/mblog` 18 | - cd mblog进入项目 19 | - 运行 `docker-compose up -d` 命令 20 | - 启动后,访问 `http://localhost:8080` 21 | - 查看日志 `docker-compose logs -f server` 22 | 23 | > 新版本中将不再使用H2为docker的默认数据库 24 | > docker 默认使用镜像运行, 如有二次开发, 请切换为编译安装 25 | 26 | - 停止服务 `docker-compose down` 27 | - 进入容器 `docker exec -it {containerId} /bin/bash` 28 | 29 | > docker-compose up会优先使用已有的容器,而不是重新创建容器 30 | > docker-compose up -d --force-recreate 使用 --force-recreate 可以强制重建容器 (否则只能在容器配置有更改时才会重建容器) 31 | -------------------------------------------------------------------------------- /docs/oauth.md: -------------------------------------------------------------------------------- 1 | 可在后台->系统配置->第三方登录 中进行配置, 未配置时前端将不会显示三方登录按钮 2 | 3 | 现支持的第三方登录有: QQ、微博、Github 4 | 5 | 一、QQ登录 6 | - 回调地址: http://{domain}/oauth/callback/qq 7 | - APP ID: 8 | - APP KEY 9 | 10 | QQ互联侧: 11 | 网站回调域: http://{domain}/oauth/callback/qq 12 | 13 | 一、微博登录 14 | - 回调地址: http://{domain}/oauth/callback/weibo 15 | - APP ID: 16 | - APP KEY 17 | 一、Github登录 18 | - 回调地址: http://{domain}/oauth/callback/github 19 | - APP ID: 20 | - APP KEY 21 | 22 | 等有时间再来补充 -------------------------------------------------------------------------------- /docs/ready.md: -------------------------------------------------------------------------------- 1 | 准备工作 2 | 3 | ### 运行环境 4 | 5 | 1. 安装Java环境,项目是用java开发的,java运行环境是必须的,版本:jdk8 6 | 2. 安装MySQL数据库服务(如果选择的H2可以忽略此步骤) 7 | 8 | ### 开发环境 9 | 10 | 1. Maven3安装 11 | 2. IDE安装lombok插件 12 | 13 | -------------------------------------------------------------------------------- /docs/upload.md: -------------------------------------------------------------------------------- 1 | 一、本地存储(默认配置) 2 | 3 | 程序启动后,将会在运行目录生成 `storage` 文件夹, 所有的程序运行时产生的文件都存储在该目录下 4 | 5 | 修改本地存储路径(默认为程序运行目录) `src/main/resources/application.yml` 6 | ```yml 7 | site: 8 | location: ${user.dir} 9 | ``` 10 | 11 | 二、云存储配置 12 | 后续完善 -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | APP_NAME=mblog-latest.jar 3 | BASE_PATH=$(cd `dirname $0`; pwd) 4 | 5 | echo 'cd $BASE_PATH' 6 | 7 | usage() { 8 | echo "case: sh run.sh [start|stop|restart|status]" 9 | exit 1 10 | } 11 | 12 | is_exist(){ 13 | pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' ` 14 | if [ -z "${pid}" ]; then 15 | return 1 16 | else 17 | return 0 18 | fi 19 | } 20 | 21 | start(){ 22 | is_exist 23 | if [ $? -eq "0" ]; then 24 | echo "${APP_NAME} running. pid=${pid}" 25 | else 26 | nohup java -jar ./target/$APP_NAME > log.file 2>log.error & 27 | echo "${APP_NAME} started" 28 | fi 29 | } 30 | 31 | stop(){ 32 | is_exist 33 | if [ $? -eq "0" ]; then 34 | kill -9 $pid 35 | echo "${pid} stopped" 36 | else 37 | echo "${APP_NAME} not running" 38 | fi 39 | } 40 | 41 | status(){ 42 | is_exist 43 | if [ $? -eq "0" ]; then 44 | echo "${APP_NAME} running. Pid is ${pid}" 45 | else 46 | echo "${APP_NAME} not running" 47 | fi 48 | } 49 | 50 | restart(){ 51 | stop 52 | start 53 | } 54 | 55 | case "$1" in 56 | "start") 57 | start 58 | ;; 59 | "stop") 60 | stop 61 | ;; 62 | "status") 63 | status 64 | ;; 65 | "restart") 66 | restart 67 | ;; 68 | *) 69 | usage 70 | ;; 71 | esac -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/BootApplication.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cache.annotation.EnableCaching; 7 | import org.springframework.context.ApplicationContext; 8 | 9 | /** 10 | * SprintBootApplication 11 | */ 12 | @Slf4j 13 | @SpringBootApplication 14 | @EnableCaching 15 | public class BootApplication { 16 | 17 | public static void main(String[] args) { 18 | ApplicationContext context = SpringApplication.run(BootApplication.class, args); 19 | String serverPort = context.getEnvironment().getProperty("server.port"); 20 | log.info("mblog started at http://localhost:" + serverPort); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/lang/EntityStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | mtons [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.base.lang; 11 | 12 | /** 13 | * @author langhsu 14 | * 15 | */ 16 | public interface EntityStatus { 17 | int ENABLED = 0; // 启动 18 | int DISABLED = 1; // 禁用 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/lang/Theme.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.lang; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author : landy 9 | */ 10 | @Data 11 | public class Theme { 12 | /** 13 | * 所在路径 14 | */ 15 | private String path; 16 | 17 | /** 18 | * 名称 (同目录名) 19 | */ 20 | private String name; 21 | 22 | /** 23 | * 介绍 24 | */ 25 | private String slogan; 26 | 27 | /** 28 | * 版本 29 | */ 30 | private String version; 31 | 32 | /** 33 | * 作者 34 | */ 35 | private String author; 36 | 37 | /** 38 | * 作者网站 39 | */ 40 | private String website; 41 | 42 | /** 43 | * 预览图 44 | */ 45 | private List previews; 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/oauth/utils/Display.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.oauth.utils; 2 | 3 | public enum Display { 4 | DEFAULT("default"), PAGE("page"), IFRAME("iframe"), POPUP("popup"), TOUCH("touch"), MOBILE("mobile"), TV("tv"), PAD("pad"), 5 | CLIENT("client"), APPONWEIBO("apponweibo"), WAP("wap"); 6 | 7 | private String type; 8 | 9 | private Display(String type) { 10 | this.type = type; 11 | } 12 | 13 | public String getType() { 14 | return this.type; 15 | } 16 | 17 | public void setType(String type) { 18 | this.type = type; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/oauth/utils/EnumOauthTypeBean.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.oauth.utils; 2 | 3 | public enum EnumOauthTypeBean { 4 | TYPE_DOUBAN("豆瓣登录", 3), 5 | TYPE_QQ("QQ登录", 2), 6 | TYPE_SINA("微博登录", 1), 7 | TYPE_GITHUB("github登录", 4); 8 | 9 | private String description; 10 | private int value; 11 | 12 | private EnumOauthTypeBean(String desc, int value) { 13 | this.description = desc; 14 | this.value = value; 15 | } 16 | 17 | public String getDescription() { 18 | return this.description; 19 | } 20 | 21 | public int getValue() { 22 | return this.value; 23 | } 24 | 25 | public static EnumOauthTypeBean getEnumStatus(int type) throws Exception { 26 | EnumOauthTypeBean[] status = values(); 27 | for (int i = 0; i < status.length; i++) { 28 | if (status[i].getValue() == type) { 29 | return status[i]; 30 | } 31 | } 32 | 33 | throw new Exception(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/oauth/utils/MyX509TrustManager.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.oauth.utils; 2 | 3 | import java.security.cert.X509Certificate; 4 | 5 | class MyX509TrustManager implements javax.net.ssl.X509TrustManager { 6 | public X509Certificate[] getAcceptedIssuers() { 7 | return null; 8 | } 9 | 10 | public void checkClientTrusted(X509Certificate[] chain, String authType) 11 | throws java.security.cert.CertificateException { 12 | } 13 | 14 | public void checkServerTrusted(X509Certificate[] chain, String authType) 15 | throws java.security.cert.CertificateException { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/oauth/utils/OathConfig.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.oauth.utils; 2 | 3 | import com.mtons.mblog.base.oauth.APIConfig; 4 | 5 | 6 | public class OathConfig { 7 | public static String getValue(String key) { 8 | return APIConfig.getInstance().getValue(key); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/oauth/utils/TrustAnyHostnameVerifier.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.oauth.utils; 2 | 3 | import javax.net.ssl.HostnameVerifier; 4 | import javax.net.ssl.SSLSession; 5 | 6 | class TrustAnyHostnameVerifier implements HostnameVerifier { 7 | public boolean verify(String hostname, SSLSession session) { 8 | return true; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/utils/Printer.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.utils; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | 5 | /** 6 | * @author langhsu on 2015/9/6. 7 | */ 8 | @Slf4j 9 | public class Printer { 10 | public static void info(String message) { 11 | log.info(message); 12 | } 13 | 14 | public static void debug(String message) { 15 | log.debug(message); 16 | } 17 | 18 | public static void warn(String message) { 19 | log.warn(message); 20 | } 21 | 22 | public static void error(String message) { 23 | log.error(message); 24 | } 25 | 26 | public static void error(String message, Throwable t) { 27 | log.error(message, t); 28 | } 29 | 30 | public static void error(Throwable t) { 31 | log.error(t.getMessage(), t); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/base/utils/ResourceLock.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.base.utils; 2 | 3 | import java.util.concurrent.*; 4 | import java.util.concurrent.atomic.AtomicInteger; 5 | 6 | /** 7 | * resource lock 8 | * 9 | * @author saxing 2019/4/3 16:20 10 | */ 11 | public class ResourceLock { 12 | 13 | private static final ConcurrentHashMap lockMap = new ConcurrentHashMap(); 14 | 15 | public static AtomicInteger getAtomicInteger(String key) { 16 | if (lockMap.get(key) == null) { 17 | lockMap.putIfAbsent(key, new AtomicInteger(0)); 18 | } 19 | int count = lockMap.get(key).incrementAndGet(); 20 | return lockMap.get(key); 21 | } 22 | 23 | public static void giveUpAtomicInteger(String key) { 24 | if (lockMap.get(key) != null) { 25 | int source = lockMap.get(key).decrementAndGet(); 26 | if (source <= 0) { 27 | lockMap.remove(key); 28 | } 29 | } 30 | } 31 | 32 | public static String getPostKey(Long postId){ 33 | return "POST_OPERATE_{postId}".replace("{postId}", String.valueOf(postId)); 34 | } 35 | 36 | public static String getPicKey(Long picId){ 37 | return "PIC_OPERATE_{pic}".replace("{pic}", String.valueOf(picId)); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/aspect/HibernateFilterAspect.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.aspect; 2 | 3 | import org.aspectj.lang.JoinPoint; 4 | import org.aspectj.lang.annotation.Aspect; 5 | import org.aspectj.lang.annotation.Before; 6 | import org.aspectj.lang.annotation.Pointcut; 7 | import org.hibernate.Session; 8 | import org.springframework.stereotype.Component; 9 | 10 | import javax.persistence.EntityManager; 11 | import javax.persistence.PersistenceContext; 12 | 13 | /** 14 | * @author Mark Han 15 | */ 16 | @Aspect 17 | @Component 18 | public class HibernateFilterAspect { 19 | 20 | private static final String FILTER_NAME = "POST_STATUS_FILTER"; 21 | 22 | @PersistenceContext 23 | protected EntityManager em; 24 | 25 | @Pointcut("@annotation(com.mtons.mblog.modules.aspect.PostStatusFilter)") 26 | public void filter() { 27 | } 28 | 29 | @Before("filter()") 30 | public void doBefore(JoinPoint joinPoint) { 31 | Session mfSession = (Session) em.getDelegate(); 32 | if (mfSession.isOpen()) { 33 | mfSession.enableFilter(FILTER_NAME).validate(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/aspect/PostStatusFilter.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.aspect; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 文章状态过滤注解 10 | * 11 | * @author Mark Han 12 | */ 13 | @Target(ElementType.METHOD) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface PostStatusFilter { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/data/BadgesCount.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.data; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @author langhsu 7 | */ 8 | public class BadgesCount implements Serializable { 9 | private static final long serialVersionUID = 8276459939240769498L; 10 | 11 | private int messages; // 消息数量 12 | 13 | public int getMessages() { 14 | return messages; 15 | } 16 | 17 | public void setMessages(int messages) { 18 | this.messages = messages; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/data/FavoriteVO.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.data; 2 | 3 | import com.mtons.mblog.modules.entity.Favorite; 4 | 5 | /** 6 | * @author langhsu on 2015/8/31. 7 | */ 8 | public class FavoriteVO extends Favorite { 9 | // extend 10 | private PostVO post; 11 | 12 | public PostVO getPost() { 13 | return post; 14 | } 15 | 16 | public void setPost(PostVO post) { 17 | this.post = post; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/data/MessageVO.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.data; 2 | 3 | import com.mtons.mblog.modules.entity.Message; 4 | 5 | /** 6 | * @author langhsu on 2015/8/31. 7 | */ 8 | public class MessageVO extends Message { 9 | // extend 10 | private UserVO from; 11 | private PostVO post; 12 | 13 | public UserVO getFrom() { 14 | return from; 15 | } 16 | 17 | public void setFrom(UserVO from) { 18 | this.from = from; 19 | } 20 | 21 | public PostVO getPost() { 22 | return post; 23 | } 24 | 25 | public void setPost(PostVO post) { 26 | this.post = post; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/data/PermissionTree.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.data; 2 | 3 | import com.mtons.mblog.modules.entity.Permission; 4 | 5 | import java.util.LinkedList; 6 | import java.util.List; 7 | 8 | /** 9 | * @author - langhsu on 2018/2/11 10 | */ 11 | public class PermissionTree extends Permission { 12 | private List items; 13 | 14 | public List getItems() { 15 | return items; 16 | } 17 | 18 | public void setItems(List items) { 19 | this.items = items; 20 | } 21 | 22 | public void addItem(PermissionTree item){ 23 | if(this.items == null){ 24 | this.items = new LinkedList<>(); 25 | } 26 | this.items.add(item); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/data/PostTagVO.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.data; 2 | 3 | import com.mtons.mblog.modules.entity.PostTag; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * @author : langhsu 11 | */ 12 | @Data 13 | @EqualsAndHashCode(callSuper = true) 14 | public class PostTagVO extends PostTag implements Serializable { 15 | private static final long serialVersionUID = 73354108587481371L; 16 | 17 | private PostVO post; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/data/TagVO.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.data; 2 | 3 | import com.mtons.mblog.modules.entity.Tag; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | 7 | import java.io.Serializable; 8 | import java.util.Date; 9 | 10 | /** 11 | * @author : langhsu 12 | */ 13 | @Data 14 | @EqualsAndHashCode(callSuper = true) 15 | public class TagVO extends Tag implements Serializable { 16 | private static final long serialVersionUID = -7787865229252467418L; 17 | 18 | private PostVO post; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/entity/PostAttribute.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.entity; 2 | 3 | import org.hibernate.annotations.Type; 4 | 5 | import javax.persistence.*; 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by langhsu on 2015/10/25. 10 | */ 11 | @Entity 12 | @Table(name = "mto_post_attribute") 13 | public class PostAttribute implements Serializable { 14 | private static final long serialVersionUID = 7829351358884064647L; 15 | 16 | @Id 17 | private long id; 18 | 19 | @Column(length = 16, columnDefinition = "varchar(16) default 'tinymce'") 20 | private String editor; 21 | 22 | /** 23 | * 内容 24 | */ 25 | @Lob 26 | @Basic(fetch = FetchType.LAZY) 27 | @Type(type="text") 28 | private String content; // 内容 29 | 30 | public long getId() { 31 | return id; 32 | } 33 | 34 | public void setId(long id) { 35 | this.id = id; 36 | } 37 | 38 | public String getEditor() { 39 | return editor; 40 | } 41 | 42 | public void setEditor(String editor) { 43 | this.editor = editor; 44 | } 45 | 46 | public String getContent() { 47 | return content; 48 | } 49 | 50 | public void setContent(String content) { 51 | this.content = content; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/entity/PostResource.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.entity; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.*; 6 | import java.io.Serializable; 7 | 8 | /** 9 | * 文章图片 10 | * 11 | * @author saxing 2019/4/3 22:39 12 | */ 13 | @Data 14 | @Entity 15 | @Table(name = "mto_post_resource", indexes = { 16 | @Index(name = "IK_R_POST_ID", columnList = "post_id") 17 | }) 18 | public class PostResource implements Serializable { 19 | private static final long serialVersionUID = -2343406058301647253L; 20 | 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | private long id; 24 | 25 | @Column(name = "post_id") 26 | private long postId; 27 | 28 | private long resourceId; 29 | 30 | private String path; 31 | 32 | @Column(name = "sort", columnDefinition = "int(11) NOT NULL DEFAULT '0'") 33 | private int sort; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/entity/PostTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.entity; 2 | 3 | import javax.persistence.*; 4 | 5 | /** 6 | * 文章标签映射表 7 | * @author : langhsu 8 | */ 9 | @Entity 10 | @Table(name = "mto_post_tag", indexes = { 11 | @Index(name = "IK_TAG_ID", columnList = "tag_id") 12 | }) 13 | public class PostTag { 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.IDENTITY) 16 | private long id; 17 | 18 | @Column(name = "post_id") 19 | private long postId; 20 | 21 | @Column(name = "tag_id") 22 | private long tagId; 23 | 24 | private long weight; 25 | 26 | public long getId() { 27 | return id; 28 | } 29 | 30 | public void setId(long id) { 31 | this.id = id; 32 | } 33 | 34 | public long getPostId() { 35 | return postId; 36 | } 37 | 38 | public void setPostId(long postId) { 39 | this.postId = postId; 40 | } 41 | 42 | public long getTagId() { 43 | return tagId; 44 | } 45 | 46 | public void setTagId(long tagId) { 47 | this.tagId = tagId; 48 | } 49 | 50 | public long getWeight() { 51 | return weight; 52 | } 53 | 54 | public void setWeight(long weight) { 55 | this.weight = weight; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/entity/RolePermission.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.entity; 2 | 3 | import javax.persistence.*; 4 | import java.io.Serializable; 5 | 6 | /** 7 | * 角色-权限值 8 | * @author - langhsu on 2018/2/11 9 | */ 10 | @Entity 11 | @Table(name = "shiro_role_permission") 12 | public class RolePermission implements Serializable { 13 | private static final long serialVersionUID = -5979636077649378677L; 14 | 15 | @Id 16 | @GeneratedValue(strategy = GenerationType.IDENTITY) 17 | private long id; 18 | 19 | @Column(name = "role_id") 20 | private long roleId; 21 | 22 | 23 | @Column(name = "permission_id") 24 | private long permissionId; 25 | 26 | public long getId() { 27 | return id; 28 | } 29 | 30 | public void setId(long id) { 31 | this.id = id; 32 | } 33 | 34 | public long getRoleId() { 35 | return roleId; 36 | } 37 | 38 | public void setRoleId(long roleId) { 39 | this.roleId = roleId; 40 | } 41 | 42 | public long getPermissionId() { 43 | return permissionId; 44 | } 45 | 46 | public void setPermissionId(long permissionId) { 47 | this.permissionId = permissionId; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/entity/UserRole.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.entity; 2 | 3 | import javax.persistence.*; 4 | import java.io.Serializable; 5 | 6 | /** 7 | * 用户角色映射表 8 | * 9 | * @author - langhsu on 2018/2/11 10 | */ 11 | @Entity 12 | @Table(name = "shiro_user_role") 13 | public class UserRole implements Serializable { 14 | private static final long serialVersionUID = -2908144287976184011L; 15 | 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.IDENTITY) 18 | private Long id; 19 | 20 | @Column(name = "user_id") 21 | private Long userId; 22 | 23 | @Column(name = "role_id") 24 | private Long roleId; 25 | 26 | public Long getId() { 27 | return id; 28 | } 29 | 30 | public void setId(Long id) { 31 | this.id = id; 32 | } 33 | 34 | public Long getUserId() { 35 | return userId; 36 | } 37 | 38 | public void setUserId(Long userId) { 39 | this.userId = userId; 40 | } 41 | 42 | public Long getRoleId() { 43 | return roleId; 44 | } 45 | 46 | public void setRoleId(Long roleId) { 47 | this.roleId = roleId; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/event/PostUpdateEvent.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.event; 2 | 3 | import org.springframework.context.ApplicationEvent; 4 | 5 | /** 6 | * 文章发布事件 7 | * //合并文章事件, 下层多个订阅者 8 | * - 推送Feed给粉丝 9 | * - 文章发布者文章数统计 10 | * - 推送通知 11 | * 12 | * created by langhsu at 2018/05/30 13 | */ 14 | public class PostUpdateEvent extends ApplicationEvent { 15 | public final static int ACTION_PUBLISH = 1; 16 | public final static int ACTION_DELETE = 2; 17 | 18 | private long postId; 19 | private long userId; 20 | private int action = ACTION_PUBLISH; 21 | 22 | public PostUpdateEvent(Object source) { 23 | super(source); 24 | } 25 | 26 | public long getPostId() { 27 | return postId; 28 | } 29 | 30 | public void setPostId(long postId) { 31 | this.postId = postId; 32 | } 33 | 34 | public long getUserId() { 35 | return userId; 36 | } 37 | 38 | public void setUserId(long userId) { 39 | this.userId = userId; 40 | } 41 | 42 | public int getAction() { 43 | return action; 44 | } 45 | 46 | public void setAction(int action) { 47 | this.action = action; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/hook/Hook.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.hook; 2 | 3 | /** 4 | * @author Beldon 2015/10/29 5 | */ 6 | public interface Hook{ 7 | 8 | // boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler); 9 | // 10 | // void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) 11 | // throws Exception; 12 | // 13 | // void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) 14 | // throws Exception; 15 | // 16 | // void afterConcurrentHandlingStarted( HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/hook/interceptor/InterceptorHook.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.hook.interceptor; 2 | 3 | import org.springframework.web.method.HandlerMethod; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | /** 10 | * 拦截器类钩子 11 | * 12 | * @author Beldon 2015/10/30 13 | */ 14 | public interface InterceptorHook { 15 | 16 | /** 17 | * 获取拦截名,可以同时获取多个拦截, 如 return new String[]{"mblog.web.controller.impl.group.GroupVidewController"}; 18 | *

19 | * 也可以拦截Controller里面的方法,格式如:return new String[]{"mblog.web.controller.impl.group.GroupVidewController#view"}; 20 | * 21 | * @return 22 | */ 23 | String[] getInterceptor(); 24 | 25 | void preHandle(HttpServletRequest request, HttpServletResponse response, HandlerMethod handler) throws Exception; 26 | 27 | void postHandle(HttpServletRequest request, HttpServletResponse response, HandlerMethod handler, ModelAndView modelAndView) throws Exception; 28 | 29 | void afterCompletion(HttpServletRequest request, HttpServletResponse response, HandlerMethod handler, Exception ex) throws Exception; 30 | 31 | void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, HandlerMethod handler) throws Exception; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/hook/interceptor/InterceptorHookSupport.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.hook.interceptor; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | 5 | import javax.annotation.PreDestroy; 6 | 7 | /** 8 | * 拦截类钩子支持类 9 | * 10 | * @author Beldon 2015/10/30 11 | */ 12 | public abstract class InterceptorHookSupport implements InterceptorHook { 13 | @Autowired 14 | protected InterceptorHookManager interceptorHookManager; 15 | 16 | @PreDestroy 17 | public void destroy() { 18 | interceptorHookManager.removeInterceptorHook(this); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/ChannelRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.repository; 11 | 12 | import com.mtons.mblog.modules.entity.Channel; 13 | import org.springframework.data.domain.Sort; 14 | import org.springframework.data.jpa.repository.JpaRepository; 15 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 16 | import org.springframework.data.jpa.repository.Query; 17 | 18 | import java.util.Collection; 19 | import java.util.List; 20 | 21 | /** 22 | * @author langhsu 23 | * 24 | */ 25 | public interface ChannelRepository extends JpaRepository, JpaSpecificationExecutor { 26 | List findAllByStatus(int status, Sort sort); 27 | 28 | @Query("select coalesce(max(weight), 0) from Channel") 29 | int maxWeight(); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/CommentRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.repository; 11 | 12 | import com.mtons.mblog.modules.entity.Comment; 13 | import org.springframework.data.domain.Page; 14 | import org.springframework.data.domain.Pageable; 15 | import org.springframework.data.jpa.repository.JpaRepository; 16 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 17 | 18 | import java.util.Collection; 19 | import java.util.List; 20 | import java.util.Set; 21 | 22 | /** 23 | * @author langhsu 24 | */ 25 | public interface CommentRepository extends JpaRepository, JpaSpecificationExecutor { 26 | Page findAll(Pageable pageable); 27 | Page findAllByPostId(Pageable pageable, long postId); 28 | Page findAllByAuthorId(Pageable pageable, long authorId); 29 | List removeByIdIn(Collection ids); 30 | List removeByPostId(long postId); 31 | long countByAuthorIdAndPostId(long authorId, long postId); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/FavoriteRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.Favorite; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | 9 | /** 10 | * @author langhsu 11 | */ 12 | public interface FavoriteRepository extends JpaRepository, JpaSpecificationExecutor { 13 | Favorite findByUserIdAndPostId(long userId, long postId); 14 | Page findAllByUserId(Pageable pageable, long userId); 15 | int deleteByPostId(long postId); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/LinksRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.repository; 11 | 12 | import com.mtons.mblog.modules.entity.Links; 13 | import org.springframework.data.jpa.repository.JpaRepository; 14 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 15 | 16 | /** 17 | * @author langhsu 18 | */ 19 | public interface LinksRepository extends JpaRepository, JpaSpecificationExecutor { 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/MessageRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.Message; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | import org.springframework.data.repository.query.Param; 11 | import org.springframework.transaction.annotation.Transactional; 12 | 13 | /** 14 | * @author langhsu 15 | */ 16 | public interface MessageRepository extends JpaRepository, JpaSpecificationExecutor { 17 | Page findAllByUserId(Pageable pageable, long userId); 18 | 19 | /** 20 | * 查询我的未读消息 21 | * 22 | * @param userId 23 | * @return 24 | */ 25 | int countByUserIdAndStatus(long userId, int status); 26 | 27 | /** 28 | * 标记我的消息为已读 29 | */ 30 | @Modifying 31 | @Query("update Message n set n.status = 1 where n.status = 0 and n.userId = :uid") 32 | int updateReadedByUserId(@Param("uid") Long uid); 33 | 34 | int deleteByPostId(long postId); 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/OptionsRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.repository; 11 | 12 | import com.mtons.mblog.modules.entity.Options; 13 | import org.springframework.data.jpa.repository.JpaRepository; 14 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 15 | 16 | /** 17 | * @author langhsu 18 | */ 19 | public interface OptionsRepository extends JpaRepository, JpaSpecificationExecutor { 20 | Options findByKey(String key); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/PermissionRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.Permission; 4 | import org.springframework.data.domain.Sort; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Query; 8 | import org.springframework.data.repository.query.Param; 9 | 10 | import java.util.List; 11 | import java.util.Set; 12 | 13 | /** 14 | * @author langhsu on 2018/8/12. 15 | */ 16 | public interface PermissionRepository extends JpaRepository, JpaSpecificationExecutor { 17 | List findAllByParentId(int parentId, Sort sort); 18 | 19 | @Query(value = "select count(role_id) from shiro_role_permission where permission_id=:permId", nativeQuery = true) 20 | int countUsed(@Param("permId") long permId); 21 | 22 | @Query("select coalesce(max(weight), 0) from Permission") 23 | int maxWeight(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/PostAttributeRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.PostAttribute; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | /** 8 | * Created by langhsu on 2018/9/27. 9 | */ 10 | public interface PostAttributeRepository extends JpaRepository, JpaSpecificationExecutor { 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/PostResourceRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.PostResource; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.Collection; 8 | import java.util.List; 9 | 10 | /** 11 | * 文章图片 dao 12 | * 13 | * @author saxing 2019/4/5 8:09 14 | */ 15 | public interface PostResourceRepository extends JpaRepository, JpaSpecificationExecutor { 16 | 17 | int deleteByPostId(long postId); 18 | 19 | int deleteByPostIdAndResourceIdIn(long postId, Collection resourceId); 20 | 21 | List findByResourceId(long resourceId); 22 | 23 | List findByPostId(long postId); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/PostTagRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.PostTag; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Query; 9 | import org.springframework.stereotype.Repository; 10 | 11 | import java.util.Set; 12 | 13 | /** 14 | * @author : langhsu 15 | */ 16 | @Repository 17 | public interface PostTagRepository extends JpaRepository, JpaSpecificationExecutor { 18 | Page findAllByTagId(Pageable pageable, long tagId); 19 | PostTag findByPostIdAndTagId(long postId, long tagId); 20 | 21 | @Query("select tagId from PostTag where postId = ?1") 22 | Set findTagIdByPostId(long postId); 23 | 24 | int deleteByPostId(long postId); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/RolePermissionRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.RolePermission; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author - langhsu 11 | * @create - 2018/5/18 12 | */ 13 | public interface RolePermissionRepository extends JpaRepository, JpaSpecificationExecutor { 14 | int deleteByRoleId(long roleId); 15 | List findAllByRoleId(long roleId); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/RoleRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.Role; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.List; 8 | import java.util.Set; 9 | 10 | public interface RoleRepository extends JpaRepository, JpaSpecificationExecutor { 11 | List findAllByStatus(int status); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/SecurityCodeRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.repository; 11 | 12 | import com.mtons.mblog.modules.entity.SecurityCode; 13 | import org.springframework.data.jpa.repository.JpaRepository; 14 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 15 | 16 | /** 17 | * @author langhsu on 2015/8/14. 18 | */ 19 | public interface SecurityCodeRepository extends JpaRepository, JpaSpecificationExecutor { 20 | SecurityCode findByKeyAndType(String key, int type); 21 | SecurityCode findByKey(String key); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/TagRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.Tag; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | import org.springframework.data.jpa.repository.Modifying; 7 | import org.springframework.data.jpa.repository.Query; 8 | import org.springframework.data.repository.query.Param; 9 | import org.springframework.stereotype.Repository; 10 | 11 | import java.util.Collection; 12 | 13 | /** 14 | * @author : langhsu 15 | */ 16 | @Repository 17 | public interface TagRepository extends JpaRepository, JpaSpecificationExecutor { 18 | Tag findByName(String name); 19 | 20 | @Modifying 21 | @Query("update Tag set posts = posts - 1 where id in (:ids) and posts > 0") 22 | int decrementPosts(@Param("ids") Collection ids); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/UserOauthRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.repository; 11 | 12 | import com.mtons.mblog.modules.entity.UserOauth; 13 | import org.springframework.data.jpa.repository.JpaRepository; 14 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 15 | 16 | /** 17 | * 第三方开发授权登录 18 | * 19 | * @author langhsu on 2015/8/12. 20 | */ 21 | public interface UserOauthRepository extends JpaRepository, JpaSpecificationExecutor { 22 | UserOauth findByAccessToken(String accessToken); 23 | UserOauth findByOauthUserId(String oauthUserId); 24 | UserOauth findByUserId(long userId); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/repository/UserRoleRepository.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.modules.entity.UserRole; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.Collection; 8 | import java.util.List; 9 | 10 | public interface UserRoleRepository extends JpaRepository, JpaSpecificationExecutor { 11 | List findAllByUserId(long userId); 12 | 13 | List findAllByUserIdIn(Collection userId); 14 | 15 | List findAllByRoleId(long roleId); 16 | 17 | /** 18 | * 清除权限 19 | * 20 | * @param userId 用户ID 21 | */ 22 | int deleteByUserId(long userId); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/ChannelService.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.service; 11 | 12 | import com.mtons.mblog.modules.entity.Channel; 13 | 14 | import java.util.Collection; 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | /** 19 | * 栏目管理 20 | * 21 | * @author langhsu 22 | * 23 | */ 24 | public interface ChannelService { 25 | List findAll(int status); 26 | Map findMapByIds(Collection ids); 27 | Channel getById(int id); 28 | void update(Channel channel); 29 | void updateWeight(int id, int weighted); 30 | void delete(int id); 31 | long count(); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/FavoriteService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.data.FavoriteVO; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | 7 | /** 8 | * 收藏记录 9 | * @author langhsu 10 | */ 11 | public interface FavoriteService { 12 | /** 13 | * 查询用户收藏记录 14 | * @param pageable 15 | * @param userId 16 | * @return 17 | */ 18 | Page pagingByUserId(Pageable pageable, long userId); 19 | 20 | void add(long userId, long postId); 21 | void delete(long userId, long postId); 22 | void deleteByPostId(long postId); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/LinksService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.entity.Links; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author : landy 9 | * @version : 1.0 10 | * @date : 2019/11/6 11 | */ 12 | public interface LinksService { 13 | List findAll(); 14 | void update(Links links); 15 | void delete(long id); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/MailService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * @author : langhsu 7 | */ 8 | public interface MailService { 9 | void config(); 10 | void sendTemplateEmail(String to, String title, String template, Map content); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.data.MessageVO; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | 7 | /** 8 | * @author langhsu 9 | */ 10 | public interface MessageService { 11 | 12 | Page pagingByUserId(Pageable pageable, long userId); 13 | 14 | /** 15 | * 发送通知 16 | * @param message 17 | */ 18 | void send(MessageVO message); 19 | 20 | /** 21 | * 未读消息数量 22 | * @param userId 23 | * @return 24 | */ 25 | int unread4Me(long userId); 26 | 27 | /** 28 | * 标记为已读 29 | * @param userId 30 | */ 31 | void readed4Me(long userId); 32 | 33 | /** 34 | * 根据文章ID清理消息 35 | * @param postId 36 | * @return 37 | */ 38 | int deleteByPostId(long postId); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/OpenOauthService.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.service; 11 | 12 | import com.mtons.mblog.modules.data.UserVO; 13 | import com.mtons.mblog.modules.data.OpenOauthVO; 14 | 15 | /** 16 | * @author langhsu on 2015/8/12. 17 | */ 18 | public interface OpenOauthService { 19 | //通过 oauth_token 查询 user 20 | UserVO getUserByOauthToken(String oauth_token); 21 | 22 | OpenOauthVO getOauthByToken(String oauth_token); 23 | 24 | OpenOauthVO getOauthByOauthUserId(String oauthUserId); 25 | 26 | OpenOauthVO getOauthByUid(long userId); 27 | 28 | boolean checkIsOriginalPassword(long userId); 29 | 30 | void saveOauthToken(OpenOauthVO oauth); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/OptionsService.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.service; 11 | 12 | import com.mtons.mblog.modules.entity.Options; 13 | import org.springframework.core.io.Resource; 14 | 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | 19 | /** 20 | * @author langhsu 21 | * 22 | */ 23 | public interface OptionsService { 24 | /** 25 | * 查询所有配置 26 | * @return list 27 | */ 28 | List findAll(); 29 | 30 | /** 31 | * 添加或修改配置 32 | * - 修改时根据key判断唯一性 33 | * @param options 34 | */ 35 | void update(Map options); 36 | 37 | void initSettings(Resource resource); 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/PermissionService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.data.PermissionTree; 4 | import com.mtons.mblog.modules.entity.Permission; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * @author - langhsu on 2018/2/11 12 | */ 13 | public interface PermissionService { 14 | /** 15 | * 分页查询权限 16 | * @param pageable 分页对象 17 | * @param name 权限名称,模糊匹配,如果为null则忽略改查询条件 18 | */ 19 | Page paging(Pageable pageable, String name); 20 | 21 | /** 22 | * 列出所有菜单项 23 | * @return 菜单列表 24 | */ 25 | List tree(); 26 | 27 | /** 28 | * 查询子菜单项 29 | * @param parentId 根目录ID 30 | * @return 菜单列表 31 | */ 32 | List tree(int parentId); 33 | 34 | /** 35 | * 查询所有权限 36 | * @return 权限列表 37 | */ 38 | List list(); 39 | 40 | /** 41 | * 根据权限项ID获得权限项信息 42 | * @param id 权限ID 43 | * @return Permission 44 | */ 45 | Permission get(long id); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/PostSearchService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.data.PostVO; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | 7 | /** 8 | * @author : langhsu 9 | * @version : 1.0 10 | * @date : 2019/1/18 11 | */ 12 | public interface PostSearchService { 13 | /** 14 | * 根据关键字搜索 15 | * @param pageable 分页 16 | * @param term 关键字 17 | * @throws Exception 18 | */ 19 | Page search(Pageable pageable, String term) throws Exception; 20 | 21 | /** 22 | * 重建 23 | */ 24 | void resetIndexes(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/RolePermissionService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.entity.Permission; 4 | import com.mtons.mblog.modules.entity.RolePermission; 5 | 6 | import java.util.List; 7 | import java.util.Set; 8 | 9 | /** 10 | * @author - langhsu 11 | * @create - 2018/5/18 12 | */ 13 | public interface RolePermissionService { 14 | List findPermissions(long roleId); 15 | void deleteByRoleId(long roleId); 16 | void add(Set rolePermissions); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/SecurityCodeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.service; 11 | 12 | /** 13 | * @author langhsu on 2015/8/14. 14 | */ 15 | public interface SecurityCodeService { 16 | /** 17 | * 生成验证码 18 | * @param key 19 | * @param target : email mobile 20 | * @return 21 | */ 22 | String generateCode(String key, int type, String target); 23 | 24 | /** 25 | * 检验验证码有效性 26 | * @param key 27 | * @param code 28 | * @return token 29 | */ 30 | boolean verify(String key, int type, String code); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/TagService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.data.PostTagVO; 4 | import com.mtons.mblog.modules.data.TagVO; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | 8 | /** 9 | * @author : langhsu 10 | */ 11 | public interface TagService { 12 | Page pagingQueryTags(Pageable pageable); 13 | Page pagingQueryPosts(Pageable pageable, String tagName); 14 | void batchUpdate(String names, long latestPostId); 15 | void deteleMappingByPostId(long postId); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/UserEventService.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.modules.service; 11 | 12 | import com.mtons.mblog.base.lang.Consts; 13 | import org.springframework.cache.annotation.CacheEvict; 14 | 15 | import java.util.Set; 16 | 17 | /** 18 | * @author langhsu on 2015/8/6. 19 | */ 20 | public interface UserEventService { 21 | /** 22 | * 自增发布文章数 23 | * @param userId 24 | */ 25 | @CacheEvict(value = {Consts.CACHE_USER, Consts.CACHE_POST}, allEntries = true) 26 | void identityPost(Long userId, boolean plus); 27 | 28 | /** 29 | * 自增评论数 30 | * @param userId 31 | */ 32 | @CacheEvict(value = {Consts.CACHE_USER, Consts.CACHE_POST}, allEntries = true) 33 | void identityComment(Long userId, boolean plus); 34 | 35 | /** 36 | * 批量自动评论数 37 | * @param userIds 38 | * @param plus 39 | */ 40 | @CacheEvict(value = {Consts.CACHE_USER, Consts.CACHE_POST}, allEntries = true) 41 | void identityComment(Set userIds, boolean plus); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/service/UserRoleService.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service; 2 | 3 | import com.mtons.mblog.modules.entity.Role; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | import java.util.Set; 8 | 9 | /** 10 | * @author - langhsu on 2018/2/11 11 | */ 12 | public interface UserRoleService { 13 | /** 14 | * 查询用户已有的角色Id 15 | * @param userId 用户ID 16 | * @return 17 | */ 18 | List listRoleIds(long userId); 19 | 20 | /** 21 | * 查询用户已有的角色 和 权限 22 | * @param userId 用户ID 23 | * @return 24 | */ 25 | List listRoles(long userId); 26 | 27 | Map> findMapByUserIds(List userIds); 28 | 29 | /** 30 | * 修改用户角色 31 | * @param userId 用户ID 32 | * @param roleIds 要授权的角色ID 33 | */ 34 | void updateRole(long userId, Set roleIds); 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/ChannelDirective.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.template.directive; 2 | 3 | import com.mtons.mblog.modules.service.ChannelService; 4 | import com.mtons.mblog.modules.template.DirectiveHandler; 5 | import com.mtons.mblog.modules.template.TemplateDirective; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | @Component 10 | public class ChannelDirective extends TemplateDirective { 11 | @Autowired 12 | private ChannelService channelService; 13 | 14 | @Override 15 | public String getName() { 16 | return "channel"; 17 | } 18 | 19 | @Override 20 | public void execute(DirectiveHandler handler) throws Exception { 21 | Integer id = handler.getInteger("id", 0); 22 | handler.put(RESULT, channelService.getById(id)).render(); 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/LinksDirective.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.template.directive; 2 | 3 | import com.mtons.mblog.modules.service.LinksService; 4 | import com.mtons.mblog.modules.template.DirectiveHandler; 5 | import com.mtons.mblog.modules.template.TemplateDirective; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * Eg: 11 | * <@links> 12 | * <#list results as row> 13 | *

  • ${row.name}
  • 14 | * 15 | * 16 | * 17 | * @author : landy 18 | * @version : 1.0 19 | * @date : 2019/11/6 20 | */ 21 | @Component 22 | public class LinksDirective extends TemplateDirective { 23 | @Autowired 24 | private LinksService linksService; 25 | 26 | @Override 27 | public String getName() { 28 | return "links"; 29 | } 30 | 31 | @Override 32 | public void execute(DirectiveHandler handler) throws Exception { 33 | handler.put(RESULTS, linksService.findAll()).render(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/NumberDirective.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.template.directive; 2 | 3 | import com.mtons.mblog.modules.template.DirectiveHandler; 4 | import com.mtons.mblog.modules.template.TemplateDirective; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * 数字处理 9 | * - 大于1000的显示1k 10 | * - 大于10000的显示1m 11 | * Created by langhsu on 2015/10/8. 12 | */ 13 | @Component 14 | public class NumberDirective extends TemplateDirective { 15 | @Override 16 | public String getName() { 17 | return "num"; 18 | } 19 | 20 | @Override 21 | public void execute(DirectiveHandler handler) throws Exception { 22 | Integer value = handler.getInteger("value", 1); 23 | String out = value.toString(); 24 | 25 | if (value > 1000) { 26 | out = value / 1000 + "k"; 27 | } else if (value > 10000) { 28 | out = value / 10000 + "m"; 29 | } 30 | handler.renderString(out); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/ResourceDirective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mtons.mblog.modules.template.directive; 5 | 6 | import com.mtons.mblog.modules.template.DirectiveHandler; 7 | import com.mtons.mblog.modules.template.TemplateDirective; 8 | import org.springframework.stereotype.Component; 9 | 10 | /** 11 | * 资源路径处理 12 | * @author langhsu 13 | */ 14 | @Component 15 | public class ResourceDirective extends TemplateDirective { 16 | @Override 17 | public String getName() { 18 | return "resource"; 19 | } 20 | 21 | @Override 22 | public void execute(DirectiveHandler handler) throws Exception { 23 | String src = handler.getString("src", "#"); 24 | if (src.startsWith("/storage") || src.startsWith("/theme")) { 25 | String base = handler.getContextPath(); 26 | handler.renderString(base + src); 27 | } else { 28 | handler.renderString(src); 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/UserCommentsDirective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mtons.mblog.modules.template.directive; 5 | 6 | import com.mtons.mblog.modules.data.CommentVO; 7 | import com.mtons.mblog.modules.service.CommentService; 8 | import com.mtons.mblog.modules.template.DirectiveHandler; 9 | import com.mtons.mblog.modules.template.TemplateDirective; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.domain.Page; 12 | import org.springframework.data.domain.Pageable; 13 | import org.springframework.stereotype.Component; 14 | 15 | /** 16 | * 根据作者取评论列表 17 | * 18 | * @author landy 19 | * @since 3.0 20 | */ 21 | @Component 22 | public class UserCommentsDirective extends TemplateDirective { 23 | @Autowired 24 | private CommentService commentService; 25 | 26 | @Override 27 | public String getName() { 28 | return "user_comments"; 29 | } 30 | 31 | @Override 32 | public void execute(DirectiveHandler handler) throws Exception { 33 | long userId = handler.getInteger("userId", 0); 34 | Pageable pageable = wrapPageable(handler); 35 | 36 | Page result = commentService.pagingByAuthorId(pageable, userId); 37 | handler.put(RESULTS, result).render(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/UserContentsDirective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mtons.mblog.modules.template.directive; 5 | 6 | import com.mtons.mblog.modules.data.PostVO; 7 | import com.mtons.mblog.modules.service.PostService; 8 | import com.mtons.mblog.modules.template.DirectiveHandler; 9 | import com.mtons.mblog.modules.template.TemplateDirective; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.domain.Page; 12 | import org.springframework.data.domain.Pageable; 13 | import org.springframework.stereotype.Component; 14 | 15 | /** 16 | * 根据作者取文章列表 17 | * 18 | * @author langhsu 19 | * 20 | */ 21 | @Component 22 | public class UserContentsDirective extends TemplateDirective { 23 | @Autowired 24 | private PostService postService; 25 | 26 | @Override 27 | public String getName() { 28 | return "user_contents"; 29 | } 30 | 31 | @Override 32 | public void execute(DirectiveHandler handler) throws Exception { 33 | long userId = handler.getInteger("userId", 0); 34 | Pageable pageable = wrapPageable(handler); 35 | 36 | Page result = postService.pagingByAuthorId(pageable, userId); 37 | handler.put(RESULTS, result).render(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/UserFavoritesDirective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mtons.mblog.modules.template.directive; 5 | 6 | import com.mtons.mblog.modules.data.FavoriteVO; 7 | import com.mtons.mblog.modules.service.FavoriteService; 8 | import com.mtons.mblog.modules.template.DirectiveHandler; 9 | import com.mtons.mblog.modules.template.TemplateDirective; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.domain.Page; 12 | import org.springframework.data.domain.Pageable; 13 | import org.springframework.stereotype.Component; 14 | 15 | /** 16 | * 根据作者取收藏列表 17 | * 18 | * @author landy 19 | * @since 3.0 20 | */ 21 | @Component 22 | public class UserFavoritesDirective extends TemplateDirective { 23 | @Autowired 24 | private FavoriteService favoriteService; 25 | 26 | @Override 27 | public String getName() { 28 | return "user_favorites"; 29 | } 30 | 31 | @Override 32 | public void execute(DirectiveHandler handler) throws Exception { 33 | long userId = handler.getInteger("userId", 0); 34 | Pageable pageable = wrapPageable(handler); 35 | 36 | Page result = favoriteService.pagingByUserId(pageable, userId); 37 | handler.put(RESULTS, result).render(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/directive/UserMessagesDirective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mtons.mblog.modules.template.directive; 5 | 6 | import com.mtons.mblog.modules.data.MessageVO; 7 | import com.mtons.mblog.modules.service.MessageService; 8 | import com.mtons.mblog.modules.template.DirectiveHandler; 9 | import com.mtons.mblog.modules.template.TemplateDirective; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.domain.Page; 12 | import org.springframework.data.domain.Pageable; 13 | import org.springframework.stereotype.Component; 14 | 15 | /** 16 | * 查询用户消息列表 17 | * 18 | * @author landy 19 | * @since 3.0 20 | */ 21 | @Component 22 | public class UserMessagesDirective extends TemplateDirective { 23 | @Autowired 24 | private MessageService messageService; 25 | 26 | @Override 27 | public String getName() { 28 | return "user_messages"; 29 | } 30 | 31 | @Override 32 | public void execute(DirectiveHandler handler) throws Exception { 33 | long userId = handler.getInteger("userId", 0); 34 | Pageable pageable = wrapPageable(handler); 35 | 36 | Page result = messageService.pagingByUserId(pageable, userId); 37 | handler.put(RESULTS, result).render(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/layout/ExtendsDirective.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.template.layout; 2 | 3 | import com.mtons.mblog.config.SiteOptions; 4 | import com.mtons.mblog.modules.template.DirectiveHandler; 5 | import com.mtons.mblog.modules.template.TemplateDirective; 6 | import freemarker.core.Environment; 7 | import freemarker.template.SimpleScalar; 8 | import freemarker.template.TemplateDirectiveBody; 9 | import freemarker.template.TemplateException; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Component; 12 | 13 | import java.io.IOException; 14 | import java.io.StringWriter; 15 | 16 | /** 17 | * @since 4.0.0 18 | */ 19 | @Component 20 | public class ExtendsDirective extends TemplateDirective { 21 | @Autowired 22 | private SiteOptions siteOptions; 23 | 24 | @Override 25 | public String getName() { 26 | return "layout.extends"; 27 | } 28 | 29 | @Override 30 | public void execute(DirectiveHandler handler) throws Exception { 31 | String theme = siteOptions.getValue("theme"); 32 | String layoutName = handler.getString("name"); 33 | layoutName = layoutName.startsWith("/") ? theme + layoutName : theme + "/" + layoutName; 34 | handler.bodyResult(); 35 | handler.getEnv().include(layoutName, null, true); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/modules/template/layout/PutType.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.template.layout; 2 | 3 | import java.io.IOException; 4 | import java.io.Writer; 5 | 6 | /** 7 | * @since 4.0.0 8 | */ 9 | public enum PutType { 10 | APPEND { 11 | @Override 12 | public void write(Writer out, String bodyResult, String putContents) throws IOException { 13 | out.write(bodyResult); 14 | out.write(putContents); 15 | } 16 | }, 17 | PREPEND { 18 | @Override 19 | public void write(Writer out, String bodyResult, String putContents) throws IOException { 20 | out.write(putContents); 21 | out.write(bodyResult); 22 | } 23 | }, 24 | REPLACE { 25 | @Override 26 | public void write(Writer out, String bodyResult, String putContents) throws IOException { 27 | out.write(putContents); 28 | } 29 | }; 30 | 31 | public abstract void write(Writer out, String bodyResult, String putContents) throws IOException; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/HasAnyRolesTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | import org.apache.shiro.subject.Subject; 4 | 5 | 6 | /** 7 | * Displays body content if the current user has any of the roles specified. 8 | *

    Equivalent to {@link org.apache.shiro.web.tags.HasAnyRolesTag}

    9 | * 10 | * @since 0.2 11 | */ 12 | public class HasAnyRolesTag extends RoleTag { 13 | // Delimeter that separates role names in tag attribute 14 | private static final String ROLE_NAMES_DELIMETER = ","; 15 | 16 | protected boolean showBody(String roleNames) { 17 | boolean hasAnyRole = false; 18 | Subject subject = getSubject(); 19 | 20 | if (subject != null) { 21 | // Iterate through roles and check to see if the user has one of the roles 22 | for (String role : roleNames.split(ROLE_NAMES_DELIMETER)) { 23 | if (subject.hasRole(role.trim())) { 24 | hasAnyRole = true; 25 | break; 26 | } 27 | } 28 | } 29 | 30 | return hasAnyRole; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/HasPermissionTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | /** 4 | *

    Equivalent to {@link org.apache.shiro.web.tags.HasPermissionTag}

    5 | * 6 | * @since 0.1 7 | */ 8 | public class HasPermissionTag extends PermissionTag { 9 | protected boolean showTagBody(String p) { 10 | return isPermitted(p); 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/HasRoleTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | /** 4 | *

    Equivalent to {@link org.apache.shiro.web.tags.HasRoleTag}

    5 | */ 6 | public class HasRoleTag extends RoleTag { 7 | protected boolean showBody(String roleName) { 8 | return getSubject() != null && getSubject().hasRole(roleName); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/LacksPermissionTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | /** 4 | *

    Equivalent to {@link org.apache.shiro.web.tags.LacksPermissionTag}

    5 | */ 6 | public class LacksPermissionTag extends PermissionTag { 7 | protected boolean showTagBody(String p) { 8 | return !isPermitted(p); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/LacksRoleTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | /** 4 | *

    Equivalent to {@link org.apache.shiro.web.tags.LacksRoleTag}

    5 | */ 6 | public class LacksRoleTag extends RoleTag { 7 | protected boolean showBody(String roleName) { 8 | boolean hasRole = getSubject() != null && getSubject().hasRole(roleName); 9 | return !hasRole; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/NotAuthenticatedTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | import freemarker.core.Environment; 4 | import freemarker.log.Logger; 5 | import freemarker.template.TemplateDirectiveBody; 6 | import freemarker.template.TemplateException; 7 | 8 | import java.io.IOException; 9 | import java.util.Map; 10 | 11 | 12 | /** 13 | * Freemarker tag that renders the tag body only if the current user has not executed a successful authentication 14 | * attempt during their current session. 15 | *

    The logically opposite tag of this one is the {@link org.apache.shiro.web.tags.AuthenticatedTag}. 16 | *

    17 | *

    Equivalent to {@link org.apache.shiro.web.tags.NotAuthenticatedTag}

    18 | */ 19 | public class NotAuthenticatedTag extends SecureTag { 20 | static final Logger log = Logger.getLogger("NotAuthenticatedTag"); 21 | 22 | @Override 23 | public void render(Environment env, Map params, TemplateDirectiveBody body) throws IOException, TemplateException { 24 | if (getSubject() == null || !(getSubject().isAuthenticated() || getSubject().isRemembered())) { 25 | log.debug("Subject does not exist or is not authenticated. Tag body will be evaluated."); 26 | renderBody(env, body); 27 | } else { 28 | log.debug("Subject exists and is authenticated. Tag body will not be evaluated."); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/RoleTag.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | import freemarker.core.Environment; 4 | import freemarker.template.TemplateDirectiveBody; 5 | import freemarker.template.TemplateException; 6 | 7 | import java.io.IOException; 8 | import java.util.Map; 9 | 10 | /** 11 | *

    Equivalent to {@link org.apache.shiro.web.tags.RoleTag}

    12 | */ 13 | public abstract class RoleTag extends SecureTag { 14 | String getName(Map params) { 15 | return getParam(params, "name"); 16 | } 17 | 18 | @Override 19 | public void render(Environment env, Map params, TemplateDirectiveBody body) throws IOException, TemplateException { 20 | boolean show = showBody(getName(params)); 21 | if (show) { 22 | renderBody(env, body); 23 | } 24 | } 25 | 26 | protected abstract boolean showBody(String roleName); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/shiro/tags/ShiroTags.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.shiro.tags; 2 | 3 | import freemarker.template.SimpleHash; 4 | 5 | /** 6 | * Shortcut for injecting the tags into Freemarker 7 | *

    Usage: cfg.setSharedVeriable("shiro", new ShiroTags());

    8 | */ 9 | public class ShiroTags extends SimpleHash { 10 | 11 | public ShiroTags() { 12 | put("authenticated", new AuthenticatedTag()); 13 | put("guest", new GuestTag()); 14 | put("hasAnyRoles", new HasAnyRolesTag()); 15 | put("hasPermission", new HasPermissionTag()); 16 | put("hasRole", new HasRoleTag()); 17 | put("lacksPermission", new LacksPermissionTag()); 18 | put("lacksRole", new LacksRoleTag()); 19 | put("notAuthenticated", new NotAuthenticatedTag()); 20 | put("principal", new PrincipalTag()); 21 | put("user", new UserTag()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/web/controller/admin/PermissionController.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.web.controller.admin; 2 | 3 | import com.mtons.mblog.modules.data.PermissionTree; 4 | import com.mtons.mblog.modules.service.PermissionService; 5 | import com.mtons.mblog.web.controller.BaseController; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * @author - langhsu 15 | * @create - 2018/5/18 16 | */ 17 | @RestController 18 | @RequestMapping("/admin/permission") 19 | public class PermissionController extends BaseController { 20 | @Autowired 21 | private PermissionService permissionService; 22 | 23 | @GetMapping("/tree") 24 | public List tree() { 25 | return permissionService.tree(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/web/controller/api/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 接口目录 3 | * Created by langhsu on 2017/9/27. 4 | */ 5 | package com.mtons.mblog.web.controller.api; -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/web/controller/site/IndexController.java: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | package com.mtons.mblog.web.controller.site; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | 14 | import com.mtons.mblog.base.lang.Consts; 15 | import org.springframework.stereotype.Controller; 16 | import org.springframework.ui.ModelMap; 17 | import org.springframework.web.bind.ServletRequestUtils; 18 | import org.springframework.web.bind.annotation.RequestMapping; 19 | 20 | import com.mtons.mblog.web.controller.BaseController; 21 | 22 | /** 23 | * @author langhsu 24 | * 25 | */ 26 | @Controller 27 | public class IndexController extends BaseController{ 28 | 29 | @RequestMapping(value= {"/", "/index"}) 30 | public String root(ModelMap model, HttpServletRequest request) { 31 | String order = ServletRequestUtils.getStringParameter(request, "order", Consts.order.NEWEST); 32 | int pageNo = ServletRequestUtils.getIntParameter(request, "pageNo", 1); 33 | model.put("order", order); 34 | model.put("pageNo", pageNo); 35 | return view(Views.INDEX); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/web/filter/RequestCostFilter.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.web.filter; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.util.StopWatch; 5 | 6 | import javax.servlet.*; 7 | import javax.servlet.http.HttpServletRequest; 8 | import java.io.IOException; 9 | 10 | /** 11 | * @author landy 12 | */ 13 | @Slf4j 14 | public class RequestCostFilter implements Filter { 15 | 16 | @Override 17 | public void init(FilterConfig filterConfig) throws ServletException { 18 | } 19 | 20 | @Override 21 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { 22 | HttpServletRequest httpRequest = (HttpServletRequest) request; 23 | StopWatch stopWatch = new StopWatch(); 24 | stopWatch.start(); 25 | chain.doFilter(request, response); 26 | stopWatch.stop(); 27 | 28 | log.debug("{} -> request code - {}", 29 | httpRequest.getRequestURI(), 30 | stopWatch.getTotalTimeMillis()); 31 | } 32 | 33 | @Override 34 | public void destroy() { 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/mtons/mblog/web/menu/Menu.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.web.menu; 2 | 3 | /** 4 | * @author - langhsu 5 | * @create - 2018/5/18 6 | */ 7 | public class Menu { 8 | private String icon; 9 | private String name; 10 | private String url; 11 | private String permission; 12 | 13 | public String getIcon() { 14 | return icon; 15 | } 16 | 17 | public void setIcon(String icon) { 18 | this.icon = icon; 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | 29 | public String getUrl() { 30 | return url; 31 | } 32 | 33 | public void setUrl(String url) { 34 | this.url = url; 35 | } 36 | 37 | public String getPermission() { 38 | return permission; 39 | } 40 | 41 | public void setPermission(String permission) { 42 | this.permission = permission; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | #schema: classpath*:scripts/schema.sql 4 | #continue-on-error: false 5 | #sql-script-encoding: utf-8 6 | driver-class-name: com.mysql.cj.jdbc.Driver 7 | url: jdbc:mysql://localhost/db_mblog?useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2B8 8 | username: root 9 | password: root 10 | flyway: 11 | enabled: true 12 | jpa: 13 | database: mysql 14 | show-sql: false 15 | hibernate: 16 | ddl-auto: update 17 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 18 | properties: 19 | hibernate.format_sql: true 20 | hibernate.naming.physical-strategy: org.hibernate.scripts.model.naming.PhysicalNamingStrategyStandardImpl 21 | hibernate.cache.use_second_level_cache: false 22 | hibernate.search.default.directory_provider: filesystem 23 | hibernate.search.default.indexBase: ${site.location}/storage/indexes -------------------------------------------------------------------------------- /src/main/resources/application-docker.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | #schema: classpath*:scripts/schema.sql 4 | #continue-on-error: false 5 | #sql-script-encoding: utf-8 6 | driver-class-name: com.mysql.cj.jdbc.Driver 7 | url: jdbc:mysql://mysql/db_mblog?useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2B8 8 | username: root 9 | password: 12345 10 | flyway: 11 | enabled: true 12 | jpa: 13 | database: mysql 14 | show-sql: false 15 | hibernate: 16 | ddl-auto: update 17 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 18 | properties: 19 | hibernate.format_sql: true 20 | hibernate.naming.physical-strategy: org.hibernate.scripts.model.naming.PhysicalNamingStrategyStandardImpl 21 | hibernate.cache.use_second_level_cache: false 22 | hibernate.search.default.directory_provider: filesystem 23 | hibernate.search.default.indexBase: ${site.location}/storage/indexes -------------------------------------------------------------------------------- /src/main/resources/application-h2.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | driver-class-name: org.h2.Driver # 驱动 4 | url: jdbc:h2:file:${site.location}/storage/db_mblog #h2 本地数据库文件 5 | # schema: classpath*:scripts/schema.sql #初始化表中记录数据语句 6 | username: root 7 | password: root 8 | jpa: 9 | database: h2 10 | show-sql: false 11 | hibernate: 12 | ddl-auto: update 13 | properties: 14 | hibernate.format_sql: true 15 | hibernate.naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl 16 | hibernate.cache.use_second_level_cache: false 17 | hibernate.search.default.directory_provider: filesystem 18 | hibernate.search.default.indexBase: ${site.location}/storage/indexes 19 | h2: #h2数据库远程管理 20 | console: 21 | enabled: true #是否开启web显示 22 | path: /console # 路径 23 | settings: 24 | web-allow-others: true 25 | trace: true #是否可以远程web -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------ 2 | _____ ______ ________ ___ ________ ________ 3 | |\ _ \ _ \|\ __ \|\ \ |\ __ \|\ ____\ 4 | \ \ \\\__\ \ \ \ \|\ /\ \ \ \ \ \|\ \ \ \___| 5 | \ \ \\|__| \ \ \ __ \ \ \ \ \ \\\ \ \ \ ___ 6 | \ \ \ \ \ \ \ \|\ \ \ \____\ \ \\\ \ \ \|\ \ 7 | \ \__\ \ \__\ \_______\ \_______\ \_______\ \_______\ 8 | \|__| \|__|\|_______|\|_______|\|_______|\|_______| 9 | ------------------------------------------------------------ 10 | Spring Boot : ${spring-boot.version} 11 | mblog : ${site.version} 12 | mblog storage : ${site.location} 13 | ------------------------------------------------------------ -------------------------------------------------------------------------------- /src/main/resources/ehcache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 16 | 17 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/scripts/menu.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "icon": "fa fa-tags icon-xlarge", 4 | "name": "栏目管理", 5 | "url": "admin/channel/list", 6 | "permission": "channel:list" 7 | }, 8 | { 9 | "icon": "fa fa-clone icon-xlarge", 10 | "name": "文章管理", 11 | "url": "admin/post/list", 12 | "permission": "post:list" 13 | }, 14 | { 15 | "icon": "fa fa-comments-o icon-xlarge", 16 | "name": "评论管理", 17 | "url": "admin/comment/list", 18 | "permission": "comment:list" 19 | }, 20 | { 21 | "icon": "fa fa-user icon-xlarge", 22 | "name": "用户管理", 23 | "url": "admin/user/list", 24 | "permission": "user:list" 25 | }, 26 | { 27 | "icon": "fa fa fa-registered icon-xlarge", 28 | "name": "角色管理", 29 | "url": "admin/role/list", 30 | "permission": "role:list" 31 | }, 32 | { 33 | "icon": "fa fa-circle-o icon-xlarge", 34 | "name": "主题管理", 35 | "url": "admin/theme/index", 36 | "permission": "theme:index" 37 | }, 38 | { 39 | "icon": "fa fa-sun-o icon-xlarge", 40 | "name": "系统配置", 41 | "url": "admin/options/index", 42 | "permission": "options:index" 43 | } 44 | ] -------------------------------------------------------------------------------- /src/main/resources/scripts/migration/V3.2__update.sql: -------------------------------------------------------------------------------- 1 | -- MySQL procedure 2 | DROP PROCEDURE IF EXISTS procedure_v32; 3 | 4 | DELIMITER // 5 | CREATE PROCEDURE procedure_v32() 6 | BEGIN 7 | IF EXISTS ( 8 | SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema= DATABASE() AND table_name='mto_message' AND COLUMN_NAME='own_id' 9 | ) THEN 10 | ALTER TABLE `mto_message` CHANGE COLUMN `own_id` `user_id` bigint(20) NULL DEFAULT NULL; 11 | END IF; 12 | IF EXISTS ( 13 | SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema= DATABASE() AND table_name='mto_comment' AND COLUMN_NAME='to_id' 14 | ) THEN 15 | ALTER TABLE `mto_comment` CHANGE COLUMN `to_id` `post_id` bigint(20) NULL DEFAULT NULL; 16 | END IF; 17 | IF EXISTS ( 18 | SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema= DATABASE() AND table_name='mto_favorite' AND COLUMN_NAME='own_id' 19 | ) THEN 20 | ALTER TABLE `mto_favorite` CHANGE COLUMN `own_id` `user_id` bigint(20) NULL DEFAULT NULL; 21 | END IF; 22 | END; // 23 | DELIMITER; 24 | 25 | CALL procedure_v32(); 26 | DROP PROCEDURE IF EXISTS procedure_v32; -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/ava/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/ava/default.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/btn/add_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/btn/add_img.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/btn/icon_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/btn/icon_top.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/btn/play-button-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/btn/play-button-large.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-10.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-11.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-6.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-7.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-8.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/bg-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/bg-9.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/party.1037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/party.1037.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/party.1040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/party.1040.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/qq.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/first/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/first/weibo.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/image-overlay-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/image-overlay-icon.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/image-overlay-view-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/image-overlay-view-icon.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/logo/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/logo/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/logo/m.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/logo/m42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/logo/m42.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/spinner-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/spinner-overlay.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/images/spinner.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/js/modules/avatar.js: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | 11 | define(function(require, exports, module) { 12 | J = jQuery; 13 | require('plugins'); 14 | 15 | var upload_url = _MTONS.BASE_PATH + '/settings/avatar'; 16 | 17 | $('#upload_btn').change(function(){ 18 | $(this).upload(upload_url, function(data){ 19 | if (data.status == 200) { 20 | window.location.reload(); 21 | } else { 22 | layer.msg(data.message, {icon: 5}); 23 | } 24 | }); 25 | }); 26 | 27 | }); -------------------------------------------------------------------------------- /src/main/resources/static/dist/js/modules/markdown.js: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | 11 | define('markdown', [ 12 | 'codemirror-css', 13 | 'codemirror-theme', 14 | 'codemirror', 15 | 'marked' 16 | ], function(require, exports, module) { 17 | 18 | require.async(['codemirror-markdown', 'codemirror-keymap', 'app.markdown'], function () { 19 | MdEditor.initEditor(); 20 | }); 21 | }); -------------------------------------------------------------------------------- /src/main/resources/static/dist/js/modules/view.js: -------------------------------------------------------------------------------- 1 | /* 2 | +-------------------------------------------------------------------------- 3 | | Mblog [#RELEASE_VERSION#] 4 | | ======================================== 5 | | Copyright (c) 2014, 2015 mtons. All Rights Reserved 6 | | http://www.mtons.com 7 | | 8 | +--------------------------------------------------------------------------- 9 | */ 10 | 11 | define(function(require, exports, module) { 12 | require('share-css'); 13 | require('share'); 14 | 15 | require.async(['highlight-css', 'highlight'], function () { 16 | hljs.initHighlightingOnLoad(); 17 | $('pre').each(function(i, block) { 18 | hljs.highlightBlock(block); 19 | }); 20 | }); 21 | 22 | $('a[data-toggle="fulltext"]').click(function () { 23 | $('.topic').addClass('fulltext'); 24 | }); 25 | 26 | if ($('.topic').outerHeight(true) <= 700) { 27 | $('.topic').addClass('fulltext'); 28 | } 29 | }); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/codemirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: inherit; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: inherit; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/codemirror/addon/edit/trailingspace.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) { 13 | if (prev == CodeMirror.Init) prev = false; 14 | if (prev && !val) 15 | cm.removeOverlay("trailingspace"); 16 | else if (!prev && val) 17 | cm.addOverlay({ 18 | token: function(stream) { 19 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {} 20 | if (i > stream.pos) { stream.pos = i; return null; } 21 | stream.pos = l; 22 | return "trailingspace"; 23 | }, 24 | name: "trailingspace" 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/codemirror/addon/fold/foldgutter.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-foldmarker { 2 | color: blue; 3 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; 4 | font-family: arial; 5 | line-height: .3; 6 | cursor: pointer; 7 | } 8 | .CodeMirror-foldgutter { 9 | width: .7em; 10 | } 11 | .CodeMirror-foldgutter-open, 12 | .CodeMirror-foldgutter-folded { 13 | cursor: pointer; 14 | } 15 | .CodeMirror-foldgutter-open:after { 16 | content: "\25BE"; 17 | } 18 | .CodeMirror-foldgutter-folded:after { 19 | content: "\25B8"; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/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 | white-space: pre; 29 | color: black; 30 | cursor: pointer; 31 | } 32 | 33 | li.CodeMirror-hint-active { 34 | background: #08f; 35 | color: white; 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/codemirror/addon/mode/multiplex_test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://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&delim-open $][inner&tag \\pi][delim&delim-close $]"); 33 | })(); 34 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/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/dist/vendors/codemirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta { color: #FF1717; } 2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } 3 | .cm-s-eclipse span.cm-atom { color: #219; } 4 | .cm-s-eclipse span.cm-number { color: #164; } 5 | .cm-s-eclipse span.cm-def { color: #00f; } 6 | .cm-s-eclipse span.cm-variable { color: black; } 7 | .cm-s-eclipse span.cm-variable-2 { color: #0000C0; } 8 | .cm-s-eclipse span.cm-variable-3, .cm-s-eclipse span.cm-type { color: #0000C0; } 9 | .cm-s-eclipse span.cm-property { color: black; } 10 | .cm-s-eclipse span.cm-operator { color: black; } 11 | .cm-s-eclipse span.cm-comment { color: #3F7F5F; } 12 | .cm-s-eclipse span.cm-string { color: #2A00FF; } 13 | .cm-s-eclipse span.cm-string-2 { color: #f50; } 14 | .cm-s-eclipse span.cm-qualifier { color: #555; } 15 | .cm-s-eclipse span.cm-builtin { color: #30a; } 16 | .cm-s-eclipse span.cm-bracket { color: #cc7; } 17 | .cm-s-eclipse span.cm-tag { color: #170; } 18 | .cm-s-eclipse span.cm-attribute { color: #00c; } 19 | .cm-s-eclipse span.cm-link { color: #219; } 20 | .cm-s-eclipse span.cm-error { color: #f00; } 21 | 22 | .cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; } 23 | .cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } 24 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | } 13 | 14 | .hljs-number, 15 | .hljs-literal, 16 | .hljs-symbol, 17 | .hljs-bullet { 18 | color: #6897BB; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-deletion { 24 | color: #cc7832; 25 | } 26 | 27 | .hljs-variable, 28 | .hljs-template-variable, 29 | .hljs-link { 30 | color: #629755; 31 | } 32 | 33 | .hljs-comment, 34 | .hljs-quote { 35 | color: #808080; 36 | } 37 | 38 | .hljs-meta { 39 | color: #bbb529; 40 | } 41 | 42 | .hljs-string, 43 | .hljs-attribute, 44 | .hljs-addition { 45 | color: #6A8759; 46 | } 47 | 48 | .hljs-section, 49 | .hljs-title, 50 | .hljs-type { 51 | color: #ffc66d; 52 | } 53 | 54 | .hljs-name, 55 | .hljs-selector-id, 56 | .hljs-selector-class { 57 | color: #e8bf6a; 58 | } 59 | 60 | .hljs-emphasis { 61 | font-style: italic; 62 | } 63 | 64 | .hljs-strong { 65 | font-weight: bold; 66 | } 67 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #222; 11 | } 12 | 13 | .hljs, 14 | .hljs-subst { 15 | color: #aaa; 16 | } 17 | 18 | .hljs-section { 19 | color: #fff; 20 | } 21 | 22 | .hljs-comment, 23 | .hljs-quote, 24 | .hljs-meta { 25 | color: #444; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-symbol, 30 | .hljs-bullet, 31 | .hljs-regexp { 32 | color: #ffcc33; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-addition { 37 | color: #00cc66; 38 | } 39 | 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-literal, 43 | .hljs-type, 44 | .hljs-template-variable, 45 | .hljs-attribute, 46 | .hljs-link { 47 | color: #32aaee; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-name, 53 | .hljs-selector-id, 54 | .hljs-selector-class { 55 | color: #6644aa; 56 | } 57 | 58 | .hljs-title, 59 | .hljs-variable, 60 | .hljs-deletion, 61 | .hljs-template-tag { 62 | color: #bb1166; 63 | } 64 | 65 | .hljs-section, 66 | .hljs-doctag, 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | 71 | .hljs-emphasis { 72 | font-style: italic; 73 | } 74 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-string, 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-symbol, 19 | .hljs-bullet, 20 | .hljs-section, 21 | .hljs-addition, 22 | .hljs-attribute, 23 | .hljs-link { 24 | color: #888; 25 | } 26 | 27 | .hljs-comment, 28 | .hljs-quote, 29 | .hljs-meta, 30 | .hljs-deletion { 31 | color: #ccc; 32 | } 33 | 34 | .hljs-keyword, 35 | .hljs-selector-tag, 36 | .hljs-section, 37 | .hljs-name, 38 | .hljs-type, 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-emphasis { 44 | font-style: italic; 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/brown-paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background:#b7a68e url(./brown-papersq.png); 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal { 17 | color:#005599; 18 | font-weight:bold; 19 | } 20 | 21 | .hljs, 22 | .hljs-subst { 23 | color: #363c69; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-title, 28 | .hljs-section, 29 | .hljs-type, 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-bullet, 33 | .hljs-built_in, 34 | .hljs-addition, 35 | .hljs-variable, 36 | .hljs-template-tag, 37 | .hljs-template-variable, 38 | .hljs-link, 39 | .hljs-name { 40 | color: #2c009f; 41 | } 42 | 43 | .hljs-comment, 44 | .hljs-quote, 45 | .hljs-meta, 46 | .hljs-deletion { 47 | color: #802022; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-literal, 53 | .hljs-doctag, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-type, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/brown-papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/highlight/styles/brown-papersq.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | } 19 | 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-tag, 23 | .hljs-regexp, 24 | .hljs-meta, 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-params, 30 | .hljs-symbol, 31 | .hljs-bullet, 32 | .hljs-link, 33 | .hljs-deletion { 34 | color: #ab875d; 35 | } 36 | 37 | .hljs-section, 38 | .hljs-title, 39 | .hljs-name, 40 | .hljs-selector-id, 41 | .hljs-selector-class, 42 | .hljs-type, 43 | .hljs-attribute { 44 | color: #9b869b; 45 | } 46 | 47 | .hljs-string, 48 | .hljs-keyword, 49 | .hljs-selector-tag, 50 | .hljs-addition { 51 | color: #8f9c6c; 52 | } 53 | 54 | .hljs-emphasis { 55 | font-style: italic; 56 | } 57 | 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/color-brewer.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colorbrewer theme 4 | Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock 5 | Ported by Fabrício Tavares de Oliveira 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #fff; 14 | } 15 | 16 | .hljs, 17 | .hljs-subst { 18 | color: #000; 19 | } 20 | 21 | .hljs-string, 22 | .hljs-meta, 23 | .hljs-symbol, 24 | .hljs-template-tag, 25 | .hljs-template-variable, 26 | .hljs-addition { 27 | color: #756bb1; 28 | } 29 | 30 | .hljs-comment, 31 | .hljs-quote { 32 | color: #636363; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-regexp, 37 | .hljs-literal, 38 | .hljs-bullet, 39 | .hljs-link { 40 | color: #31a354; 41 | } 42 | 43 | .hljs-deletion, 44 | .hljs-variable { 45 | color: #88f; 46 | } 47 | 48 | 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-built_in, 55 | .hljs-doctag, 56 | .hljs-type, 57 | .hljs-tag, 58 | .hljs-name, 59 | .hljs-selector-id, 60 | .hljs-selector-class, 61 | .hljs-strong { 62 | color: #3182bd; 63 | } 64 | 65 | .hljs-emphasis { 66 | font-style: italic; 67 | } 68 | 69 | .hljs-attribute { 70 | color: #e6550d; 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/darcula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Darcula color scheme from the JetBrains family of IDEs 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #2b2b2b; 13 | } 14 | 15 | .hljs { 16 | color: #bababa; 17 | } 18 | 19 | .hljs-strong, 20 | .hljs-emphasis { 21 | color: #a8a8a2; 22 | } 23 | 24 | .hljs-bullet, 25 | .hljs-quote, 26 | .hljs-link, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal { 30 | color: #6896ba; 31 | } 32 | 33 | .hljs-code, 34 | .hljs-selector-class { 35 | color: #a6e22e; 36 | } 37 | 38 | .hljs-emphasis { 39 | font-style: italic; 40 | } 41 | 42 | .hljs-keyword, 43 | .hljs-selector-tag, 44 | .hljs-section, 45 | .hljs-attribute, 46 | .hljs-name, 47 | .hljs-variable { 48 | color: #cb7832; 49 | } 50 | 51 | .hljs-params { 52 | color: #b9b9b9; 53 | } 54 | 55 | .hljs-string { 56 | color: #6a8759; 57 | } 58 | 59 | .hljs-subst, 60 | .hljs-type, 61 | .hljs-built_in, 62 | .hljs-builtin-name, 63 | .hljs-symbol, 64 | .hljs-selector-id, 65 | .hljs-selector-attr, 66 | .hljs-selector-pseudo, 67 | .hljs-template-tag, 68 | .hljs-template-variable, 69 | .hljs-addition { 70 | color: #e0c46c; 71 | } 72 | 73 | .hljs-comment, 74 | .hljs-deletion, 75 | .hljs-meta { 76 | color: #7f7f7f; 77 | } 78 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #444; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-section, 18 | .hljs-link { 19 | color: white; 20 | } 21 | 22 | .hljs, 23 | .hljs-subst { 24 | color: #ddd; 25 | } 26 | 27 | .hljs-string, 28 | .hljs-title, 29 | .hljs-name, 30 | .hljs-type, 31 | .hljs-attribute, 32 | .hljs-symbol, 33 | .hljs-bullet, 34 | .hljs-built_in, 35 | .hljs-addition, 36 | .hljs-variable, 37 | .hljs-template-tag, 38 | .hljs-template-variable { 39 | color: #d88; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-deletion, 45 | .hljs-meta { 46 | color: #777; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-literal, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-doctag, 55 | .hljs-type, 56 | .hljs-name, 57 | .hljs-strong { 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-emphasis { 62 | font-style: italic; 63 | } 64 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/darkula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Deprecated due to a typo in the name and left here for compatibility purpose only. 3 | Please use darcula.css instead. 4 | */ 5 | 6 | @import url('darcula.css'); 7 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/dracula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dracula Theme v1.2.0 4 | 5 | https://github.com/zenorocha/dracula-theme 6 | 7 | Copyright 2015, All rights reserved 8 | 9 | Code licensed under the MIT license 10 | http://zenorocha.mit-license.org 11 | 12 | @author Éverton Ribeiro 13 | @author Zeno Rocha 14 | 15 | */ 16 | 17 | .hljs { 18 | display: block; 19 | overflow-x: auto; 20 | padding: 0.5em; 21 | background: #282a36; 22 | } 23 | 24 | .hljs-keyword, 25 | .hljs-selector-tag, 26 | .hljs-literal, 27 | .hljs-section, 28 | .hljs-link { 29 | color: #8be9fd; 30 | } 31 | 32 | .hljs-function .hljs-keyword { 33 | color: #ff79c6; 34 | } 35 | 36 | .hljs, 37 | .hljs-subst { 38 | color: #f8f8f2; 39 | } 40 | 41 | .hljs-string, 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-type, 45 | .hljs-attribute, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #f1fa8c; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #6272a4; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-doctag, 68 | .hljs-type, 69 | .hljs-name, 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000080; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #0ff; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-attribute, 21 | .hljs-symbol, 22 | .hljs-bullet, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-template-tag, 26 | .hljs-template-variable, 27 | .hljs-addition { 28 | color: #ff0; 29 | } 30 | 31 | .hljs-keyword, 32 | .hljs-selector-tag, 33 | .hljs-section, 34 | .hljs-type, 35 | .hljs-name, 36 | .hljs-selector-id, 37 | .hljs-selector-class, 38 | .hljs-variable { 39 | color: #fff; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-doctag, 45 | .hljs-deletion { 46 | color: #888; 47 | } 48 | 49 | .hljs-number, 50 | .hljs-regexp, 51 | .hljs-literal, 52 | .hljs-link { 53 | color: #0f0; 54 | } 55 | 56 | .hljs-meta { 57 | color: #008080; 58 | } 59 | 60 | .hljs-keyword, 61 | .hljs-selector-tag, 62 | .hljs-title, 63 | .hljs-section, 64 | .hljs-name, 65 | .hljs-strong { 66 | font-weight: bold; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/github-gist.css: -------------------------------------------------------------------------------- 1 | /** 2 | * GitHub Gist Theme 3 | * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | background: white; 9 | padding: 0.5em; 10 | color: #333333; 11 | overflow-x: auto; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-meta { 16 | color: #969896; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-strong, 23 | .hljs-emphasis, 24 | .hljs-quote { 25 | color: #df5000; 26 | } 27 | 28 | .hljs-keyword, 29 | .hljs-selector-tag, 30 | .hljs-type { 31 | color: #a71d5d; 32 | } 33 | 34 | .hljs-literal, 35 | .hljs-symbol, 36 | .hljs-bullet, 37 | .hljs-attribute { 38 | color: #0086b3; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name { 43 | color: #63a35c; 44 | } 45 | 46 | .hljs-tag { 47 | color: #333333; 48 | } 49 | 50 | .hljs-title, 51 | .hljs-attr, 52 | .hljs-selector-id, 53 | .hljs-selector-class, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo { 56 | color: #795da3; 57 | } 58 | 59 | .hljs-addition { 60 | color: #55a532; 61 | background-color: #eaffea; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #bd2c00; 66 | background-color: #ffecec; 67 | } 68 | 69 | .hljs-link { 70 | text-decoration: underline; 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/ir-black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote, 15 | .hljs-meta { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-tag, 22 | .hljs-name { 23 | color: #96cbfe; 24 | } 25 | 26 | .hljs-attribute, 27 | .hljs-selector-id { 28 | color: #ffffb6; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-selector-attr, 33 | .hljs-selector-pseudo, 34 | .hljs-addition { 35 | color: #a8ff60; 36 | } 37 | 38 | .hljs-subst { 39 | color: #daefa3; 40 | } 41 | 42 | .hljs-regexp, 43 | .hljs-link { 44 | color: #e9c062; 45 | } 46 | 47 | .hljs-title, 48 | .hljs-section, 49 | .hljs-type, 50 | .hljs-doctag { 51 | color: #ffffb6; 52 | } 53 | 54 | .hljs-symbol, 55 | .hljs-bullet, 56 | .hljs-variable, 57 | .hljs-template-variable, 58 | .hljs-literal { 59 | color: #c6c5fe; 60 | } 61 | 62 | .hljs-number, 63 | .hljs-deletion { 64 | color:#ff73fd; 65 | } 66 | 67 | .hljs-emphasis { 68 | font-style: italic; 69 | } 70 | 71 | .hljs-strong { 72 | font-weight: bold; 73 | } 74 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; 12 | overflow-x: auto; 13 | padding: 0.5em; 14 | background-color: #f4f4f4; 15 | } 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: black; 20 | } 21 | 22 | .hljs-string, 23 | .hljs-title, 24 | .hljs-symbol, 25 | .hljs-bullet, 26 | .hljs-attribute, 27 | .hljs-addition, 28 | .hljs-variable, 29 | .hljs-template-tag, 30 | .hljs-template-variable { 31 | color: #050; 32 | } 33 | 34 | .hljs-comment, 35 | .hljs-quote { 36 | color: #777; 37 | } 38 | 39 | .hljs-number, 40 | .hljs-regexp, 41 | .hljs-literal, 42 | .hljs-type, 43 | .hljs-link { 44 | color: #800; 45 | } 46 | 47 | .hljs-deletion, 48 | .hljs-meta { 49 | color: #00e; 50 | } 51 | 52 | .hljs-keyword, 53 | .hljs-selector-tag, 54 | .hljs-doctag, 55 | .hljs-title, 56 | .hljs-section, 57 | .hljs-built_in, 58 | .hljs-tag, 59 | .hljs-name { 60 | font-weight: bold; 61 | color: navy; 62 | } 63 | 64 | .hljs-emphasis { 65 | font-style: italic; 66 | } 67 | 68 | .hljs-strong { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | } 10 | 11 | .hljs { 12 | color: #00193a; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-selector-tag, 17 | .hljs-title, 18 | .hljs-section, 19 | .hljs-doctag, 20 | .hljs-name, 21 | .hljs-strong { 22 | font-weight: bold; 23 | } 24 | 25 | .hljs-comment { 26 | color: #738191; 27 | } 28 | 29 | .hljs-string, 30 | .hljs-title, 31 | .hljs-section, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-addition, 36 | .hljs-tag, 37 | .hljs-quote, 38 | .hljs-name, 39 | .hljs-selector-id, 40 | .hljs-selector-class { 41 | color: #0048ab; 42 | } 43 | 44 | .hljs-meta, 45 | .hljs-subst, 46 | .hljs-symbol, 47 | .hljs-regexp, 48 | .hljs-attribute, 49 | .hljs-deletion, 50 | .hljs-variable, 51 | .hljs-template-variable, 52 | .hljs-link, 53 | .hljs-bullet { 54 | color: #4c81c9; 55 | } 56 | 57 | .hljs-emphasis { 58 | font-style: italic; 59 | } 60 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; color: #ddd; 10 | } 11 | 12 | .hljs-tag, 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-strong, 17 | .hljs-name { 18 | color: #f92672; 19 | } 20 | 21 | .hljs-code { 22 | color: #66d9ef; 23 | } 24 | 25 | .hljs-class .hljs-title { 26 | color: white; 27 | } 28 | 29 | .hljs-attribute, 30 | .hljs-symbol, 31 | .hljs-regexp, 32 | .hljs-link { 33 | color: #bf79db; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-bullet, 38 | .hljs-subst, 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-emphasis, 42 | .hljs-type, 43 | .hljs-built_in, 44 | .hljs-builtin-name, 45 | .hljs-selector-attr, 46 | .hljs-selector-pseudo, 47 | .hljs-addition, 48 | .hljs-variable, 49 | .hljs-template-tag, 50 | .hljs-template-variable { 51 | color: #a6e22e; 52 | } 53 | 54 | .hljs-comment, 55 | .hljs-quote, 56 | .hljs-deletion, 57 | .hljs-meta { 58 | color: #75715e; 59 | } 60 | 61 | .hljs-keyword, 62 | .hljs-selector-tag, 63 | .hljs-literal, 64 | .hljs-doctag, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-type, 68 | .hljs-selector-id { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/ocean.css: -------------------------------------------------------------------------------- 1 | /* Ocean Dark Theme */ 2 | /* https://github.com/gavsiu */ 3 | /* Original theme - https://github.com/chriskempson/base16 */ 4 | 5 | /* Ocean Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #65737e; 9 | } 10 | 11 | /* Ocean Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #bf616a; 21 | } 22 | 23 | /* Ocean Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #d08770; 33 | } 34 | 35 | /* Ocean Yellow */ 36 | .hljs-attribute { 37 | color: #ebcb8b; 38 | } 39 | 40 | /* Ocean Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #a3be8c; 46 | } 47 | 48 | /* Ocean Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #8fa1b3; 52 | } 53 | 54 | /* Ocean Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #b48ead; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2b303b; 64 | color: #c0c5ce; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #2f1e2e; 62 | color: #a39e9b; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #e7e9db; 62 | color: #4f424c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/qtcreator_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator dark color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #000000; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #aaaaaa; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #a8a8a2; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #ff55ff; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #aaaaff; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #ffff55; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #ff5555; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #8888ff; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #ff55ff; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #55ffff; 83 | } 84 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/qtcreator_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator light color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #ffffff; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #000000; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #000000; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #000080; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #800080; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #808000; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #800000; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #0055AF; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #008000; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #008000; 83 | } 84 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #474949; 12 | color: #d1d9e1; 13 | } 14 | 15 | 16 | .hljs-comment, 17 | .hljs-quote { 18 | color: #969896; 19 | font-style: italic; 20 | } 21 | 22 | .hljs-keyword, 23 | .hljs-selector-tag, 24 | .hljs-literal, 25 | .hljs-type, 26 | .hljs-addition { 27 | color: #cc99cc; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-selector-attr, 32 | .hljs-selector-pseudo { 33 | color: #f99157; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag, 38 | .hljs-regexp { 39 | color: #8abeb7; 40 | } 41 | 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-section, 45 | .hljs-built_in { 46 | color: #b5bd68; 47 | } 48 | 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-selector-id, 52 | .hljs-class .hljs-title { 53 | color: #ffcc66; 54 | } 55 | 56 | .hljs-section, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-symbol, 63 | .hljs-bullet, 64 | .hljs-subst, 65 | .hljs-meta, 66 | .hljs-link { 67 | color: #f99157; 68 | } 69 | 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-attr, 79 | .hljs-attribute { 80 | color: #81a2be; 81 | } 82 | 83 | .hljs-emphasis { 84 | font-style: italic; 85 | } 86 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/school-book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 15px 0.5em 0.5em 30px; 11 | font-size: 11px; 12 | line-height:16px; 13 | } 14 | 15 | pre{ 16 | background:#f6f6ae url(./school-book.png); 17 | border-top: solid 2px #d2e8b9; 18 | border-bottom: solid 1px #d2e8b9; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-literal { 24 | color:#005599; 25 | font-weight:bold; 26 | } 27 | 28 | .hljs, 29 | .hljs-subst { 30 | color: #3e5915; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-title, 35 | .hljs-section, 36 | .hljs-type, 37 | .hljs-symbol, 38 | .hljs-bullet, 39 | .hljs-attribute, 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-addition, 43 | .hljs-variable, 44 | .hljs-template-tag, 45 | .hljs-template-variable, 46 | .hljs-link { 47 | color: #2c009f; 48 | } 49 | 50 | .hljs-comment, 51 | .hljs-quote, 52 | .hljs-deletion, 53 | .hljs-meta { 54 | color: #e60415; 55 | } 56 | 57 | .hljs-keyword, 58 | .hljs-selector-tag, 59 | .hljs-literal, 60 | .hljs-doctag, 61 | .hljs-title, 62 | .hljs-section, 63 | .hljs-type, 64 | .hljs-name, 65 | .hljs-selector-id, 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | 70 | .hljs-emphasis { 71 | font-style: italic; 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/school-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/highlight/styles/school-book.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment, 5 | .hljs-quote { 6 | color: #8e908c; 7 | } 8 | 9 | /* Tomorrow Red */ 10 | .hljs-variable, 11 | .hljs-template-variable, 12 | .hljs-tag, 13 | .hljs-name, 14 | .hljs-selector-id, 15 | .hljs-selector-class, 16 | .hljs-regexp, 17 | .hljs-deletion { 18 | color: #c82829; 19 | } 20 | 21 | /* Tomorrow Orange */ 22 | .hljs-number, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-literal, 26 | .hljs-type, 27 | .hljs-params, 28 | .hljs-meta, 29 | .hljs-link { 30 | color: #f5871f; 31 | } 32 | 33 | /* Tomorrow Yellow */ 34 | .hljs-attribute { 35 | color: #eab700; 36 | } 37 | 38 | /* Tomorrow Green */ 39 | .hljs-string, 40 | .hljs-symbol, 41 | .hljs-bullet, 42 | .hljs-addition { 43 | color: #718c00; 44 | } 45 | 46 | /* Tomorrow Blue */ 47 | .hljs-title, 48 | .hljs-section { 49 | color: #4271ae; 50 | } 51 | 52 | /* Tomorrow Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #8959a8; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: white; 62 | color: #4d4d4c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/jquery-validation/localization/messages_zh.js: -------------------------------------------------------------------------------- 1 | (function( factory ) { 2 | if ( typeof define === "function" && define.amd ) { 3 | define( ["jquery", "../jquery.validate"], factory ); 4 | } else if (typeof module === "object" && module.exports) { 5 | module.exports = factory( require( "jquery" ) ); 6 | } else { 7 | factory( jQuery ); 8 | } 9 | }(function( $ ) { 10 | 11 | /* 12 | * Translated default messages for the jQuery validation plugin. 13 | * Locale: ZH (Chinese, 中文 (Zhōngwén), 汉语, 漢語) 14 | */ 15 | $.extend( $.validator.messages, { 16 | required: "这是必填字段", 17 | remote: "请修正此字段", 18 | email: "请输入有效的电子邮件地址", 19 | url: "请输入有效的网址", 20 | date: "请输入有效的日期", 21 | dateISO: "请输入有效的日期 (YYYY-MM-DD)", 22 | number: "请输入有效的数字", 23 | digits: "只能输入数字", 24 | creditcard: "请输入有效的信用卡号码", 25 | equalTo: "你的输入不相同", 26 | extension: "请输入有效的后缀", 27 | maxlength: $.validator.format( "最多可以输入 {0} 个字符" ), 28 | minlength: $.validator.format( "最少要输入 {0} 个字符" ), 29 | rangelength: $.validator.format( "请输入长度在 {0} 到 {1} 之间的字符串" ), 30 | range: $.validator.format( "请输入范围在 {0} 到 {1} 之间的数值" ), 31 | step: $.validator.format( "请输入 {0} 的整数倍值" ), 32 | max: $.validator.format( "请输入不大于 {0} 的数值" ), 33 | min: $.validator.format( "请输入不小于 {0} 的数值" ) 34 | } ); 35 | return $; 36 | })); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/jquery-validation/localization/messages_zh.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Validation Plugin - v1.19.0 - 11/28/2018 2 | * https://jqueryvalidation.org/ 3 | * Copyright (c) 2018 Jörn Zaefferer; Licensed MIT */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return a.extend(a.validator.messages,{required:"这是必填字段",remote:"请修正此字段",email:"请输入有效的电子邮件地址",url:"请输入有效的网址",date:"请输入有效的日期",dateISO:"请输入有效的日期 (YYYY-MM-DD)",number:"请输入有效的数字",digits:"只能输入数字",creditcard:"请输入有效的信用卡号码",equalTo:"你的输入不相同",extension:"请输入有效的后缀",maxlength:a.validator.format("最多可以输入 {0} 个字符"),minlength:a.validator.format("最少要输入 {0} 个字符"),rangelength:a.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),range:a.validator.format("请输入范围在 {0} 到 {1} 之间的数值"),step:a.validator.format("请输入 {0} 的整数倍值"),max:a.validator.format("请输入不大于 {0} 的数值"),min:a.validator.format("请输入不小于 {0} 的数值")}),a}); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/layer/skin/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/layer/skin/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/layer/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/layer/skin/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/layer/skin/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/layer/skin/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/layer/skin/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/layer/skin/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/layer/skin/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/layer/skin/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/pace/themes/pace-theme-minimal.css: -------------------------------------------------------------------------------- 1 | /* This is a compiled file, you should be editing the file in the templates directory */ 2 | .pace { 3 | -webkit-pointer-events: none; 4 | pointer-events: none; 5 | 6 | -webkit-user-select: none; 7 | -moz-user-select: none; 8 | user-select: none; 9 | } 10 | 11 | .pace-inactive { 12 | display: none; 13 | } 14 | 15 | .pace .pace-progress { 16 | background: #2299dd; 17 | position: fixed; 18 | z-index: 2000; 19 | top: 0; 20 | right: 100%; 21 | width: 100%; 22 | height: 2px; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/share.js/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/share.js/fonts/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/share.js/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/share.js/fonts/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/share.js/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/share.js/fonts/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.gitignore 3 | *.log 4 | *~ 5 | *# 6 | node_modules/ 7 | build/ 8 | !.travis.yml 9 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | cache: 5 | directories: 6 | - node_modules 7 | before_install: 8 | - npm install -g npm 9 | install: 10 | - npm install 11 | sudo: false 12 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/History.md: -------------------------------------------------------------------------------- 1 | 2.4.0 / 2016-09-18 2 | ================== 3 | 4 | * Add social-steam icon 5 | * Rename vkontakte to social-vkontakte icon 6 | 7 | 2.3.3 / 2016-09-17 8 | ================== 9 | 10 | * Add event icon, fix #57 11 | * Add vkontakte icon, fix #56 12 | 13 | 2.3.2 / 2016-06-13 14 | ================== 15 | 16 | * Add exclamation icon, fix #50 17 | * Use woff2, ttf, woff, svg order. 18 | 19 | 2.3.1 / 2016-05-04 20 | ================== 21 | 22 | * CSS, use woff before ttf 23 | * CSS, google instead of gplus 24 | * Gitignore, ignore .files 25 | * CSS, add organization, update readme 26 | * Add organization icon, fix #45 27 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2016 Sabbir Ahmed & All Contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-line-icons", 3 | "version": "2.4.1", 4 | "authors": [ 5 | "Sabbir Ahmed " 6 | ], 7 | "description": "Simple Line Icons Bower Package", 8 | "keywords": [ 9 | "fonts", 10 | "simple", 11 | "simple-line", 12 | "icon" 13 | ], 14 | "main": [ 15 | "css/simple-line-icons.css", 16 | "scss/simple-line-icons.scss", 17 | "less/simple-line-icons.less" 18 | ], 19 | "license": "MIT", 20 | "homepage": "https://github.com/thesabbir/simple-line-icons", 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test", 26 | "tests" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.eot -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.ttf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/simple-line-icons/fonts/Simple-Line-Icons.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | sass = require('gulp-sass'), 3 | less = require('gulp-less'); 4 | 5 | var paths = { 6 | less: 'less/simple-line-icons.less', 7 | sass: 'scss/simple-line-icons.scss', 8 | build: 'build/' 9 | }; 10 | 11 | gulp.task('less', function(){ 12 | return gulp.src(paths.less) 13 | .pipe(less()) 14 | .pipe(gulp.dest(paths.build)); 15 | }); 16 | 17 | gulp.task('sass', function(){ 18 | return gulp.src(paths.sass) 19 | .pipe(sass()) 20 | .pipe(gulp.dest(paths.build)); 21 | }); 22 | 23 | gulp.task('test', ['less', 'sass']); 24 | 25 | gulp.task('default', ['test']); 26 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/simple-line-icons/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-line-icons", 3 | "version": "2.4.1", 4 | "description": "Simple and elegent line icons.", 5 | "main": "index.js", 6 | "scripts": { 7 | "precommit": "npm test", 8 | "test": "gulp test" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/thesabbir/simple-line-icons.git" 13 | }, 14 | "keywords": [ 15 | "icon", 16 | "simple", 17 | "line", 18 | "css", 19 | "webfont" 20 | ], 21 | "author": "Sabbir Ahmed", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/thesabbir/simple-line-icons/issues" 25 | }, 26 | "homepage": "https://thesabbir.github.io/simple-line-icons", 27 | "devDependencies": { 28 | "gulp": "^3.9.1", 29 | "gulp-less": "^3.1.0", 30 | "gulp-sass": "^2.3.2", 31 | "husky": "^0.11.8" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),e=function(t){return t.getParam("code_dialog_width",600)},o=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},i=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},c=function(t){return t.getContent({source_view:!0})},d=function(t){var n=e(t),d=o(t);t.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:n,minHeight:d,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(n){i(t,n.data.code)}}).find("#code").value(c(t))},u=function(t){t.addCommand("mceCodeEditor",function(){d(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){d(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){d(t)}})};t.add("code",function(t){return u(t),a(t),{}})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Color"),i=function(e,n){e.find("#preview")[0].getEl().style.background=n},t=function(e,t){var l=n(t),a=l.toRgb();e.fromJSON({r:a.r,g:a.g,b:a.b,hex:l.toHex().substr(1)}),i(e,l.toHex())},l=function(e,n,l){var a=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:l,onchange:function(){var e=this.rgb();a&&(a.find("#r").value(e.r),a.find("#g").value(e.g),a.find("#b").value(e.b),a.find("#hex").value(this.value().substr(1)),i(a,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=a.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return t(a,n="#"+n),void i.value(n);n={r:a.find("#r").value(),g:a.find("#g").value(),b:a.find("#b").value()},i.value(n),t(a,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+a.toJSON().hex)}});t(a,l)};e.add("colorpicker",function(e){e.settings.color_picker_callback||(e.settings.color_picker_callback=function(n,i){l(e,n,i)})})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/directionality/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,i){var n,o=t.dom,c=t.selection.getSelectedBlocks();c.length&&(n=o.getAttrib(c[0],"dir"),e.each(c,function(t){o.getParent(t.parentNode,'*[dir="'+i+'"]',o.getRoot())||o.setAttrib(t,"dir",n!==i?i:null)}),t.nodeChanged())},n=function(t){t.addCommand("mceDirectionLTR",function(){i(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){i(t,"rtl")})},o=function(t){var i=[];return e.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(e){i.push(e+"[dir="+t+"]")}),i.join(",")},c=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:o("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:o("rtl")})};t.add("directionality",function(t){n(t),c(t)})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-cool.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-cry.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-embarassed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-embarassed.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-frown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-frown.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-innocent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-innocent.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-kiss.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-laughing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-laughing.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-money-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-money-mouth.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-sealed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-sealed.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-smile.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-surprised.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-tongue-out.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-tongue-out.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-undecided.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-undecided.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-wink.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-yell.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/img/smiley-yell.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/emoticons/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]],o=function(t){var o;return o='',e.each(i,function(i){o+="",e.each(i,function(e){var i=t+"/img/smiley-"+e+".gif";o+=''}),o+=""}),o+="
    "},n=function(t,e){var i=o(e);t.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:i,onclick:function(e){var i,o,n,a=t.dom.getParent(e.target,"a");a&&(i=t,o=a.getAttribute("data-mce-url"),n=a.getAttribute("data-mce-alt"),i.insertContent(i.dom.createHTML("img",{src:o,alt:n})),this.hide())}},tooltip:"Emoticons"})};t.add("emoticons",function(t,e){n(t,e)})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/help/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/plugins/help/img/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var n=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"
    ")})},t=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(o){n(o),t(o)})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(n,e){var t,a=(t=n).plugins.visualchars&&t.plugins.visualchars.isEnabled()?' ':" ";n.insertContent(function(n,e){for(var t="",a=0;a0&&n.on("keydown",function(i){if(i.keyCode===a.TAB&&!i.isDefaultPrevented()){if(i.shiftKey)return;i.preventDefault(),i.stopImmediatePropagation(),e(n,t)}})},r=function(n){n.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};n.add("nonbreaking",function(n){t(n),r(n),o(n)})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var t=function(t){t.addCommand("mcePrint",function(){t.getWin().print()})},n=function(t){t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("print",function(i){t(i),n(i),i.addShortcut("Meta+P","","mcePrint")})}(); -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position:absolute;display:inline-block;background-color:green;opacity:.5}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%} -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/static/dist/vendors/tinymce/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/treetable/css/jquery.treetable.css: -------------------------------------------------------------------------------- 1 | table.treetable span.indenter { 2 | display: inline-block; 3 | margin: 0; 4 | padding: 0; 5 | text-align: right; 6 | 7 | /* Disable text selection of nodes (for better D&D UX) */ 8 | user-select: none; 9 | -khtml-user-select: none; 10 | -moz-user-select: none; 11 | -o-user-select: none; 12 | -webkit-user-select: none; 13 | 14 | /* Force content-box box model for indenter (Bootstrap compatibility) */ 15 | -webkit-box-sizing: content-box; 16 | -moz-box-sizing: content-box; 17 | box-sizing: content-box; 18 | 19 | width: 19px; 20 | } 21 | 22 | table.treetable span.indenter a { 23 | background-position: left center; 24 | background-repeat: no-repeat; 25 | display: inline-block; 26 | text-decoration: none; 27 | width: 19px; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/static/dist/vendors/treetable/css/screen.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #ddd; 3 | color: #000; 4 | font-family: Helvetica, Arial, sans-serif; 5 | line-height: 1.5; 6 | margin: 0; 7 | padding: 0; 8 | } 9 | 10 | #main { 11 | background: #fff; 12 | border-left: 20px solid #eee; 13 | border-right: 20px solid #eee; 14 | margin: 0 auto; 15 | max-width: 800px; 16 | padding: 20px; 17 | } 18 | 19 | pre.listing { 20 | background: #eee; 21 | border: 1px solid #ccc; 22 | margin: .6em 0 .3em 0; 23 | padding: .1em .3em; 24 | } 25 | 26 | pre.listing b { 27 | color: #f00; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/static/error/reject.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Reject ERROR 6 | 17 | 18 | 19 |
    20 |

    拒绝访问:(

    21 |
    22 |

    很抱歉,您的权限可能不够!

    23 |
    24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/dist/images/btn-add-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/admin/dist/images/btn-add-image.png -------------------------------------------------------------------------------- /src/main/resources/templates/admin/dist/js/site.base.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | var page = String(window.location); 3 | 4 | /** 5 | * 记住下拉框选中值 6 | */ 7 | $('select[data-select]').each(function () { 8 | var id = $(this).attr('data-select'); 9 | if (typeof(id) != 'undefined' && id.length > 0) { 10 | $(this).val(id); 11 | } 12 | }); 13 | 14 | $('.checkall').on('click', function (event) { 15 | var checked = $(this).prop('checked'); 16 | $(this).closest('table').find('input[type=checkbox]').prop('checked', checked); 17 | }); 18 | 19 | $('.sidebar-menu a').each(function () { 20 | var $this = $(this); 21 | var href = $this[0].href; 22 | if (href === page) { 23 | $this.closest('li').addClass("active"); 24 | } else if (href.substring(0, href.lastIndexOf('/')) === page.substring(0, page.lastIndexOf('/'))) { 25 | $this.closest('li').addClass("active"); 26 | } 27 | }); 28 | 29 | $('[data-toggle="tooltip"]').tooltip(); 30 | }); 31 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/message.ftl: -------------------------------------------------------------------------------- 1 | <#if message??> 2 |
    3 | 4 | ${message} 5 |
    6 | 7 | 8 | <#if data??> 9 | <#if (data.code >= 0)> 10 |
    11 | 12 | ${data.message} 13 |
    14 | <#else> 15 |
    16 | 17 | ${data.message} 18 |
    19 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/admin/options/mail.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 |
    -------------------------------------------------------------------------------- /src/main/resources/templates/classic/about.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "classic", 3 | "slogan": "经典主题", 4 | "version": "1.0", 5 | "author": "landy", 6 | "website": "http://mtons.com", 7 | "previews": [ 8 | "/theme/classic/dist/images/preview/1.png" 9 | ] 10 | } -------------------------------------------------------------------------------- /src/main/resources/templates/classic/channel/editor/tinymce.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /src/main/resources/templates/classic/dist/images/btn-add-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/classic/dist/images/btn-add-image.png -------------------------------------------------------------------------------- /src/main/resources/templates/classic/dist/images/preview/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/classic/dist/images/preview/1.png -------------------------------------------------------------------------------- /src/main/resources/templates/classic/inc/action_message.ftl: -------------------------------------------------------------------------------- 1 | <#if message??> 2 |
    3 | <#----> 4 | ${message} 5 |
    6 | 7 | <#if data??> 8 | <#if (data.code >= 0)> 9 |
    10 | <#----> 11 | ${data.message} 12 |
    13 | <#else> 14 |
    15 | <#----> 16 | ${data.message} 17 |
    18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/templates/classic/inc/footer.ftl: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 16 |
    17 |
    18 | 19 | 20 | 21 | 22 | 23 | 28 | -------------------------------------------------------------------------------- /src/main/resources/templates/classic/settings/avatar.ftl: -------------------------------------------------------------------------------- 1 | <@layout.extends name="/inc/layout.ftl"> 2 | <@layout.put block="title"> 3 | 修改用户信息 4 | 5 | 6 | <@layout.put block="contents"> 7 |
    8 |
    9 | 15 |
    16 |
    17 |
    18 | <@layout.extends name="/inc/action_message.ftl" /> 19 |
    20 |
    21 | 25 |
    26 |
    27 | [Example] 28 |
    29 |
    30 |
    31 | 32 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/templates/default/about.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default", 3 | "slogan": "默认主题", 4 | "version": "1.0", 5 | "author": "landy", 6 | "website": "http://mtons.com", 7 | "previews": [ 8 | "/theme/default/dist/images/preview/1.png" 9 | ] 10 | } -------------------------------------------------------------------------------- /src/main/resources/templates/default/channel/editor/tinymce.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/btn-add-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/btn-add-image.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/icon_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/icon_top.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/image-overlay-audio-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/image-overlay-audio-icon.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/image-overlay-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/image-overlay-icon.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/image-overlay-play-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/image-overlay-play-icon.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/image-overlay-view-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/image-overlay-view-icon.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/logo.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/preview/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/preview/1.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/qq.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/dist/images/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langhsu/mblog/f133cb2a09558b3de8806399d3ae62fc480ccda5/src/main/resources/templates/default/dist/images/weibo.png -------------------------------------------------------------------------------- /src/main/resources/templates/default/inc/action_message.ftl: -------------------------------------------------------------------------------- 1 | <#if message??> 2 |
    3 | <#----> 4 | ${message} 5 |
    6 | 7 | <#if data??> 8 | <#if (data.code >= 0)> 9 |
    10 | <#----> 11 | ${data.message} 12 |
    13 | <#else> 14 |
    15 | <#----> 16 | ${data.message} 17 |
    18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/templates/default/inc/footer.ftl: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 16 |
    17 |
    18 | 19 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /src/main/resources/templates/default/settings/avatar.ftl: -------------------------------------------------------------------------------- 1 | <@layout.extends name="/inc/layout.ftl"> 2 | <@layout.put block="title"> 3 | 修改用户信息 4 | 5 | 6 | <@layout.put block="contents"> 7 |
    8 |
    9 | 15 |
    16 |
    17 |
    18 | <#include "/default/inc/action_message.ftl"/> 19 |
    20 |
    21 | 25 |
    26 |
    27 | [Example] 28 |
    29 |
    30 |
    31 | 32 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/templates/email_code.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 验证邮件 7 | 19 | 20 | 21 |
    22 |

    验证码: ${code}

    23 |

    该验证码将会在30分钟后失效

    24 |

    请勿向任何人泄露您收到的验证码

    25 |
    26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/templates/error.ftl: -------------------------------------------------------------------------------- 1 | <@layout.extends name="/inc/layout.ftl"> 2 | <@layout.put block="title" type="replace"> 3 | 消息提示 4 | 5 | 6 | <@layout.put block="contents" type="replace"> 7 |
    8 |
    提示
    9 |
    10 |
    11 | <#if error??> 12 | ${error} 13 | 14 |
    15 |
    16 |
    17 | 18 | -------------------------------------------------------------------------------- /src/test/java/com/mtons/mblog/Base64Test.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog; 2 | 3 | import org.apache.commons.lang3.StringUtils; 4 | import org.springframework.util.Base64Utils; 5 | 6 | import java.io.UnsupportedEncodingException; 7 | import java.util.Arrays; 8 | 9 | /** 10 | * @author : xulang 11 | * @version : 1.0 12 | * @date : 2019/1/16 13 | */ 14 | public class Base64Test { 15 | public static void main(String[] args) throws UnsupportedEncodingException { 16 | byte[] keys = "mtons".getBytes("UTF-8"); 17 | System.out.println(Base64Utils.encodeToString(Arrays.copyOf(keys, 16))); 18 | 19 | String src = "/static/"; 20 | if (StringUtils.isNoneBlank(src) && src.length() > 1) { 21 | if (src.startsWith("/")) { 22 | src = src.substring(1); 23 | } 24 | 25 | if (!src.endsWith("/")) { 26 | src = src + "/"; 27 | } 28 | } 29 | System.out.println(src); 30 | 31 | System.out.println("sg[hide]test[/hide]fsd".replaceAll("\\[hide\\]([\\s\\S]*)\\[\\/hide\\]", "$1")); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/com/mtons/mblog/ImageUtilsTest.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog; 2 | 3 | import com.mtons.mblog.base.utils.FileKit; 4 | import com.mtons.mblog.base.utils.ImageUtils; 5 | import net.coobird.thumbnailator.Thumbnails; 6 | import net.coobird.thumbnailator.geometry.Position; 7 | import net.coobird.thumbnailator.geometry.Positions; 8 | 9 | import javax.imageio.ImageIO; 10 | import java.awt.image.BufferedImage; 11 | import java.io.ByteArrayOutputStream; 12 | import java.io.File; 13 | import java.io.IOException; 14 | 15 | /** 16 | * created by langhsu 17 | * on 2019/1/20 18 | */ 19 | public class ImageUtilsTest { 20 | public static void main(String[] args) throws Exception { 21 | // File file = new File("F:/data/test.png"); 22 | // byte[] bytes = ImageUtils.screenshot(Thumbnails.of(file), Positions.CENTER,360, 240); 23 | // FileKit.writeByteArrayToFile(bytes, "F:/data/test_out.jpg"); 24 | 25 | byte[] bytes = ImageUtils.download("https://images.gitee.com/uploads/images/2019/0125/142627_fcd67bfd_116277.jpeg"); 26 | System.out.println(bytes); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/com/mtons/mblog/modules/repository/ResourceRepositoryTest.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.repository; 2 | 3 | import com.mtons.mblog.BootApplication; 4 | import com.mtons.mblog.modules.entity.Resource; 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | import java.time.LocalDateTime; 11 | import java.time.format.DateTimeFormatter; 12 | import java.util.List; 13 | 14 | /** 15 | * pic repo test 16 | * 17 | * @author saxing 2019/4/5 17:25 18 | */ 19 | @RunWith(SpringRunner.class) 20 | @SpringBootTest(classes = BootApplication.class) 21 | public class ResourceRepositoryTest { 22 | 23 | @Autowired 24 | ResourceRepository resourceRepository; 25 | 26 | @Test 27 | public void find0Before() { 28 | 29 | LocalDateTime now = LocalDateTime.now(); 30 | String timeStr = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(now); 31 | List beforeResources = resourceRepository.find0Before(timeStr); 32 | System.out.println(beforeResources); 33 | } 34 | } -------------------------------------------------------------------------------- /src/test/java/com/mtons/mblog/modules/service/impl/PostServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package com.mtons.mblog.modules.service.impl; 2 | 3 | import com.mtons.mblog.BootApplication; 4 | import com.mtons.mblog.modules.service.PostService; 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * post service test 15 | * 16 | * @author saxing 2019/4/5 17:32 17 | */ 18 | @RunWith(SpringRunner.class) 19 | @SpringBootTest(classes = BootApplication.class) 20 | public class PostServiceImplTest { 21 | 22 | @Autowired 23 | PostServiceImpl postService; 24 | 25 | @Test 26 | public void cleanPostPic() { 27 | } 28 | } --------------------------------------------------------------------------------