mirror of
https://github.com/jkjoy/typecho-theme-farallon.git
synced 2026-06-27 20:34:30 +00:00
更改版本号
This commit is contained in:
+3
-9
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user