-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.php
98 lines (95 loc) · 4.86 KB
/
index.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* 微言大“艺”
* The Art of Sublime Words
*
* 一款适用于Typecho的仿微博主题
*
* @package Weibo
* @author Pomelo
* @version 3.0
* @link https://weibo.rowingbohe.com
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');?>
<?php $this->need('sidebar.php'); ?>
<div id="loop" class="right">
<main id="main" class="width-half index" role="main" itemprop="mainContentOfPage" style="min-height: 514px;">
<div class="heading">
<div class="inner">
<ul class="nav-menu-main">
<?php if ($this->is('index')) : ?>
<li class="active">
<a href="<?php $this->options->siteUrl() ?>">全部</a></li>
<?php $this->widget('Widget_Metas_Category_List')
->parse('<li class="menu-btn"><a href="{permalink}">{name}</a></li>'); ?>
</ul>
<?php elseif ($this->is('category')): ?>
<li class="menu-btn">
<a href="<?php $this->options->siteUrl() ?>">全部</a></li>
<?php $this->widget('Widget_Metas_Category_List')
->parse('<li class="menu-btn"><a href="{permalink}" target="_blank">{name}</a></li>'); ?>
<?php endif; ?>
</div>
</div>
<!-- 文章列表 -->
<div id="primary" class="list">
<?php while($this->next()): ?>
<article class="post">
<div class="entry-header pull-left">
<img src="<?php $this->options->headImgUrl() ?>" height="100" class="topic-thumb bg tips-right"></div>
<div class="entry-content">
<div class="meta">
<div class="author" itemprop="author">
<span class="author-name"><?php $this->author(); ?></span>
<span class="is-author icon" aria-label="This is master"></span></div>
<time class="author-time" itemprop="datePublished" datetime=""><?php $this->date('Y-m-d H:i'); ?></time>
<span class="author-time">来自
<a href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
<?php $currGroup = get_object_vars($this->user) ['row']['group'];
if ($currGroup == "administrator"): ?>
<a href="<?php $this->options->adminUrl('write-post.php?cid=' . $this->cid ); ?>">编辑</a>
<?php endif; ?>
</span>
</div>
<h2 class="title" id="directory-0">
<a href="<?php $this->permalink() ?>" rel="bookmark"><?php $this->title() ?></a>
</h2>
<div class="summary" itemprop="description">
<a href="<?php $this->permalink() ?>"><?php $this->excerpt(140, '...'); ?>
<?php if ($this->options->ROWINGBOHE == '0'): ?>
<img src="<?php showThumbnail1($this); ?>" alt="<?php $this->title(); ?>" class="entry-image">
<?php elseif ($this->options->ROWINGBOHE == '1'): ?>
<img src="<?php showThumbnail2($this); ?>" alt="<?php $this->title(); ?>" class="entry-image">
<?php elseif ($this->options->ROWINGBOHE == '2'): ?>
<img src="<?php showThumbnail3($this); ?>" alt="<?php $this->title(); ?>" class="entry-image">
<?php elseif ($this->options->ROWINGBOHE == '3'): ?>
<img src="<?php $this->options->ROWINGBOHEUrl() ?>" alt="<?php $this->title(); ?>" class="entry-image">
<?php elseif ($this->options->ROWINGBOHE == '4'): ?>
<?php endif; ?>
</a>
</div>
<footer class="entry-footer">
<ul class="items state">
<li class="item count-comment"><span class="icon"></span><?php $this->commentsNum(); ?></li>
<li class="item count-view"><span class="icon"></span><?php _e(getViewsStr($this)); ?></li>
<li class="item count-like"><a href="<?php $this->categoryUrl(','); ?>"><?php $this->category(','); ?></a></li>
<li class="item count-image">Tags: <?php $this->tags(',', true, 'none'); ?></li>
</ul>
</footer>
</article>
<?php endwhile; ?>
</div>
<!-- 文章列表结束 -->
<div class="heading">
<div class="inner">
<ul class="nav-menu-main">
<?php $this->pageNav('上一页', '下一页'); ?>
</ul>
</div>
</div>
</main>
</div>
</section>
</div>
<?php $this->need('footer.php'); ?>