feat: implement modular UMass theme components and supporting generation scripts for home page structure
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
try:
|
||||
with open('src/main/resources/templates/index.html', 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
main_content_lines = lines[277:2663]
|
||||
|
||||
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(bodyClass='umass-platform-homepage path-frontpage page-node-type-homepage homepage transparent-header')}">
|
||||
|
||||
<head>
|
||||
<title>Bệnh Viện Đa Khoa Quốc Tế S.I.S Cần Thơ</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Content Top Area -->
|
||||
<div layout:fragment="content-top">
|
||||
<th:block th:replace="~{themes/__${activeTheme}__/content-top}"></th:block>
|
||||
</div>
|
||||
|
||||
<!-- Main Content Area -->
|
||||
<div layout:fragment="content">
|
||||
"""
|
||||
html += "".join(main_content_lines)
|
||||
html += """
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
with open('src/main/resources/templates/pages/home.html', 'w', encoding='utf-8') as f:
|
||||
f.write(html)
|
||||
|
||||
print("Successfully created pages/home.html")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
Reference in New Issue
Block a user