From 0b95cfeae713d376b541edf6bc553ae0ddc121c7 Mon Sep 17 00:00:00 2001 From: filesite Date: Sun, 24 Nov 2024 16:14:34 +0800 Subject: [PATCH] add small title for menus --- themes/beauty/controller/ListController.php | 4 ++-- themes/beauty/views/site/index.php | 8 ++++++-- www/css/beauty.css | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/themes/beauty/controller/ListController.php b/themes/beauty/controller/ListController.php index d656266..79f2de9 100644 --- a/themes/beauty/controller/ListController.php +++ b/themes/beauty/controller/ListController.php @@ -140,7 +140,7 @@ Class ListController extends Controller { } //图片、视频类型筛选支持 - $allFiles = $scanResults[$cateId]['files']; + $allFiles = !empty($scanResults[$cateId]['files']) ? $scanResults[$cateId]['files'] : []; $showType = $this->get('show', 'all'); if ($showType == 'image' && !empty($scanResults[$cateId]['files'])) { $scanResults[$cateId]['files'] = array_filter($scanResults[$cateId]['files'], function($item) { @@ -345,7 +345,7 @@ Class ListController extends Controller { //缓存key统一生成,方便按规则获取上一级目录的缓存cid protected function getBreadcrumbs($currentDir, $scanResults, $scanner) { $webroot = FSC::$app['config']['content_directory']; - $arr = explode($webroot, $currentDir['realpath']); + $arr = !empty($currentDir['realpath']) ? explode($webroot, $currentDir['realpath']) : []; $breads = array(); if (count($arr) < 2) { diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 37b1fff..3fa4d01 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -34,7 +34,6 @@ $main_view_cls = $menu_ext_status == 'opened' ? '' : 'full'; - @@ -57,14 +56,19 @@ $main_view_cls = $menu_ext_status == 'opened' ? '' : 'full'; */ ?> +