更改版本号

This commit is contained in:
浪子 2024-05-30 14:47:29 +08:00
parent e86e1afd66
commit bd3b384fde
5 changed files with 7 additions and 16 deletions

2
dist/js/bundle.js vendored
View File

@ -17,7 +17,7 @@
is_single = false; is_single = false;
post_id = 0; post_id = 0;
is_archive = false; is_archive = false;
VERSION = "0.4.1"; VERSION = "0.5.0";
constructor() { constructor() {
super(); super();
this.initCopyright(); this.initCopyright();

View File

@ -20,12 +20,10 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
$stat = Typecho_Widget::widget('Widget_Stat'); $stat = Typecho_Widget::widget('Widget_Stat');
Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=' . $stat->publishedPostsNum)->to($archives); Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=' . $stat->publishedPostsNum)->to($archives);
$year = 0; $mon = 0; $year = 0; $mon = 0;
$output = '<div class="archives">'; // Start archives container $output = '<div class="archives">'; // Start archives container
while ($archives->next()) { while ($archives->next()) {
$year_tmp = date('Y', $archives->created); $year_tmp = date('Y', $archives->created);
$mon_tmp = date('m', $archives->created); $mon_tmp = date('m', $archives->created);
// 检查是否需要新的年份标题 // 检查是否需要新的年份标题
if ($year != $year_tmp) { if ($year != $year_tmp) {
if ($year > 0) { if ($year > 0) {
@ -34,8 +32,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
$year = $year_tmp; $year = $year_tmp;
$mon = 0; // 重置月份 $mon = 0; // 重置月份
$output .= '<div class="archive-year"><h2 class="archive--title__year">' . $year . '</h2>'; // 开始新的年份div $output .= '<div class="archive-year"><h2 class="archive--title__year">' . $year . '</h2>'; // 开始新的年份div
} }
// 检查是否需要新的月份标题 // 检查是否需要新的月份标题
if ($mon != $mon_tmp) { if ($mon != $mon_tmp) {
if ($mon > 0) { if ($mon > 0) {
@ -45,13 +42,11 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
$output .= '<h3 class="archive--title__month"></h3>';// '. $mon . ' $output .= '<h3 class="archive--title__month"></h3>';// '. $mon . '
$output .= '<ul class="archive--list">'; // 开始新的月份列表 $output .= '<ul class="archive--list">'; // 开始新的月份列表
} }
// 输出文章项 // 输出文章项
$output .= '<li class="archive--item">'; $output .= '<li class="archive--item">';
$output .= '<div class="archive--title"><a href="' . $archives->permalink . '">' . $archives->title . '</a></div>'; $output .= '<div class="archive--title"><a href="' . $archives->permalink . '">' . $archives->title . '</a></div>';
$output .= '<div class="archive--meta">' . date('m月d日', $archives->created) . '</div></li>'; $output .= '<div class="archive--meta">' . date('m月d日', $archives->created) . '</div></li>';
} }
// 循环后,确保所有标签都已经关闭 // 循环后,确保所有标签都已经关闭
if ($mon > 0) { if ($mon > 0) {
$output .= '</ul>'; // 结束最后一个月份的列表 $output .= '</ul>'; // 结束最后一个月份的列表
@ -60,7 +55,6 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
$output .= '</div>'; // 结束最后一个年份的div $output .= '</div>'; // 结束最后一个年份的div
} }
$output .= '</div>'; // End archives container $output .= '</div>'; // End archives container
echo $output; echo $output;
?> ?>
</div> </div>

View File

@ -241,4 +241,4 @@ document.addEventListener('DOMContentLoaded', (event) => {
</style> </style>
<?php endif; ?> <?php endif; ?>
</main> </main>
<?php $this->need('footer.php'); ?> <?php $this->need('footer.php'); ?>

View File

@ -119,6 +119,4 @@
cursor: not-allowed; cursor: not-allowed;
} }
/* 分页 */ /* 分页 */
</style> </style>

View File

@ -10,5 +10,4 @@
<div class="author--sns"> <div class="author--sns">
<?php $this->need('sns.php'); ?> <?php $this->need('sns.php'); ?>
</div> </div>
</div> </div>