Private
Public Access
- Introduced new workspace components including app-frame, empty-state, icon-button, list-state, mobile-bar, panel-header, panel, section-head, section, sidebar-shell, sidebar-toolbar, and status-pill for improved UI structure. - Implemented directory index routing and parent-path fallback in index.php for better navigation. - Updated README.md to reflect new workspace features and patterns. - Added workspace.css for styling the new components and layout. - Enhanced settings.php to include workspace in the navigation structure. - Created views/workspace/index.php to serve as the main workspace interface with dynamic sections and navigation.
26 lines
1.4 KiB
PHP
26 lines
1.4 KiB
PHP
<?php return [
|
|
'render' => function($prop) {
|
|
$id = trim((string)($prop['id'] ?? ''));
|
|
$class = trim((string)($prop['class'] ?? ''));
|
|
$actionHtml = (string)($prop['action_html'] ?? '');
|
|
$searchId = trim((string)($prop['search_id'] ?? ''));
|
|
$searchClass = trim((string)($prop['search_class'] ?? ''));
|
|
$searchInputId = trim((string)($prop['search_input_id'] ?? ''));
|
|
$searchInputName = trim((string)($prop['search_input_name'] ?? 'search'));
|
|
$searchInputClass = trim((string)($prop['search_input_class'] ?? ''));
|
|
$searchPlaceholder = (string)($prop['search_placeholder'] ?? 'Search...');
|
|
ob_start();
|
|
?>
|
|
<div<?= $id !== '' ? ' id="' . asafe($id) . '"' : '' ?> class="ws-sidebar-top<?= $class !== '' ? ' ' . asafe($class) : '' ?>">
|
|
<?= $actionHtml ?>
|
|
<div<?= $searchId !== '' ? ' id="' . asafe($searchId) . '"' : '' ?> class="ws-search-wrap<?= $searchClass !== '' ? ' ' . asafe($searchClass) : '' ?>">
|
|
<i class="fas fa-search ws-search-icon"></i>
|
|
<input type="search"<?= $searchInputId !== '' ? ' id="' . asafe($searchInputId) . '"' : '' ?> name="<?= asafe($searchInputName) ?>" class="ws-search-input<?= $searchInputClass !== '' ? ' ' . asafe($searchInputClass) : '' ?>" placeholder="<?= asafe($searchPlaceholder) ?>" autocomplete="off">
|
|
</div>
|
|
</div>
|
|
<?php
|
|
return ob_get_clean();
|
|
},
|
|
|
|
'about' => 'Sidebar toolbar with optional action area and compact search field',
|
|
];
|