mirror of https://github.com/1099438829/apeblog
修正主题的一些bug
This commit is contained in:
parent
3f385526a1
commit
eb5bb4e907
|
|
@ -120,6 +120,10 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '',
|
||||||
{
|
{
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
case "all":
|
||||||
|
//获取顶级分类
|
||||||
|
return get_document_category_all(0, $row, $display);
|
||||||
|
break;
|
||||||
case 'top':
|
case 'top':
|
||||||
//获取顶级分类
|
//获取顶级分类
|
||||||
return get_document_category_by_parent(0, $row, $display);
|
return get_document_category_by_parent(0, $row, $display);
|
||||||
|
|
@ -175,7 +179,6 @@ function tpl_get_channel($type, $typeid, $row = 100, $where = '', $orderby = '',
|
||||||
return $tempArr;
|
return $tempArr;
|
||||||
break;
|
break;
|
||||||
case 'root':
|
case 'root':
|
||||||
|
|
||||||
if (!$typeid) {
|
if (!$typeid) {
|
||||||
throw new Exception('请指定要获取的栏目分类id!');
|
throw new Exception('请指定要获取的栏目分类id!');
|
||||||
}
|
}
|
||||||
|
|
@ -254,6 +257,24 @@ function get_document_category_by_parent($pid, $row, $display = 1)
|
||||||
return $tempArr;
|
return $tempArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_document_category_all( $display = 1)
|
||||||
|
{
|
||||||
|
$documentCategoryList = get_document_category_list();
|
||||||
|
$tempArr = array();
|
||||||
|
foreach ($documentCategoryList as $item) {
|
||||||
|
if (($display ? $item['display'] == 1 : true)) {
|
||||||
|
if ($item['pid'] == 0){
|
||||||
|
$tempArr[$item['id']] = $item;
|
||||||
|
}else{
|
||||||
|
$tempArr[$item['pid']]['child'][] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $tempArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模板-获取上一篇和下一篇
|
* 模板-获取上一篇和下一篇
|
||||||
* $get=上一篇|下一篇
|
* $get=上一篇|下一篇
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -62,10 +62,8 @@
|
||||||
<div class="menu-plane">
|
<div class="menu-plane">
|
||||||
<nav class="menu-header-plane">
|
<nav class="menu-header-plane">
|
||||||
<ul id="menu-header-list" class="menu-header-list">
|
<ul id="menu-header-list" class="menu-header-list">
|
||||||
<li id="menu-item-128" class="menu-item current_page_item menu-item-128">
|
<li id="menu-item-1" class="menu-item menu-item-1"><a href="/" aria-current="page">首页</a></li>
|
||||||
<a href="/" aria-current="page">首页</a>
|
{ape:channel type="all"}
|
||||||
</li>
|
|
||||||
{ape:channel type="top"}
|
|
||||||
<li id="menu-item-{$field.id}" class="menu-item {notempty name="field['child']"}menu-item-has-children{/notempty} {:IsActiveNav($cid,$field['id'])?'current-menu-item':''} menu-item-{$field['id']}">
|
<li id="menu-item-{$field.id}" class="menu-item {notempty name="field['child']"}menu-item-has-children{/notempty} {:IsActiveNav($cid,$field['id'])?'current-menu-item':''} menu-item-{$field['id']}">
|
||||||
{notempty name="field['child']"}
|
{notempty name="field['child']"}
|
||||||
<a href="#" aria-current="page">{$field['title']}</a>
|
<a href="#" aria-current="page">{$field['title']}</a>
|
||||||
|
|
@ -90,7 +88,7 @@
|
||||||
<div class="user-menu-pc-search" onclick="openSearch()" title="搜索">
|
<div class="user-menu-pc-search" onclick="openSearch()" title="搜索">
|
||||||
<i class="fal fa-search"></i>
|
<i class="fal fa-search"></i>
|
||||||
</div>
|
</div>
|
||||||
<span class="user-menu-main">
|
<span class="user-menu-main user-menu-main-notlogin">
|
||||||
<a href="login.html"><button class="login-btn-header">登录</button></a>
|
<a href="login.html"><button class="login-btn-header">登录</button></a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue