Manage dynamic blocks and expand the editor library

This commit is contained in:
2026-11-22 00:59:59 +08:00
parent 828dfc09f9
commit 92354d7e4a
63 changed files with 671 additions and 188 deletions
+8 -13
View File
@@ -55,15 +55,11 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
</div>
<?php endif ?>
</div>
<?php if ($home): ?>
<div class="wrap hero-directory">
<a class="overline directory-label" href="/services">产品与服务</a>
<a href="/pagepan"><span>PAGEPAN</span><small>可视化建站</small></a>
<a href="/highspeaker"><span>HighSpeaker DNS</span><small>开源智能解析</small></a>
<a href="/sc"><span>软著代理</span><small>登记申请与材料服务</small></a>
<a href="/shnu-sc"><span>SHNU 学生</span><small>软著申请方案</small></a>
</div>
<?php endif ?>
<?php foreach ($page['sections'] as $section): ?>
<?php if ($section['style'] === 'hero-links'): ?>
<?= View::fragment('section', ['section' => $section, 'moment' => false, 'canvas' => $canvas, 'pageSlug' => $page['slug']]) ?>
<?php endif ?>
<?php endforeach ?>
</section>
<?php if ($canvas || $page['quicklinks']): ?>
<nav class="section-nav" aria-label="本页目录"<?= $canvas ? ' data-studio-navigation' : '' ?><?= !$page['quicklinks'] ? ' hidden' : '' ?>>
@@ -75,7 +71,9 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
</nav>
<?php endif ?>
<?php foreach ($page['sections'] as $section): ?>
<?= View::fragment('section', ['section' => $section, 'moment' => $home && $section['key'] === 'about', 'canvas' => $canvas]) ?>
<?php if ($section['style'] !== 'hero-links'): ?>
<?= View::fragment('section', ['section' => $section, 'moment' => $home && $section['key'] === 'about', 'canvas' => $canvas, 'pageSlug' => $page['slug']]) ?>
<?php endif ?>
<?php endforeach ?>
<?php if ($canvas): ?>
<template data-studio-section-end><?= View::fragment('section', [
@@ -83,6 +81,3 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
'moment' => false, 'canvas' => true,
]) ?></template>
<?php endif ?>
<?php if ($home): ?>
<?= View::fragment('network-groups', ['network' => $network, 'standalone' => false]) ?>
<?php endif ?>