mirror of https://github.com/halo-dev/halo
🐛 修复Anatole主题菜单高亮问题
parent
f00877c8de
commit
602059fb2a
|
@ -3,7 +3,6 @@
|
||||||
> Halo may be the best Java blog system. | Halo可能是最好的Java博客系统。
|
> Halo may be the best Java blog system. | Halo可能是最好的Java博客系统。
|
||||||
|
|
||||||
[](#)
|
[](#)
|
||||||
[](https://github.com/spring-projects/spring-boot)
|
|
||||||
[](https://github.com/ruibaby/halo/releases)
|
[](https://github.com/ruibaby/halo/releases)
|
||||||
[](https://travis-ci.org/ruibaby/halo)
|
[](https://travis-ci.org/ruibaby/halo)
|
||||||
|
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
<developer>
|
<developer>
|
||||||
<id>RYAN0UP</id>
|
<id>ruibaby</id>
|
||||||
<name>Ryan Wang</name>
|
<name>Ryan Wang</name>
|
||||||
<email>i@ryanc.cc</email>
|
<email>i@ryanc.cc</email>
|
||||||
<url>https://ryanc.cc</url>
|
<url>https://ryanc.cc</url>
|
||||||
|
|
|
@ -249,6 +249,8 @@ public class IndexController extends BaseController{
|
||||||
User user = userService.findUser();
|
User user = userService.findUser();
|
||||||
model.addAttribute("user",user);
|
model.addAttribute("user",user);
|
||||||
|
|
||||||
|
model.addAttribute("is_gallery",true);
|
||||||
|
|
||||||
//设置选项
|
//设置选项
|
||||||
model.addAttribute("options",HaloConst.OPTIONS);
|
model.addAttribute("options",HaloConst.OPTIONS);
|
||||||
return this.render("gallery");
|
return this.render("gallery");
|
||||||
|
|
|
@ -126,39 +126,33 @@
|
||||||
</div>
|
</div>
|
||||||
<#if options.widget_postcount?default("true")=="true">
|
<#if options.widget_postcount?default("true")=="true">
|
||||||
<div class="col-lg-3 col-xs-6" id="widgetPostCountBody">
|
<div class="col-lg-3 col-xs-6" id="widgetPostCountBody">
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-aqua">
|
<div class="small-box bg-aqua">
|
||||||
<div class="inner"><h3>${postCount?default(0)}</h3><p>文章</p></div>
|
<div class="inner"><h3>${postCount?default(0)}</h3><p>文章</p></div>
|
||||||
<div class="icon"><i class="ion ion-bag"></i></div>
|
<div class="icon"><i class="ion ion-bag"></i></div>
|
||||||
<a href="/admin/posts" class="small-box-footer">查看所有 <i class="fa fa-arrow-circle-right"></i></a>
|
<a data-pjax="true" href="/admin/posts" class="small-box-footer">查看所有 <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</#if>
|
</#if>
|
||||||
<#if options.widget_commentcount?default("true")=="true">
|
<#if options.widget_commentcount?default("true")=="true">
|
||||||
<div class="col-lg-3 col-xs-6" id="widgetCommentCountBody">
|
<div class="col-lg-3 col-xs-6" id="widgetCommentCountBody">
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-green">
|
<div class="small-box bg-green">
|
||||||
<div class="inner"><h3>${commentCount?default(0)}</h3><p>评论</p></div>
|
<div class="inner"><h3>${commentCount?default(0)}</h3><p>评论</p></div>
|
||||||
<div class="icon"><i class="ion ion-stats-bars"></i></div>
|
<div class="icon"><i class="ion ion-stats-bars"></i></div>
|
||||||
<a href="/admin/comments" class="small-box-footer">查看所有 <i class="fa fa-arrow-circle-right"></i></a>
|
<a data-pjax="true" href="/admin/comments" class="small-box-footer">查看所有 <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</#if>
|
</#if>
|
||||||
<!-- ./col -->
|
|
||||||
<#if options.widget_attachmentcount?default("true")=="true">
|
<#if options.widget_attachmentcount?default("true")=="true">
|
||||||
<div class="col-lg-3 col-xs-6" id="widgetAttachmentCountBody">
|
<div class="col-lg-3 col-xs-6" id="widgetAttachmentCountBody">
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-yellow">
|
<div class="small-box bg-yellow">
|
||||||
<div class="inner"><h3>${mediaCount?default(0)}</h3><p>媒体库</p></div>
|
<div class="inner"><h3>${mediaCount?default(0)}</h3><p>媒体库</p></div>
|
||||||
<div class="icon"><i class="ion ion-person-add"></i></div>
|
<div class="icon"><i class="ion ion-person-add"></i></div>
|
||||||
<a href="/admin/attachments" class="small-box-footer">上传图片 <i class="fa fa-arrow-circle-right"></i></a>
|
<a data-pjax="true" href="/admin/attachments" class="small-box-footer">上传图片 <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</#if>
|
</#if>
|
||||||
<!-- ./col -->
|
|
||||||
<#if options.widget_daycount?default("true")=="true">
|
<#if options.widget_daycount?default("true")=="true">
|
||||||
<div class="col-lg-3 col-xs-6" id="widgetDayCountBody">
|
<div class="col-lg-3 col-xs-6" id="widgetDayCountBody">
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-red">
|
<div class="small-box bg-red">
|
||||||
<div class="inner"><h3 id="blogStart">1</h3><p>成立天数</p></div>
|
<div class="inner"><h3 id="blogStart">1</h3><p>成立天数</p></div>
|
||||||
<div class="icon"><i class="ion ion-pie-graph"></i></div>
|
<div class="icon"><i class="ion ion-pie-graph"></i></div>
|
||||||
|
@ -166,7 +160,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</#if>
|
</#if>
|
||||||
<!-- ./col -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -192,7 +185,6 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<#if postTopFive??>
|
<#if postTopFive??>
|
||||||
<tr>
|
|
||||||
<#list postTopFive as post>
|
<#list postTopFive as post>
|
||||||
<tr>
|
<tr>
|
||||||
<#if post.postStatus == 0>
|
<#if post.postStatus == 0>
|
||||||
|
@ -212,7 +204,6 @@
|
||||||
<td>${post.postDate?if_exists?string("yyyy-MM-dd HH:mm")}</td>
|
<td>${post.postDate?if_exists?string("yyyy-MM-dd HH:mm")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</#list>
|
</#list>
|
||||||
</tr>
|
|
||||||
<#else>
|
<#else>
|
||||||
<tr><td>暂无数据</td></tr>
|
<tr><td>暂无数据</td></tr>
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -236,15 +227,16 @@
|
||||||
<div class="box-body table-responsive">
|
<div class="box-body table-responsive">
|
||||||
<table class="table table-bordered table-hover text-center">
|
<table class="table table-bordered table-hover text-center">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th>评论者</th>
|
<th>评论者</th>
|
||||||
<th>评论页面</th>
|
<th>评论页面</th>
|
||||||
<th>内容</th>
|
<th>内容</th>
|
||||||
<th>状态</th>
|
<th>状态</th>
|
||||||
<th>时间</th>
|
<th>时间</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<#if comments??>
|
<#if comments??>
|
||||||
<tr>
|
|
||||||
<#list comments as comment>
|
<#list comments as comment>
|
||||||
<tr>
|
<tr>
|
||||||
<td>${comment.commentAuthor}</td>
|
<td>${comment.commentAuthor}</td>
|
||||||
|
@ -280,7 +272,6 @@
|
||||||
<td>${comment.commentDate?string("yyyy-MM-dd HH:mm")}</td>
|
<td>${comment.commentDate?string("yyyy-MM-dd HH:mm")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</#list>
|
</#list>
|
||||||
</tr>
|
|
||||||
<#else>
|
<#else>
|
||||||
<tr><td>暂无数据</td></tr>
|
<tr><td>暂无数据</td></tr>
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -312,14 +303,15 @@
|
||||||
<div class="box-body table-responsive">
|
<div class="box-body table-responsive">
|
||||||
<table class="table table-bordered table-hover text-center">
|
<table class="table table-bordered table-hover text-center">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th>事件</th>
|
<th>事件</th>
|
||||||
<th>结果</th>
|
<th>结果</th>
|
||||||
<th>IP</th>
|
<th>IP</th>
|
||||||
<th>时间</th>
|
<th>时间</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<#if logs??>
|
<#if logs??>
|
||||||
<tr>
|
|
||||||
<#list logs as log>
|
<#list logs as log>
|
||||||
<tr>
|
<tr>
|
||||||
<td>${log.logTitle}</td>
|
<td>${log.logTitle}</td>
|
||||||
|
@ -328,7 +320,6 @@
|
||||||
<td>${log.logCreated?string("yyyy-MM-dd HH:mm")}</td>
|
<td>${log.logCreated?string("yyyy-MM-dd HH:mm")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</#list>
|
</#list>
|
||||||
</tr>
|
|
||||||
<#else>
|
<#else>
|
||||||
<tr><td>暂无数据</td></tr>
|
<tr><td>暂无数据</td></tr>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
|
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
|
||||||
<meta content="telephone=no" name="format-detection" />
|
<meta content="telephone=no" name="format-detection" />
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta name="author" content="${keywords?default("Anatole")}" />
|
<meta name="author" content="" />
|
||||||
<meta name="keywords" content=""/>
|
<meta name="keywords" content="${keywords?default("Anatole")}"/>
|
||||||
<meta name="description" content="${description?default("Anatole")}" />
|
<meta name="description" content="${description?default("Anatole")}" />
|
||||||
<link rel="shortcut icon" href="/anatole/source/images/favicon.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="/anatole/source/images/favicon.png" type="image/x-icon" />
|
||||||
<link href="/anatole/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
<link href="/anatole/source/css/font-awesome.min.css" type="text/css" rel="stylesheet"/>
|
||||||
|
@ -24,6 +24,21 @@
|
||||||
<script type="text/javascript" src="/anatole/source/js/jquery.js"></script>
|
<script type="text/javascript" src="/anatole/source/js/jquery.js"></script>
|
||||||
<script type="text/javascript" src="/anatole/source/js/jquery-migrate-1.2.1.min.js"></script>
|
<script type="text/javascript" src="/anatole/source/js/jquery-migrate-1.2.1.min.js"></script>
|
||||||
<script type="text/javascript" src="/anatole/source/js/jquery.appear.js"></script>
|
<script type="text/javascript" src="/anatole/source/js/jquery.appear.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var url = location.href;
|
||||||
|
var urlstatus = false;
|
||||||
|
$(".nav li a").each(function () {
|
||||||
|
if ((url + '/').indexOf($(this).attr('href')) > -1 && $(this).attr('href') != '/') {
|
||||||
|
$(this).addClass('current');
|
||||||
|
urlstatus = true;
|
||||||
|
} else {
|
||||||
|
$(this).removeClass('current');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!urlstatus) {
|
||||||
|
$(".nav li a").eq(0).addClass('current');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</#macro>
|
</#macro>
|
Loading…
Reference in New Issue