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 + + + +