From be155d813d92677d8ca55868a05b3f98519c9a5e Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 16 Sep 2023 13:37:56 +0800 Subject: [PATCH] theme webdirectory improve --- themes/webdirectory/views/site/index.php | 106 ++++++++++++----------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/themes/webdirectory/views/site/index.php b/themes/webdirectory/views/site/index.php index dcfb6ba..ea901b8 100644 --- a/themes/webdirectory/views/site/index.php +++ b/themes/webdirectory/views/site/index.php @@ -1,76 +1,78 @@
{$menu['directory']} + foreach($viewData['menus'] as $menu) { + $link = urlencode($menu['directory']); + echo <<{$menu['directory']} eof; - } + } } ?>
- $item) { - //跳过一级目录下的文件 - if (!empty($item['filename'])) {continue;} + $item) { + //跳过一级目录下的文件 + if (!empty($item['filename'])) {continue;} - echo << -

{$item['directory']}

+ echo << +

{$item['directory']}

eof; - //二级目录 - if (!empty($item['directories'])) { - foreach($item['directories'] as $fid => $dir) { - echo << -

- {$dir['directory']}

+ //二级目录 + if (!empty($item['directories'])) { + foreach($item['directories'] as $fid => $dir) { + echo << +

- {$dir['directory']}

eof; - //URL链接 - if (!empty($dir['files'])) { - foreach($dir['files'] as $urlItem) { - echo << - - {$urlItem['shortcut']['name']} - {$urlItem['shortcut']['url']} - -
+ //URL链接 + if (!empty($dir['files'])) { + foreach($dir['files'] as $urlItem) { + if (empty($urlItem['shortcut'])) {continue;} + echo << + + {$urlItem['shortcut']['name']} + {$urlItem['shortcut']['url']} + + eof; - } - } + } + } - echo << + echo << eof; - } - } + } + } - //URL链接 - if (!empty($item['files'])) { - foreach($item['files'] as $fid => $urlItem) { - echo << - - {$urlItem['shortcut']['name']} - {$urlItem['shortcut']['url']} - - + //URL链接 + if (!empty($item['files'])) { + foreach($item['files'] as $fid => $urlItem) { + if (empty($urlItem['shortcut'])) {continue;} + echo << + + {$urlItem['shortcut']['name']} + {$urlItem['shortcut']['url']} + + eof; - } - } + } + } - echo << + echo << eof; - } - } - ?> + } + } + ?> \ No newline at end of file