From 8f842d6dfd76f923fdae72163f3ae8a12ee7f5e6 Mon Sep 17 00:00:00 2001 From: puke <1129090915@qq.com> Date: Fri, 7 Nov 2025 20:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=A8=A1=E6=9D=BF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + README_EN.md | 1 + web/app.py | 9 +++++++++ web/i18n/locales/en_US.json | 1 + web/i18n/locales/zh_CN.json | 1 + 5 files changed, 13 insertions(+) diff --git a/README.md b/README.md index b390e28..c681984 100644 --- a/README.md +++ b/README.md @@ -253,6 +253,7 @@ uv run streamlit run web/app.py - 从下拉菜单选择模板,按尺寸分组显示(竖屏/横屏/方形) - 点击「预览模板」可以自定义参数测试效果 - 如果懂 HTML,可以在 `templates/` 文件夹创建自己的模板 +- 🔗 [查看所有模板效果图](https://aidc-ai.github.io/Pixelle-Video/zh/user-guide/templates/#_3) --- diff --git a/README_EN.md b/README_EN.md index 6611ccc..9ff0528 100644 --- a/README_EN.md +++ b/README_EN.md @@ -253,6 +253,7 @@ Determines video layout and design. - Select template from dropdown menu, displayed grouped by dimension (portrait/landscape/square) - Click "Preview Template" to test effect with custom parameters - If you know HTML, you can create your own templates in the `templates/` folder +- 🔗 [View All Template Previews](https://aidc-ai.github.io/Pixelle-Video/user-guide/templates/#built-in-template-preview) --- diff --git a/web/app.py b/web/app.py index 1557726..ffa316c 100644 --- a/web/app.py +++ b/web/app.py @@ -660,6 +660,15 @@ def main(): st.markdown(f"**{tr('help.how')}**") st.markdown(tr("template.how")) + # Template preview link (based on language) + current_lang = get_language() + if current_lang == "zh_CN": + template_docs_url = "https://aidc-ai.github.io/Pixelle-Video/zh/user-guide/templates/#_3" + else: + template_docs_url = "https://aidc-ai.github.io/Pixelle-Video/user-guide/templates/#built-in-template-preview" + + st.markdown(f"🔗 [{tr('template.preview_link')}]({template_docs_url})") + # Import template utilities from pixelle_video.utils.template_util import get_templates_grouped_by_size diff --git a/web/i18n/locales/en_US.json b/web/i18n/locales/en_US.json index d547e00..03eb64a 100644 --- a/web/i18n/locales/en_US.json +++ b/web/i18n/locales/en_US.json @@ -74,6 +74,7 @@ "template.selector": "Template Selection", "template.select": "Select Template", "template.select_help": "Select template and video size", + "template.preview_link": "View All Template Previews", "template.video_size_info": "Final Video Size: {width} × {height}", "template.separator_selected": "Please select a specific template, not the group header", "template.default": "Default", diff --git a/web/i18n/locales/zh_CN.json b/web/i18n/locales/zh_CN.json index a54a885..adeabae 100644 --- a/web/i18n/locales/zh_CN.json +++ b/web/i18n/locales/zh_CN.json @@ -74,6 +74,7 @@ "template.selector": "模板选择", "template.select": "选择模板", "template.select_help": "选择模板和视频尺寸", + "template.preview_link": "查看所有模板效果图", "template.video_size_info": "最终视频尺寸:{width} × {height}", "template.separator_selected": "请选择具体的模板,而不是分组标题", "template.default": "默认",