-
Notifications
You must be signed in to change notification settings - Fork 4
/
post.php
111 lines (104 loc) · 5.81 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
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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="single-header header-wide header_version_1 <?php if ($this->options->bcool_animate !== "close" || !empty($this->options->bcool_animate)): ?>animate__animated animate__<?php $this->options->bcool_animate() ?><?php endif; ?>">
<div class="wrap wrap-center">
<div class="wrap_float">
<div class="breadcrumbs">
<a href="<?php $this->options->siteUrl(); ?>">首页</a> / <a href="#">文章</a> / <span
class="current"><?php $this->title() ?></span>
</div>
<div class="post-tags">
<div class="tag"><?php $this->category('</div><div class="tag">', true); ?></div>
<div class="hashtag">#<?php $this->tags('</div><div class="hashtag">#', true, '暂无标签'); ?></div>
</div>
<h1 class="page-title">
<?php $this->title() ?>
</h1>
<div class="post-info">
<div class="post-author post-info-author">
<div class="author-image">
<img class="lazy image-cover" src="<?php $this->options->themeUrl('./assets/img/avatar/default.png'); ?>"
data-src="<?php Gravatar($this->author->mail); ?>" error-src="<?php fallbackGravatar(); ?>" alt=""/>
</div>
<span><?php $this->author(); ?></span>
</div>
<div class="post-date post-info-date">
<i class="fa-regular fa-clock"></i><?php $this->date(); ?>
</div>
<?php if ($this->options->bcool_views || $this->user->hasLogin()) : ?>
<div class="post-views post-info-views">
<i class="fa-regular fa-eye"></i><?php get_post_view($this) ?>
</div>
<?php else : get_post_view($this, false);
endif; ?>
</div>
</div>
</div>
</div>
<div class="page-wrap">
<div class="page-wrap-content">
<div class="post-single-wrap sticky-parent">
<div class="share-block">
<div class="share-block-main js-share-block-main">
<div class="socials">
<a href="<?php share($this, 'qq'); ?>" class="soc-link" data-title="QQ">
<i class="fab fa-qq fa-lg"></i>
</a>
<a class="soc-link getModal" data-title="Wechat" data-href="#modal-qrcode">
<i class="fab fa-weixin fa-lg"></i>
</a>
<a href="<?php share($this, 'weibo'); ?>" class="soc-link" data-title="Weibo">
<i class="fab fa-weibo fa-lg"></i>
</a>
<a href="<?php share($this, 'facebook'); ?>" class="soc-link" data-title="Facebook">
<i class="fab fa-facebook-f fa-lg"></i>
</a>
<div class="soc-link show-more-socials" style="display: none;">
<div><i class="fas fa-ellipsis-h fa-lg"></i></div>
</div>
</div>
<div class="share-block-item js-anchor link-to-comments" data-href="#comments-section">
<div class="comments-count">
<span><?php $this->commentsNum(_t('0'), _t('1'), _t('%d')); ?></span>
</div>
</div>
</div>
<div class="share-block-item mobile-item js-mobile-share-show mobile-share-show-btn">
<div class="show-mobile-icon"><i class="fas fa-share-alt fa-2x"></i></div>
</div>
</div>
<div class="single-content wp-content">
<div class="wrap wrap-center">
<div class="wrap_float">
<?php echo ShortCode($this->content, $this, $this->user->hasLogin()); ?>
</div>
</div>
<section class="catalog-container"></section>
</div>
</div>
<?php $prevId = thePrevCid($this);
$nextId = theNextCid($this); ?>
<div class="articles-controls">
<?php $this->widget('Widget_Archive@recommend' . $prevId, 'pageSize=1&type=post', 'cid=' . $prevId)->to($prev); ?>
<a href="<?php if (empty($prev->permalink)): ?><?php else: ?><?php $prev->permalink(); ?><?php endif; ?>"
class="articles-controls-item prev-article">
<div class="articles-controls-item-wrapper">
<div class="control-direction"><i class="fa-solid fa-arrow-left fa-lg"></i> 上一篇</div>
<h3 class="post-title">
<?php if (empty($prev->title)): ?>没有了~<?php else: ?><?php $prev->title(); ?><?php endif; ?>
</h3>
</div>
</a>
<?php $this->widget('Widget_Archive@recommend' . $nextId, 'pageSize=1&type=post', 'cid=' . $nextId)->to($next); ?>
<a href="<?php if (empty($next->permalink)): ?><?php else: ?><?php $next->permalink(); ?><?php endif; ?>"
class="articles-controls-item next-article">
<div class="articles-controls-item-wrapper">
<div class="control-direction">下一篇 <i class="fa-solid fa-arrow-right fa-lg"></i></div>
<h3 class="post-title">
<?php if (empty($next->title)): ?>没有了~<?php else: ?><?php $next->title(); ?><?php endif; ?>
</h3>
</div>
</a>
</div>
<?php $this->need('comments.php'); ?>
<?php $this->need('footer.php'); ?>