Browse Source

improve submenu of no data in the root dir

master
filesite 4 months ago
parent
commit
f49b608d0e
  1. 2
      themes/beauty/views/layout/main.php
  2. 29
      themes/beauty/views/site/index.php

2
themes/beauty/views/layout/main.php

@ -93,7 +93,7 @@ require_once __DIR__ . '/../../../../plugins/Html.php'; @@ -93,7 +93,7 @@ require_once __DIR__ . '/../../../../plugins/Html.php';
<?php } ?>
</div>
<!--for theme googleimage-->
<!--for theme beauty-->
<script src="/js/jquery-3.1.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/lazyload.min.js"></script>

29
themes/beauty/views/site/index.php

@ -228,21 +228,24 @@ eof; @@ -228,21 +228,24 @@ eof;
//显示图片、视频筛选链接
$arrShowTypes = array(
'all' => '所有',
'image' => '照片',
'video' => '视频',
);
echo '<ul class="nav nav-tabs ml-1">';
foreach ($arrShowTypes as $key => $title) {
$showLink = Html::getLinkByParams(FSC::$app['requestUrl'], array('show' => $key, 'page' => 1));
$activedClass = $key == $viewData['showType'] ? 'active' : '';
echo <<<eof
<li role="presentation" class="{$activedClass}"><a href="{$showLink}">{$title}</a></li>
if ($total > 0) {
$arrShowTypes = array(
'all' => '所有',
'image' => '照片',
'video' => '视频',
);
echo '<ul class="nav nav-tabs ml-1">';
foreach ($arrShowTypes as $key => $title) {
$showLink = Html::getLinkByParams(FSC::$app['requestUrl'], array('show' => $key, 'page' => 1));
$activedClass = $key == $viewData['showType'] ? 'active' : '';
echo <<<eof
<li role="presentation" class="{$activedClass}"><a href="{$showLink}">{$title}</a></li>
eof;
}
echo '</ul>';
}
echo '</ul>';
//空目录显示提示信息
if (

Loading…
Cancel
Save