Manage dynamic blocks and expand the editor library
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Content\DirectoryCard;
|
||||
use App\Content\Html;
|
||||
use App\Content\View;
|
||||
|
||||
$e = View::escape(...);
|
||||
?>
|
||||
<ul class="network-list">
|
||||
<?php foreach ($articles as $item): ?>
|
||||
<?php
|
||||
$card = $item['card'];
|
||||
['primary' => $target, 'detail' => $detail] = DirectoryCard::links($item, Html::articleBody($item));
|
||||
?>
|
||||
<li>
|
||||
<?php if ($target !== ''): ?><a href="<?= $e($target) ?>"><?php else: ?><span class="network-static"><?php endif ?>
|
||||
<?php if (!empty($card['image'])): ?>
|
||||
<img src="<?= $e($card['image']) ?>" alt="" loading="lazy" width="76" height="28">
|
||||
<?php endif ?>
|
||||
<span><?= $e($item['title']) ?></span>
|
||||
<?php if ($target !== ''): ?></a><?php else: ?></span><?php endif ?>
|
||||
<?php if ($standalone && $detail !== ''): ?>
|
||||
<a class="network-detail" href="<?= $e($detail) ?>">查看详情</a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user