forked from laysense/laysense.cn
Add canvas element tools and categorized article editing
This commit is contained in:
+14
-36
@@ -36,8 +36,19 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
|
||||
<?php if ($canvas || $page['image'] !== ''): ?>
|
||||
<div class="hero-visual <?= $home ? 'hero-illustration' : ($service ? 'hero-service-art' : 'app-frame') ?><?= $page['image_scale'] ? ' studio-media-' . $e($page['image_scale']) : '' ?>" data-visual<?= $page['image'] === '' ? ' hidden' : '' ?>>
|
||||
<img<?= $page['image'] === '' ? '' : ' src="' . $e($page['image']) . '"' ?> alt="<?= $e($page['alt']) ?>" width="1448" height="1086" fetchpriority="high"<?= $canvas ? ' data-studio-hero-image' : '' ?>>
|
||||
<?php if ($home && !$canvas && $page['image'] === '/assets/original/home-hero.webp' && !$page['image_scale']): ?>
|
||||
<div class="home-pipe-flow" aria-hidden="true"><span></span><span></span><span></span><span></span></div>
|
||||
<?php if ($home && !$canvas && $page['image'] === '/assets/original/home-hero.webp'): ?>
|
||||
<svg class="home-pipe-flow" viewBox="0 0 640 480" aria-hidden="true" focusable="false">
|
||||
<defs>
|
||||
<path id="hero-pipe-tower" pathLength="100" d="M174 347 241 312 Q246 310 246 305 L246 299 Q246 295 252 293 L273 282"/>
|
||||
<path id="hero-pipe-disk" pathLength="100" d="M409 282 428 293 Q433 296 433 300 L433 304 Q433 307 438 309 L500 337"/>
|
||||
<path id="hero-pipe-node" pathLength="100" d="M119 201 125 205 Q129 207 129 212 L129 214 Q130 217 134 219 L190 243"/>
|
||||
<path id="hero-pipe-chart" pathLength="100" d="M443 226 471 213 Q478 208 483 209 L488 207 Q492 205 492 200 L492 182"/>
|
||||
</defs>
|
||||
<g class="home-pipe-route"><use href="#hero-pipe-tower"/><use href="#hero-pipe-tower"/></g>
|
||||
<g class="home-pipe-route"><use href="#hero-pipe-disk"/><use href="#hero-pipe-disk"/></g>
|
||||
<g class="home-pipe-route"><use href="#hero-pipe-node"/><use href="#hero-pipe-node"/></g>
|
||||
<g class="home-pipe-route"><use href="#hero-pipe-chart"/><use href="#hero-pipe-chart"/></g>
|
||||
</svg>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -71,38 +82,5 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
|
||||
]) ?></template>
|
||||
<?php endif ?>
|
||||
<?php if ($home): ?>
|
||||
<section class="section home-news" id="blog" aria-labelledby="updates-heading">
|
||||
<div class="wrap">
|
||||
<div class="section-heading inline-heading">
|
||||
<h2 id="updates-heading">来笙动态</h2>
|
||||
<a class="button button-outline" href="/articles">查看全部动态</a>
|
||||
</div>
|
||||
<?= View::fragment('article-list', ['articles' => $articles]) ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php if ($page['partners']): ?>
|
||||
<section class="section network" aria-labelledby="network-heading">
|
||||
<div class="wrap">
|
||||
<div class="section-heading"><h2 id="network-heading">支持项目与合作伙伴</h2></div>
|
||||
<?php foreach (['来笙支持项目' => 'supported-projects', '来笙合作伙伴' => 'partners'] as $group => $id): ?>
|
||||
<div class="network-group" id="<?= $e($id) ?>">
|
||||
<h3><?= $e($group) ?></h3>
|
||||
<ul class="network-list">
|
||||
<?php foreach ($page['partners'] as $partner): ?>
|
||||
<?php if ($partner['group'] !== $group) { continue; } ?>
|
||||
<li>
|
||||
<?php if ($partner['url']): ?><a href="<?= $e($partner['url']) ?>"><?php else: ?><div><?php endif ?>
|
||||
<?php if ($partner['image']): ?>
|
||||
<img src="<?= $e($partner['image']) ?>" alt="" loading="lazy" width="76" height="28">
|
||||
<?php endif ?>
|
||||
<span><?= $e($partner['name']) ?></span>
|
||||
<?php if ($partner['url']): ?></a><?php else: ?></div><?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
<?= View::fragment('network-groups', ['network' => $network, 'standalone' => false]) ?>
|
||||
<?php endif ?>
|
||||
|
||||
Reference in New Issue
Block a user