# handsome主题修改之归档页折叠效果 ------------ 懒得写教程了想自己折腾的去Google《折叠面板 Bootstrap》 直接上代码复制粘贴省事 ```php need('component/header.php'); ?> need('component/aside.php'); $stat = Typecho_Widget::widget('Widget_Stat'); ?> 文章归档 publishedPostsNum); ?> publishedPostsNum)->to($archives); $color = array("light","info","dark","success","black","warning","primary","danger"); $year=0; $mon=0; $i=0; $j=0; $output = ''; $x=0; $num = 0; while($archives->next()){ $year_tmp = date('Y',$archives->created); $mon_tmp = date('m',$archives->created); $y=$year; $m=$mon; if ($year > $year_tmp || $mon > $mon_tmp) { $output .= ''; } if ($year != $year_tmp || $mon != $mon_tmp) { if ($x != 0){ $output .= '';//.tl-body } $year = $year_tmp; $mon = $mon_tmp; $x++; if($x>=8) $x=1; $colorsec = $color[$x]; $output .= ''.date('Y年m月',$archives->created).'';//输出月份 } $output .= ''.date('d日',$archives->created).''. $archives->title .''; //输出文章 } echo $output; ?> 开始 need('component/footer.php'); ?> 最后修改:2020 年 04 月 05 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏 文章引用 反向引用 Loading... 暂未引用其他文章 暂未被其它文章引用 下一篇 上一篇 发表评论 取消回复 使用cookie技术保留您的个人信息以便您下次快速评论,继续评论表示您已同意该条款 评论 * 私密评论 名称 * 🎲 邮箱 * 地址 发表评论 提交中...