mirror of
https://github.com/danpros/htmly.git
synced 2026-04-21 04:56:23 +05:30
Improvements
This commit is contained in:
parent
b2ceb921fd
commit
c7bf485275
4 changed files with 10 additions and 4 deletions
|
|
@ -909,7 +909,7 @@ function get_teaser($text)
|
|||
{
|
||||
$teaserType = config('teaser.type');
|
||||
|
||||
if (strlen(strip_tags($text)) < config('teaser.char') || $teaserType === 'full') {
|
||||
if ($teaserType === 'full') {
|
||||
echo $text;
|
||||
} else {
|
||||
$string = preg_replace('/\s\s+/', ' ', strip_tags($text));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@
|
|||
<?php } ?>
|
||||
<div class="teaser-body" itemprop="articleBody">
|
||||
<?php echo get_thumbnail($p->body) ?>
|
||||
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
|
||||
<p><?php echo get_teaser($p->body) ?>
|
||||
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@
|
|||
<?php } ?>
|
||||
<div class="teaser-body" itemprop="articleBody">
|
||||
<?php echo get_thumbnail($p->body) ?>
|
||||
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
|
||||
<p><?php echo get_teaser($p->body) ?>
|
||||
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@
|
|||
<?php } ?>
|
||||
<div class="teaser-body" itemprop="articleBody">
|
||||
<?php echo get_thumbnail($p->body) ?>
|
||||
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
|
||||
<p><?php echo get_teaser($p->body) ?>
|
||||
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue