forked from laysense/laysite
Improve canvas layers, heading removal and component previews in 1.5.3
This commit is contained in:
@@ -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 ?>
|
||||
|
||||
Reference in New Issue
Block a user