feat: implement swiper slider, tabbed livestream, and table extension plugins with schema updates for settings content

This commit is contained in:
2026-07-25 18:26:29 +07:00
parent 0eb7bd5863
commit 54e420499f
374 changed files with 16434 additions and 495 deletions
+32
View File
@@ -0,0 +1,32 @@
import re
html_file = "/home/x79/sisvietnamvn_01/sisvietnamvn_main/html_snippets/content_main_blocks/temp"
plugin_file = "/home/x79/sisvietnamvn_01/sisvietnamvn_main/src/main/java/com/sisvietnamvn/web/plugins/tabbedlivestream/TabbedLivestreamPlugin.java"
with open(html_file, "r") as f:
html_content = f.read()
with open(plugin_file, "r") as f:
plugin_content = f.read()
target = """ // TODO: Dán mã HTML thật của tabbed-livestream vào đây
t.setHtmlTemplate(
"<!-- Tabbed Livestream Template -->\\n" +
"<div class=\\"livestream-container\\">\\n" +
" {{#each livestream_posts}}\\n" +
" <div class=\\"livestream-item\\">\\n" +
" <a href=\\"/post/{{slug}}\\">{{title}}</a>\\n" +
" </div>\\n" +
" {{/each}}\\n" +
"</div>"
);"""
replacement = ' t.setHtmlTemplate("""\n' + html_content + '""");'
if target in plugin_content:
new_content = plugin_content.replace(target, replacement)
with open(plugin_file, "w") as f:
f.write(new_content)
print("Success")
else:
print("Target not found")