mirror of https://github.com/halo-dev/halo
🎨 添加站点验证代码设置
parent
bd09397edb
commit
bd249296c1
|
@ -112,7 +112,7 @@ public class CommentController extends BaseController {
|
|||
* @param session session
|
||||
* @return 重定向到/admin/comments
|
||||
*/
|
||||
@GetMapping("/revert")
|
||||
@GetMapping(value = "/revert")
|
||||
public String moveToPublish(@PathParam("commentId") Long commentId,
|
||||
@PathParam("status") Integer status,
|
||||
HttpSession session) {
|
||||
|
@ -133,7 +133,7 @@ public class CommentController extends BaseController {
|
|||
* @param page 当前页码
|
||||
* @return string 重定向到/admin/comments
|
||||
*/
|
||||
@GetMapping("/remove")
|
||||
@GetMapping(value = "/remove")
|
||||
public String moveToAway(@PathParam("commentId") Long commentId,
|
||||
@PathParam("status") Integer status,
|
||||
@RequestParam(value = "page", defaultValue = "0") Integer page) {
|
||||
|
@ -153,7 +153,7 @@ public class CommentController extends BaseController {
|
|||
* @param commentContent 回复的内容
|
||||
* @return 重定向到/admin/comments
|
||||
*/
|
||||
@PostMapping("/reply")
|
||||
@PostMapping(value = "/reply")
|
||||
public String replyComment(@RequestParam("commentId") Long commentId,
|
||||
@RequestParam("postId") Long postId,
|
||||
@RequestParam("commentContent") String commentContent,
|
||||
|
|
|
@ -89,7 +89,7 @@ public class PageController {
|
|||
* @param linkId linkId 友情链接编号
|
||||
* @return String 模板路径admin/admin_page_link
|
||||
*/
|
||||
@GetMapping("/links/edit")
|
||||
@GetMapping(value = "/links/edit")
|
||||
public String toEditLink(Model model, @PathParam("linkId") Long linkId) {
|
||||
Optional<Link> link = linkService.findByLinkId(linkId);
|
||||
model.addAttribute("updateLink", link.get());
|
||||
|
|
|
@ -273,7 +273,7 @@ public class PostController extends BaseController {
|
|||
* @param postId 文章编号
|
||||
* @return 重定向到/admin/posts
|
||||
*/
|
||||
@GetMapping("/throw")
|
||||
@GetMapping(value = "/throw")
|
||||
public String moveToTrash(@RequestParam("postId") Long postId, @RequestParam("status") Integer status) {
|
||||
try {
|
||||
postService.updatePostStatus(postId, PostStatusEnum.RECYCLE.getCode());
|
||||
|
@ -290,7 +290,7 @@ public class PostController extends BaseController {
|
|||
* @param postId 文章编号
|
||||
* @return 重定向到/admin/posts
|
||||
*/
|
||||
@GetMapping("/revert")
|
||||
@GetMapping(value = "/revert")
|
||||
public String moveToPublish(@RequestParam("postId") Long postId,
|
||||
@RequestParam("status") Integer status) {
|
||||
try {
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="baiduToken" class="col-lg-2 col-sm-4 control-label">百度推送token:
|
||||
<label for="baiduToken" class="col-lg-2 col-sm-4 control-label">百度推送 token:
|
||||
<span data-toggle="tooltip" data-placement="top" title="百度站长平台获取" style="cursor: pointer">
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -159,6 +159,31 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#-- 站点验证代码 -->
|
||||
<div class="form-group">
|
||||
<label for="blogVerificationGoogle" class="col-lg-2 col-sm-4 control-label">Google 站点验证:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<input type="text" class="form-control" id="blogVerificationGoogle" name="blog_verification_google" value="${options.blog_verification_google?if_exists}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="blogVerificationBing" class="col-lg-2 col-sm-4 control-label">Bing 站点验证:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<input type="text" class="form-control" id="blogVerificationBing" name="blog_verification_bing" value="${options.blog_verification_bing?if_exists}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="blogVerificationBaidu" class="col-lg-2 col-sm-4 control-label">Baidu 站点验证:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<input type="text" class="form-control" id="blogVerificationBaidu" name="blog_verification_baidu" value="${options.blog_verification_baidu?if_exists}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="blogVerificationQihu" class="col-lg-2 col-sm-4 control-label">360 站点验证:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<input type="text" class="form-control" id="blogVerificationQihu" name="blog_verification_qihu" value="${options.blog_verification_qihu?if_exists}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="button" class="btn btn-primary btn-sm " onclick="saveOptions('seoOptions')"><@spring.message code='common.btn.save' /></button>
|
||||
|
@ -180,7 +205,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="rssPosts" class="col-lg-2 col-sm-4 control-label">RSS显示条数:</label>
|
||||
<label for="rssPosts" class="col-lg-2 col-sm-4 control-label">RSS 显示条数:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<input type="number" class="form-control" id="rssPosts" name="rss_posts" value="${options.rss_posts?if_exists}">
|
||||
</div>
|
||||
|
@ -313,7 +338,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nativeCss" class="col-lg-2 col-sm-4 control-label">自定义CSS:
|
||||
<label for="nativeCss" class="col-lg-2 col-sm-4 control-label">自定义 CSS:
|
||||
<span data-toggle="tooltip" data-placement="top" title="对评论框自定义样式,如边距等" style="cursor: pointer">
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -351,7 +376,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="valineCss" class="col-lg-2 col-sm-4 control-label">自定义CSS:
|
||||
<label for="valineCss" class="col-lg-2 col-sm-4 control-label">自定义 CSS:
|
||||
<span data-toggle="tooltip" data-placement="top" title="对评论框自定义样式,如边距等" style="cursor: pointer">
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -371,7 +396,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="disqusCss" class="col-lg-2 col-sm-4 control-label">自定义CSS:
|
||||
<label for="disqusCss" class="col-lg-2 col-sm-4 control-label">自定义 CSS:
|
||||
<span data-toggle="tooltip" data-placement="top" title="对评论框自定义样式,如边距等" style="cursor: pointer">
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -391,7 +416,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="livereCss" class="col-lg-2 col-sm-4 control-label">自定义CSS:
|
||||
<label for="livereCss" class="col-lg-2 col-sm-4 control-label">自定义 CSS:
|
||||
<span data-toggle="tooltip" data-placement="top" title="对评论框自定义样式,如边距等" style="cursor: pointer">
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -417,7 +442,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="changyanCss" class="col-lg-2 col-sm-4 control-label">自定义CSS:
|
||||
<label for="changyanCss" class="col-lg-2 col-sm-4 control-label">自定义 CSS:
|
||||
<span data-toggle="tooltip" data-placement="top" title="对评论框自定义样式,如边距等" style="cursor: pointer">
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -529,7 +554,7 @@
|
|||
<form method="post" class="form-horizontal" id="adminOptions">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-sm-4 control-label">启用pjax:</label>
|
||||
<label class="col-lg-2 col-sm-4 control-label">启用 pjax:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="admin_pjax" value="true" ${((options.admin_pjax?default('true'))=='true')?string('checked','')}> 启用
|
||||
|
@ -614,7 +639,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="emSmtpHost" class="col-lg-2 col-sm-4 control-label">SMTP地址:</label>
|
||||
<label for="emSmtpHost" class="col-lg-2 col-sm-4 control-label">SMTP 地址:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<input type="text" class="form-control" id="emailSmtpHost" name="mail_smtp_host" value="${options.mail_smtp_host?if_exists}" autocomplete='address-line1'>
|
||||
</div>
|
||||
|
@ -648,7 +673,7 @@
|
|||
<form method="post" class="form-horizontal" id="otherOptions">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 col-sm-4 control-label">API服务:</label>
|
||||
<label class="col-lg-2 col-sm-4 control-label">API 服务:</label>
|
||||
<div class="col-lg-4 col-sm-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="api_status" value="true" ${((options.api_status?if_exists)=='true')?string('checked','')}> 启用
|
||||
|
|
|
@ -51,13 +51,13 @@
|
|||
</@commonTag>
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="<#if user_session.userAvatar?if_exists!="">${user_session.userAvatar}<#else >/static/images/default.png</#if>" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">${user_session.userDisplayName?if_exists}</span>
|
||||
<img src="<#if user.userAvatar?if_exists!="">${user.userAvatar}<#else >/static/images/default.png</#if>" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">${user.userDisplayName?if_exists}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="user-header">
|
||||
<img src="<#if user_session.userAvatar?if_exists!="">${user_session.userAvatar}<#else >/static/images/default.png</#if>" class="img-circle" alt="User Image">
|
||||
<p>${user_session.userDisplayName?if_exists}</p>
|
||||
<img src="<#if user.userAvatar?if_exists!="">${user.userAvatar}<#else >/static/images/default.png</#if>" class="img-circle" alt="User Image">
|
||||
<p>${user.userDisplayName?if_exists}</p>
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
<div class="pull-left"><a data-pjax="true" href="/admin/profile" class="btn btn-default "><i class="fa fa-user"></i><@spring.message code='admin.module.header.btn.profile' /></a></div>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<section class="sidebar">
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="<#if user_session.userAvatar?if_exists!="">${user_session.userAvatar?if_exists}<#else >/static/images/default.png</#if>" class="img-circle" alt="User Image">
|
||||
<img src="<#if user.userAvatar?if_exists!="">${user.userAvatar?if_exists}<#else >/static/images/default.png</#if>" class="img-circle" alt="User Image">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>${user_session.userDisplayName?if_exists}</p><a href="/admin/profile"><i class="fa fa-circle text-success"></i><@spring.message code='admin.menu.profile' /></a>
|
||||
<p>${user.userDisplayName?if_exists}</p><a href="/admin/profile"><i class="fa fa-circle text-success"></i><@spring.message code='admin.menu.profile' /></a>
|
||||
</div>
|
||||
</div>
|
||||
<form action="#" method="get" class="sidebar-form">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<#ftl output_format="HTML" strip_whitespace=true>
|
||||
|
||||
<#-- 统计代码 -->
|
||||
<#macro statistics>
|
||||
${options.statistics_code?if_exists}
|
||||
|
@ -14,3 +16,19 @@
|
|||
<link rel="shortcut icon" type="images/x-icon" href="${options.blog_favicon}">
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
<#-- 站点验证代码 -->
|
||||
<#macro verification>
|
||||
<#if options.blog_verification_google??>
|
||||
<meta name="google-site-verification" content="${options.blog_verification_google}" />
|
||||
</#if>
|
||||
<#if options.blog_verification_bing??>
|
||||
<meta name="msvalidate.01" content="${options.blog_verification_bing}" />
|
||||
</#if>
|
||||
<#if options.blog_verification_baidu??>
|
||||
<meta name="baidu-site-verification" content="${options.blog_verification_baidu}" />
|
||||
</#if>
|
||||
<#if options.blog_verification_qihu??>
|
||||
<meta name="360-site-verification" content="${options.blog_verification_qihu}" />
|
||||
</#if>
|
||||
</#macro>
|
|
@ -14,6 +14,7 @@
|
|||
<meta name="author" content="${user.userDisplayName?if_exists}" />
|
||||
<meta name="keywords" content="${keywords?default("Anatole")}"/>
|
||||
<meta name="description" content="${description?default("Anatole")}" />
|
||||
<@verification></@verification>
|
||||
<@favicon></@favicon>
|
||||
<link href="/anatole/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
||||
<link rel="stylesheet" href="/anatole/source/css/blog_basic.min.css?version=88107691fe">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<#macro head title="" keywords="" description="">
|
||||
<#import "../../../common/macro/common_macro.ftl" as common>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!--
|
||||
|
@ -94,8 +95,7 @@
|
|||
|
||||
<!-- Site Verification -->
|
||||
|
||||
<meta name="google-site-verification" content="${options.theme_material_google_site_verification?if_exists}" />
|
||||
<meta name="baidu-site-verification" content="${options.theme_material_baidu_site_verification?if_exists}" />
|
||||
<@common.verification />
|
||||
|
||||
<!-- RSS -->
|
||||
<link rel=alternate type="application/atom+xml" href="/atom.xml">
|
||||
|
|
|
@ -132,18 +132,6 @@
|
|||
<input type="text" class="form-control" id="materialCopyrightSince" name="theme_material_copyright_since" value="${options.theme_material_copyright_since?if_exists}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="materialGoogleSiteVerification" class="col-sm-4 control-label">谷歌Search Console验证:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="materialGoogleSiteVerification" name="theme_material_google_site_verification" value="${options.theme_material_google_site_verification?if_exists}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="materialBaiduSiteVerification" class="col-sm-4 control-label">百度站长平台验证:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="materialBaiduSiteVerification" name="theme_material_baidu_site_verification" value="${options.theme_material_baidu_site_verification?if_exists}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right" onclick="saveThemeOptions('materialGeneralOptions')">保存设置</button>
|
||||
|
|
Loading…
Reference in New Issue