更改版本号
This commit is contained in:
parent
e86e1afd66
commit
bd3b384fde
|
@ -17,7 +17,7 @@
|
|||
is_single = false;
|
||||
post_id = 0;
|
||||
is_archive = false;
|
||||
VERSION = "0.4.1";
|
||||
VERSION = "0.5.0";
|
||||
constructor() {
|
||||
super();
|
||||
this.initCopyright();
|
||||
|
|
|
@ -20,12 +20,10 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=' . $stat->publishedPostsNum)->to($archives);
|
||||
$year = 0; $mon = 0;
|
||||
$output = '<div class="archives">'; // Start archives container
|
||||
|
||||
$output = '<div class="archives">'; // Start archives container
|
||||
while ($archives->next()) {
|
||||
$year_tmp = date('Y', $archives->created);
|
||||
$mon_tmp = date('m', $archives->created);
|
||||
|
||||
$mon_tmp = date('m', $archives->created);
|
||||
// 检查是否需要新的年份标题
|
||||
if ($year != $year_tmp) {
|
||||
if ($year > 0) {
|
||||
|
@ -34,8 +32,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|||
$year = $year_tmp;
|
||||
$mon = 0; // 重置月份
|
||||
$output .= '<div class="archive-year"><h2 class="archive--title__year">' . $year . '</h2>'; // 开始新的年份div
|
||||
}
|
||||
|
||||
}
|
||||
// 检查是否需要新的月份标题
|
||||
if ($mon != $mon_tmp) {
|
||||
if ($mon > 0) {
|
||||
|
@ -45,13 +42,11 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|||
$output .= '<h3 class="archive--title__month"></h3>';// '. $mon . '
|
||||
$output .= '<ul class="archive--list">'; // 开始新的月份列表
|
||||
}
|
||||
|
||||
// 输出文章项
|
||||
$output .= '<li class="archive--item">';
|
||||
$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>';
|
||||
}
|
||||
|
||||
// 循环后,确保所有标签都已经关闭
|
||||
if ($mon > 0) {
|
||||
$output .= '</ul>'; // 结束最后一个月份的列表
|
||||
|
@ -60,7 +55,6 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|||
$output .= '</div>'; // 结束最后一个年份的div
|
||||
}
|
||||
$output .= '</div>'; // End archives container
|
||||
|
||||
echo $output;
|
||||
?>
|
||||
</div>
|
||||
|
|
2
post.php
2
post.php
|
@ -241,4 +241,4 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
|||
</style>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
<?php $this->need('footer.php'); ?>
|
|
@ -119,6 +119,4 @@
|
|||
cursor: not-allowed;
|
||||
}
|
||||
/* 分页 */
|
||||
</style>
|
||||
|
||||
|
||||
</style>
|
|
@ -10,5 +10,4 @@
|
|||
<div class="author--sns">
|
||||
<?php $this->need('sns.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
Loading…
Reference in New Issue