-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpost.php
87 lines (72 loc) · 3.66 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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if (!$this->request->isAjax()) {
$this->need('header.php');
} else {
$this->need('siteTitle.php');
} ?>
<?php $treeMenu = $this->treeMenu;
if ($treeMenu == '<div class="index-menu"><ul class="index-menu-list"></ul></div>') $treeMenu = NULL;
?>
<div style="max-width: 900px;"
class="translation-all-1_5 <?php if (!$this->fields->rmTree && $treeMenu): ?>mdl-cell--9-col mdl-cell--6-col-tablet<?php else: ?>mdl-cell--11-col mdl-cell--8-col-tablet<?php endif; ?>">
<div class="post-card page-post-card mdl-card mdl-cell mdl-shadow--2dp hover-shadow--4dp menu-dialog-visible mdl-cell--12-col">
<?php $postThumb = getPostThumb($this);
if (!$postThumb):$postThumb = $this->fields->card_image; endif; ?>
<?php if ($postThumb): ?>
<div class="mdl-card__title has-image image-no-show">
<a class="has-image-img"><img alt="" src="<?php echo $postThumb; ?>"></a>
<?php else: ?>
<div class="mdl-card__title">
<?php endif; ?>
<div class="card-text-wrapper inner-a-color-inherit">
<h2 class="mdl-card__title-text mdl-typography--font-bold">
<a class="a-none"><?php $this->title() ?>
</a>
</h2>
<div class="post-meta2">
<time datetime="<?php $this->date('c'); ?>" itemprop="datePublished">
<?php $this->date('Y/m/d'); ?>
</time>
<a itemprop="name" class="a-none"
href="<?php $this->author->permalink(); ?>"
rel="author"><?php $this->author(); ?></a>
<span class="inner-a-color-inherit a-none">
<?php $this->category(','); ?></span>
<span class="inner-a-color-inherit a-none">
<a itemprop="discussionUrl" onclick="$.gotoAnchorSmooth($('#comments'));return false;"
href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1评论', '%d评论'); ?></a></span>
</div>
</div>
</div>
<div class="mdl-card__supporting-text color-text-block-primary ">
<div class="article-content markdown" id="article-content">
<?php $this->content() ?>
</div>
<div class="tag-wrapper">
<?php foreach ($this->tags as $tag): ?>
<a class="mdl-button mdl-js-button least-button mdl-button--primary hover--margin-top-1px mdl-shadow--2dp hover-shadow--3dp translation-all-3"
href="<?php echo $tag['permalink']; ?>">#<?php echo $tag['name']; ?></a>
<?php endforeach; ?>
</div>
</div>
<div class="mdl-card__actions mdl-card--border" style="background: #EEEEEE;">
<?php $this->need('comments.php'); ?>
</div><!--mdl-card__actions-->
</div>
<ul class="post-near ">
<?php $this->theNext('<li class=""><i class="material-icons">arrow_back</i>%s</li>', '没有了'); ?>
<div class="mdl-layout-spacer"></div>
<?php $this->thePrev('<li class="right"><i class="material-icons">arrow_forward</i>%s</li>', '没有了'); ?>
</ul>
</div>
<?php if (!$this->fields->rmTree && $treeMenu): ?>
<div id="article-index-w"
class="article-title-list-w mdl-cell--3-col mdl-cell--hide-phone mdl-cell--2-col-tablet">
<div class="article-title-list">
<?php echo $treeMenu; ?>
</div>
</div>
<?php endif; ?>
<?php if (!$this->request->isAjax()) {
$this->need('footer.php');
} ?>