This repository has been archived by the owner on Jan 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsidebar.php
69 lines (62 loc) · 3.25 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
<div id="secondary">
<div class="sidebar">
<section class="widget">
<form id="search" method="post" action="./">
<input type="text" name="s" class="text" placeholder="搜索..." />
<button type="submit" class="submit icon-search">搜索</button>
</form>
</section>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowCategory', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('分类'); ?></h3>
<ul class="widget-list widget-list2">
<?php Typecho_Widget::widget('Widget_Metas_Category_List')->to($category); ?>
<?php while($category->next()): ?>
<li><h3><a href="<?php $category->permalink(); ?>"><?php echo str_repeat(" ", $category->levels); $category->name(); ?></a></h3></li>
<?php endwhile; ?>
</ul>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentPosts', $this->options->sidebarBlock)): ?>
<section class="widget">
<div class="widget-title"><?php _e('最新文章'); ?></div>
<ul class="widget-list widget-list2">
<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<li><h3><a href="{permalink}">{title}</a></h3></li>'); ?>
</ul>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowArchive', $this->options->sidebarBlock)): ?>
<section class="widget">
<div class="widget-title"><?php _e('归档'); ?></div>
<ul class="widget-list widget-list2">
<?php $this->widget('Widget_Contents_Post_Date', 'type=month&format=F Y')
->parse('<li><h3><a href="{permalink}">{date}</a></h3></li>'); ?>
</ul>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowOther', $this->options->sidebarBlock)): ?>
<section class="widget">
<div class="widget-title"><?php _e('其它'); ?></div>
<ul class="widget-list widget-list2">
<?php if($this->user->hasLogin()): ?>
<li class="last"><h3><a href="<?php $this->options->adminUrl(); ?>"><?php _e('进入后台'); ?> (<?php $this->user->screenName(); ?>)</a></h3></li>
<li><h3><a href="<?php $this->options->logoutUrl(); ?>"><?php _e('退出'); ?></a></h3></li>
<?php else: ?>
<li class="last"><h3><a href="<?php $this->options->adminUrl('login.php'); ?>"><?php _e('登录'); ?></a></h3></li>
<?php endif; ?>
<li><h3><a href="<?php $this->options->feedUrl(); ?>"><?php _e('文章 RSS'); ?></a></h3></li>
<li><h3><a href="<?php $this->options->commentsFeedUrl(); ?>"><?php _e('评论 RSS'); ?></a></h3></li>
<li><h3><a href="http://www.typecho.org">Typecho</a></h3></li>
</ul>
</section>
<?php endif; ?>
<section class="widget">
<div class="widget-title"><?php _e('友情链接'); ?></div>
<ul class="widget-list widget-list2 frind-links">
<li><a href="http://www.naaln.com">Why·Liam·Home</a></li>
<li><a href="http://photo.naaln.com">Why·Liam·Photo</a></li>
</ul>
</section>
</div>
</div>