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';
<?php } ?> <?php } ?>
</div> </div>
<!--for theme googleimage--> <!--for theme beauty-->
<script src="/js/jquery-3.1.1.min.js"></script> <script src="/js/jquery-3.1.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script> <script src="/js/bootstrap.min.js"></script>
<script src="/js/lazyload.min.js"></script> <script src="/js/lazyload.min.js"></script>

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

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

Loading…
Cancel
Save