This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
post.php
84 lines (84 loc) · 4.09 KB
/
post.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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="mdui-card mdr-breadcrumbs">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons"></i></span>
<span class="mdui-chip-title mdui-p-l-0">
<a href="<?php $this->options->siteUrl(); ?>"><?= _t('首页') ?></a> »
<?php $this->category(' & '); ?> »
<?= $this->title() ?>
</span>
</div>
<article id="post" class="mdr-post mdui-card<?php if ($this->options->PjaxOption && $this->hidden) : ?> protected<?php endif; ?> mdui-shadow-6" style="margin-top:20px;">
<?php if (postThumb($this) && !$this->hidden) : ?>
<div class="mdui-card-media">
<?php echo postThumb($this); ?>
</div>
<?php endif; ?>
<div class="mdui-card-primary">
<div class="mdui-card-primary-title"><?php $this->title() ?></div>
<div class="mdui-card-primary-subtitle">
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->date(); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->category(' ', false); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->commentsNum(_t('暂无评论'), _t('%d 条评论')); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php Postviews($this); ?>
</div>
</div>
<?php if ($this->options->mdrPostAuthor) : ?>
<div class="mdui-card-header">
<div class="mdui-card-header-avatar"><?php $this->author->gravatar(40); ?></div>
<div class="mdui-card-header-title"><a href="<?php $this->author->permalink(); ?>"><?php $this->author() ?></a></div>
<div class="mdui-card-header-subtitle">Author</div>
</div>
<?php endif; ?>
<div class="mdui-card-content mdui-typo">
<?php /* MDr Time Notice */
if ($this->options->TimeNotice && !$this->hidden) :
if ((time() - $this->modified) >= ($this->options->TimeNoticeLock) * 24 * 60 * 60) : ?>
<script defer>
<?php if (!MDR_PJAX) echo "window.onload = () => {"; ?>
mdui.snackbar({
message: '此文章最后修订于 <?= date(_t('Y 年 m 月 d 日'), $this->modified) ?>,其中的信息可能已经有所发展或是发生改变。',
position: '<?= $this->options->mdrSnackbar ?>',
timeout: 5000
});
<?php if (!MDR_PJAX) echo "}"; ?>
</script>
<?php endif;
endif; ?>
<?php $this->content(); ?>
</div>
<?php if (!$this->hidden) : ?>
<?= mdrTags($this->tags); ?>
<?= mdrLicense($this->fields->linceses); ?>
<?= mdrSponsor($this->options->mdrSponsor); ?>
<script defer>
<?php if (!MDR_PJAX) echo "window.onload = () => {"; ?>
mdrCatalog(<?= json_encode(getCatalog($this->content)) ?>)
<?php if (!MDR_PJAX) echo "}"; ?>
</script>
<?php endif; ?>
</article>
<?php if (!$this->hidden) : ?>
<?php $this->need('comments.php'); ?>
<?php endif; ?>
<div class="mdui-row footer-nav">
<div class="mdui-ripple mdui-col-xs-6 mdui-col-sm-6 footer-nav-left">
<div class="footer-nav-inner">
<i class="mdui-icon material-icons footer-nav-icon"></i>
<span class="footer-nav-title"><?= _t('上一篇') ?></span>
<div class="footer-nav-text"><?php $this->thePrev('%s', _t('没有了')); ?></div>
</div>
</div>
<div class="mdui-ripple mdui-col-xs-6 mdui-col-sm-6 footer-nav-right">
<div class="footer-nav-inner">
<i class="mdui-icon material-icons footer-nav-icon"></i>
<span class="footer-nav-title"><?= _t('下一篇') ?></span>
<div class="footer-nav-text"><?php $this->theNext('%s', _t('没有了')); ?></div>
</div>
</div>
</div>
<?php $this->need('footer.php'); ?>