Files
sisvietnamvn_01/sisvietnamvn_main/src/main/resources/templates/page.html
T

100 lines
3.8 KiB
HTML

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{themes/__${activeTheme}__/layout}">
<head>
<title th:text="${page.title}">Page Title</title>
<!-- Add Meta Description for SEO -->
<meta name="description" th:if="${page.metaDescription != null}" th:content="${page.metaDescription}" />
<!-- Customizer CSS overrides -->
<style th:inline="css">
body {
font-family: /*[[${themeModFontFamily}]]*/ sans-serif !important;
}
/* Inject Customizer Primary Color dynamically */
a, .text-primary {
color: /*[[${themeModPrimaryColor}]]*/ #007bff !important;
}
/*[[${themeModCustomCss}]]*/
</style>
</head>
<body>
<!-- Render Editor.js Blocks -->
<div layout:fragment="content">
<th:block th:each="block : ${blocks}">
<!-- 1. HTML Snippet Block (Custom) -->
<th:block th:if="${block.type == 'snippet'}">
<div th:utext="${block.data.htmlContent}" th:remove="tag"></div>
</th:block>
<!-- 2. Header Block -->
<th:block th:if="${block.type == 'header'}">
<th:block th:switch="${block.data.level}">
<h1 th:case="1" th:utext="${block.data.text}"></h1>
<h2 th:case="2" th:utext="${block.data.text}"></h2>
<h3 th:case="3" th:utext="${block.data.text}"></h3>
<h4 th:case="4" th:utext="${block.data.text}"></h4>
<h5 th:case="5" th:utext="${block.data.text}"></h5>
<h6 th:case="6" th:utext="${block.data.text}"></h6>
<h2 th:case="*" th:utext="${block.data.text}"></h2>
</th:block>
</th:block>
<!-- 3. Paragraph Block -->
<th:block th:if="${block.type == 'paragraph'}">
<p th:utext="${block.data.text}"></p>
</th:block>
<!-- 4. List Block -->
<th:block th:if="${block.type == 'list'}">
<ul th:if="${block.data.style == 'unordered'}">
<li th:each="item : ${block.data.items}" th:utext="${item}"></li>
</ul>
<ol th:if="${block.data.style == 'ordered'}">
<li th:each="item : ${block.data.items}" th:utext="${item}"></li>
</ol>
</th:block>
<!-- 5. Image Block -->
<th:block th:if="${block.type == 'image'}">
<img th:src="${block.data.file.url}" th:alt="${block.data.caption}" />
<p th:if="${block.data.caption}" th:utext="${block.data.caption}"></p>
</th:block>
<!-- 6. Quote Block -->
<th:block th:if="${block.type == 'quote'}">
<blockquote>
<p th:utext="${block.data.text}"></p>
<footer th:if="${block.data.caption}" th:utext="${block.data.caption}"></footer>
</blockquote>
</th:block>
<!-- 7. Delimiter Block -->
<th:block th:if="${block.type == 'delimiter'}">
<hr />
</th:block>
<!-- 8. Table Block -->
<th:block th:if="${block.type == 'table'}">
<table>
<tbody>
<tr th:each="row, rowStat : ${block.data.content}">
<th:block th:if="${block.data.withHeadings == true and rowStat.index == 0}">
<th th:each="cell : ${row}" th:utext="${cell}"></th>
</th:block>
<th:block th:unless="${block.data.withHeadings == true and rowStat.index == 0}">
<td th:each="cell : ${row}" th:utext="${cell}"></td>
</th:block>
</tr>
</tbody>
</table>
</th:block>
</th:block>
</div>
</body>
</html>