-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
87 lines (78 loc) · 3.88 KB
/
sidebar.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
<div class="col-md-3">
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowSearch', $this->options->sidebarBlock)): ?>
<form method="post" action="" class="panel-body">
<div class="input-group">
<div class="form-control-wrapper">
<input type="text" name="s" class="form-control floating-label" placeholder="搜索" size="32" />
</div>
<span class="input-group-btn">
<button class="btn btn-primary btn-fab btn-raised mdi-action-search" value="" id="search-btn" type="submit"></button>
</span>
</div>
</form>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentPosts', $this->options->sidebarBlock)): ?>
<div class="panel panel-danger">
<a class="panel-heading" onclick="$('.recent_posts_box').slideToggle()" href="javascript:;">
<h3 class="panel-title"><i class="fa fa-align-justify"></i> 最新文章</h3>
</a>
<div class="recent_posts_box">
<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<a href="{permalink}" class="item">{title}</a>'); ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentComments', $this->options->sidebarBlock)): ?>
<?php $this->widget('Widget_Comments_Recent')->to($comments); ?>
<div class="panel panel-success">
<a class="panel-heading" onclick="$('.comments_box').slideToggle()" href="javascript:;">
<h3 class="panel-title"><i class="fa fa-comment"></i> 最新回复</h3>
</a>
<div class="comments_box">
<?php while($comments->next()): ?>
<a href="<?php $comments->permalink(); ?>" class="item"><?php $comments->author(false); ?>: <?php $comments->excerpt(30, '...'); ?></a>
<?php endwhile; ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowTags', $this->options->sidebarBlock)): ?>
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=count&ignoreZeroCount=1&desc=1&limit=5')->to($tags); ?>
<div class="panel panel-warning">
<a class="panel-heading" onclick="$('.tags_box').slideToggle()" href="javascript:;">
<h3 class="panel-title"><i class="fa fa-tags"></i> 标签</h3>
</a>
<?php if($tags->have()): ?>
<div class="tags_box">
<?php while ($tags->next()): ?>
<a href="<?php $tags->permalink(); ?>" rel="tag" class="item size-<?php $tags->split(5, 10, 20, 30); ?>" title="<?php $tags->count(); ?> 个话题"><?php $tags->name(); ?><span class="badge pull-right"> <?php $tags->count(); ?></span></a>
<?php endwhile; ?>
<?php else: ?>
<?php _e('没有任何标签'); ?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowArchive', $this->options->sidebarBlock)): ?>
<div class="panel panel-info">
<a class="panel-heading" onclick="$('.article_cate_box').slideToggle()" href="javascript:;">
<h3 class="panel-title"><i class="fa fa-archive"></i> 归档</h3>
</a>
<div class="article_cate_box">
<?php $this->widget('Widget_Contents_Post_Date', 'type=month&format=F Y')
->parse('<a href="{permalink}" class="item">{date}</a>'); ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowOther', $this->options->sidebarBlock)): ?>
<div class="panel panel-default">
<a class="panel-heading" onclick="$('.other_box').slideToggle()" href="javascript:;">
<h3 class="panel-title"><i class="fa fa-bolt"></i> 其他</h3>
</a>
<div class="other_box">
<a href="<?php $this->options->feedUrl(); ?>" class="item"><?php _e('文章 RSS'); ?></a>
<a href="<?php $this->options->commentsFeedUrl(); ?>" class="item"><?php _e('评论 RSS'); ?></a>
</div>
</div>
<?php endif; ?>
<?php Links_Plugin::output(); ?>
</div>