Skip to content

Commit

Permalink
fix: thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchen915 committed Jul 24, 2018
1 parent fe4af27 commit 1d9ccc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function themeConfig($form) {
$form->addInput($color);

$thumbnail = new Typecho_Widget_Helper_Form_Element_Select('thumbnail', array(
'open' => '显示缩略图,无图不显示',
'open' => '显示缩略图',
'close' => '不显示缩略图'),
// 'random'=>'显示缩略图,无图文章随机显示',
// 'default' => '显示缩略图,无图文章显示固定的缩略图',
Expand Down
11 changes: 10 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
/**
* Typecho Material 风格主题。
*
* - pjax
* - custome theam color
* - image zooming
* - code hightlight
* - Google analyze
* - CC listens
*
* Issue https://github.com/zhangchen915/material-typecho/issues
*
* @package Material-typecho
* @author zhangchen915
* @version 1.0
Expand All @@ -21,7 +30,7 @@
<li>分类:<?php $this->category(','); ?></li>
</ul>
<a href="<?php $this->permalink() ?>" class="entry-summary mdc-layout-grid__inner">
<?php if($this->options->thumbnailConfig == 'open' && get_thumbnail($this)): ?>
<?php if($this->options->thumbnail == 'open' && get_thumbnail($this)): ?>
<div class="thumbnail mdc-layout-grid__cell--span-4" style="background-image: url('<?php echo get_thumbnail($this) ?>')"></div>
<p class="mdc-layout-grid__cell--span-8"><?php $this->excerpt(250, '...'); ?></p>
<?php else : ?>
Expand Down

0 comments on commit 1d9ccc4

Please sign in to comment.