From 0b4f614073b59635cc1e5036b468d69c6d8cbe9e Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 30 Dec 2018 21:52:20 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 1 - src/main/resources/application-docker.yaml | 61 ------------------- src/main/resources/i18n/messages.properties | 4 +- .../resources/i18n/messages_en_US.properties | 4 +- .../resources/i18n/messages_zh_CN.properties | 4 +- .../resources/static/halo-backend/js/halo.js | 2 +- .../static/halo-backend/js/halo.min.js | 2 +- 7 files changed, 8 insertions(+), 70 deletions(-) delete mode 100644 _config.yml delete mode 100755 src/main/resources/application-docker.yaml diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 3397c9a49..000000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-architect \ No newline at end of file diff --git a/src/main/resources/application-docker.yaml b/src/main/resources/application-docker.yaml deleted file mode 100755 index 2d32867c4..000000000 --- a/src/main/resources/application-docker.yaml +++ /dev/null @@ -1,61 +0,0 @@ -server: - port: 8090 - use-forward-headers: true - undertow: - io-threads: 2 - worker-threads: 36 - buffer-size: 1024 - directBuffers: true - servlet: - session: - timeout: 86400s -spring: - datasource: - type: com.zaxxer.hikari.HikariDataSource - - # H2database 配置 - driver-class-name: org.h2.Driver - url: jdbc:h2:file:~/halo/halo - username: admin - password: 123456 - - #MySql配置 -# driver-class-name: com.mysql.cj.jdbc.Driver -# url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=UTC -# username: root -# password: 123456 - - h2: - console: - settings: - web-allow-others: false - path: /h2-console - enabled: true - jpa: - hibernate: - ddl-auto: update - show-sql: false - freemarker: - allow-request-override: false - cache: false - check-template-location: true - charset: utf-8 - content-type: text/html - expose-request-attributes: false - expose-session-attributes: false - expose-spring-macro-helpers: true - suffix: .ftl - settings: - auto_import: /spring.ftl as spring - servlet: - multipart: - max-file-size: 10MB - max-request-size: 10MB - - # 多语言资源文件路径 - messages: - basename: i18n/messages -logging: - file: ./logs/log.log - - diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index ab3f111e7..25964be91 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -132,7 +132,7 @@ admin.categories.text.all-categories = 所有分类目录 admin.categories.text.edit-category = 修改分类目录 admin.categories.text.add-category = 添加分类目录 admin.categories.form.cate-name = 名称 -admin.categories.form.cate-name-tips = 页面上所显示的名称 +admin.categories.form.cate-name-tips = *页面上所显示的名称 admin.categories.form.cate-url = 路径名称 admin.categories.form.cate-url-tips = *这是文章路径上显示的名称,最好为英文 admin.categories.form.cate-desc = 描述 @@ -322,7 +322,7 @@ admin.tags.text.edit-tag = 修改标签 admin.tags.text.add-tag = 添加标签 admin.tags.text.all-tags = 所有标签 admin.tags.form.tag-name = 名称 -admin.tags.form.tag-name-tips = 页面上所显示的名称 +admin.tags.form.tag-name-tips = *页面上所显示的名称 admin.tags.form.tag-url = 路径名称 admin.tags.form.tag-url-tips = *这是文章路径上显示的名称,最好为英文 diff --git a/src/main/resources/i18n/messages_en_US.properties b/src/main/resources/i18n/messages_en_US.properties index 6ac72489e..984b3672e 100644 --- a/src/main/resources/i18n/messages_en_US.properties +++ b/src/main/resources/i18n/messages_en_US.properties @@ -132,7 +132,7 @@ admin.categories.text.all-categories = All categories admin.categories.text.edit-category = Edit category admin.categories.text.add-category = Add category admin.categories.form.cate-name = Category name -admin.categories.form.cate-name-tips = The name displayed on the page. +admin.categories.form.cate-name-tips = *The name displayed on the page. admin.categories.form.cate-url = Category url admin.categories.form.cate-url-tips = *This is the name displayed on the article path,preferably in English. admin.categories.form.cate-desc = Category description @@ -322,7 +322,7 @@ admin.tags.text.edit-tag = Edit tag admin.tags.text.add-tag = Add tag admin.tags.text.all-tags = All tags admin.tags.form.tag-name = Tag name -admin.tags.form.tag-name-tips = The name displayed on the page +admin.tags.form.tag-name-tips = *The name displayed on the page admin.tags.form.tag-url = Tag url admin.tags.form.tag-url-tips = *This is the name displayed on the article path, preferably in English diff --git a/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties index ab3f111e7..25964be91 100644 --- a/src/main/resources/i18n/messages_zh_CN.properties +++ b/src/main/resources/i18n/messages_zh_CN.properties @@ -132,7 +132,7 @@ admin.categories.text.all-categories = 所有分类目录 admin.categories.text.edit-category = 修改分类目录 admin.categories.text.add-category = 添加分类目录 admin.categories.form.cate-name = 名称 -admin.categories.form.cate-name-tips = 页面上所显示的名称 +admin.categories.form.cate-name-tips = *页面上所显示的名称 admin.categories.form.cate-url = 路径名称 admin.categories.form.cate-url-tips = *这是文章路径上显示的名称,最好为英文 admin.categories.form.cate-desc = 描述 @@ -322,7 +322,7 @@ admin.tags.text.edit-tag = 修改标签 admin.tags.text.add-tag = 添加标签 admin.tags.text.all-tags = 所有标签 admin.tags.form.tag-name = 名称 -admin.tags.form.tag-name-tips = 页面上所显示的名称 +admin.tags.form.tag-name-tips = *页面上所显示的名称 admin.tags.form.tag-url = 路径名称 admin.tags.form.tag-url-tips = *这是文章路径上显示的名称,最好为英文 diff --git a/src/main/resources/static/halo-backend/js/halo.js b/src/main/resources/static/halo-backend/js/halo.js index 1f9cc25da..cf6adf753 100644 --- a/src/main/resources/static/halo-backend/js/halo.js +++ b/src/main/resources/static/halo-backend/js/halo.js @@ -60,7 +60,7 @@ document.addEventListener('pjax:complete', function () { function initMenu() { var pathName = location.pathname; if (pathName === "/admin/posts/edit") { - pathName = "/admin/posts/new"; + pathName = "/admin/posts/write"; } if (pathName === "/admin/category/edit") { pathName = "/admin/category"; diff --git a/src/main/resources/static/halo-backend/js/halo.min.js b/src/main/resources/static/halo-backend/js/halo.min.js index 7a49c5405..16260a702 100644 --- a/src/main/resources/static/halo-backend/js/halo.min.js +++ b/src/main/resources/static/halo-backend/js/halo.min.js @@ -1 +1 @@ -$.extend({halo:function(){}});$.fn.extend({animateCss:function(animationName,callback){var animationEnd=(function(el){var animations={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(var t in animations){if(el.style[t]!==undefined){return animations[t];}}})(document.createElement("div"));this.addClass("animated "+animationName).one(animationEnd,function(){$(this).removeClass("animated "+animationName);if(typeof callback==="function"){callback();}});return this;}});$(document).ready(function(){$("#animated-header,#animated-content").animateCss("fadeIn");if($(window).width()<1024){if($("body").hasClass("layout-boxed")){$("body").removeClass("layout-boxed");}if($("body").hasClass("sidebar-collapse")){$("body").removeClass("sidebar-collapse");}}initMenu();});document.addEventListener("pjax:complete",function(){$("#animated-header,#animated-content").animateCss("fadeIn");initMenu();});function initMenu(){var pathName=location.pathname;if(pathName==="/admin/posts/edit"){pathName="/admin/posts/new";}if(pathName==="/admin/category/edit"){pathName="/admin/category";}if(pathName==="/admin/tag/edit"){pathName="/admin/tag";}if(pathName==="/admin/page/edit"){pathName="/admin/page/new";}if(pathName==="/admin/page/links"){pathName="/admin/page";}if(pathName==="/admin/page/galleries"){pathName="/admin/page";}if(pathName==="/admin/menus/edit"){pathName="/admin/menus";}$(".sidebar-menu").children().each(function(){var li=$(this);li.find("a").each(function(){var href=$(this).attr("href");if(pathName===href){li.addClass("active");$(this).parent().addClass("active");}else{$(this).parent().removeClass("active");}});});}$.halo.prototype.showMsg=function(text,icon,hideAfter){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff"});};$.halo.prototype.showMsgAndReload=function(text,icon,hideAfter){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff",afterHidden:function(){window.location.reload();}});};$.halo.prototype.showMsgAndRedirect=function(text,icon,hideAfter,url,isPjax){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff",afterHidden:function(){if(isPjax==="true"){pjax.loadUrl(url);}else{window.location.href=url;}}});};$.halo.prototype.showMsgAndParentRedirect=function(text,icon,hideAfter,url){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff",afterHidden:function(){parent.location.href=url;}});};$.halo.prototype.formatContent=function(a){a=a.replace(/\r\n/g,"
");a=a.replace(/\n/g,"
");a=a.replace(/\s/g," ");return a;};$.halo.prototype.layerModal=function(url,title){layer.open({type:2,title:title,shadeClose:true,shade:0.5,maxmin:true,area:["90%","90%"],content:url,scrollbar:false});};function saveOptions(option){var param=$("#"+option).serialize();$.post("/admin/option/save",param,function(data){if(data.code===1){halo.showMsg(data.msg,"success",1000);}else{halo.showMsg(data.msg,"error",2000);}},"JSON");} \ No newline at end of file +$.extend({halo:function(){}});$.fn.extend({animateCss:function(animationName,callback){var animationEnd=(function(el){var animations={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(var t in animations){if(el.style[t]!==undefined){return animations[t];}}})(document.createElement("div"));this.addClass("animated "+animationName).one(animationEnd,function(){$(this).removeClass("animated "+animationName);if(typeof callback==="function"){callback();}});return this;}});$(document).ready(function(){$("#animated-header,#animated-content").animateCss("fadeIn");if($(window).width()<1024){if($("body").hasClass("layout-boxed")){$("body").removeClass("layout-boxed");}if($("body").hasClass("sidebar-collapse")){$("body").removeClass("sidebar-collapse");}}initMenu();});document.addEventListener("pjax:complete",function(){$("#animated-header,#animated-content").animateCss("fadeIn");initMenu();});function initMenu(){var pathName=location.pathname;if(pathName==="/admin/posts/edit"){pathName="/admin/posts/write";}if(pathName==="/admin/category/edit"){pathName="/admin/category";}if(pathName==="/admin/tag/edit"){pathName="/admin/tag";}if(pathName==="/admin/page/edit"){pathName="/admin/page/new";}if(pathName==="/admin/page/links"){pathName="/admin/page";}if(pathName==="/admin/page/galleries"){pathName="/admin/page";}if(pathName==="/admin/menus/edit"){pathName="/admin/menus";}$(".sidebar-menu").children().each(function(){var li=$(this);li.find("a").each(function(){var href=$(this).attr("href");if(pathName===href){li.addClass("active");$(this).parent().addClass("active");}else{$(this).parent().removeClass("active");}});});}$.halo.prototype.showMsg=function(text,icon,hideAfter){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff"});};$.halo.prototype.showMsgAndReload=function(text,icon,hideAfter){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff",afterHidden:function(){window.location.reload();}});};$.halo.prototype.showMsgAndRedirect=function(text,icon,hideAfter,url,isPjax){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff",afterHidden:function(){if(isPjax==="true"){pjax.loadUrl(url);}else{window.location.href=url;}}});};$.halo.prototype.showMsgAndParentRedirect=function(text,icon,hideAfter,url){if(heading==undefined){var heading="提示";}$.toast({text:text,heading:heading,icon:icon,showHideTransition:"fade",allowToastClose:true,hideAfter:hideAfter,stack:1,position:"top-center",textAlign:"left",loader:true,loaderBg:"#ffffff",afterHidden:function(){parent.location.href=url;}});};$.halo.prototype.formatContent=function(a){a=a.replace(/\r\n/g,"
");a=a.replace(/\n/g,"
");a=a.replace(/\s/g," ");return a;};$.halo.prototype.layerModal=function(url,title){layer.open({type:2,title:title,shadeClose:true,shade:0.5,maxmin:true,area:["90%","90%"],content:url,scrollbar:false});};function saveOptions(option){var param=$("#"+option).serialize();$.post("/admin/option/save",param,function(data){if(data.code===1){halo.showMsg(data.msg,"success",1000);}else{halo.showMsg(data.msg,"error",2000);}},"JSON");} \ No newline at end of file