-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathpost.php
More file actions
executable file
·92 lines (80 loc) · 4.12 KB
/
post.php
File metadata and controls
executable file
·92 lines (80 loc) · 4.12 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
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php'); ?>
<div class="main">
<?php $this->need('module/head2.php');?>
<?php if($this->fields->thumb): ?>
<!--有封面图的文章详情页顶部样式-->
<div class="post_thumb blur">
<!-- 背景图片容器 -->
<div class="post_bg lazy-load" data-src="<?php $this->fields->thumb();?>"></div>
<div class="pc">
<!-- 新增的菜单按钮 -->
<i class="iconfont icon-nav menu-button"></i>
<!-- 内容容器保持不变 -->
<div class="post_header padding animate__animated animate__fadeIn">
<?php $firstCat = $this->categories[0]; ?>
<a href="<?php echo $firstCat['permalink']; ?>"><?php echo $firstCat['name']; ?></a>
<h1><?php echo $this->hidden ? '密码保护:' . $this->row['title'] : $this->row['title']; ?></h1>
<div class="post_meta">
<span><?php $this->date('Y.m.d'); ?></span>
<span>/</span>
<span><?php get_post_view($this) ?> 阅读</span>
<span>/</span>
<span><?php $this->commentsNum('0 评论', '1 评论', '%d 评论'); ?></span>
<span>/</span>
<span><?php echo art_count($this->cid); ?> 字</span>
</div>
</div>
</div>
</div>
<div class="m blur">
<!--当前文章所属分类 只取第一个分类-->
<div class="category">
<?php $firstCat = $this->categories[0]; ?>
<a href="<?php echo $firstCat['permalink']; ?>"><?php echo $firstCat['name']; ?></a>
</div>
<!--文章标题和统计-->
<div class="post_info">
<h1><?php echo $this->hidden ? '密码保护:' . $this->row['title'] : $this->row['title'];?></h1>
<span>阅读 <?php get_post_view($this) ?></span>
<span><?php $this->commentsNum('评论 0', '评论 1', '评论 %d'); ?></span>
<span>发表于<?php $this->date('Y.m.d'); ?></span>
</div>
</div>
<?php else: ?>
<!--没有封面图的文章详情页顶部样式-->
<div class="post_nothumb blur animate__animated animate__fadeIn">
<div class="breadcrumb">
<li><a href="<?php $this->options->siteUrl(); ?>">首页</a><span>></span></li>
<li><?php $firstCat = $this->categories[0]; ?><a href="<?php echo $firstCat['permalink']; ?>"><?php echo $firstCat['name']; ?></a><span>></span></li>
<li>正文</li>
</div>
<div class="pc">
<i class="iconfont icon-nav menu-button"></i>
</div>
<h1><?php echo $this->hidden ? '密码保护:' . $this->row['title'] : $this->row['title']; ?></h1>
<div class="post_meta">
<span><?php $this->date('Y年m月d日'); ?></span>
<span><?php get_post_view($this) ?> 阅读</span>
<span><?php $this->commentsNum('0 评论', '1 评论', '%d 评论'); ?></span>
<span><?php echo art_count($this->cid); ?> 字</span>
</div>
</div>
<?php endif;?>
<!--通用文章正文-->
<div class="post_content padding blur animate__animated animate__fadeIn">
<?php echo AutoLightbox($this->content);?>
<div class="cc-say">
本文著作权归作者 [ <span><?php if($this->fields->author){ $this->fields->author();}else{$this->author();}?></span> ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ <span><?php echo $this->fields->origin ? $this->fields->origin : '互联网' ;?></span> ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。
</div>
<?php if ($this->tags) { ?>
<div class="tags"><?php $this->tags('', true); ?></div>
<?php } ?>
</div>
<!--通用文章评论-->
<?php $this->need('comments.php'); ?>
</div>
<!--返回顶部-->
<a id="gototop" class="hidden pc"><i class="iconfont icon-up"></i></a>
<?php $this->need('footer.php'); ?>