feat: implement widget and menu shortcode rendering in HtmlSnippetService and update section title
This commit is contained in:
@@ -641,6 +641,26 @@
|
||||
media: '<i class="fa fa-newspaper-o fa-2x"></i>'
|
||||
});
|
||||
|
||||
// ── DYNAMIC WIDGETS ──
|
||||
bm.add('widget-sidebar', {
|
||||
label: 'Sidebar Widgets',
|
||||
category: 'Widgets',
|
||||
content: '<div class="widget-area" style="padding: 10px; border: 2px dashed #6366f1; text-align: center; color: #6366f1; background: #f0f0f5; border-radius: 8px;">[widgets:sidebar]</div>',
|
||||
media: '<i class="fa fa-th-list fa-2x"></i>'
|
||||
});
|
||||
bm.add('widget-footer', {
|
||||
label: 'Footer Widgets',
|
||||
category: 'Widgets',
|
||||
content: '<div class="widget-area" style="padding: 10px; border: 2px dashed #6366f1; text-align: center; color: #6366f1; background: #f0f0f5; border-radius: 8px;">[widgets:footer]</div>',
|
||||
media: '<i class="fa fa-th-large fa-2x"></i>'
|
||||
});
|
||||
bm.add('widget-stats', {
|
||||
label: 'Stats Widgets',
|
||||
category: 'Widgets',
|
||||
content: '<div class="widget-area" style="padding: 10px; border: 2px dashed #6366f1; text-align: center; color: #6366f1; background: #f0f0f5; border-radius: 8px;">[widgets:stats]</div>',
|
||||
media: '<i class="fa fa-bar-chart fa-2x"></i>'
|
||||
});
|
||||
|
||||
// ── MEDIA ──
|
||||
bm.add('image-gallery', {
|
||||
label: 'Image Gallery',
|
||||
|
||||
@@ -26,15 +26,7 @@
|
||||
|
||||
<!-- 1. HTML Snippet Block (Custom) -->
|
||||
<th:block th:if="${block.type == 'snippet'}">
|
||||
<th:block th:if="${block.data.id == 'top-banner' or block.data.id == 'umass_banner_snippet' or block.data.id == 'content_top_snippet' or block.data.id == 'top_banner' or block.data.id == 'content-top'}">
|
||||
<div th:replace="~{themes/__${activeTheme}__/content-top}"></div>
|
||||
</th:block>
|
||||
<th:block th:if="${block.data.id == 'block_1_block-multiple-ctas' or block.data.id == 'block-multiple-ctas'}">
|
||||
<div th:replace="~{themes/__${activeTheme}__/content-main-blocks-cta}"></div>
|
||||
</th:block>
|
||||
<th:block th:unless="${block.data.id == 'top-banner' or block.data.id == 'umass_banner_snippet' or block.data.id == 'content_top_snippet' or block.data.id == 'top_banner' or block.data.id == 'content-top' or block.data.id == 'block_1_block-multiple-ctas' or block.data.id == 'block-multiple-ctas'}">
|
||||
<div th:utext="${block.data.htmlContent}" th:remove="tag"></div>
|
||||
</th:block>
|
||||
<div th:utext="${block.data.htmlContent}" th:remove="tag"></div>
|
||||
</th:block>
|
||||
|
||||
<!-- 2. Header Block -->
|
||||
|
||||
Reference in New Issue
Block a user