diff options
| author | 阔落 <45323514+BigCoke233@users.noreply.github.com> | 2019-03-30 15:30:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-30 15:30:52 +0800 |
| commit | 9ae13dfa011baab12843b6855c2e9a4d6ca92075 (patch) | |
| tree | 07399ca9dfed868bc74a4ace8bc14e11d31e364d /includes/post-item.php | |
| parent | d5ff633699d665803d400551dc66c14ec480bb5f (diff) | |
Add files via upload
Diffstat (limited to 'includes/post-item.php')
| -rw-r--r-- | includes/post-item.php | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/includes/post-item.php b/includes/post-item.php index 60ad412..f43e58c 100644 --- a/includes/post-item.php +++ b/includes/post-item.php @@ -1,36 +1,48 @@ <?php if($this->is('post') || $this->fields->type=='1' ): ?>
<!-- 说说 -->
-<?php if ($this->is('index')): ?>
+ <?php if ($this->is('index')): ?>
<div class="post-item item">
-
- <div class="row">
- <div class="saying-info">
+ <div class="post-content saying-content">
+ <h3><?php $this->author() ?>说:</h3>
+ <?php $this->need('includes/post-content.php'); ?>
+ </div>
+ <hr />
+ <div class="row saying-info">
<div class="col-md-1 col-xs-2 saying-avatar">
- <?php $this->author->gravatar(50); ?>
+ <?php $this->author->gravatar(50) ?>
</div>
- <div class="col-md-11 col-xs-10 saying-title-info">
- <h4 class="saying-title"><a href="<?php $this->permalink() ?>" class="post-link"><?php $this->sticky(); $this->title() ?></a></h4>
- <span><br /><i class="glyphicon glyphicon-send"></i> <?php $this->author() ?> 发布了一条说说:</span>
+ <div class="col-md-11 col-xs-10">
+ <h4 class="saying-title"><a href="<?php $this->permalink() ?>"><?php $this->title(); ?></a></h4>
+ <div class="saying-info"><?php $this->date('F j, Y'); ?></div>
+
+ <a href="<?php $this->permalink() ?>" class="read-more pull-right btn btn-default">前往吐槽</a>
</div>
</div>
</div>
- <hr />
- <div class="post-content saying-content">
- <?php
- $content = preg_replace('/<img(.*?)src="(.*?)"(.*?)>/s','<a data-fancybox="gallery" href="${2}"><img${1}src="${2}"${3}></a>',$this->content);
- echo $content
- ?>
- </div>
- <a href="<?php $this->permalink() ?>" class="post-link">
+
+ <br />
+ <?php endif; ?>
+<!-- 小板式文章 -->
+<?php elseif($this->fields->type=='2'): ?>
+ <a href="<?php $this->permalink() ?>" class="post-link">
+ <div class="item post-item">
+ <div class="row">
+ <div style="height:160px;background:url('<?php $this->fields->banner(); ?>');background-repeat:no-repeat;background-size:cover" class="col-md-3 col-xs-3 post-banner-sm"></div>
+ <div class="cold-md-9 col-xs-9" style="margin-top:-20px;">
+ <h3><?php $this->sticky(); $this->title() ?></h3>
+ <p class="excerpt">
+ <?php $this->excerpt(66); ?>
+ </p>
<hr />
- <div class="post-info"><span class="glyphicon glyphicon-th-large"></span> <?php $this->category(',', true, '木有分类'); ?> | <span class="glyphicon glyphicon-calendar"></span> <?php $this->date('F j, Y'); ?> | <Span class="glyphicon glyphicon-comment"></span> <?php $this->commentsNum('%d Comments'); ?></div>
- <br />
- </a>
+ <div class="post-info"><span class="glyphicon glyphicon-th-large"></span> <?php $this->category(',', true, '木有分类'); ?> | <span class="glyphicon glyphicon-calendar"></span> <?php $this->date('F j, Y'); ?> | <Span class="glyphicon glyphicon-comment"></span> <?php $this->commentsNum('%d Comments'); ?></div>
+
+ </div>
</div>
- <br />
-<?php endif; ?>
+ </div>
+ </a>
+ <br />
<?php else: ?>
-<!-- 文章 -->
+<!-- 普通文章 -->
<a href="<?php $this->permalink() ?>" class="post-link">
<div class="item post-item">
<?php if ($this->is('index')): ?>
|
