From c37a01d956934cb3dc039254e4a3bada2ca7ebb4 Mon Sep 17 00:00:00 2001 From: filesite Date: Thu, 26 Sep 2024 23:09:29 +0800 Subject: [PATCH] css update for night theme --- themes/beauty/controller/SiteController.php | 8 +++++++- themes/beauty/views/site/index.php | 2 +- www/css/beauty.css | 10 +++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index 7635695..484baab 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -324,7 +324,7 @@ Class SiteController extends Controller { $imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); $imgFile = $scanner->getSnapshotImage($realpath, $imgExts); - //支持视频目录 + //支持视频、音乐目录 if (empty($imgFile)) { $videoExts = !empty(FSC::$app['config']['supportedVideoExts']) ? FSC::$app['config']['supportedVideoExts'] : array('mp4', 'mov', 'm3u8'); $firstVideo = $scanner->getSnapshotImage($realpath, $videoExts); @@ -342,6 +342,12 @@ Class SiteController extends Controller { $size = 'vm'; Common::saveCacheToFile($cacheKey, compact('url', 'size'), $cacheSubDir); } + }else { + $audioExts = !empty(FSC::$app['config']['supportedAudioExts']) ? FSC::$app['config']['supportedAudioExts'] : array('mp3'); + $firstVideo = $scanner->getSnapshotImage($realpath, $audioExts); + if (!empty($firstVideo)) { + $url = '/img/beauty/audio_icon.jpeg'; + } } }else { $url = $imgFile['path']; diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 03b3ced..c8f7a41 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -275,7 +275,7 @@ eof; 'audio' => '音乐', ); - echo '