-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
137 lines (133 loc) · 6.5 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
/**
* 一款基于响应式设计的简约风博客主题
*
* @package Ayaka
* @author MR158
* @version 1.1.4
* @link https://mr158.cn
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');?>
<header class="index-header">
<?php if($this->options->bannerBGUrl): ?>
<div class="index-header__bg top-bg" style="background-image:url(<?php echo $this->options->bannerBGUrl; ?>)"></div>
<?php else: ?>
<div class="index-header__bg top-bg" style="background-image:url(<?php $this->options->themeUrl('/img/default_bg.jpg'); ?>)"></div>
<?php endif; ?>
<div class="index-header__waves top-waves">
<svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
<defs>
<path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" />
</defs>
<g class="parallax">
<use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(252,252,252,0.7" />
<use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(252,252,252,0.5)" />
<use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(252,252,252,0.3)" />
<use xlink:href="#gentle-wave" x="48" y="7" fill="rgb(252,252,252)" />
</g>
</svg>
</div>
</header>
<section class="profile">
<div class="profile__main">
<div class="profile__main--avatar">
<?php if($this->options->logoUrl): ?>
<img src="<?php echo $this->options->logoUrl; ?>" alt="LOGO">
<?php else: ?>
<img src="<?php $this->options->themeUrl('/img/default_avatar.jpg');?>" alt="LOGO">
<?php endif; ?>
</div>
<?php if($this->options->homeTitle):?>
<h1 class="profile__main--title"><?php $this->options->homeTitle(); ?></h1>
<?php else: ?>
<h1 class="profile__main--title"><?php $this->options->title(); ?></h1>
<?php endif; ?>
<?php if($this->options->homeDesc):?>
<p class="profile__main--desc"><?php $this->options->homeDesc(); ?></p>
<?php else: ?>
<p class="profile__main--desc"><?php $this->options->description(); ?></p>
<?php endif; ?>
<div class="profile__main--social-icons social-icons">
<?php if($this->options->socialQQ): ?>
<a class="social-icons__item" href="http://wpa.qq.com/msgrd?v=3&uin=<?php $this->options->socialQQ() ?>&site=qq&menu=yes" target="_blank">
<div class="social-qq">
<i class="iconfont icon-qq"></i>
</div>
</a>
<?php endif; ?>
<?php if($this->options->socialGithubUrl): ?>
<a class="social-icons__item" href="<?php $this->options->socialGithubUrl() ?>" target="_blank">
<div class="social-github">
<i class="iconfont icon-github"></i>
</div>
</a>
<?php endif; ?>
<?php if($this->options->socialEmail): ?>
<a class="social-icons__item" href="mailto:<?php $this->options->socialEmail() ?>" target="_blank">
<div class="social-email">
<i class="iconfont icon-mail-alt"></i>
</div>
</a>
<?php endif; ?>
</div>
</div>
</section>
<section class="content">
<div class="content__wrap">
<section class="post-list-wrap">
<section class="post-list">
<?php while($this->next()): ?>
<article class="post-item ayaka-block">
<figure class="post-item__thumb">
<a href="<?php $this->permalink() ?>">
<div class="post-loading lazy-load-placeholder">
<div class="post-loading__1"></div>
<div class="post-loading__2"></div>
<div class="post-loading__3"></div>
</div>
<img src="<?php $this->options->themeUrl('/img/default_thumb.jpg'); ?>"
<?php if(Service::get_postthumb($this)): ?>
data-src="<?php echo Service::get_postthumb($this) ?>"
<?php elseif($this->options->postImgUrl): ?>
data-src="<?php echo $this->options->postImgUrl ?>?rand=<?php echo rand();?>"
<?php else: ?>
data-src="<?php $this->options->themeUrl('/img/default_thumb.jpg'); ?>"
<?php endif; ?>
alt="<?php $this->title() ?>"
class="lazy-load">
</a>
</figure>
<div class="post-item__info">
<h2 class="post-item__info--title">
<a href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h2>
<div class="post-item__info--tags">
<div class="post-tag-time tag-primary">
<i class="iconfont icon-clock"></i>
<time datetime="<?php $this->date('c'); ?>"><?php $this->date('Y年m月d日'); ?></time>
</div>
<?php foreach($this->categories as $cat): ?>
<a href="<?php echo $cat["permalink"]?>" class="post-tag-cat tag-warning">
<i class="iconfont icon-folder"></i>
<span><?php echo $cat["name"] ?></span>
</a>
<?php endforeach; ?>
</div>
<div class="post-item__info--desc text-ellipsis">
<a href="<?php $this->permalink() ?>">
<?php $this->excerpt(120, ' ...'); ?>
</a>
</div>
</div>
</article>
<?php endwhile; ?>
</section>
<nav class="pagination">
<?php $this->pageNav('<i class="iconfont icon-angle-left"></i>', '<i class="iconfont icon-angle-right"></i>'); ?>
</nav>
</section>
</div>
</section>
<?php $this->need('footer.php'); ?>