This repository was archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathpost.php
More file actions
78 lines (74 loc) · 3.2 KB
/
Copy pathpost.php
File metadata and controls
78 lines (74 loc) · 3.2 KB
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
<?php
/**
*
* 文章
*
* @author MaiCong <i@maicong.me>
* @link https://github.com/maicong/stay
* @since 1.5.7
*
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
// 获取音频地址
if ($this->request->isAjax() && $this->request->is('do=getSpeech')) {
$this->response->throwJson([
'data' => text2speech($this->cid)
]);
}
$halfyear = 3600 * 24 * 30 * 6;
$lostTime = time() - $this->modified;
$this->need('header.php');
?>
<main class="main" role="main">
<div class="container">
<article class="card post single" itemscope itemtype="http://schema.org/BlogPosting">
<?php if (time() - $this->modified > $halfyear): ?>
<div class="post-warning">
<p>这篇文章距离上次修改已过半年,其中的信息可能已经有所发展或是发生改变。</p>
</div>
<?php endif; ?>
<?php if ($this->options->text2speech): ?>
<div id="post-text2speech" class="post__text2speech">
<i class="speechicon"></i>
<span id="post-text2speech-text" class="text">转换为语音并朗读全文</span>
<span id="post-text2speech-time" class="time">00:00 / 00:00</span>
<span id="post-text2speech-progress" class="progress"></span>
</div>
<?php endif; ?>
<div id="post-content" class="post__content" itemprop="articleBody">
<?php echo getContent($this->content); ?>
</div>
<?php if ($this->options->openDonate): ?>
<div class="post__donate">
<button id="post-donate-btn" class="post__donate__btn">打赏/DONATE</button>
<div id="post-donate-list" class="post__donate__list">
<?php if ($this->options->donateTips): ?>
<p class="tips"><?php $this->options->donateTips(); ?></p>
<?php endif; ?>
<div class="qrcode">
<?php if ($this->options->donateWeixin): ?>
<div class="qrcode__item">
<img class="card" src="<?php $this->options->donateWeixin(); ?>" alt="微信">
<p>微信</p>
</div>
<?php endif; ?>
<?php if ($this->options->donateAlipay): ?>
<div class="qrcode__item">
<img class="card" src="<?php $this->options->donateAlipay(); ?>" alt="支付宝">
<p>支付宝</p>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="post__tags" itemprop="keywords"><?php $this->tags(' ', true, ''); ?></div>
</article>
<section class="near">
<div class="near__prev"><?php $this->thePrev('<span>«</span> %s','« 没有了'); ?></div>
<div class="near__next"><?php $this->theNext('%s »','没有了 <span>»</span>'); ?></div>
</section>
<?php $this->need('comments.php'); ?>
</div>
</main>
<?php $this->need('footer.php'); ?>