Source code of filesite.io.
https://filesite.io
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.7 KiB
65 lines
1.7 KiB
<div class="menu"> |
|
<?php |
|
$selectedId = $viewData['cateId']; |
|
if (!empty($viewData['menus'])) { |
|
foreach($viewData['menus'] as $index => $item) { |
|
$selected = $item['id'] == $selectedId ? 'selected' : ''; |
|
echo <<<eof |
|
<a href="/?id={$item['id']}" class="{$selected}">{$item['directory']}</a> |
|
eof; |
|
} |
|
} |
|
?> |
|
</div> |
|
|
|
<div class="hr"></div> |
|
|
|
<div class="content markdown-body"> |
|
<?php |
|
$imgExts = ['jpg', 'jpeg', 'png', 'gif']; |
|
$category = $viewData['scanResults'][$selectedId]; |
|
|
|
if (!empty($category['directories'])) { |
|
foreach($category['directories'] as $dir) { |
|
echo <<<eof |
|
<a href="{$dir['path']}" class="img-item"> |
|
eof; |
|
|
|
if (!empty($dir['snapshot'])) { |
|
echo <<<eof |
|
<img src="{$dir['snapshot']}" alt="{$dir['directory']}"> |
|
eof; |
|
}else if (!empty($dir['files'])) { |
|
$first_img = array_shift($dir['files']); |
|
echo <<<eof |
|
<img src="{$first_img['path']}" alt="{$first_img['filename']}"> |
|
eof; |
|
} |
|
echo <<<eof |
|
<strong>{$dir['directory']}</strong> |
|
</a> |
|
eof; |
|
} |
|
}else if (!empty($category['files'])) { |
|
foreach($category['files'] as $file) { |
|
if (!in_array($file['extension'], $imgExts)) {continue;} |
|
echo <<<eof |
|
<img src="{$file['path']}" alt="{$file['filename']}"> |
|
eof; |
|
} |
|
} |
|
?> |
|
</div> |
|
|
|
<div class="modal-mask" id="modal_about"> |
|
<div class="modal-about"> |
|
<div class="modal-head"> |
|
<h3>关于GoogleImage</h3> |
|
<span class="btn-close" role="button"><svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class=" NMm5M"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span> |
|
</div> |
|
<div class="hr"></div> |
|
<div class="modal-body markdown-body"> |
|
<?php echo $viewData['html']; ?> |
|
</div> |
|
</div> |
|
</div>
|