-
Notifications
You must be signed in to change notification settings - Fork 3
/
page.php
executable file
·58 lines (58 loc) · 2.17 KB
/
page.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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
/*
* @Author: Magneto github.com:ouyangyanhuo
* @Date: 2023-06-08 10:43:31
* @LastEditors: ouyangyanhuo [email protected]
* @LastEditTime: 2023-09-16 10:26:31
* @FilePath: \TinaTheme\page.php
* @Description:
* EMail:[email protected]
* Copyright (c) 2023 by Magneto, All Rights Reserved.
*/
<?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 <?php $this->author(); ?>
</a> |
<a>
<time><?php $this->date('M j, Y'); ?></time>
</a> |
<?php if ($this->options->WordCount): ?>
<a>
共 <?php echo word_count($this->cid); ?> 个字符
</a>
<?php endif; ?>
</div>
</div>
</div>
</div>
</header>
</article>
<div 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($this->content);
?>
<?php else: ?>
<?php echo getContentTest($this->content); ?>
<?php endif; ?>
</div>
<?php if ($this->options->TheComments): ?>
<div class="container">
<?php $this->need('comments.php'); ?>
</div>
<?php endif; ?>
</div>
</main>
<?php $this->need('footer.php'); ?>