Browse Source

improve page title and copyright in list page

master
filesite 4 months ago
parent
commit
feeed6124a
  1. 22
      themes/beauty/controller/ListController.php
  2. 2
      themes/beauty/views/site/player.php

22
themes/beauty/controller/ListController.php

@ -120,17 +120,27 @@ Class ListController extends Controller {
$page = $this->get('page', 1); $page = $this->get('page', 1);
$pageSize = $this->get('limit', 24); $pageSize = $this->get('limit', 24);
$pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io";
if (!empty($subcate)) { //获取网站名称和版权申明
$pageTitle = "{$subcate['directory']}的照片,来自{$pageTitle}"; $maxScanDeep = 0; //最大扫描目录级数
if (!empty($subcate['title'])) { $cacheKey = $this->getCacheKey('root', 'readme', $maxScanDeep);
$pageTitle = $subcate['title']; $readmeFile = Common::getCacheFromFile($cacheKey);
//底部版权申明配置支持
$copyright = '';
if (!empty($readmeFile['copyright'])) {
$copyright = $readmeFile['copyright'];
} }
$pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io";
if (!empty($readmeFile['title'])) {
$pageTitle = $readmeFile['title'];
} }
$viewName = '//site/index'; //共享视图 $viewName = '//site/index'; //共享视图
$params = compact( $params = compact(
'cateId', 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'breadcrumbs', 'htmlCateReadme', 'cateId', 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'breadcrumbs', 'htmlCateReadme',
'mp3File', 'page', 'pageSize', 'cacheDataId' 'mp3File', 'page', 'pageSize', 'cacheDataId', 'copyright'
); );
return $this->render($viewName, $params, $pageTitle); return $this->render($viewName, $params, $pageTitle);
} }

2
themes/beauty/views/site/player.php

@ -36,7 +36,7 @@
<source src="<?php echo $viewData['videoUrl']; ?>" type="video/mp4"> <source src="<?php echo $viewData['videoUrl']; ?>" type="video/mp4">
</video> </video>
<div class="text-right mt-2 mr-1"> <div class="text-right mt-2 mr-1">
<a class="btn btn-info" href="<?php echo $viewData['videoUrl']; ?>"> <a class="btn btn-default" href="<?php echo $viewData['videoUrl']; ?>">
下载视频 下载视频
</a> </a>

Loading…
Cancel
Save