Add canvas element tools and categorized article editing
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
use App\Content\View;
|
||||
|
||||
$e = View::escape(...);
|
||||
?>
|
||||
<section class="section network" aria-label="支持项目与合作伙伴">
|
||||
<div class="wrap">
|
||||
<?php if (!$standalone): ?>
|
||||
<div class="section-heading inline-heading">
|
||||
<h2>支持项目与合作伙伴</h2>
|
||||
<a class="button button-outline" href="/network">查看全部</a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php foreach ($network as $slug => $group): ?>
|
||||
<div class="network-group" id="<?= $e($slug) ?>">
|
||||
<?php if ($standalone): ?><h2><?= $e($group['name']) ?></h2><?php else: ?><h3><?= $e($group['name']) ?></h3><?php endif ?>
|
||||
<?php if (!$group['articles']): ?><p class="empty-state">暂无已发布条目。</p><?php endif ?>
|
||||
<ul class="network-list">
|
||||
<?php foreach ($group['articles'] as $item): ?>
|
||||
<?php $card = $item['card']; $articlePath = '/articles/' . $item['slug']; ?>
|
||||
<li>
|
||||
<a href="<?= $e(($card['url'] ?? '') ?: $articlePath) ?>">
|
||||
<?php if (!empty($card['image'])): ?>
|
||||
<img src="<?= $e($card['image']) ?>" alt="" loading="lazy" width="76" height="28">
|
||||
<?php endif ?>
|
||||
<span><?= $e($item['title']) ?></span>
|
||||
</a>
|
||||
<?php if ($standalone && !empty($card['url']) && ($item['body'] !== '' || $item['summary'] !== '')): ?>
|
||||
<a class="network-detail" href="<?= $e($articlePath) ?>">查看详情</a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user