This commit is contained in:
浪子 2024-05-26 14:17:20 +08:00
parent aec71a535b
commit e86e1afd66
2 changed files with 47 additions and 42 deletions

View File

@ -1,13 +1,19 @@
## 说明 ## 说明
移植自`hugo-theme-farallon` 原汁原味,可以直接使用 原主题的CSS 移植自 `bigfa `大大的 `hugo-theme-farallon` 原汁原味,可以直接使用 原主题的CSS
精简部分 JS. 精简部分 JS.
感谢
- 2024.5.24
2024.5.24
新增了说说页面,基于memos 0.19 以下的版本 新增了说说页面,基于memos 0.19 以下的版本
在后台设置memos的地址和memoID即可 在后台设置memos的地址和memoID即可
默认获取最近20条公开的memo 默认获取最近20条公开的memo
- 2024.5.26
抄了个网站统计页面
## 原项目地址 ## 原项目地址
https://github.com/bigfa/hugo-theme-farallon https://github.com/bigfa/hugo-theme-farallon
@ -43,6 +49,7 @@ https://github.com/AlanDecode/Typecho-Plugin-DoubanBoard
若使用AI摘要插件则显示AI摘要,不使用则显示默认字数摘要 若使用AI摘要插件则显示AI摘要,不使用则显示默认字数摘要
## 预览地址 ## 预览地址
https://www.imsun.org https://www.imsun.org

View File

@ -3,9 +3,7 @@
* 网站数据 * 网站数据
* @package custom * @package custom
*/ */
if (!defined('__TYPECHO_ROOT_DIR__')) exit; if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$GLOBALS['page'] = 'page-data';
$this->need('header.php'); $this->need('header.php');
?> ?>
<section class="site--main"> <section class="site--main">
@ -15,43 +13,43 @@ $this->need('header.php');
</header> </header>
<article class="post--single"> <article class="post--single">
<div class="graph u-marginBottom30"> <div class="graph u-marginBottom30">
<div data-target="<?php $this->options->postLinkOpen(); ?>" class="post-content"> <div data-target="<?php $this->options->postLinkOpen(); ?>" class="post-content">
<h2>分类占比</h2> <h2>分类占比</h2>
<p>下面是个分类的文章占比:</p> <p>下面是个分类的文章占比:</p>
<div id="category-chart" style="height: 390px;"></div> <div id="category-chart" style="height: 390px;"></div>
<h2>文章更新</h2> <h2>文章更新</h2>
<p>下面是 <?php echo date('Y年m月d日', time() - 20736000); ?> 到 <?php echo date('Y年m月d日', time()); ?> 的文章更新情况</p> <p>下面是 <?php echo date('Y年m月d日', time() - 20736000); ?> 到 <?php echo date('Y年m月d日', time()); ?> 的文章更新情况</p>
<div id="post-chart" style="height: 250px;"></div> <div id="post-chart" style="height: 250px;"></div>
<h2>评论动态</h2> <h2>评论动态</h2>
<p>下面是 <?php echo date('Y年m月d日', time() - 20736000); ?> 到 <?php echo date('Y年m月d日', time()); ?> 的评论动态</p> <p>下面是 <?php echo date('Y年m月d日', time() - 20736000); ?> 到 <?php echo date('Y年m月d日', time()); ?> 的评论动态</p>
<div id="comment-chart" style="height: 250px;"></div> <div id="comment-chart" style="height: 250px;"></div>
<h2>最多阅读的文章</h2> <h2>最多阅读的文章</h2>
<?php $top5Post = top5post(); ?> <?php $top5Post = top5post(); ?>
<p>下面是阅读量排名前 <?php echo count($top5Post); ?> 的文章</p> <p>下面是阅读量排名前 <?php echo count($top5Post); ?> 的文章</p>
<table class="pure-table pure-table-bordered"> <table class="pure-table pure-table-bordered">
<thead> <thead>
<tr> <tr>
<th>排名</th> <th>排名</th>
<th>文章</th> <th>文章</th>
<th>阅读量</th> <th>阅读量</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php $top = 1; ?> <?php $top = 1; ?>
<?php foreach ($top5Post as $post): ?> <?php foreach ($top5Post as $post): ?>
<tr> <tr>
<td><?php echo $top; ?></td> <td><?php echo $top; ?></td>
<td><a href="<?php echo $post['link']; ?>"><?php echo $post['title']; ?></a></td> <td><a href="<?php echo $post['link']; ?>"><?php echo $post['title']; ?></a></td>
<td><?php echo $post['views']; ?></td> <td><?php echo $post['views']; ?></td>
</tr> </tr>
<?php $top ++; ?> <?php $top ++; ?>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<h2>最多评论的文章</h2> <h2>最多评论的文章</h2>
<?php $top5CommentPost = top5CommentPost(); ?> <?php $top5CommentPost = top5CommentPost(); ?>
<p>下面是评论数排名前 <?php echo count($top5CommentPost); ?> 的文章:</p> <p>下面是评论数排名前 <?php echo count($top5CommentPost); ?> 的文章:</p>
<table class="pure-table pure-table-bordered"> <table class="pure-table pure-table-bordered">
<thead> <thead>
<tr> <tr>
<th>排名</th> <th>排名</th>
@ -70,9 +68,9 @@ $this->need('header.php');
<?php $top ++; ?> <?php $top ++; ?>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
</div> </div>
</article> </article>
</section> </section>
<script type="text/javascript"> <script type="text/javascript">
var data = { var data = {