PRINTFILM: AI short-video marketing and AI short-drama creation platform
feat: 顶栏与首页显眼处加入 GitHub 开源仓库入口
yi5582de52bb16
diff --git a/README.md b/README.mdindex 766613c..ddc6178 100644--- a/README.md+++ b/README.md@@ -1,13 +1,15 @@# PRINTFILM**开源项目**:PRINTFILM+**源码**:[github.com/yi1108/printfilm](https://github.com/yi1108/printfilm)**版本**:0.2.0 | **更新**:2026-09-17模板驱动的 AI 短视频与漫剧创作平台:主题 / 剧本 → 分镜 → 生图 → 生视频 → 成片。口播由 Seedance 在出片时一并生成,无需单独配音。同一条生成能力,多套视觉风格;支持注册登录、按量计费、管理后台与开放 API。## 社区-添加微信号 **`gitpp88`**(备注「入群」)加入 printfilm 用户群:学习短剧 / 部署答疑 / 模板交流。+- **GitHub**:https://github.com/yi1108/printfilm+- 添加微信号 **`gitpp88`**(备注「入群」)加入 printfilm 用户群:学习短剧 / 部署答疑 / 模板交流。diff --git a/frontend/src/components/layout/AppShell.tsx b/frontend/src/components/layout/AppShell.tsxindex 8e4cd5c..88a376f 100644--- a/frontend/src/components/layout/AppShell.tsx+++ b/frontend/src/components/layout/AppShell.tsx@@ -1,6 +1,7 @@import type { ReactNode } from 'react'import { Link } from 'react-router-dom'import { useI18n } from '../../i18n'+import { GITHUB_REPO_URL } from '../../lib/siteLinks'import SiteNav, { type NavActive } from './SiteNav'type Props = {@@ -28,6 +29,9 @@ export default function AppShell({ children, active, wide, flush, hideFooter }:<Link to="/privacy">{t('footer.privacy')}</Link><Link to="/contact">{t('footer.contact')}</Link><Link to="/help">{t('footer.help')}</Link>+ <a href={GITHUB_REPO_URL} target="_blank" rel="noopener noreferrer">+ {t('footer.github')}+ </a></nav><p>© {new Date().getFullYear()} PRINTFILM. All rights reserved.</p></footer>diff --git a/frontend/src/components/layout/SiteNav.tsx b/frontend/src/components/layout/SiteNav.tsxindex bd8fb4d..52efdfa 100644--- a/frontend/src/components/layout/SiteNav.tsx+++ b/frontend/src/components/layout/SiteNav.tsx@@ -4,10 +4,11 @@ import { api } from '../../api'import type { User } from '../../api'import UserAvatar from '../UserAvatar'import BrandMark from '../BrandMark'-import { IconHelp } from '../ui/Icons'+import { IconGithub, IconHelp } from '../ui/Icons'import Button from '../ui/Button'import CreateChoiceModal from '../ui/CreateChoiceModal'import { USER_UPDATED_EVENT } from '../../lib/userEvents'+import { GITHUB_REPO_URL } from '../../lib/siteLinks'import { useI18n } from '../../i18n'import LanguageSwitch from './LanguageSwitch'@@ -113,6 +114,17 @@ export default function SiteNav({ active }: Props) {</nav><div className="pf-nav-right"><LanguageSwitch />+ <a+ className="pf-nav-github"+ href={GITHUB_REPO_URL}+ target="_blank"+ rel="noopener noreferrer"+ title={t('nav.githubTitle')}+ aria-label={t('nav.githubTitle')}+ >+ <IconGithub size={18} />+ <span>{t('nav.github')}</span>+ </a><button type="button" className="pf-nav-help-btn" title={t('nav.helpCenter')} onClick={() => nav('/help')}><IconHelp size={18} className="pf-nav-help-icon" /><span>{t('nav.help')}</span>@@ -148,7 +160,12 @@ export default function SiteNav({ active }: Props) {</div>{menuOpen ? (<div className="pf-nav-drawer" role="dialog" aria-label={t('nav.mobileNav')}>- <nav className="pf-nav-drawer-links">{centerLinks}</nav>+ <nav className="pf-nav-drawer-links">+ {centerLinks}+ <a href={GITHUB_REPO_URL} target="_blank" rel="noopener noreferrer">+ {t('nav.github')}+ </a>+ </nav></div>) : null}<CreateChoiceModal open={createOpen} onClose={() => setCreateOpen(false)} />diff --git a/frontend/src/components/ui/Icons.tsx b/frontend/src/components/ui/Icons.tsxindex 89fbd90..e67b4ff 100644--- a/frontend/src/components/ui/Icons.tsx+++ b/frontend/src/components/ui/Icons.tsx@@ -43,6 +43,22 @@ export function IconHelp(p: IconProps) {)}+/** GitHub Octocat 标记(填充,便于顶栏识别) */+export function IconGithub(p: IconProps) {+ return (+ <svg+ width={p.size ?? 18}+ height={p.size ?? 18}+ viewBox="0 0 24 24"+ fill="currentColor"+ className={p.className}+ aria-hidden+ >+ <path d="M12 2C6.477 2 2 6.584 2 12.217c0 4.506 2.865 8.33 6.839 9.68.5.094.682-.22.682-.486 0-.24-.009-.875-.014-1.717-2.782.616-3.369-1.366-3.369-1.366-.454-1.178-1.11-1.491-1.11-1.491-.908-.635.069-.622.069-.622 1.004.072 1.532 1.05 1.532 1.05.892 1.559 2.341 1.109 2.91.848.091-.66.35-1.11.636-1.365-2.22-.257-4.555-1.134-4.555-5.048 0-1.115.39-2.027 1.03-2.742-.103-.258-.447-1.296.098-2.701 0 0 .84-.274 2.75 1.046A9.38 9.38 0 0 1 12 6.918a9.38 9.38 0 0 1 2.504.344c1.909-1.32 2.747-1.046 2.747-1.046.547 1.405.203 2.443.1 2.701.64.715 1.028 1.627 1.028 2.742 0 3.924-2.339 4.788-4.566 5.04.359.315.679.938.679 1.891 0 1.365-.012 2.465-.012 2.8 0 .269.18.585.688.485A10.24 10.24 0 0 0 22 12.217C22 6.584 17.523 2 12 2z" />+ </svg>+ )+}+export function IconBell(p: IconProps) {return (<Svg {...p}>diff --git a/frontend/src/i18n/locales/en/pages.ts b/frontend/src/i18n/locales/en/pages.tsindex ac66435..223cbdc 100644--- a/frontend/src/i18n/locales/en/pages.ts+++ b/frontend/src/i18n/locales/en/pages.ts@@ -7,6 +7,7 @@ export const enPages = {lede: 'AI drama from script to episodic film. AI short video from offer to storyboard to film. One studio, two ways to ship.',startCreate: 'Start creating',browseTools: 'Browse tools',+ githubCta: 'Open source · View on GitHub',products: 'Products',dramaTitle: 'AI Drama',dramaFor: 'For short-drama makers',@@ -195,6 +196,12 @@ export const enPages = {href: 'mailto:[email protected]?subject=PRINTFILM%20Enterprise',actionLabel: 'Email partnerships',},+ {+ title: 'Open source',+ desc: 'Source, issues, and deployment docs are on GitHub. Stars, issues, and PRs welcome.',+ href: 'https://github.com/yi1108/printfilm',+ actionLabel: 'github.com/yi1108/printfilm',+ },],topics: ['Account & sign-in',diff --git a/frontend/src/i18n/locales/en/shell.ts b/frontend/src/i18n/locales/en/shell.tsindex 2c87c2e..f0bc611 100644--- a/frontend/src/i18n/locales/en/shell.ts+++ b/frontend/src/i18n/locales/en/shell.ts@@ -54,6 +54,8 @@ export const enShell = {pricing: 'Pricing',help: 'Help',helpCenter: 'Help center',+ github: 'GitHub',+ githubTitle: 'Open source on GitHub',login: 'Sign in',startCreate: 'Start creating',profile: 'Account',@@ -70,6 +72,7 @@ export const enShell = {privacy: 'Privacy',contact: 'Contact',help: 'Help',+ github: 'GitHub',links: 'Footer links',},wechatGroup: {diff --git a/frontend/src/i18n/locales/zh/pages.ts b/frontend/src/i18n/locales/zh/pages.tsindex 38b1ba4..4c76083 100644--- a/frontend/src/i18n/locales/zh/pages.ts+++ b/frontend/src/i18n/locales/zh/pages.ts@@ -7,6 +7,7 @@ export const zhPages = {lede: 'AI 漫剧从剧本到分集成片,AI短视频从卖点到分镜成片。一套工作台,两种出片方式。',startCreate: '开始创作',browseTools: '浏览工具',+ githubCta: '开源仓库 · 在 GitHub 查看',products: '主产品',dramaTitle: 'AI 漫剧',dramaFor: '给短剧创作者',@@ -195,6 +196,12 @@ export const zhPages = {href: 'mailto:[email protected]?subject=PRINTFILM%20Enterprise',actionLabel: '发送合作邮件',},+ {+ title: '开源仓库',+ desc: '源码、Issue 与部署说明见 GitHub。欢迎 Star、提问题或贡献。',+ href: 'https://github.com/yi1108/printfilm',+ actionLabel: 'github.com/yi1108/printfilm',+ },],topics: ['账号与登录', '充值与到账', '创作任务异常', '下载与素材', '隐私与账号注销', '其他'],},diff --git a/frontend/src/i18n/locales/zh/shell.ts b/frontend/src/i18n/locales/zh/shell.tsindex 9f44b00..f0fe156 100644--- a/frontend/src/i18n/locales/zh/shell.ts+++ b/frontend/src/i18n/locales/zh/shell.ts@@ -53,6 +53,8 @@ export const zhShell = {pricing: '定价',help: '帮助',helpCenter: '帮助中心',+ github: 'GitHub',+ githubTitle: '开源仓库 · GitHub',login: '登录',startCreate: '开始创作',profile: '个人中心',@@ -69,6 +71,7 @@ export const zhShell = {privacy: '隐私政策',contact: '联系我们',help: '帮助中心',+ github: 'GitHub',links: '页脚链接',},wechatGroup: {diff --git a/frontend/src/lib/siteLinks.ts b/frontend/src/lib/siteLinks.tsnew file mode 100644index 0000000..d3a2462--- /dev/null+++ b/frontend/src/lib/siteLinks.ts@@ -0,0 +1,3 @@+/** 站外固定链接(开源仓库等) */++export const GITHUB_REPO_URL = 'https://github.com/yi1108/printfilm'diff --git a/frontend/src/pages/ContactPage.tsx b/frontend/src/pages/ContactPage.tsxindex 6379888..25e8ae0 100644--- a/frontend/src/pages/ContactPage.tsx+++ b/frontend/src/pages/ContactPage.tsx@@ -1,10 +1,11 @@import { useState, type FormEvent } from 'react'import { Link } from 'react-router-dom'-import { HelpCircle, Mail, Building2 } from 'lucide-react'+import { HelpCircle, Mail, Building2, GitBranch } from 'lucide-react'import AppShell from '../components/layout/AppShell'import { useI18n } from '../i18n'+import { GITHUB_REPO_URL } from '../lib/siteLinks'-const CHANNEL_ICONS = [Mail, HelpCircle, Building2] as const+const CHANNEL_ICONS = [Mail, HelpCircle, Building2, GitBranch] as const/** 联系我们:渠道说明 + 本地反馈表单(引导发邮件) */export default function ContactPage() {@@ -54,7 +55,7 @@ export default function ContactPage() {<div className="pf-contact-channels">{m.contact.channels.map((ch, i) => {const Icon = CHANNEL_ICONS[i] || Mail- const isExternal = ch.href?.startsWith('mailto:')+ const isExternal = Boolean(ch.href && /^(mailto:|https?:)/i.test(ch.href))return (<article key={ch.title} className="pf-contact-card"><span className="pf-contact-card-icon" aria-hidden>@@ -64,7 +65,13 @@ export default function ContactPage() {<p>{ch.desc}</p>{ch.href ? (isExternal ? (- <a className="pf-contact-card-link" href={ch.href}>+ <a+ className="pf-contact-card-link"+ href={ch.href}+ {...(ch.href.startsWith('http')+ ? { target: '_blank', rel: 'noopener noreferrer' }+ : {})}+ >{ch.actionLabel || t('contact.contactAction')}</a>) : (@@ -130,6 +137,9 @@ export default function ContactPage() {<Link to="/privacy">{t('footer.privacy')}</Link><Link to="/help">{t('footer.help')}</Link><Link to="/pricing">{t('contact.pricing')}</Link>+ <a href={GITHUB_REPO_URL} target="_blank" rel="noopener noreferrer">+ {t('footer.github')}+ </a></nav></div></AppShell>diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsxindex 3d099ae..4cf0e9c 100644--- a/frontend/src/pages/HomePage.tsx+++ b/frontend/src/pages/HomePage.tsx@@ -4,10 +4,12 @@ import { Link, useNavigate } from 'react-router-dom'import { ArrowRight } from 'lucide-react'import AppShell from '../components/layout/AppShell'import Button from '../components/ui/Button'+import { IconGithub } from '../components/ui/Icons'import ComingSoon from '../components/ui/ComingSoon'import CreateChoiceModal from '../components/ui/CreateChoiceModal'import { useI18n } from '../i18n'import { getDramaImageStylePreviewUrl } from '../lib/dramaImageStylePreviews'+import { GITHUB_REPO_URL } from '../lib/siteLinks'import { PRODUCT_ICONS, localizeToolDefs } from '../lib/toolsCatalog'export default function HomePage() {@@ -54,6 +56,16 @@ export default function HomePage() {<ArrowRight size={16} strokeWidth={2} aria-hidden /></Button></div>+ <a+ className="pf-land-github"+ href={GITHUB_REPO_URL}+ target="_blank"+ rel="noopener noreferrer"+ >+ <IconGithub size={16} />+ <span>{t('home.githubCta')}</span>+ <ArrowRight size={14} strokeWidth={2.2} aria-hidden />+ </a></div><div className="pf-land-frames" aria-hidden><figure className="pf-land-frame is-drama">@@ -217,6 +229,9 @@ export default function HomePage() {<Link to="/terms">{t('footer.terms')}</Link><Link to="/privacy">{t('footer.privacy')}</Link><Link to="/contact">{t('footer.contact')}</Link>+ <a href={GITHUB_REPO_URL} target="_blank" rel="noopener noreferrer">+ {t('footer.github')}+ </a></nav><p className="pf-land-copy">© {new Date().getFullYear()} PRINTFILM. All rights reserved.</p></footer>diff --git a/frontend/src/pages/LegalDocPage.tsx b/frontend/src/pages/LegalDocPage.tsxindex 09bb30e..cb0c970 100644--- a/frontend/src/pages/LegalDocPage.tsx+++ b/frontend/src/pages/LegalDocPage.tsx@@ -2,6 +2,7 @@ import { Link } from 'react-router-dom'import AppShell from '../components/layout/AppShell'import { useI18n } from '../i18n'import { getLegalDoc, type LegalDoc } from '../lib/legalContent'+import { GITHUB_REPO_URL } from '../lib/siteLinks'/** 渲染单份法律文档正文 */function LegalBody({ doc }: { doc: LegalDoc }) {@@ -42,6 +43,9 @@ function LegalBody({ doc }: { doc: LegalDoc }) {<Link to="/privacy">{t('footer.privacy')}</Link><Link to="/contact">{t('footer.contact')}</Link><Link to="/help">{t('footer.help')}</Link>+ <a href={GITHUB_REPO_URL} target="_blank" rel="noopener noreferrer">+ {t('footer.github')}+ </a></nav></article>)diff --git a/frontend/src/pages/PricingPage.tsx b/frontend/src/pages/PricingPage.tsxindex fd21f0d..a8cdd50 100644--- a/frontend/src/pages/PricingPage.tsx+++ b/frontend/src/pages/PricingPage.tsx@@ -15,6 +15,7 @@ import PricingWalletCard from '../components/billing/PricingWalletCard'import TopupHistoryModal from '../components/billing/TopupHistoryModal'import { api, type BillingSku, type UsageSummary, type Wallet } from '../api'import { useI18n } from '../i18n'+import { GITHUB_REPO_URL } from '../lib/siteLinks'type PayType = 'alipay' | 'wxpay'@@ -326,6 +327,9 @@ export default function PricingPage() {<Link to="/terms">{t('footer.terms')}</Link><Link to="/privacy">{t('footer.privacy')}</Link><Link to="/contact">{t('footer.contact')}</Link>+ <a href={GITHUB_REPO_URL} target="_blank" rel="noopener noreferrer">+ {t('footer.github')}+ </a></nav><p className="pf-pricing-site-copy">© {new Date().getFullYear()} PRINTFILM. All rights reserved.</p></footer>diff --git a/frontend/src/styles/printfilm.css b/frontend/src/styles/printfilm.cssindex 5055f56..2aa7a27 100644--- a/frontend/src/styles/printfilm.css+++ b/frontend/src/styles/printfilm.css@@ -28,7 +28,7 @@padding: 0;}-/* ——— Nav ——— */+/* ??? Nav ??? */.pf-nav {position: sticky;top: 0;@@ -107,6 +107,29 @@color: var(--pf-ink);}+.pf-nav-github {+ display: inline-flex;+ align-items: center;+ gap: 0.4rem;+ height: 32px;+ padding: 0 0.7rem 0 0.55rem;+ border: 1px solid var(--pf-line);+ border-radius: 999px;+ background: #fff;+ color: var(--pf-ink);+ font-size: 0.82rem;+ font-weight: 650;+ text-decoration: none;+ transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;+}++.pf-nav-github:hover {+ border-color: #9fd400;+ background: rgba(182, 255, 0, 0.28);+ box-shadow: 0 0 0 3px rgba(182, 255, 0, 0.18);+ color: var(--pf-ink);+}+.pf-nav-lang {display: inline-flex;align-items: stretch;@@ -194,7 +217,7 @@color: var(--pf-muted);}-/* ——— Workspace home (多产品工作台首屏) ——— */+/* ??? Workspace home (????????) ??? */.pf-ws-hero {position: relative;padding: 2.75rem 0 1.75rem;@@ -367,7 +390,7 @@box-shadow: var(--pf-shadow);}-/* ——— Official landing home ——— */+/* ??? Official landing home ??? */.pf-land-kicker {margin: 0 0 0.55rem;font-family: 'Space Grotesk', 'Noto Sans SC', sans-serif;@@ -432,6 +455,26 @@gap: 0.75rem;}+.pf-land-github {+ display: inline-flex;+ align-items: center;+ gap: 0.45rem;+ margin-top: 1.05rem;+ color: var(--pf-ink);+ font-size: 0.92rem;+ font-weight: 650;+ text-decoration: none;+ border-bottom: 2px solid rgba(182, 255, 0, 0.85);+ padding-bottom: 0.12rem;+ width: fit-content;+ transition: color 0.15s ease, border-color 0.15s ease, gap 0.15s ease;+}++.pf-land-github:hover {+ gap: 0.6rem;+ border-bottom-color: var(--pf-lime);+}+.pf-land-frames {display: grid;grid-template-columns: 1fr 1fr;@@ -813,7 +856,7 @@grid-column: 1 / -1;}-/* ——— Drama list P3 ——— */+/* ??? Drama list P3 ??? */.pf-pill-row {display: flex;flex-wrap: wrap;@@ -2207,7 +2250,7 @@text-decoration: underline;}-/* —— Legal / contact pages —— */+/* ?? Legal / contact pages ?? */.pf-legal-page {width: min(760px, 100%);margin: 0 auto;@@ -2312,7 +2355,7 @@.pf-contact-channels {display: grid;- grid-template-columns: repeat(3, minmax(0, 1fr));+ grid-template-columns: repeat(2, minmax(0, 1fr));gap: 0.85rem;margin-bottom: 2rem;}@@ -2898,7 +2941,7 @@letter-spacing: 0.12em;}-/* ——— Common ——— */+/* ??? Common ??? */.pf-card {background: var(--pf-card);border: 1px solid var(--pf-line);@@ -2936,7 +2979,7 @@color: var(--pf-ink);}-/* 余额不足错误内的快速充值跳转 */+/* ?????????????? */.pf-billing-topup-link {color: var(--pf-accent, #2563eb);font-weight: 600;@@ -3074,7 +3117,7 @@color: #3a4518;}-/* ——— Home ——— */+/* ??? Home ??? */.pf-home-hero {display: grid;grid-template-columns: 1.05fr 0.95fr;@@ -3341,7 +3384,7 @@color: var(--pf-muted);}-/* ——— Create / Style three-column ——— */+/* ??? Create / Style three-column ??? */.pf-create {display: grid;grid-template-columns: 300px 1fr 300px;@@ -3662,7 +3705,7 @@overflow: hidden;}-/* 角色设定 / 成片方式等:直接挂 img 的旧结构 */+/* ???? / ????????? img ???? */.pf-style-opt > img,.pf-style-opt > .ph {width: 100%;@@ -3681,7 +3724,7 @@background: #e8eaee;}-/* 竖屏模板:画框保持网格对齐,画面按真实比例完整显示 */+/* ????????????????????????? */.pf-style-opt.portrait .pf-style-opt-media {background: #0b0d12;}@@ -3891,7 +3934,7 @@border-radius: 3px;}-/* Storyboard:中间列允许收缩,避免分镜表 min-width 把右侧「生成进度」裁切掉 */+/* Storyboard?????????????? min-width ???????????? */.pf-board {display: grid;grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 220px);@@ -3979,7 +4022,7 @@vertical-align: top;}-/* 固定窄列不换行;旁白 / 分镜按比例吃剩余宽度,避免整表横向滑动 */+/* ?????????? / ??????????????????? */.pf-shot-table .col-no {width: 3rem;font-weight: 700;@@ -5281,7 +5324,7 @@ button.pf-shot-editable:disabled {color: var(--pf-muted);}-/* —— Pricing / top-up page —— */+/* ?? Pricing / top-up page ?? */.pf-pricing-page {width: 100%;margin: 0 auto;@@ -5366,7 +5409,7 @@ button.pf-shot-editable:disabled {font-weight: 700;}-/* 深色余额卡片 */+/* ?????? */.pf-pricing-wallet-dark {background: linear-gradient(155deg, #243041 0%, #151c26 52%, #111820 100%);color: #f3f5f8;@@ -5936,7 +5979,7 @@ button.pf-shot-editable:disabled {}}-/* —— Payment QR modal —— */+/* ?? Payment QR modal ?? */.pf-modal-panel.pf-pay-modal {width: min(400px, 94vw);background: #fff;@@ -6217,7 +6260,7 @@ button.pf-shot-editable:disabled {font-size: 0.76rem;}-/* —— Global dialog / modal system —— */+/* ?? Global dialog / modal system ?? */.pf-dialog-root {position: fixed;inset: 0;@@ -6574,7 +6617,7 @@ button.pf-shot-editable:disabled {gap: 0.55rem;}-/* —— Help center —— */+/* ?? Help center ?? */.pf-help-modal.pf-modal-panel--drawer {width: min(440px, 100vw);}@@ -6778,7 +6821,7 @@ button.pf-shot-editable:disabled {}}-/* legacy modal reuse — share new veil look */+/* legacy modal reuse ? share new veil look */.modal-backdrop {position: fixed;inset: 0;@@ -6928,6 +6971,16 @@ button.pf-shot-editable:disabled {display: none;}+ .pf-nav-github span {+ display: none;+ }++ .pf-nav-github {+ width: 32px;+ padding: 0;+ justify-content: center;+ }+.pf-nav-burger {display: inline-flex;}@@ -7078,7 +7131,7 @@ button.pf-shot-editable:disabled {}}-/* ——— WeChat group FAB (全站右下角) ——— */+/* ??? WeChat group FAB (?????) ??? */.pf-wx-fab-root {position: fixed;right: 20px;