From a71c4165e251d9104bf250d87f1ec9fed23166ee Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 23 Apr 2022 00:56:54 +0800 Subject: [PATCH] theme google image support 1 dir-level, add blueimp-gallery support --- conf/app.php | 2 +- .../googleimage/controller/SiteController.php | 3 +- themes/googleimage/views/layout/main.php | 46 ++++++++++++++++ themes/googleimage/views/site/index.php | 25 ++++++--- www/css/blueimp-gallery.min.css | 2 + www/css/googleimage.css | 2 +- www/img/close.png | Bin 0 -> 163 bytes www/img/close.svg | 4 ++ www/img/error.png | Bin 0 -> 1047 bytes www/img/error.svg | 6 ++ www/img/loading.gif | Bin 0 -> 3796 bytes www/img/loading.svg | 52 ++++++++++++++++++ www/img/next.png | Bin 0 -> 166 bytes www/img/next.svg | 4 ++ www/img/play-pause.png | Bin 0 -> 432 bytes www/img/play-pause.svg | 6 ++ www/img/prev.png | Bin 0 -> 170 bytes www/img/prev.svg | 4 ++ www/img/video-play.png | Bin 0 -> 993 bytes www/img/video-play.svg | 5 ++ www/js/blueimp-gallery.min.js | 2 + www/js/googleimage.js | 17 ++++++ 22 files changed, 169 insertions(+), 11 deletions(-) create mode 100644 www/css/blueimp-gallery.min.css create mode 100644 www/img/close.png create mode 100644 www/img/close.svg create mode 100644 www/img/error.png create mode 100644 www/img/error.svg create mode 100644 www/img/loading.gif create mode 100644 www/img/loading.svg create mode 100644 www/img/next.png create mode 100644 www/img/next.svg create mode 100644 www/img/play-pause.png create mode 100644 www/img/play-pause.svg create mode 100644 www/img/prev.png create mode 100644 www/img/prev.svg create mode 100644 www/img/video-play.png create mode 100644 www/img/video-play.svg create mode 100644 www/js/blueimp-gallery.min.js diff --git a/conf/app.php b/conf/app.php index a564fb6..acc6288 100644 --- a/conf/app.php +++ b/conf/app.php @@ -10,7 +10,7 @@ return array( //'theme' => 'manual', //name of theme which is enabled //in developing - 'content_directory' => 'dogs/', //directory of contents in /www/ + 'content_directory' => 'dogs_2/', //directory of contents in /www/ 'theme' => 'googleimage', //name of theme which is enabled 'default_layout' => 'main', //default layout diff --git a/themes/googleimage/controller/SiteController.php b/themes/googleimage/controller/SiteController.php index f35af74..c8fa918 100644 --- a/themes/googleimage/controller/SiteController.php +++ b/themes/googleimage/controller/SiteController.php @@ -8,8 +8,6 @@ require_once __DIR__ . '/../../../plugins/Parsedown.php'; Class SiteController extends Controller { public function actionIndex() { - $cateId = $this->get('id', ''); - //获取数据 $scanner = new DirScanner(); $scanner->setWebRoot(FSC::$app['config']['content_directory']); @@ -18,6 +16,7 @@ Class SiteController extends Controller { //获取目录 $menus = $scanner->getMenus(); + $cateId = $this->get('id', $menus[0]['id']); $titles = []; $html = ''; diff --git a/themes/googleimage/views/layout/main.php b/themes/googleimage/views/layout/main.php index dd47496..b359605 100644 --- a/themes/googleimage/views/layout/main.php +++ b/themes/googleimage/views/layout/main.php @@ -7,8 +7,14 @@ + + @@ -36,10 +42,50 @@ include_once $viewFile; ©FSC 2022 - execute time: {page_time_cost} ms + + + + diff --git a/themes/googleimage/views/site/index.php b/themes/googleimage/views/site/index.php index cb9c199..2d21456 100644 --- a/themes/googleimage/views/site/index.php +++ b/themes/googleimage/views/site/index.php @@ -1,6 +1,3 @@ -