Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"main": "src/web-server.js",
"scripts": {
"start": "node src/web-server.js",
"dev": "node src/web-server.js",
"web": "node src/web-server.js",
"vendor:pdfjs": "node scripts/sync-pdfjs-vendor.js",
"vendor:tesseract": "node scripts/sync-tesseract-vendor.js",
Expand Down
13 changes: 9 additions & 4 deletions public/landing-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ function svgIcon(name) {
function buildHero(host, stats) {
const wrapper = document.createElement("section");
wrapper.id = "hero";
// 注意:eyebrow 中的版本号需与 package.json 的 version 保持一致(当前 2.4.0)
wrapper.className = "landing-hero reveal-on-scroll";
wrapper.innerHTML = `
<div class="landing-hero-glow" aria-hidden="true"></div>
<div class="landing-hero-inner">
<span class="landing-hero-eyebrow">v2.3 · local-first 多格式转换工作台</span>
<span class="landing-hero-eyebrow">v2.4 · local-first 多格式转换工作台</span>
<h2 class="landing-hero-title">把文档跨格式转换变成<br/><span class="landing-hero-accent">可验证、可修复、可解释</span>的工程</h2>
<p class="landing-hero-sub">${stats.inputFormats} 种输入 × ${stats.outputFormats} 种输出 · ${stats.recommendedRoutes} 条推荐路径 · Repair Engine(2/7 动作已实现)· 处理阶段禁联网</p>
<p class="landing-hero-sub"><span class="keep-together">${stats.inputFormats} 种输入 × ${stats.outputFormats} 种输出</span> · <span class="keep-together">${stats.recommendedRoutes} 条推荐路径</span> · <span class="keep-together">Repair Engine(2/7 动作已实现)</span> · <span class="keep-together">处理阶段禁联网</span></p>
<div class="landing-hero-actions">
<button type="button" class="primary-button btn-gradient btn-lg" data-landing-cta>立即体验 ${svgIcon("arrow")}</button>
<a href="#formats" class="landing-cta-ghost">查看路径矩阵</a>
Expand Down Expand Up @@ -198,14 +199,18 @@ function buildCta(host) {

function attachRevealObserver(root) {
const targets = root.querySelectorAll(".reveal-on-scroll");
const revealAll = () => targets.forEach((el) => el.classList.add("is-revealed"));
if (window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
targets.forEach((el) => el.classList.add("is-revealed"));
revealAll();
return;
}
if (typeof IntersectionObserver === "undefined") {
targets.forEach((el) => el.classList.add("is-revealed"));
revealAll();
return;
}
// reveal-armed 门控:只有 observer 真正武装成功后,CSS 才允许隐藏未 reveal 的区块。
// 这样 fullPage 截图、打印或 JS 未执行的嵌入环境下,内容始终保持可见。
root.classList.add("reveal-armed");
const observer = new IntersectionObserver((entries) => {
for (const entry of entries) {
if (entry.isIntersecting) {
Expand Down
72 changes: 68 additions & 4 deletions public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ body[data-active-view="workbench"] .is-landing-only { display: none !important;
outline: none;
}

.compact-field select:hover,
.compact-field input:hover {
border-color: var(--border-strong);
}

.compact-field select:focus,
.compact-field input:focus,
#inputContent:focus,
Expand Down Expand Up @@ -584,6 +589,12 @@ body[data-active-view="workbench"] .is-landing-only { display: none !important;
cursor: not-allowed;
}

.ghost-button:active:not(:disabled):not(.disabled),
.mini-button:active:not(:disabled),
.menu-button:active {
transform: translateY(1px);
}

button:disabled {
cursor: not-allowed;
opacity: 0.62;
Expand Down Expand Up @@ -611,6 +622,14 @@ button:disabled {
color: var(--muted-strong);
font-size: 0.8rem;
font-weight: 800;
transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.auxiliary-actions > summary:hover,
.output-settings > summary:hover {
border-color: var(--accent);
background: var(--accent-soft);
color: var(--accent-strong);
}

.auxiliary-menu {
Expand Down Expand Up @@ -680,6 +699,7 @@ button:disabled {
min-width: 32px;
text-align: right;
font-variant-numeric: tabular-nums;
font-weight: 700;
color: var(--muted-strong);
}

Expand Down Expand Up @@ -721,7 +741,7 @@ button:disabled {
}

.progress-track {
height: 4px;
height: 6px;
overflow: hidden;
border-radius: 999px;
background: #e5e9ee;
Expand All @@ -731,7 +751,7 @@ button:disabled {
width: 0;
height: 100%;
border-radius: inherit;
background: var(--accent);
background: linear-gradient(90deg, var(--accent), var(--accent-strong));
transition: width 0.18s ease;
}

Expand Down Expand Up @@ -767,6 +787,12 @@ button:disabled {
box-shadow: var(--shadow-soft);
}

/* 面板层次:外层工作面板投影略深于内层预览卡片 */
.source-pane,
.result-pane {
box-shadow: var(--shadow);
}

.source-pane {
align-self: stretch;
display: flex;
Expand Down Expand Up @@ -806,7 +832,7 @@ button:disabled {
padding: 14px 18px;
background: var(--surface-raised);
cursor: pointer;
transition: border-color 0.15s ease, background-color 0.15s ease;
transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.drop-zone:hover,
Expand All @@ -817,6 +843,12 @@ button:disabled {
box-shadow: 0 0 0 3px var(--focus);
}

.drop-zone:hover .upload-icon,
.drop-zone:focus-visible .upload-icon,
.drop-zone.is-active .upload-icon {
transform: scale(1.08);
}

.upload-icon {
display: grid;
place-items: center;
Expand All @@ -828,6 +860,7 @@ button:disabled {
color: var(--accent-strong);
font-size: 1.1rem;
font-weight: 900;
transition: transform 0.15s ease;
}

.drop-zone strong,
Expand Down Expand Up @@ -907,7 +940,9 @@ button:disabled {
}

.queue-empty {
padding: 14px 12px;
color: var(--muted);
text-align: center;
}

.queue-item {
Expand Down Expand Up @@ -998,6 +1033,11 @@ button:disabled {
line-height: 1.72;
}

#inputContent::placeholder,
#outputEditor::placeholder {
color: #9aa7b4;
}

#inputContent.is-binary-input {
min-height: 118px;
border-bottom: 1px solid var(--border);
Expand Down Expand Up @@ -1063,6 +1103,7 @@ button:disabled {
color: var(--muted-strong);
font-size: 0.8rem;
font-weight: 800;
transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.output-settings-panel {
Expand Down Expand Up @@ -1109,6 +1150,7 @@ button:disabled {
}

.tab-button {
position: relative;
min-width: 76px;
min-height: 44px;
border: 1px solid transparent;
Expand All @@ -1128,13 +1170,29 @@ button:disabled {
background: rgba(255, 255, 255, 0.6);
}

.tab-button:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 2px;
}

.tab-button.is-active {
border-color: var(--border);
background: #ffffff;
color: var(--accent-strong);
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.tab-button.is-active::after {
content: "";
position: absolute;
left: 14px;
right: 14px;
bottom: 4px;
height: 2px;
border-radius: 999px;
background: var(--accent);
}

.toggle-label {
display: inline-flex;
align-items: center;
Expand Down Expand Up @@ -1229,10 +1287,16 @@ button:disabled {

.preview-markdown:empty::before,
.text-output-preview:empty::before {
display: block;
display: grid;
place-items: center;
min-height: 200px;
border: 1.5px dashed var(--border-strong);
border-radius: var(--radius);
background: var(--surface-soft);
color: #94a3b8;
font-family: var(--font-ui);
font-size: 0.88rem;
text-align: center;
}

.preview-markdown:empty::before {
Expand Down
Loading
Loading