Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jielive/initial
Browse files Browse the repository at this point in the history
  • Loading branch information
jielive committed Mar 9, 2022
2 parents 9197245 + d24d312 commit 0b4d9ea
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 64 deletions.
76 changes: 38 additions & 38 deletions page-archives.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<?php
/**
* 归档
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div id="main">
<?php Breadcrumbs($this); ?>
<article class="post">
<h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
<?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize='.Typecho_Widget::widget('Widget_Stat')->publishedPostsNum)->to($archives);
$year=0;
$output = '<div id="archives">';
while($archives->next()){
$year_tmp = date('Y',$archives->created);
if ($year > $year_tmp) {
$output .= '</ul>';
}
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<h3>'.date('Y 年',$archives->created).'</h3><ul>';
}
if ($this->options->PjaxOption && $archives->hidden) {
$output .= '<li>'.date('m/d:',$archives->created).'<a>'. $archives->title .'</a></li>';
} else {
$output .= '<li>'.date('m/d:',$archives->created).'<a href="'.$archives->permalink .'">'. $archives->title .'</a></li>';
}
}
$output .= '</ul></div>';
echo $output;
?>
</article>
</div>
<?php $this->need('sidebar.php'); ?>
<?php
/**
* 归档
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div id="main">
<?php Breadcrumbs($this); ?>
<article class="post">
<h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
<?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize='.Typecho_Widget::widget('Widget_Stat')->publishedPostsNum)->to($archives);
$year=0;
$output = '<div id="archives">';
while($archives->next()){
$year_tmp = date('Y',$archives->created);
if ($year > $year_tmp) {
$output .= '</ul>';
}
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<h3>'.date('Y 年',$archives->created).'</h3><ul>';
}
if ($this->options->PjaxOption && $archives->hidden) {
$output .= '<li>'.date('m/d:',$archives->created).'<a>'. $archives->title .'</a></li>';
} else {
$output .= '<li>'.date('m/d:',$archives->created).'<a href="'.$archives->permalink .'">'. $archives->title .'</a></li>';
}
}
$output .= '</ul></div>';
echo $output;
?>
</article>
</div>
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>
52 changes: 26 additions & 26 deletions page-links.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<?php
/**
* 链接
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div id="main">
<?php Breadcrumbs($this); ?>
<article class="post">
<h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
<div class="post-content">
<?php $this->content(); ?>
<ul class="links">
<?php if ($this->options->InsideLinksIcon): ?>
<script>function erroricon(obj){var a=obj.parentNode,i=document.createElement("i");i.appendChild(document.createTextNode("★"));a.removeChild(obj);a.insertBefore(i,a.childNodes[0])}</script>
<?php endif; ?>
<?php Links($this->options->InsideLinksSort, $this->options->InsideLinksIcon ? 1 : 0); ?>
</ul>
</div>
</article>
<?php $this->need('comments.php'); ?>
</div>
<?php $this->need('sidebar.php'); ?>
<?php
/**
* 链接
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div id="main">
<?php Breadcrumbs($this); ?>
<article class="post">
<h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
<div class="post-content">
<?php $this->content(); ?>
<ul class="links">
<?php if ($this->options->InsideLinksIcon): ?>
<script>function erroricon(obj){var a=obj.parentNode,i=document.createElement("i");i.appendChild(document.createTextNode("★"));a.removeChild(obj);a.insertBefore(i,a.childNodes[0])}</script>
<?php endif; ?>
<?php Links($this->options->InsideLinksSort, $this->options->InsideLinksIcon ? 1 : 0); ?>
</ul>
</div>
</article>
<?php $this->need('comments.php'); ?>
</div>
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>

0 comments on commit 0b4d9ea

Please sign in to comment.