forked from wehaox/Typecho-Butterfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
74 lines (74 loc) · 3.41 KB
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('page_header.php'); ?>
<main class="layout" id="content-inner">
<div class="recent-posts category_ui" id="recent-posts">
<?php if ($this->have()): ?>
<?php while($this->next()): ?>
<div class="recent-post-item" >
<wehao class="post_cover">
<a class="article-title" href="<?php $this->permalink() ?>">
<img class="post_bg" data-lazy-src="<?php echo get_ArticleThumbnail($this);?>" src="<?php echo GetLazyLoad() ?>" onerror="this.onerror=null;this.src='https://tva1.sinaimg.cn/large/007X0Rdyly1gpaaf55n1rj30ic09u0sw.jpg'"></a>
</wehao>
<div class="recent-post-info">
<a class="article-title" href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
<div class="article-meta-wrap">
<?php $this->sticky();?>
<span class="post-meta-date" style="display:none;">
<i class="far fa-calendar-alt"></i>
<?php _e('发表于 '); ?> <?php $this->date(); ?>
<time class="post-meta-date-created" datetime="<?php $this->date('c'); ?>">
</time>
</span>
<i class="fas fa-history"></i>
<span class="article-meta-label">更新于</span>
<?php echo date('Y-m-d' , $this->modified);?>
<time class="post-meta-date-updated" datetime="<?php echo date('Y-m-d' , $this->modified);?>" title="更新于 ">
</time>
<span class="article-meta">
<span class="article-meta__separator">|</span>
<i class="fas fa-inbox article-meta__icon"></i>
<span class="post-meta-date">
<?php _e('分类: '); ?>
<?php $this->category(' '); ?>
</span>
<span class="article-meta__separator">|</span>
<span class="post-meta-date" itemprop="author">
<?php _e('作者: '); ?>
<a itemprop="name" href="<?php $this->author->permalink(); ?>" rel="author">
<?php $this->author(); ?>
</a>
</span>
<span class="article-meta__separator">|</span>
<i class="fas fa-comments"></i>
<span class="post-meta-date" itemprop="interactionCount">
<a itemprop="discussionUrl" href="<?php $this->permalink() ?>#comments">
<?php $this->commentsNum('0条评论', '1 条评论', '%d 条评论'); ?>
</a>
</span>
</span>
</div>
<div class="content">
<?php if($this->fields->excerpt && $this->fields->excerpt!='') {
echo $this->fields->excerpt;
}else{
echo $this->excerpt(130);
}
echo '<br><br><a href="',$this->permalink(),'" title="',$this->title(),'">阅读全文...</a>';
?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
<nav id="pagination">
<?php $this->pageNav('<i class="fas fa-chevron-left fa-fw"></i>', '<i class="fas fa-chevron-right fa-fw"></i>', 1, '...', array('wrapTag' => 'div', 'wrapClass' => 'pagination', 'itemTag' => '', 'prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current' )); ?>
</nav>
</div><!-- end #main -->
<?php $this->need('sidebar.php'); ?>
</main>
<script type="text/javascript" src="<?php $this->options->themeUrl('js/wehao.js?v1.4'); ?>"></script>
<?php $this->need('footer.php'); ?>