Browse Source

sitename, copyright support txt config file

master
filesite 4 months ago
parent
commit
cd7f95a2db
  1. 9
      themes/beauty/controller/SiteController.php
  2. 8
      themes/beauty/views/layout/main.php
  3. 2
      themes/beauty/views/site/index.php
  4. 24
      www/girls/README.md

9
themes/beauty/controller/SiteController.php

@ -122,10 +122,17 @@ Class SiteController extends Controller { @@ -122,10 +122,17 @@ Class SiteController extends Controller {
if (!empty($subcate)) {
$pageTitle = "{$subcate['directory']}照片,来自{$pageTitle}";
}
//底部版权申明配置支持
$copyright = '';
if (!empty($readmeFile['copyright'])) {
$copyright = $readmeFile['copyright'];
}
$viewName = 'index';
$params = compact(
'page', 'pageSize', 'cacheDataId',
'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File'
'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File', 'copyright'
);
return $this->render($viewName, $params, $pageTitle);
}

8
themes/beauty/views/layout/main.php

@ -35,7 +35,12 @@ require_once __DIR__ . '/../../../../plugins/Html.php'; @@ -35,7 +35,12 @@ require_once __DIR__ . '/../../../../plugins/Html.php';
<p>用手机扫码打开</p>
<div id="qrimg"></div>
</div>
<p>
<p class="copyright">
<?php
if (!empty($viewData['copyright'])) {
echo $viewData['copyright'];
}else {
?>
<span>&copy;2022 - <?=date('Y')?></span>
by <a href="https://filesite.io/" target="_blank">FileSite.io</a>
<br>
@ -44,6 +49,7 @@ require_once __DIR__ . '/../../../../plugins/Html.php'; @@ -44,6 +49,7 @@ require_once __DIR__ . '/../../../../plugins/Html.php';
- 执行耗时: {page_time_cost} ms
<?php } ?>
<br>友情链接:<a href="https://tajian.tv" target="_blank">Ta荐 - 你的聚宝盆</a>
<?php } ?>
</p>
</footer>

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

@ -23,7 +23,7 @@ $supportedExts = array_merge($imgExts, $videoExts); @@ -23,7 +23,7 @@ $supportedExts = array_merge($imgExts, $videoExts);
<a class="navbar-brand" href="/">
<!--img class="verMiddle" src="/content/machete_icon.png" alt="logo图片"-->
<span class="verMiddle">家庭相册</span>
<span class="verMiddle"><?php echo $pageTitle; ?></span>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->

24
www/girls/README.md

@ -26,6 +26,30 @@ Machete是一款简单易用的家庭相册系统,可方便更新升级、支 @@ -26,6 +26,30 @@ Machete是一款简单易用的家庭相册系统,可方便更新升级、支
* <a href="https://jq.qq.com/?_wv=1027&k=WoH3Pv7d" target="_blank">Machete交流群</a>
## 网站配置
网站名称和底部的版权申明支持文本文件配置,在girls/目录(或你本地映射到girls/的目录)下增加以下文件:
* README_title.txt - 网站名称配置文件
* README_copyright.txt - 版权申明配置文件
注意配置文件名大小写必须一致!
配置文件内容填写纯文本的中英文信息(支持html代码),示例:
* README_title.txt
```
家庭相册演示
```
* README_copyright.txt
```
<span>&copy;2022 - 2024</span>
by <a href="https://filesite.io/" target="_blank">FileSite.io</a>
```
## 友情链接
* <a href="https://tajian.tv" target="_blank">Ta荐 - 你的聚宝盆</a>
Loading…
Cancel
Save