Scope article feeds and expand canvas editing
This commit is contained in:
@@ -6,22 +6,22 @@ $e = View::escape(...);
|
||||
<section class="section article-page" aria-labelledby="archive-title" data-enter>
|
||||
<div class="wrap">
|
||||
<div class="section-heading">
|
||||
<?php if ($tag || $category): ?><a class="back-link" href="/articles">全部动态</a><?php endif ?>
|
||||
<?php if ($backPath): ?><a class="back-link" href="<?= $e($backPath) ?>"><?= $e($backLabel) ?></a><?php endif ?>
|
||||
<h1 id="archive-title"><?= $e($headline) ?></h1>
|
||||
<p>来笙的公告、新闻和产品动态。</p>
|
||||
<p><?= $e($description) ?></p>
|
||||
</div>
|
||||
<nav class="filter-nav" aria-label="动态分类">
|
||||
<a href="/articles" <?= !$category && !$tag ? 'aria-current="page"' : '' ?>>全部</a>
|
||||
<a href="<?= $e($allPath) ?>" <?= !$category && !$tag ? 'aria-current="page"' : '' ?>>全部</a>
|
||||
<?php foreach ($categories as $key => $label): ?>
|
||||
<a href="/articles/category/<?= $e($key) ?>" <?= $category === $key ? 'aria-current="page"' : '' ?>><?= $e($label) ?></a>
|
||||
<a href="<?= $e($categoryLinks[$key]) ?>" <?= $category === (string) $key ? 'aria-current="page"' : '' ?>><?= $e($label) ?></a>
|
||||
<?php endforeach ?>
|
||||
</nav>
|
||||
<?= View::fragment('article-list', ['articles' => $articles]) ?>
|
||||
<?= View::fragment('article-list', ['articles' => $articles, 'categoryScope' => $categoryScope ?? null]) ?>
|
||||
<?php if ($pageNumber > 1 || $hasNext): ?>
|
||||
<nav class="pagination" aria-label="动态分页">
|
||||
<?php if ($pageNumber > 1): ?><a class="button button-outline" href="<?= $e($archivePath . ($pageNumber > 2 ? '?page=' . ($pageNumber - 1) : '')) ?>" rel="prev">上一页</a><?php endif ?>
|
||||
<?php if ($pageNumber > 1): ?><a class="button button-outline" href="<?= $e(View::archivePage($archivePath, $pageNumber - 1)) ?>" rel="prev">上一页</a><?php endif ?>
|
||||
<span>第 <?= $e($pageNumber) ?> 页</span>
|
||||
<?php if ($hasNext): ?><a class="button button-outline" href="<?= $e($archivePath . '?page=' . ($pageNumber + 1)) ?>" rel="next">下一页</a><?php endif ?>
|
||||
<?php if ($hasNext): ?><a class="button button-outline" href="<?= $e(View::archivePage($archivePath, $pageNumber + 1)) ?>" rel="next">下一页</a><?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user