forked from laysense/laysense.cn
Manage dynamic blocks and expand the editor library
This commit is contained in:
+8
-13
@@ -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 ?>
|
||||
|
||||
Reference in New Issue
Block a user