Skip to content

AI video skill for Claude Code & Codex — cinematic, editable product promos with Remotion: 124 shot recipe cards, 150 motion previews, beat sync, sound design, Motion Workbench & JianYing (CapCut CN) export.

polish(gallery): 顶栏去同步状态,Showcase 入口移到左下角徽章区 (#53)

Yihaof6cd036e7689
diff --git a/gallery/app.js b/gallery/app.js
index c6f9cfd..4a3db0e 100644
--- a/gallery/app.js
+++ b/gallery/app.js
@@ -51,7 +51,6 @@ const elements = {
previewCount: document.querySelector('#previewCount'),
searchInput: document.querySelector('#searchInput'),
styleCount: document.querySelector('#styleCount'),
- syncStatus: document.querySelector('#syncStatus'),
themeSwitch: document.querySelector('#themeSwitch'),
toast: document.querySelector('#toast'),
selectionBar: document.querySelector('#selectionBar'),
@@ -138,7 +137,6 @@ function applyLanguage() {
});
applyTheme();
updateSelectionBar();
- setSyncStatus('ready', state.hasLoaded ? text('synced') : text('scanning'));
}
function setFollowMenuOpen(open) {
@@ -332,11 +330,6 @@ function observeMedia() {
document.querySelectorAll('.lazy-media').forEach((media) => mediaObserver.observe(media));
}
-function setSyncStatus(mode, label) {
- elements.syncStatus.dataset.state = mode;
- elements.syncStatus.lastElementChild.textContent = label;
-}
-
let toastTimer;
function showToast(message) {
elements.toast.textContent = message;
@@ -348,7 +341,6 @@ function showToast(message) {
}
async function loadLibrary({silent = false} = {}) {
- if (!silent) setSyncStatus('loading', text('scanning'));
try {
const response = await fetch(libraryEndpoint, {cache: 'no-store'});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
@@ -362,7 +354,6 @@ async function loadLibrary({silent = false} = {}) {
elements.styleCount.textContent = library.stats.styleCount;
elements.previewCount.textContent = library.stats.previewCount;
renderCategoryCounts();
- setSyncStatus('ready', text('synced'));
if (changed) {
render();
showToast(text('updated'));
@@ -371,7 +362,6 @@ async function loadLibrary({silent = false} = {}) {
}
} catch (error) {
console.error(error);
- setSyncStatus('error', text('failed'));
if (!state.hasLoaded) {
elements.library.innerHTML = `
<div class="load-error">
diff --git a/gallery/index.html b/gallery/index.html
index 5cac0c0..22d0cc3 100644
--- a/gallery/index.html
+++ b/gallery/index.html
@@ -464,7 +464,7 @@
statSamples: '动态样片',
statTemplate: '现成模板',
footer: 'Apache-2.0 · 基于 Remotion 构建 · ',
- navShowcase: '用户作品',
+ navShowcase: '社区作品展示',
},
};
diff --git a/gallery/library.html b/gallery/library.html
index 080fc53..f880f25 100644
--- a/gallery/library.html
+++ b/gallery/library.html
@@ -62,7 +62,6 @@
<span>VIDEO SHOTCRAFT</span>
</a>
<div class="topbar-actions">
- <a class="topbar-link" href="./showcase.html" data-i18n="navShowcase">Showcase</a>
<div class="theme-switch" id="themeSwitch" role="group" aria-label="Page theme">
<button type="button" data-theme="system" aria-pressed="true">Auto</button>
<button type="button" data-theme="light" aria-pressed="false">Light</button>
@@ -72,10 +71,6 @@
<button type="button" data-language="zh" aria-pressed="false">中文</button>
<button type="button" data-language="en" aria-pressed="true">EN</button>
</div>
- <div class="sync-status" id="syncStatus" aria-live="polite">
- <span class="sync-indicator" aria-hidden="true"></span>
- <span>Scanning</span>
- </div>
</div>
</header>
@@ -134,6 +129,12 @@
</span>
<span class="social-badge-name" data-i18n="starGitHubLabel">Star on GitHub</span>
</a>
+ <a class="social-badge" data-platform="showcase" href="./showcase.html" data-i18n-aria-label="navShowcaseAria" aria-label="Browse community showcase videos">
+ <span class="social-badge-mark" aria-hidden="true">
+ <svg viewBox="0 0 24 24" focusable="false"><path d="M8 5.5v13a1 1 0 0 0 1.52.86l10.5-6.5a1 1 0 0 0 0-1.72L9.52 4.64A1 1 0 0 0 8 5.5Z"/></svg>
+ </span>
+ <span class="social-badge-name" data-i18n="navShowcase">Showcase</span>
+ </a>
</div>
</aside>
diff --git a/gallery/showcase.js b/gallery/showcase.js
index 2c4a0ec..6b9fb2c 100644
--- a/gallery/showcase.js
+++ b/gallery/showcase.js
@@ -18,11 +18,11 @@ const SHOWCASE_L10N = {
fullscreen: 'Fullscreen',
},
zh: {
- documentTitle: 'Showcase 用户作品 | video-shotcraft',
+ documentTitle: '社区作品展示 | video-shotcraft',
skip: '跳到作品列表',
brandHome: '回到主页',
navLibrary: '镜头库',
- title: '用户作品 Showcase',
+ title: '社区作品展示',
intro: '社区用 video-shotcraft 做出的产品视频。每张卡片都带作者的社交账号——投稿你的成片,让观众找到你。',
submitCta: '投稿我的作品',
empty: '还没有投稿——来做第一个被展示的作品吧。',
diff --git a/gallery/styles.css b/gallery/styles.css
index cd45d9a..95992a0 100644
--- a/gallery/styles.css
+++ b/gallery/styles.css
@@ -148,18 +148,12 @@ a { color: inherit; }
:root[data-theme="dark"] .brand-mark-dark { display: block; }
.topbar-actions,
-.sync-status,
.language-switch,
.theme-switch {
display: flex;
align-items: center;
}
.topbar-actions { gap: 0.55rem; }
-.sync-status { gap: 0.5rem; color: var(--muted); font-size: 0.74rem; }
-.sync-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
-.sync-status[data-state="loading"] .sync-indicator { animation: pulse 1s ease-in-out infinite; }
-.sync-status[data-state="error"] { color: var(--danger); }
-.sync-status[data-state="error"] .sync-indicator { background: var(--danger); }
.language-switch,
.theme-switch {
@@ -306,18 +300,21 @@ main {
margin-inline: auto;
}
+/* 图标统一左对齐成一列:徽章整体居中时标签长短不一,图标会错位 */
.sidebar-social > .social-badge {
width: min(100%, 184px);
margin-inline: auto;
- justify-content: center;
+ justify-content: flex-start;
+ padding-left: 0.55rem;
}
.follow-trigger {
width: 100%;
- justify-content: center;
+ justify-content: flex-start;
+ padding-left: 0.55rem;
position: relative;
font: inherit;
- text-align: center;
+ text-align: left;
cursor: pointer;
}
@@ -926,7 +923,6 @@ kbd { padding: 0.2rem 0.34rem; border: 1px solid var(--line); border-radius: 5px
rather than covering the "copy selected" button it just acted on */
.toast.has-selection-bar { bottom: 5.2rem; }
-@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.75); } }
@keyframes shimmer { to { background-position-x: -220%; } }
@@ -980,7 +976,6 @@ kbd { padding: 0.2rem 0.34rem; border: 1px solid var(--line); border-radius: 5px
.brand-mark { width: 26px; height: 26px; }
.topbar-actions { gap: 0.55rem; }
.theme-switch button { padding-inline: 0.42rem; }
- .sync-status span:last-child { display: none; }
.intro { padding: 1.5rem 0 1.5rem; }
h1 { font-size: 2.15rem; }
.stats { width: 100%; justify-content: space-between; }
diff --git a/gallery/translations.js b/gallery/translations.js
index 40939b5..8c2a792 100644
--- a/gallery/translations.js
+++ b/gallery/translations.js
@@ -66,12 +66,13 @@ window.GALLERY_I18N = {
redNoteName: '小红书',
starGitHub: '在 GitHub 为 video-shotcraft 加星',
starAction: 'Star',
- starGitHubLabel: '在 GitHub 加星',
+ starGitHubLabel: '收藏 GitHub',
themeLabel: '页面主题',
themeSystem: '系统',
themeLight: '浅色',
themeDark: '深色',
- navShowcase: '用户作品',
+ navShowcase: '社区作品展示',
+ navShowcaseAria: '浏览社区作品展示',
},
en: {
title: 'Shot Recipes & Motion Samples',
@@ -145,6 +146,7 @@ window.GALLERY_I18N = {
themeLight: 'Light',
themeDark: 'Dark',
navShowcase: 'Showcase',
+ navShowcaseAria: 'Browse community showcase videos',
},
},
cardsZh: {