Improve canvas layers, heading removal and component previews in 1.5.3

This commit is contained in:
2026-11-28 16:15:19 +08:00
parent 93b58b87b0
commit cb317bbeb0
31 changed files with 322 additions and 90 deletions
+6
View File
@@ -4,11 +4,17 @@ use App\Content\View;
$e = View::escape(...);
$modules = $kind === 'modules';
$previews = $modules ? [
'content' => 'headline', 'cover' => 'cover', 'layout' => 'split-balanced-right', 'media' => 'gallery',
'features' => 'features', 'details' => 'feature-matrix', 'actions' => 'navigation', 'events' => 'event-agenda',
'commerce' => 'product-spotlight', 'editorial' => 'editorial-feature', 'headers' => 'header-inline', 'footers' => 'footer-columns',
] : ['text-elements' => 'list', 'link-elements' => 'two-actions', 'media-elements' => 'gallery', 'structure-elements' => 'table'];
?>
<section role="tabpanel" id="studio-panel-<?= $kind ?>" aria-labelledby="studio-tab-<?= $kind ?>" data-library-panel="<?= $kind ?>" hidden>
<ul class="studio-library-categories" data-library-index>
<?php foreach ($groups as $group => [$category, $items]): ?>
<li><button type="button" data-library-category="<?= $e($group) ?>" data-library-label="<?= $e($category) ?>">
<img class="studio-category-preview" src="/assets/template-previews/<?= $e($previews[$group]) ?>.webp" alt="" width="96" height="60" loading="lazy">
<span><?= $e($category) ?></span><small><?= count($items) ?></small>
</button></li>
<?php endforeach ?>