This repository has been archived by the owner on May 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathnav-left.php
86 lines (84 loc) · 3.28 KB
/
nav-left.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
<?php
/**
* nav-left.php
*
* 左侧边栏
*
* @author 熊猫小A
* @version 0.1
*
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
?>
<nav id="nav-left">
<div id="author-panel">
<div class="avatar-circle">
<div class="avatar-circle-bg__wrapper">
<div class="avatar-circle-bg">
<div class="avatar-circle-bg">
<div class="avatar-circle-bg">
<div class="avatar-circle-bg"></div>
</div>
</div>
</div>
</div>
</div>
<div class="aside-user__avatar">
<a href="<?php echo $this->options->left_link?$this->options->left_link:'/' ?>" class="avatar"><img class="avatar author-avatar" src="<?php
if ($this->options->defaultavatar) echo $this->options->defaultavatar;
else echo Typecho_Common::gravatarUrl(Utils::getAdminMail(), 100, '', '', true);
?>"></a>
</div>
<div class="aside-user__name">
<a href="<?php echo $this->options->left_link?$this->options->left_link:'/' ?>" class="name"><?php echo Utils::getAdminScreenName(); ?></a>
</div>
<?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?>
<div class="statics flex">
<div class="posts-num flex flex-direction-column align-items-center">
<span><?php $stat->publishedPostsNum() ?></span>
<span>文章</span>
</div>
<div class="comments-num flex flex-direction-column align-items-center">
<span><?php $stat->publishedCommentsNum() ?></span>
<span>评论</span>
</div>
<div class="category-num flex flex-direction-column align-items-center">
<span><?php $stat->categoriesNum() ?></span>
<span>分类</span>
</div>
</div>
</div>
<?php
if($this->options->aside_nav &&$this->options->aside_nav!=''){
echo '<div id="pages" class="nav-left-panel" style="animation-delay:0.2s">
<span class="hidden-xs"><i class="fa fa-compass"></i> 页面导航</span>
<ul id="pages-ul">';
$navs=explode(PHP_EOL,$this->options->aside_nav);
foreach ($navs as $value) {
$value=str_replace("\r",'', $value);
echo '<li>'.$value.'</li>';
}
echo '</ul></div>';
}
?>
<?php
if($this->options->aside_link &&$this->options->aside_link!=''){
echo '<div id="links" class="nav-left-panel" style="animation-delay:0.4s">
<span><i class="fa fa-link"></i> 友情链接</span>
<ul>';
$navs=explode(PHP_EOL,$this->options->aside_link);
foreach ($navs as $value) {
$value=str_replace("\r",'', $value);
echo '<li>'.$value.'</li>';
}
echo ' </ul>
</div>';
}
?>
<?php if($this->options->bloglayout=='1' && $this->fields->showTOC=='1' && ($this->is('post')||$this->is('page'))):?>
<div id="TOC" style="animation-delay:0.6s">
<style>a[data-src="#TOC"]{display:flex}</style>
<?php echo $GLOBALS['TOC_O']; ?>
</div>
<?php endif;?>
</nav>