|
|
@ -5,8 +5,8 @@ |
|
|
|
<div class="navbar-header"> |
|
|
|
<div class="navbar-header"> |
|
|
|
<div class="navbar-toggle"> |
|
|
|
<div class="navbar-toggle"> |
|
|
|
<img class="svg icon1 svgimg lampJS verMiddle" src="/img/beauty/buld.svg" alt="点击关灯/开灯" title="点击关灯/开灯"> |
|
|
|
<img class="svg icon1 svgimg lampJS verMiddle" src="/img/beauty/buld.svg" alt="点击关灯/开灯" title="点击关灯/开灯"> |
|
|
|
<button type="button" class="collapsed mr_button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" |
|
|
|
<img class="icon1 svg connectmeJS svgimg iconr2 verMiddle" src="/img/beauty/contactUs.svg" alt="联系我们" title="联系我们" /> |
|
|
|
aria-expanded="false"> |
|
|
|
<button type="button" class="collapsed mr_button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> |
|
|
|
<span class="sr-only">Toggle navigation</span> |
|
|
|
<span class="sr-only">Toggle navigation</span> |
|
|
|
<img class="svg icon1 svgimg verMiddle" src="/img/beauty/navshow.svg" alt="展开列表" title="展开列表"> |
|
|
|
<img class="svg icon1 svgimg verMiddle" src="/img/beauty/navshow.svg" alt="展开列表" title="展开列表"> |
|
|
|
</button> |
|
|
|
</button> |
|
|
@ -20,18 +20,18 @@ |
|
|
|
<!-- Collect the nav links, forms, and other content for toggling --> |
|
|
|
<!-- Collect the nav links, forms, and other content for toggling --> |
|
|
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
|
|
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
|
|
|
<ul class="nav navbar-nav"> |
|
|
|
<ul class="nav navbar-nav"> |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
$selectedId = $viewData['cateId']; |
|
|
|
$selectedId = $viewData['cateId']; |
|
|
|
$breadcrumbs = !empty($viewData['breadcrumbs']) ? $viewData['breadcrumbs'] : []; |
|
|
|
$breadcrumbs = !empty($viewData['breadcrumbs']) ? $viewData['breadcrumbs'] : []; |
|
|
|
if (!empty($viewData['menus'])) { //只显示第一级目录 |
|
|
|
if (!empty($viewData['menus'])) { //只显示第一级目录 |
|
|
|
foreach($viewData['menus'] as $index => $item) { |
|
|
|
foreach ($viewData['menus'] as $index => $item) { |
|
|
|
$selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'active' : ''; |
|
|
|
$selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'active' : ''; |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<li class="{$selected}"><a href="/?id={$item['id']}">{$item['directory']}</a></li> |
|
|
|
<li class="{$selected}"><a href="/?id={$item['id']}">{$item['directory']}</a></li> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
?> |
|
|
|
?> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<?php /* |
|
|
|
<?php /* |
|
|
|
<form class="navbar-form navbar-left"> |
|
|
|
<form class="navbar-form navbar-left"> |
|
|
@ -43,7 +43,7 @@ eof; |
|
|
|
*/ ?> |
|
|
|
*/ ?> |
|
|
|
<div class="nb_right nav navbar-nav navbar-right"> |
|
|
|
<div class="nb_right nav navbar-nav navbar-right"> |
|
|
|
<img class="svg icon1 svgimg lampJS verMiddle" src="/img/beauty/buld.svg" alt="点击关灯/开灯" title="点击关灯/开灯"> |
|
|
|
<img class="svg icon1 svgimg lampJS verMiddle" src="/img/beauty/buld.svg" alt="点击关灯/开灯" title="点击关灯/开灯"> |
|
|
|
<img class="icon1 svg connectmeJS svgimg svgimg2 iconr2 verMiddle" src="/img/beauty/scrolltop.svg" alt="联系我们" title="联系我们"> |
|
|
|
<img class="icon1 svg connectmeJS svgimg iconr2 verMiddle" src="/img/beauty/contactUs.svg" alt="联系我们" title="联系我们" /> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div><!-- /.navbar-collapse --> |
|
|
|
</div><!-- /.navbar-collapse --> |
|
|
@ -57,12 +57,12 @@ if (!empty($breadcrumbs)) { |
|
|
|
<small>当前位置:</small> |
|
|
|
<small>当前位置:</small> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
|
|
|
|
|
|
|
|
foreach($breadcrumbs as $bread) { |
|
|
|
foreach ($breadcrumbs as $bread) { |
|
|
|
if ($bread['id'] != $selectedId) { |
|
|
|
if ($bread['id'] != $selectedId) { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<a href="{$bread['url']}">{$bread['name']}</a> / |
|
|
|
<a href="{$bread['url']}">{$bread['name']}</a> / |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<strong>{$bread['name']}</strong> |
|
|
|
<strong>{$bread['name']}</strong> |
|
|
|
eof; |
|
|
|
eof; |
|
|
@ -82,23 +82,23 @@ eof; |
|
|
|
$imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); |
|
|
|
$imgExts = !empty(FSC::$app['config']['supportedImageExts']) ? FSC::$app['config']['supportedImageExts'] : array('jpg', 'jpeg', 'png', 'webp', 'gif'); |
|
|
|
$category = !empty($viewData['scanResults'][$selectedId]) ? $viewData['scanResults'][$selectedId] : []; |
|
|
|
$category = !empty($viewData['scanResults'][$selectedId]) ? $viewData['scanResults'][$selectedId] : []; |
|
|
|
|
|
|
|
|
|
|
|
//当前目录的描述介绍 |
|
|
|
// //当前目录的描述介绍 |
|
|
|
if (!empty($category['description'])) { |
|
|
|
// if (!empty($category['description'])) { |
|
|
|
echo <<<eof |
|
|
|
// echo <<<eof |
|
|
|
<p class="modal-body">{$category['description']}</p> |
|
|
|
// <p class="modal-body">{$category['description']}</p> |
|
|
|
eof; |
|
|
|
// eof; |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
//当前目录的readme详细介绍 |
|
|
|
// //当前目录的readme详细介绍 |
|
|
|
if (!empty($viewData['htmlCateReadme'])) { |
|
|
|
// if (!empty($viewData['htmlCateReadme'])) { |
|
|
|
echo <<<eof |
|
|
|
// echo <<<eof |
|
|
|
<div class="modal-body markdown-body">{$viewData['htmlCateReadme']}</div> |
|
|
|
// <div class="modal-body markdown-body">{$viewData['htmlCateReadme']}</div> |
|
|
|
eof; |
|
|
|
// eof; |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($category['directories'])) { //两级目录支持 |
|
|
|
if (!empty($category['directories'])) { //两级目录支持 |
|
|
|
$index = 0; |
|
|
|
$index = 0; |
|
|
|
foreach($category['directories'] as $dir) { |
|
|
|
foreach ($category['directories'] as $dir) { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<div class="im_item bor_radius col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
|
|
|
<div class="im_item bor_radius col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
|
|
|
<a href="{$dir['path']}" class="bor_radius"> |
|
|
|
<a href="{$dir['path']}" class="bor_radius"> |
|
|
@ -107,17 +107,17 @@ eof; |
|
|
|
if (!empty($dir['snapshot'])) { |
|
|
|
if (!empty($dir['snapshot'])) { |
|
|
|
if ($index > 0) { |
|
|
|
if ($index > 0) { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<img data-original="{$dir['snapshot']}" class="bor_radius im_img lazy" alt="{$dir['directory']}"> |
|
|
|
<img src="/img/beauty/lazy.svg" data-original="{$dir['snapshot']}" class="bor_radius im_img lazy" alt="{$dir['directory']}"> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<img src="{$dir['snapshot']}" class="bor_radius im_img" alt="{$dir['directory']}"> |
|
|
|
<img src="{$dir['snapshot']}" class="bor_radius im_img" alt="{$dir['directory']}"> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
} |
|
|
|
} |
|
|
|
}else if (!empty($dir['files'])) { |
|
|
|
} else if (!empty($dir['files'])) { |
|
|
|
$first_img = array_shift($dir['files']); |
|
|
|
$first_img = array_shift($dir['files']); |
|
|
|
if (!in_array($first_img['extension'], $imgExts)) { |
|
|
|
if (!in_array($first_img['extension'], $imgExts)) { |
|
|
|
foreach($dir['files'] as $file) { |
|
|
|
foreach ($dir['files'] as $file) { |
|
|
|
if (in_array($file['extension'], $imgExts)) { |
|
|
|
if (in_array($file['extension'], $imgExts)) { |
|
|
|
$first_img = $file; |
|
|
|
$first_img = $file; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -128,14 +128,14 @@ eof; |
|
|
|
if (in_array($first_img['extension'], $imgExts)) { |
|
|
|
if (in_array($first_img['extension'], $imgExts)) { |
|
|
|
if ($index > 0) { |
|
|
|
if ($index > 0) { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<img data-original="{$first_img['path']}" class="bor_radius im_img lazy" alt="{$first_img['filename']}"> |
|
|
|
<img src="/img/beauty/lazy.svg" data-original="{$first_img['path']}" class="bor_radius im_img lazy" alt="{$first_img['filename']}"> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<img src="{$first_img['path']}" class="bor_radius im_img" alt="{$first_img['filename']}"> |
|
|
|
<img src="/img/beauty/lazy.svg" data-original="{$first_img['path']}" class="bor_radius im_img lazy" alt="{$first_img['filename']}"> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<img src="/img/default.png" class="bor_radius im_img" alt="default image"> |
|
|
|
<img src="/img/default.png" class="bor_radius im_img" alt="default image"> |
|
|
|
eof; |
|
|
|
eof; |
|
|
@ -150,14 +150,16 @@ eof; |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
$index ++; |
|
|
|
$index++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($category['files'])) { //一级目录支持 |
|
|
|
if (!empty($category['files'])) { //一级目录支持 |
|
|
|
$index = 0; |
|
|
|
$index = 0; |
|
|
|
foreach($category['files'] as $file) { |
|
|
|
foreach ($category['files'] as $file) { |
|
|
|
if (!in_array($file['extension'], $imgExts)) {continue;} |
|
|
|
if (!in_array($file['extension'], $imgExts)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$title = !empty($file['title']) ? $file['title'] : $file['filename']; |
|
|
|
$title = !empty($file['title']) ? $file['title'] : $file['filename']; |
|
|
|
|
|
|
|
|
|
|
@ -165,21 +167,21 @@ eof; |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<div class="im_item bor_radius col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
|
|
|
<div class="im_item bor_radius col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
|
|
|
<a href="javascript:;" class="bor_radius" data-fancybox="gallery" data-src="{$file['path']}" data-caption="图片{$title}"> |
|
|
|
<a href="javascript:;" class="bor_radius" data-fancybox="gallery" data-src="{$file['path']}" data-caption="图片{$title}"> |
|
|
|
<img src="img/beauty/lazy.svg" data-original="{$file['path']}" class="bor_radius im_img lazy" alt="{$file['filename']}"> |
|
|
|
<img src="/img/beauty/lazy.svg" data-original="{$file['path']}" class="bor_radius im_img lazy" alt="{$file['filename']}"> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
echo <<<eof |
|
|
|
echo <<<eof |
|
|
|
<div class="im_item bor_radius col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
|
|
|
<div class="im_item bor_radius col-xs-6 col-sm-4 col-md-3 col-lg-2"> |
|
|
|
<a href="javascript:;" class="bor_radius" data-fancybox="gallery" data-src="{$file['path']}" data-caption="图片{$title}"> |
|
|
|
<a href="javascript:;" class="bor_radius" data-fancybox="gallery" data-src="{$file['path']}" data-caption="图片{$title}"> |
|
|
|
<img src="{$file['path']}" class="bor_radius im_img" alt="{$file['filename']}"> |
|
|
|
<img src="/img/beauty/lazy.svg" class="bor_radius im_img lazy" alt="{$file['filename']}"> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
eof; |
|
|
|
eof; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$index ++; |
|
|
|
$index++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
?> |
|
|
|
?> |
|
|
|