1 Star 1 Fork 0

一辈子那么长 / AL_lolimeow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
page-archives.php 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
安好娱乐 提交于 2019-04-18 17:52 . 增加文章归档页面
<?php
/**
* 文章归档
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<div class="meowblog">
<div class="main-container">
<div class="container">
<div class="row">
<div class="col-lg-10 col-md-10 ml-auto mr-auto">
<?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);
$year = 0;
$mon = 0;
$output = '<div class="timeline timeline-one-side" data-timeline-content="axis" data-timeline-axis-style="dashed" >';
while ($archives->next()):
$year_tmp = date('Y', $archives->created);
$mon_tmp = date('m', $archives->created);
$y = $year;
$m = $mon;
if ($mon != $mon_tmp && $mon > 0) $output .= '</ul></li>';
if ($year != $year_tmp && $year > 0) $output .= '</ul></div>';
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<span class="timeline-step badge-success"><br><i class="fa fa-clock-o"></i><br></span><div class="timeline-content"> <h5 class="text-muted font-weight-bold biji-tit">' . $year . '年 </h5><ul>';
}
if ($mon != $mon_tmp) {
$mon = $mon_tmp;
$output .= '<li><span class="al_mon biji-oth">' . $mon . ' 月 <b class="openoff" style="color: #ff5f33;" data-toggle="open"> [ 展开 ]</b></span><ul class="al_post_list biji-content">';
}
$output .= '<li>' . date('d日: ', $archives->created) . '<a href="' . $archives->permalink . '" title="' . $archives->title . '">' . $archives->title . '</a> </li>';
endwhile;
$output .= '</ul></li></ul></div>';
echo $output;
?>
</div>
</div>
</div>
</div>
<?php $this->need('footer.php'); ?>
PHP
1
https://gitee.com/alone88/AL_lolimeow.git
git@gitee.com:alone88/AL_lolimeow.git
alone88
AL_lolimeow
AL_lolimeow
master

搜索帮助