Release LaySite 1.4.0 canvas editing and layers
This commit is contained in:
@@ -27,9 +27,9 @@ $modules = $kind === 'modules';
|
||||
<?php foreach ($groups as $group => [$category, $items]): ?>
|
||||
<div class="<?= $modules ? 'studio-template-cards' : 'studio-element-items' ?>" data-template-group="<?= $e($group) ?>" hidden>
|
||||
<?php foreach ($items as $key => $item): ?>
|
||||
<?php [$label, $markup, $option, $feed] = array_pad($item, 4, null); ?>
|
||||
<?php [$label, $markup, $option, $feed] = array_pad($item, 4, null); $dynamic = is_string($feed) && $feed !== ''; ?>
|
||||
<?php if ($modules): ?>
|
||||
<article class="studio-template-card" data-template-card data-library-item data-template-search-text="<?= $e($label . ' ' . $key . ($feed !== null ? ' 动态' : '')) ?>">
|
||||
<article class="studio-template-card" data-template-card data-library-item data-template-search-text="<?= $e($label . ' ' . $key . ($dynamic ? ' 动态' : '')) ?>">
|
||||
<?php if (($item[4] ?? '') === 'layout'): ?>
|
||||
<?php [$previewKind, $previewPreset] = explode('-', $key, 2); ?>
|
||||
<div class="studio-layout-card-preview">
|
||||
@@ -45,11 +45,11 @@ $modules = $kind === 'modules';
|
||||
<div class="studio-template-meta">
|
||||
<div class="studio-component-label">
|
||||
<span><?= $e($label) ?></span>
|
||||
<?php if ($feed !== null): ?><span class="studio-dynamic-badge">动态</span><?php endif ?>
|
||||
<?php if ($dynamic): ?><span class="studio-dynamic-badge">动态</span><?php endif ?>
|
||||
</div>
|
||||
<button type="button" class="button button-outline" disabled data-canvas-template="<?= $e($key) ?>"
|
||||
data-template-title="<?= $e($label) ?>" data-template-lead="<?= $e($option) ?>" data-template-style="<?= $e($item[4] ?? 'plain') ?>"
|
||||
<?= $feed !== null ? 'data-template-feed="' . $e($feed) . '"' : '' ?> aria-label="添加<?= $e($label) ?>组件">添加</button>
|
||||
<?= $dynamic ? 'data-template-feed="' . $e($feed) . '"' : '' ?> aria-label="添加<?= $e($label) ?>组件">添加</button>
|
||||
</div>
|
||||
<template data-preset="<?= $e($key) ?>"><?= $markup ?></template>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user