feat: add UMass Amherst theme support, implement HTML snippet management system, and update page rendering logic

This commit is contained in:
2026-07-06 23:50:55 +07:00
parent 3dc5a03484
commit e6d98edc45
364 changed files with 9967 additions and 36960 deletions
+16
View File
@@ -0,0 +1,16 @@
import re
filepath = "src/main/resources/templates/themes/umass/footer.html"
with open(filepath, "r", encoding="utf-8") as f:
content = f.read()
# We want to replace the `a.logo` block with our new logo
# Using DOTALL to match across newlines
pattern = r'<a class="logo"[^>]*>.*?</a>'
replacement = '<a class="logo" href="/" aria-label="Sisvietnamvn">\n <div>\n <img th:src="@{/theme-assets/umass/images/logo.png}" alt="Sisvietnamvn" style="height: 60px; width: auto;"/>\n </div>\n</a>'
content = re.sub(pattern, replacement, content, count=1, flags=re.DOTALL)
with open(filepath, "w", encoding="utf-8") as f:
f.write(content)
print("Updated footer.html")