-
Notifications
You must be signed in to change notification settings - Fork 3
/
post.php
executable file
·57 lines (57 loc) · 2.29 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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main>
<div class="container">
<article>
<header class="article-header">
<div class="thumb">
<div>
<h1><?php $this->title() ?></h1>
<div class="post-meta">
<div>
<a>
By <a href="<?php $this->author->permalink(); ?>"><?php $this->author(); ?></a>
</a> |
<a>
<time><?php $this->date('M j, Y'); ?></time> |
</a>
<a>
<?php _e('Category: '); ?><?php $this->category(','); ?>
</a>
<?php if ($this->options->WordCount): ?>
<time> | 共 <?php echo word_count($this->cid); ?> 个字符</time>
<?php endif; ?>
</div>
<div class="tags">
<?php $this->tags(', ', true); ?>
</div>
</div>
</div>
</header>
</article>
<div id="post" class="article-post">
<?php if ($this->options->fancybox): ?>
<?php
$pattern = '/\<img.*?src\=\"(.*?)\".*?alt\=\"(.*?)\".*?title\=\"(.*?)\"[^>]*>/i';
$replacement = '<a href="$1" data-fancybox="gallery" /><img class="lazy" data-original="$1" alt="$2" title="$3"></a>';
$content = preg_replace($pattern, $replacement, $this->content);
echo getContentTest($content)
?>
<?php else: ?>
<?php echo getContentTest($this->content); ?>
<?php endif; ?>
</div>
</div>
<?php if ($this->options->TheComments): ?>
<div class="container">
<?php $this->need('comments.php'); ?>
</div>
<?php endif; ?>
<br><br>
<div class="container">
<nav class="flex container suggested">
<?php prev_post($this);?>
<?php next_post($this);?>
</nav>
</div>
<?php $this->need('footer.php'); ?>