Browse Source

improve view

master
filesite 3 years ago
parent
commit
eb0d0d6e96
  1. 4
      themes/googleimage/controller/SiteController.php
  2. 4
      themes/googleimage/views/site/index.php
  3. 2
      www/js/googleimage.js

4
themes/googleimage/controller/SiteController.php

@ -43,11 +43,11 @@ Class SiteController extends Controller { @@ -43,11 +43,11 @@ Class SiteController extends Controller {
}
$pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统";
if (!empty($subcate)) {
$pageTitle = "{$subcate['directory']}的照片,来自{$pageTitle}";
if (!empty($readmeFile['title'])) {
$pageTitle = $readmeFile['title'];
}
if (!empty($subcate)) {
$pageTitle = "{$subcate['directory']}照片,来自{$pageTitle}";
}
$viewName = 'index';
$params = compact('cateId', 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme');

4
themes/googleimage/views/site/index.php

@ -93,7 +93,9 @@ eof; @@ -93,7 +93,9 @@ eof;
</a>
eof;
}
}else if (!empty($category['files'])) { //一级目录支持
}
if (!empty($category['files'])) { //一级目录支持
foreach($category['files'] as $file) {
if (!in_array($file['extension'], $imgExts)) {continue;}

2
www/js/googleimage.js

@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
//init photo gallery
if ($('.img-preview').length > 0) {
var imgContainer = $('.content').get(0);
var links = imgContainer.getElementsByTagName('a');
var links = imgContainer.getElementsByClassName('img-preview');
$('.img-preview').click(function(evt) {
var target = evt.target;

Loading…
Cancel
Save