@namewta/skills-hub 0.1.49 → 0.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/THIRD_PARTY_NOTICES.md +19 -7
- package/cli.mjs +2 -2
- package/install.mjs +11 -4
- package/package.json +1 -1
- package/scripts/persistence/home.md +1 -1
- package/skills/dev/dev-build/SKILL.md +2 -0
- package/skills/dev/dev-build/references/implement-request.md +7 -2
- package/skills/dev/dev-formal-verify/SKILL.md +2 -1
- package/skills/dev/dev-formal-verify/references/create-check.md +3 -1
- package/skills/dev/dev-formal-verify/references/example.md +1 -1
- package/skills/dev/dev-formal-verify/references/tool-choice.md +1 -1
- package/skills/dev/dev-help/references/capabilities.md +6 -6
- package/skills/dev/dev-help/references/guide-verification.md +7 -1
- package/skills/dev/dev-help/references/help-method.md +7 -1
- package/skills/dev/dev-issue/SKILL.md +1 -0
- package/skills/dev/dev-issue/references/github-operations.md +8 -0
- package/skills/dev/dev-plan/references/plan-template.md +1 -0
- package/skills/dev/dev-plan/references/vertical-slicing.md +2 -0
- package/skills/dev/dev-pr/references/pull-request-evidence.md +2 -0
- package/skills/dev/dev-review/references/host-parity.md +12 -0
- package/skills/dev/dev-review/references/review-baseline.md +2 -0
- package/skills/dev/dev-setup/references/formal-options.md +1 -1
- package/skills/dev/dev-statechart/SKILL.md +17 -19
- package/skills/dev/dev-statechart/agents/openai.yaml +3 -3
- package/skills/dev/dev-statechart/assets/theme.css +135 -0
- package/skills/dev/dev-statechart/references/lean-proof.md +47 -0
- package/skills/dev/dev-statechart/references/render.md +15 -83
- package/skills/dev/dev-statechart/references/runtime.md +21 -1
- package/skills/dev/dev-statechart/scripts/lean/backends/lemma-chart.mjs +285 -0
- package/skills/dev/dev-statechart/scripts/lean/backends/mermaid.mjs +174 -0
- package/skills/dev/dev-statechart/scripts/lean/backends/proof-chart.mjs +540 -0
- package/skills/dev/dev-statechart/scripts/lean/backends/report.mjs +242 -0
- package/skills/dev/dev-statechart/scripts/lean/frontends/facts.mjs +234 -0
- package/skills/dev/dev-statechart/scripts/lean/frontends/view.mjs +217 -0
- package/skills/dev/dev-statechart/scripts/lean/ir.mjs +226 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/attribute.mjs +148 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/blocks.mjs +32 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/budget.mjs +167 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/check.mjs +70 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/contract.mjs +160 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/fold.mjs +206 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/inline.mjs +84 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/mark.mjs +432 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/reduce.mjs +73 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/trust.mjs +111 -0
- package/skills/dev/dev-statechart/scripts/lean/passes/view-lemmas.mjs +155 -0
- package/skills/dev/dev-statechart/scripts/lean/pipeline.mjs +164 -0
- package/skills/dev/dev-statechart/scripts/lean/run.mjs +168 -0
- package/skills/dev/dev-statechart/scripts/statechart.mjs +42 -23
- package/skills/dev/dev-statechart/scripts/worker.mjs +33 -7
- package/skills/dev/dev-ui-design/SKILL.md +2 -2
- package/skills/dev/dev-ui-design/references/interaction-review.md +9 -0
- package/skills/dev/dev-verify/SKILL.md +1 -1
- package/skills/dev/dev-verify/references/evidence-storage.md +12 -0
- package/skills/dev/dev-workflow/SKILL.md +6 -6
- package/skills/dev/dev-workflow/references/method-handoffs.md +7 -1
- package/skills/dev/dev-writing/SKILL.md +2 -0
- package/skills/dev/dev-writing/references/library-docs.md +37 -0
- package/skills/home/home-doctor/references/diagnosis.md +2 -2
- package/skills/home/home-doctor/scripts/doctor.mjs +68 -38
- package/skills/home/home-project-changelog/SKILL.md +7 -7
- package/skills/home/home-project-changelog/assets/project-changelog.example.json +188 -0
- package/skills/home/home-project-changelog/assets/project-changelog.schema.json +156 -0
- package/skills/home/home-project-changelog/assets/worker-brief.md +1 -1
- package/skills/home/home-project-changelog/references/git-ranges.md +2 -2
- package/skills/home/home-project-changelog/references/schema.md +61 -0
- package/skills/home/home-project-changelog/references/tools.md +28 -22
- package/skills/home/home-project-changelog/references/workflow.md +12 -9
- package/skills/home/home-project-changelog/references/writing.md +5 -3
- package/skills/home/home-project-changelog/scripts/changelog.mjs +42 -38
- package/skills/home/home-project-changelog/scripts/contract.mjs +40 -3
- package/skills/home/home-project-changelog/scripts/legacy-markdown.mjs +116 -0
- package/skills/home/home-project-changelog/scripts/migrate.mjs +122 -0
- package/skills/home/home-project-changelog/scripts/revision.mjs +2 -196
- package/skills/home/home-project-changelog/scripts/storage.mjs +120 -125
- package/skills/home/home-project-changelog/scripts/summary.mjs +0 -60
- package/skills/home/home-route/SKILL.md +2 -2
- package/skills/home/home-route/references/routing.md +3 -1
- package/skills/home/home-route/scripts/route.mjs +79 -11
- package/skills/home/home-setup/SKILL.md +2 -1
- package/skills/home/home-setup/assets/repos.schema.json +10 -0
- package/skills/home/home-setup/references/registry.md +18 -1
- package/skills/home/home-setup/scripts/registry.mjs +67 -7
- package/skills/home/home-website/SKILL.md +13 -9
- package/skills/home/home-website/assets/website/scripts/inputs.mjs +143 -128
- package/skills/home/home-website/assets/website/scripts/render.mjs +8 -6
- package/skills/home/home-website/assets/website/scripts/site.mjs +21 -10
- package/skills/home/home-website/assets/website/site/public/home-assets/app.js +81 -34
- package/skills/home/home-website/assets/website/site/public/home-assets/site.css +92 -70
- package/skills/home/home-website/assets/website/site/templates/favicon.png +0 -0
- package/skills/home/home-website/assets/website/site/templates/layout.mjs +13 -10
- package/skills/home/home-website/assets/website/site/templates/ledger.mjs +51 -46
- package/skills/home/home-website/assets/website/site/templates/model.mjs +58 -14
- package/skills/home/home-website/assets/website/site/templates/pages.mjs +28 -30
- package/skills/home/home-website/assets/website/site/templates/project-logs.mjs +3 -107
- package/skills/home/home-website/assets/website/site.config.json +1 -1
- package/skills/home/home-website/references/website.md +64 -46
- package/skills/home/home-website/scripts/activate.mjs +106 -0
- package/skills/home/home-website/scripts/init.mjs +98 -11
- package/skills/home/home-workflow/SKILL.md +6 -4
- package/skills/system/system-clash-proxy-config/SKILL.md +21 -0
- package/skills/system/system-clash-proxy-config/agents/openai.yaml +4 -0
- package/skills/system/system-clash-proxy-config/assets/clash-override.js +328 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/browser-privacy.md +2 -2
- package/skills/system/{system-config → system-clash-proxy-config}/references/changes.md +2 -2
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/clash-verge.md +1 -1
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/diagnosis.md +1 -1
- package/skills/system/system-clash-proxy-config/references/dns-workflow.md +42 -0
- package/skills/system/system-clash-proxy-config/references/egress-macos.md +31 -0
- package/skills/system/system-clash-proxy-config/references/egress-windows.md +37 -0
- package/skills/system/system-clash-proxy-config/references/egress.md +12 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/flclash.md +1 -1
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/index.md +1 -1
- package/skills/system/{system-clash-tun-egress → system-clash-proxy-config}/references/linux-cutover.md +29 -0
- package/skills/system/system-clash-proxy-config/references/locale-workflow.md +9 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/mihomo.md +1 -25
- package/skills/system/system-clash-proxy-config/references/session.md +34 -0
- package/skills/system/system-clash-proxy-config/references/subscription.md +29 -0
- package/skills/system/{system-proxy → system-clash-proxy-config}/references/troubleshooting.md +7 -7
- package/skills/system/{system-clash-tun-egress → system-clash-proxy-config}/references/verification.md +2 -0
- package/skills/system/system-clash-proxy-config/scripts/prepare-session.mjs +155 -0
- package/skills/system/system-clash-proxy-config/scripts/run-session.mjs +138 -0
- package/skills/system/system-inspect/SKILL.md +1 -1
- package/skills/system/system-inspect/references/health-audit.md +1 -1
- package/upstream-skills/zh-archify/SKILL.md +11 -11
- package/upstream-skills/zh-archify/assets/template.html +6 -3
- package/upstream-skills/zh-archify/bin/archify.mjs +67 -4
- package/upstream-skills/zh-archify/modules/code-analysis/ARCHITECTURE.md +7 -1
- package/upstream-skills/zh-archify/modules/code-analysis/bin/analyze-run.mjs +2 -1
- package/upstream-skills/zh-archify/modules/code-analysis/bin/check.mjs +29 -15
- package/upstream-skills/zh-archify/modules/code-analysis/bin/drift.mjs +3 -3
- package/upstream-skills/zh-archify/modules/code-analysis/bin/prepare.mjs +5 -6
- package/upstream-skills/zh-archify/modules/code-analysis/bin/serve.mjs +66 -36
- package/upstream-skills/zh-archify/modules/code-analysis/bin/verify-change.mjs +43 -13
- package/upstream-skills/zh-archify/modules/code-analysis/docs/TECH-GUIDE.md +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/docs/USAGE.md +37 -4
- package/upstream-skills/zh-archify/modules/code-analysis/extract/ts/functions.mjs +7 -5
- package/upstream-skills/zh-archify/modules/code-analysis/extract/ts/index.mjs +4 -1
- package/upstream-skills/zh-archify/modules/code-analysis/extract/ts/snapshot-host.mjs +9 -0
- package/upstream-skills/zh-archify/modules/code-analysis/lib/architecture-drift.mjs +28 -7
- package/upstream-skills/zh-archify/modules/code-analysis/lib/drift-capture.mjs +4 -3
- package/upstream-skills/zh-archify/modules/code-analysis/lib/git-sources.mjs +5 -3
- package/upstream-skills/zh-archify/modules/code-analysis/lib/output.mjs +272 -0
- package/upstream-skills/zh-archify/modules/code-analysis/lib/pull-request.mjs +34 -4
- package/upstream-skills/zh-archify/modules/code-analysis/lib/task.mjs +4 -2
- package/upstream-skills/zh-archify/modules/code-analysis/lib/verification-context.mjs +13 -1
- package/upstream-skills/zh-archify/modules/code-analysis/lib/verification-history.mjs +112 -0
- package/upstream-skills/zh-archify/modules/code-analysis/lib/verification.mjs +6 -2
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/atlas.mjs +71 -5
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/atlas.css +16 -2
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/atlas.js +121 -5
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/atlas3d.js +38 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/overlay.css +14 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/overlay.js +187 -27
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/client/verification.js +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/i18n.mjs +9 -0
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/inject.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/page.mjs +11 -6
- package/upstream-skills/zh-archify/modules/code-analysis/overlay/pull-request.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/schemas/ai-task.schema.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/atlas.test.mjs +88 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/duplicates.test.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/test/external-workflow.test.mjs +1 -1
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/boundary.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/boundary.task.missing.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/complexity.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/complexity.task.valid.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/import-cycle.task.changed.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/import-cycle.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/fixtures/tasks/module-cycle.task.json +1 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/function-source-range.test.mjs +10 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/output-recovery.test.mjs +626 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/pull-request.test.mjs +98 -2
- package/upstream-skills/zh-archify/modules/code-analysis/test/review.test.mjs +37 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/source-panel.test.mjs +2 -1
- package/upstream-skills/zh-archify/modules/code-analysis/test/task.test.mjs +3 -2
- package/upstream-skills/zh-archify/modules/code-analysis/test/verification-history.test.mjs +216 -0
- package/upstream-skills/zh-archify/modules/code-analysis/test/verification.test.mjs +122 -0
- package/upstream-skills/zh-archify/package-lock.json +2 -2
- package/upstream-skills/zh-archify/package.json +1 -1
- package/upstream-skills/zh-archify/references/authoring-contract.md +2 -0
- package/upstream-skills/zh-archify/references/explainer-authoring.md +1 -1
- package/upstream-skills/zh-archify/renderers/architecture/render-architecture.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/class/render-class.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/dataflow/render-dataflow.mjs +2 -1
- package/upstream-skills/zh-archify/renderers/erd/render-erd.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/lifecycle/render-lifecycle.mjs +4 -2
- package/upstream-skills/zh-archify/renderers/sequence/render-sequence.mjs +4 -2
- package/upstream-skills/zh-archify/renderers/shared/cli.mjs +7 -1
- package/upstream-skills/zh-archify/renderers/timeline/render-timeline.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/tree/render-tree.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/waterfall/render-waterfall.mjs +1 -0
- package/upstream-skills/zh-archify/renderers/workflow/render-workflow.mjs +3 -2
- package/upstream-skills/zh-archify/renderers/workflow/workflow-compiler.mjs +68 -7
- package/upstream-skills/zh-archify/skill-release.json +1 -1
- package/upstream-skills/zh-modern-web-guidance/SKILL.md +4 -11
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/language-detection.md +20 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/language-model.md +22 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/prompt-api.md +22 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/summarizer.md +20 -0
- package/upstream-skills/zh-modern-web-guidance/guides/built-in-ai/translator.md +22 -0
- package/upstream-skills/zh-modern-web-guidance/guides/performance/custom-ml-model-inference.md +342 -0
- package/upstream-skills/zh-modern-web-guidance/guides/performance/data-parallel-computation.md +337 -0
- package/upstream-skills/zh-modern-web-guidance/guides/performance/improve-next-page-load-performance.md +4 -1
- package/upstream-skills/zh-modern-web-guidance/guides/performance/large-scene-rendering.md +350 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-atoms/position-aware-tooltips.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-atoms/viewport-aware-dropdowns.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/animate-to-from-top-layer.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/declarative-dialog-popover-control.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/scroll-target-on-load.md +29 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-behaviors/sortable-table.md +1 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/app-menus.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/context-menu.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/copy-button.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/dialog.md +10 -1
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/hovercard.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/menu.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/navbar.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/persistent-app-tours.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/persistent-toast-notifications.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/ui-components/toolbar.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/user-experience/content-first-noise-reduction.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/user-experience/natural-interactions.md +9 -0
- package/upstream-skills/zh-modern-web-guidance/guides/webmcp/agentic-javascript-tools.md +27 -0
- package/skills/home/home-project-changelog/assets/project-changelog.md +0 -35
- package/skills/system/system-clash-tun-egress/SKILL.md +0 -22
- package/skills/system/system-clash-tun-egress/agents/openai.yaml +0 -4
- package/skills/system/system-config/SKILL.md +0 -37
- package/skills/system/system-config/agents/openai.yaml +0 -4
- package/skills/system/system-config/references/ai-cli-config.md +0 -75
- package/skills/system/system-config/references/ai-cli-optimization.md +0 -37
- package/skills/system/system-config/references/index.md +0 -12
- package/skills/system/system-config/references/locale-workflow.md +0 -33
- package/skills/system/system-config/references/locale.md +0 -50
- package/skills/system/system-proxy/SKILL.md +0 -40
- package/skills/system/system-proxy/agents/openai.yaml +0 -4
- package/skills/system/system-proxy/assets/protected-rules.yaml +0 -7
- package/skills/system/system-proxy/references/dns-workflow.md +0 -152
- /package/skills/system/{system-config → system-clash-proxy-config}/assets/configuration.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/assets/network.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/acceptance.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/dns-fields.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/dns-misconceptions.md +0 -0
- /package/skills/system/{system-clash-tun-egress/references/troubleshooting.md → system-clash-proxy-config/references/egress-troubleshooting.md} +0 -0
- /package/skills/system/{system-config → system-clash-proxy-config}/references/locale-linux.md +0 -0
- /package/skills/system/{system-config → system-clash-proxy-config}/references/locale-macos.md +0 -0
- /package/skills/system/{system-config → system-clash-proxy-config}/references/locale-windows.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/network-performance.md +0 -0
- /package/skills/system/{system-clash-tun-egress → system-clash-proxy-config}/references/nodes-and-dns.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/platform-dns.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/platforms.md +0 -0
- /package/skills/system/{system-proxy → system-clash-proxy-config}/references/tun-dns.md +0 -0
|
@@ -77,27 +77,50 @@
|
|
|
77
77
|
const input = one('#timeline-query');
|
|
78
78
|
if (!input) return;
|
|
79
79
|
const project = one('#timeline-project');
|
|
80
|
-
const
|
|
80
|
+
const range = one('#timeline-window');
|
|
81
81
|
const category = one('#timeline-category');
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
const reset = one('#reset-timeline');
|
|
83
|
+
const fields = [['repo', project], ['window', range], ['category', category], ['q', input]].filter(([, field]) => field);
|
|
84
|
+
const number = value => value == null ? '未核实' : value.toLocaleString('zh-CN');
|
|
85
|
+
const lineMetrics = ['linesAdded', 'linesDeleted'];
|
|
86
|
+
function statFields(container) {
|
|
87
|
+
return {
|
|
88
|
+
metrics: new Map([...container.querySelectorAll('[data-metric]')].map(element => [element.dataset.metric, element])),
|
|
89
|
+
categories: [...container.querySelectorAll('[data-category-count]')],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
const windows = all('.ledger-window').map(section => {
|
|
93
|
+
const header = section.querySelector('header');
|
|
94
|
+
const groups = [...section.querySelectorAll('.ledger-group')].map(group => ({
|
|
89
95
|
group,
|
|
90
96
|
id: group.dataset.ledgerRepo,
|
|
91
97
|
projectText: normalize(group.dataset.ledgerRepo + ' ' + group.dataset.repoName),
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
metrics: JSON.parse(group.dataset.totals),
|
|
99
|
+
stats: statFields(group.querySelector('summary')),
|
|
100
|
+
rows: [...group.querySelectorAll('.ledger-entry')].map(row => ({
|
|
94
101
|
row,
|
|
95
102
|
category: row.dataset.kind,
|
|
96
|
-
text: normalize(row.textContent),
|
|
103
|
+
text: normalize(row.textContent + ' ' + (row.dataset.search ?? '')),
|
|
97
104
|
task: row.hasAttribute('data-entry'),
|
|
98
105
|
})),
|
|
99
|
-
}))
|
|
100
|
-
|
|
106
|
+
}));
|
|
107
|
+
const toggle = header?.querySelector('[data-window-toggle]');
|
|
108
|
+
function updateToggle() {
|
|
109
|
+
if (!toggle) return;
|
|
110
|
+
const allOpen = groups.every(({group}) => group.hidden || group.open);
|
|
111
|
+
toggle.textContent = allOpen ? '收起全部' : '展开全部';
|
|
112
|
+
toggle.setAttribute('aria-label', toggle.dataset.windowLabel + ',' + toggle.textContent + '项目任务');
|
|
113
|
+
toggle.setAttribute('aria-expanded', String(allOpen));
|
|
114
|
+
}
|
|
115
|
+
toggle?.addEventListener('click', () => {
|
|
116
|
+
const shouldOpen = groups.some(({group}) => !group.hidden && !group.open);
|
|
117
|
+
for (const {group} of groups) if (!group.hidden) group.open = shouldOpen;
|
|
118
|
+
updateToggle();
|
|
119
|
+
});
|
|
120
|
+
for (const {group} of groups) group.addEventListener('toggle', updateToggle);
|
|
121
|
+
return {section, key:section.dataset.window, groups, stats:header && statFields(header), updateToggle};
|
|
122
|
+
});
|
|
123
|
+
let savedOpen = null;
|
|
101
124
|
|
|
102
125
|
function restore() {
|
|
103
126
|
const params = new URL(location.href).searchParams;
|
|
@@ -107,14 +130,25 @@
|
|
|
107
130
|
}
|
|
108
131
|
}
|
|
109
132
|
|
|
133
|
+
function updateStats(stats, counts, values) {
|
|
134
|
+
stats.metrics.get('changes').textContent = number([...counts.values()].reduce((total, count) => total + count, 0));
|
|
135
|
+
for (const key of lineMetrics) stats.metrics.get(key).textContent = number(values[key]);
|
|
136
|
+
for (const element of stats.categories) element.textContent = number(counts.get(element.dataset.categoryCount) ?? 0);
|
|
137
|
+
}
|
|
138
|
+
|
|
110
139
|
function render() {
|
|
111
140
|
const tokens = normalize(input.value).split(/\s+/u).filter(Boolean);
|
|
141
|
+
const filtering = Boolean(project?.value || range.value || category.value || tokens.length);
|
|
142
|
+
if (filtering && !savedOpen) savedOpen = new Map(windows.flatMap(entry =>
|
|
143
|
+
entry.groups.map(({group}) => [group, group.open])));
|
|
112
144
|
const projects = new Set();
|
|
113
|
-
let
|
|
114
|
-
for (const entry of
|
|
115
|
-
let groups = 0, entries = 0
|
|
145
|
+
let visibleWindows = 0, tasks = 0;
|
|
146
|
+
for (const entry of windows) {
|
|
147
|
+
let groups = 0, entries = 0;
|
|
148
|
+
const totals = Object.fromEntries(lineMetrics.map(key => [key, 0]));
|
|
149
|
+
const windowCounts = new Map();
|
|
116
150
|
for (const group of entry.groups) {
|
|
117
|
-
const matchesScope = (!project?.value || project.value === group.id) && (!
|
|
151
|
+
const matchesScope = (!project?.value || project.value === group.id) && (!range.value || range.value === entry.key);
|
|
118
152
|
const visible = group.rows.filter(item => {
|
|
119
153
|
item.row.hidden = !matchesScope || (category.value !== '' && category.value !== item.category)
|
|
120
154
|
|| !tokens.every(token => item.text.includes(token) || group.projectText.includes(token));
|
|
@@ -122,33 +156,43 @@
|
|
|
122
156
|
});
|
|
123
157
|
const commitOnly = !group.rows.length && !category.value && tokens.every(token => group.projectText.includes(token));
|
|
124
158
|
group.group.hidden = !matchesScope || (!visible.length && !commitOnly);
|
|
159
|
+
if (filtering) group.group.open = !group.group.hidden && visible.length > 0;
|
|
160
|
+
else if (savedOpen) group.group.open = savedOpen.get(group.group);
|
|
125
161
|
if (group.group.hidden) continue;
|
|
126
162
|
groups++;
|
|
127
163
|
projects.add(group.id);
|
|
128
|
-
|
|
129
|
-
|
|
164
|
+
const counts = new Map();
|
|
165
|
+
for (const item of visible) {
|
|
166
|
+
if (!item.task) continue;
|
|
167
|
+
entries++;
|
|
168
|
+
counts.set(item.category, (counts.get(item.category) ?? 0) + 1);
|
|
169
|
+
windowCounts.set(item.category, (windowCounts.get(item.category) ?? 0) + 1);
|
|
170
|
+
}
|
|
171
|
+
updateStats(group.stats, counts, group.metrics);
|
|
172
|
+
for (const key of lineMetrics) {
|
|
173
|
+
const sum = totals[key] + group.metrics[key];
|
|
174
|
+
totals[key] = totals[key] == null || group.metrics[key] == null || !Number.isSafeInteger(sum) ? null : sum;
|
|
175
|
+
}
|
|
130
176
|
}
|
|
131
177
|
entry.section.hidden = groups === 0;
|
|
178
|
+
entry.updateToggle();
|
|
132
179
|
if (!groups) continue;
|
|
133
|
-
|
|
134
|
-
else dated++;
|
|
180
|
+
visibleWindows++;
|
|
135
181
|
tasks += entries;
|
|
136
|
-
|
|
137
|
-
? `所示项目共 ${number(commits)} 次 Git 提交`
|
|
138
|
-
: `${number(commits)} 次 Git 提交`;
|
|
139
|
-
entry.count.textContent = `${number(entries)} 项任务 · ${commitLabel}`;
|
|
182
|
+
if (entry.stats) updateStats(entry.stats, windowCounts, totals);
|
|
140
183
|
}
|
|
141
|
-
|
|
184
|
+
if (!filtering) savedOpen = null;
|
|
185
|
+
reset.hidden = !filtering;
|
|
142
186
|
const projectCount = project ? ` · ${projects.size} 个项目` : '';
|
|
143
|
-
one('#timeline-count').textContent = `${
|
|
144
|
-
one('#timeline-empty').hidden =
|
|
187
|
+
one('#timeline-count').textContent = `${visibleWindows} 个区间${projectCount} · ${number(tasks)} 项任务`;
|
|
188
|
+
one('#timeline-empty').hidden = visibleWindows > 0;
|
|
145
189
|
}
|
|
146
190
|
|
|
147
191
|
for (const [key, field] of fields) field.addEventListener(field === input ? 'input' : 'change', () => {
|
|
148
192
|
setQueryParam(key, field.value);
|
|
149
193
|
render();
|
|
150
194
|
});
|
|
151
|
-
|
|
195
|
+
reset.addEventListener('click', () => {
|
|
152
196
|
for (const [key, field] of fields) {
|
|
153
197
|
field.value = '';
|
|
154
198
|
setQueryParam(key, '');
|
|
@@ -198,13 +242,16 @@
|
|
|
198
242
|
link.href = routeHref(root + item.url);
|
|
199
243
|
link.target = '_self';
|
|
200
244
|
const label = document.createElement('small');
|
|
201
|
-
|
|
245
|
+
const task = item.kind === '变更' || item.kind === '任务';
|
|
246
|
+
label.textContent = task ? item.name : item.kind + ' · ' + item.id;
|
|
202
247
|
const title = document.createElement('strong');
|
|
203
248
|
addHighlighted(title,item.title,tokens[0]);
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
249
|
+
link.append(label,title);
|
|
250
|
+
if (!task && item.text) {
|
|
251
|
+
const desc = document.createElement('span');
|
|
252
|
+
addHighlighted(desc,item.text,tokens[0]);
|
|
253
|
+
link.append(desc);
|
|
254
|
+
}
|
|
208
255
|
results.append(link);
|
|
209
256
|
}
|
|
210
257
|
results.scrollTop = 0;
|
|
@@ -44,7 +44,7 @@ h1, h2, h3 { color: var(--ink); }
|
|
|
44
44
|
.main-content { min-height: calc(100vh - 189px); padding-block: 32px 62px; }
|
|
45
45
|
:where(h2,article,section,[id]) { scroll-margin-top: 92px; }
|
|
46
46
|
.masthead { position: sticky; z-index: 10; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
|
|
47
|
-
.mast-inner, .brand, .main-nav, .mast-tools, .search-open, .icon-button, .text-link, .button-row, .primary-button, .secondary-button, .section-heading, .hero-date, .
|
|
47
|
+
.mast-inner, .brand, .main-nav, .mast-tools, .search-open, .icon-button, .text-link, .button-row, .primary-button, .secondary-button, .section-heading, .hero-date, .card-top, .card-foot, .project-chip, .footer-inner, .field, .filter-pills, .period-heading, .detail-intro, .crumbs { display: flex; align-items: center; }
|
|
48
48
|
.mast-inner { height: 70px; gap: clamp(20px, 4vw, 62px); }
|
|
49
49
|
.brand { color: var(--ink); gap: 12px; white-space: nowrap; font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -.055em; }
|
|
50
50
|
.brand-stamp { position: relative; display: inline-block; width: 32px; height: 32px; border-radius: 9px; background: #162840; }
|
|
@@ -76,7 +76,7 @@ kbd { font: 11px/1.4 var(--mono); border: 1px solid var(--line); border-radius:
|
|
|
76
76
|
.sym-activity::after { content:""; display:block; width:3px; height:6px; position:absolute; bottom:2px; left:1px; background:currentColor; box-shadow:6px -4px currentColor,12px -1px currentColor; }
|
|
77
77
|
.sym-book { border:1.5px solid; border-radius:2px; }
|
|
78
78
|
.sym-book::after { content:""; position:absolute; inset:0 45% 0 auto; border-left:1px solid; }
|
|
79
|
-
.overview-hero { position:relative;
|
|
79
|
+
.overview-hero { position:relative; text-align:center; padding: clamp(28px,5vw,56px) 20px; border-radius:16px; border:1px solid #273a52; background:radial-gradient(ellipse at 93% 0%, #31465c 0%, transparent 57%),linear-gradient(110deg,#101e33,#1c3045); color:#f8f5ee; }
|
|
80
80
|
.overview-hero::before { content:""; position:absolute; inset:0; pointer-events:none; background-image:radial-gradient(#d5c4a117 .8px,transparent .8px); background-size:14px 14px; mask-image:linear-gradient(90deg,transparent 2%,black 100%); }
|
|
81
81
|
.overview-hero>* { position:relative; }
|
|
82
82
|
.hero-date { color:#e4c48c; gap:8px; font-size:12px; letter-spacing:.04em; }
|
|
@@ -84,15 +84,8 @@ kbd { font: 11px/1.4 var(--mono); border: 1px solid var(--line); border-radius:
|
|
|
84
84
|
.hero-date time, .repo-id, .card-foot time, .period-heading>span:last-child { font-family:var(--mono); }
|
|
85
85
|
.hero-copy h1 { color:#fcf8ef; font:700 clamp(36px,3.5vw,51px)/1.18 var(--serif); letter-spacing:.03em; margin:13px 0 10px; }
|
|
86
86
|
.hero-copy>p { color:#d3dce5; font-size:15px; }
|
|
87
|
-
.hero-
|
|
88
|
-
.hero-
|
|
89
|
-
.hero-stats>div:first-child { padding-left:0; } .hero-stats>div:last-child { border:none; padding-right:0; }
|
|
90
|
-
.hero-stats dd { color:#f7e8ce; font:500 clamp(34px,3.5vw,53px)/1.15 var(--serif); font-variant-numeric:lining-nums tabular-nums; }
|
|
91
|
-
.hero-stats dt { color:#ccd5df; font-size:13px; }
|
|
92
|
-
.activity-figure { min-width:0; border:1px solid #9bafbd48; background:#0c1c2c5e; padding:16px 20px 12px; border-radius:11px; color:#d5dfe9; }
|
|
93
|
-
.activity-figure figcaption { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
|
|
94
|
-
.chart-label { font-weight:650; font-size:14px; gap:8px; color:#f6ecd9; }
|
|
95
|
-
.key-multi { width:5px; height:5px; margin:0 2px; border-radius:50%; background:#d8b77f; outline:1px solid #d8b77f; outline-offset:1px; }
|
|
87
|
+
.hero-date { justify-content:center; }
|
|
88
|
+
.hero-link { color:#f2ce91; text-decoration:underline; text-underline-offset:4px; }
|
|
96
89
|
.section-heading { justify-content:space-between; gap:12px; margin-bottom:16px; }
|
|
97
90
|
.section-heading h2 { font-size:24px; letter-spacing:-.04em; }
|
|
98
91
|
.text-link { background:none; border:0; padding:0; width:fit-content; gap:8px; font-weight:600; color:var(--gold); font-size:13px; }
|
|
@@ -180,8 +173,7 @@ kbd { font: 11px/1.4 var(--mono); border: 1px solid var(--line); border-radius:
|
|
|
180
173
|
.detail-head>p { color:var(--text); }
|
|
181
174
|
.button-row { gap:10px; flex-wrap:wrap; } .button-row:not(:empty) { margin-top:18px; }
|
|
182
175
|
.external-arrow { font-size:16px;line-height:1; }
|
|
183
|
-
.
|
|
184
|
-
.detail-stats dt,.stat-strip dt { color:var(--muted); font-size:12px; }
|
|
176
|
+
.stat-strip dt { color:var(--muted); font-size:12px; }
|
|
185
177
|
.empty-book { display:inline-grid; place-items:center; background:var(--soft); width:40px; height:40px; border-radius:10px; margin-bottom:10px; }
|
|
186
178
|
.log-layout { display:grid; grid-template-columns:225px minmax(0,1fr); gap:28px; align-items:start; }
|
|
187
179
|
.log-index { position:sticky; top:90px; border-left:2px solid var(--line); padding-left:13px; }
|
|
@@ -193,13 +185,21 @@ kbd { font: 11px/1.4 var(--mono); border: 1px solid var(--line); border-radius:
|
|
|
193
185
|
.period-heading { justify-content:space-between; font-size:11px; }
|
|
194
186
|
.log-period h2 { font:600 clamp(18px,2.5vw,26px)/1.5 var(--mono); margin:9px 0; }
|
|
195
187
|
.period-title { color:var(--text); } .period-note { margin-top:10px; padding:8px 12px; border-left:2px solid var(--gold); background:var(--gold-soft); font-size:13px; }
|
|
196
|
-
.stat-strip { display:
|
|
197
|
-
.stat-strip
|
|
188
|
+
.stat-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%, 10rem),1fr)); gap:1px; margin:16px 0; text-align:center; }
|
|
189
|
+
.stat-strip > div { min-width:0; border-block:1px solid var(--line); padding:clamp(8px,1.6vw,18px) 6px; }
|
|
190
|
+
.stat-strip dt { font-weight:600; }
|
|
191
|
+
.stat-strip dd { font:600 clamp(1.35rem,3vw,2.3rem)/1.15 var(--mono); color:var(--ink); margin-top:5px; overflow-wrap:anywhere; }
|
|
192
|
+
.stat-strip :is([data-stat="commits"],[data-stat="lines-added"],[data-stat="lines-deleted"]) dd { font-size:clamp(1.7rem,4vw,3rem); }
|
|
193
|
+
.stat-strip [data-stat="lines-added"] dd, .measure-linesAdded b { color:var(--line-add); }
|
|
194
|
+
.stat-strip [data-stat="lines-deleted"] dd, .measure-linesDeleted b { color:var(--line-delete); }
|
|
195
|
+
.log-period .stat-strip [data-stat] dd { font-size:clamp(1.25rem,2.7vw,2rem); }
|
|
196
|
+
:root { --line-add:#176254; --line-delete:#9b444a; }
|
|
197
|
+
:root[data-theme="dark"] { --line-add:#8be0c9; --line-delete:#f5a7a3; }
|
|
198
198
|
.stat-strip dt { overflow-wrap:anywhere; }
|
|
199
199
|
.stat-summary { margin:10px 0 24px; padding:18px 24px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
|
|
200
|
-
.stat-summary h2 { font-
|
|
201
|
-
.stat-summary p { color:var(--muted); font-size:12px; margin-top:
|
|
202
|
-
.stat-summary .stat-strip { margin:
|
|
200
|
+
.stat-summary h2 { font:700 clamp(1.2rem,2vw,1.55rem)/1.3 var(--serif); text-align:center; margin:0; }
|
|
201
|
+
.stat-summary p { color:var(--muted); font-size:12px; margin-top:7px; text-align:center; }
|
|
202
|
+
.stat-summary .stat-strip { margin:14px 0; }
|
|
203
203
|
.category-block { margin-top:12px; } .category-block h3 { font-size:14px; } .category-block ul,.sample-sheet ol { padding-left:1.5em; }.category-block li { font-size:14px; }
|
|
204
204
|
#demo-status { color:var(--gold); }.demo-footnote { margin-top:15px; }.demo-panel input { accent-color:var(--gold); }
|
|
205
205
|
dialog { color:var(--text); width:min(590px,calc(100vw - 28px)); max-height:min(650px,82vh); padding:0; border-radius:12px; border:1px solid var(--line); background:var(--surface); box-shadow:0 24px 90px #09132459; margin: min(15vh,115px) auto auto; }
|
|
@@ -216,25 +216,29 @@ dialog::backdrop { background:#111c2b80; backdrop-filter:blur(3px); }
|
|
|
216
216
|
.search-help { display:flex; gap:16px;border-top:1px solid var(--line); }
|
|
217
217
|
mark { background:var(--gold-soft);color:var(--ink);border-radius:2px; }
|
|
218
218
|
@media (max-width:1040px) {
|
|
219
|
-
.wrap { width:calc(100% - 56px); }
|
|
219
|
+
.wrap { width:calc(100% - 56px); }
|
|
220
220
|
}
|
|
221
221
|
@media (max-width:780px) {
|
|
222
222
|
.wrap { width:calc(100% - 34px); }.mast-inner { gap:20px; height:60px; }.main-nav { gap:15px; }
|
|
223
|
-
.search-open kbd { display:none; }
|
|
223
|
+
.search-open kbd { display:none; }
|
|
224
224
|
.log-layout { grid-template-columns:170px minmax(0,1fr);gap:16px; }.stat-strip dt { font-size:10px; }
|
|
225
225
|
}
|
|
226
226
|
@media (max-width:600px) {
|
|
227
|
-
.wrap { width:calc(100% - 32px); }.mast-inner { height:auto;display:grid;grid-template-columns:1fr auto;gap:0; }.brand { min-height:51px;font-size:24px;width:fit-content; }.brand-stamp { width:30px;height:30px; }.mast-tools { grid-column:2;grid-row:1; }.main-nav { grid-column:1 / -1;grid-row:2;gap:24px; }.main-nav a { min-height:37px;font-size:13px; }.main-nav a[aria-current]::after { height:2px; }
|
|
227
|
+
.wrap { width:calc(100% - 32px); }.mast-inner { height:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 6px; }.brand { min-height:51px;font-size:24px;min-width:0;width:fit-content;max-width:100%;overflow-wrap:anywhere; }.brand-stamp { width:30px;height:30px; }.mast-tools { grid-column:2;grid-row:1; }.main-nav { grid-column:1 / -1;grid-row:2;gap:24px; }.main-nav a { min-height:37px;font-size:13px; }.main-nav a[aria-current]::after { height:2px; }
|
|
228
228
|
.mast-tools { gap:7px; }.search-open { min-height:32px; }.theme-button { width:33px; height:33px; }.main-content { padding-block:17px 36px; }
|
|
229
|
-
.overview-hero {
|
|
229
|
+
.overview-hero { padding:28px 16px; border-radius:12px; }.hero-copy h1 { font-size:45px;margin:8px 0; }.hero-copy>p { font-size:13px; }.hero-date { font-size:11px; }
|
|
230
230
|
.home-grid { gap:10px; }.project-card { padding:13px 12px 10px; }.card-top { gap:5px; }.group-tag {padding:0 4px;font-size:10px;}.project-mark { width:33px;height:33px;border-radius:8px; }.motif { transform:scale(.86); }.project-card h3 { font-size:23px; margin-top:10px; }.project-card p { font-size:12px; }.card-foot { font-size:10px; }.catalog-grid { gap:10px; }
|
|
231
231
|
.crumbs { margin-bottom:15px; }.page-head { padding-bottom:17px; }.page-head h1 { font-size:35px; }.page-head p { font-size:13px; }.field {width:100%;}.filter-bar { gap:10px;padding:12px 0; }.filter-pills button { padding:4px 8px; }
|
|
232
232
|
.log-layout,.demo-layout { grid-template-columns:1fr; }.log-index { position:static;display:flex;gap:9px;flex-wrap:wrap;align-items:center; }.log-index h2 { margin:0; }.log-index a { margin:0;padding:4px 6px;background:var(--soft);border-radius:4px; }.log-index a span { display:none; }.log-period { padding:16px;scroll-margin-top:100px; }
|
|
233
233
|
.detail-head { padding:18px; }.detail-head h1 {font-size:34px;}
|
|
234
234
|
.footer-inner { gap:8px;font-size:11px; }.footer-brand { font-size:15px; }.sample-sheet h1 { font-size:32px; }
|
|
235
235
|
}
|
|
236
|
+
@media (max-width:420px) {
|
|
237
|
+
.mast-tools .search-open { justify-content:center; width:33px; padding:0; }
|
|
238
|
+
.mast-tools .search-open > span:not(.symbol) { display:none; }
|
|
239
|
+
}
|
|
236
240
|
@media (max-width:360px) {
|
|
237
|
-
.home-grid,.catalog-grid { grid-template-columns:1fr; }
|
|
241
|
+
.home-grid,.catalog-grid { grid-template-columns:1fr; }
|
|
238
242
|
}
|
|
239
243
|
@media (max-width:600px) {
|
|
240
244
|
.log-index { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
|
|
@@ -252,79 +256,97 @@ mark { background:var(--gold-soft);color:var(--ink);border-radius:2px; }
|
|
|
252
256
|
.ledger-search { display:flex; align-items:center; gap:7px; padding:0 8px; }
|
|
253
257
|
.ledger-search input { min-width:0; width:9rem; border:0; background:transparent; color:var(--ink); outline:none; font:inherit; }
|
|
254
258
|
.ledger-search:focus-within { outline:2px solid var(--focus); outline-offset:1px; }
|
|
255
|
-
.ledger-window { margin:16px 0 23px; border:1px solid var(--line); border-radius:
|
|
256
|
-
.window
|
|
257
|
-
.window-head
|
|
258
|
-
.window-
|
|
259
|
-
.ledger-
|
|
259
|
+
.ledger-window { margin:16px 0 23px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
|
|
260
|
+
.ledger-window:target { border-color:var(--focus); }
|
|
261
|
+
.window-head, .ledger-group-head { display:grid; grid-template-columns:minmax(13rem,1.1fr) minmax(15rem,.9fr) minmax(0,1.2fr); align-items:center; gap:8px 12px; padding:12px 16px; }
|
|
262
|
+
.window-head { background:var(--soft); border-radius:7px; }
|
|
263
|
+
.ledger-window > header { border-bottom:1px solid var(--line); }
|
|
260
264
|
.ledger-group + .ledger-group { border-top:1px solid var(--line); }
|
|
261
|
-
.ledger-group
|
|
262
|
-
.ledger-
|
|
263
|
-
.ledger-
|
|
265
|
+
.ledger-group[open] > summary { border-bottom:1px solid var(--line); }
|
|
266
|
+
.ledger-heading { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0; color:var(--ink); font-weight:650; overflow-wrap:anywhere; }
|
|
267
|
+
.window-head .ledger-heading { font:650 clamp(.875rem, 1.45vw, 1.05rem)/1.45 var(--sans); }
|
|
268
|
+
.window-head h3 { font:inherit; }
|
|
269
|
+
.ledger-heading i { flex:none; width:7px; height:7px; background:var(--tone); border-radius:50%; }
|
|
270
|
+
.ledger-disclosure { cursor:pointer; list-style:none; }
|
|
271
|
+
.ledger-disclosure::-webkit-details-marker { display:none; }
|
|
272
|
+
.ledger-disclosure .ledger-heading::before { content:""; flex:none; width:6px; height:6px; border-inline-end:2px solid; border-block-end:2px solid; transform:rotate(-45deg); margin-inline-end:4px; }
|
|
273
|
+
.ledger-group[open] .ledger-heading::before { transform:rotate(45deg); }
|
|
274
|
+
.ledger-disclosure:focus-visible { outline-offset:-3px; }
|
|
275
|
+
.ledger-disclosure:hover { background:var(--soft); }
|
|
276
|
+
.ledger-categories, .ledger-totals { font-variant-numeric:tabular-nums; }
|
|
277
|
+
.ledger-categories { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:4px 12px; font-size:.8rem; }
|
|
278
|
+
.ledger-categories > span { display:inline-flex; align-items:center; gap:3px; white-space:nowrap; }
|
|
279
|
+
.ledger-categories > span::before { content:""; width:6px; height:6px; flex:none; border-radius:2px; background:var(--kind); margin-inline-end:1px; }
|
|
280
|
+
.ledger-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); color:var(--muted); gap:8px; text-align:center; }
|
|
281
|
+
.ledger-measure { display:grid; gap:3px; min-width:0; font-size:.73rem; }
|
|
282
|
+
.ledger-measure b { font:650 clamp(.92rem,1.45vw,1.24rem)/1.1 var(--mono); overflow-wrap:anywhere; }
|
|
283
|
+
.ledger-group-head .ledger-measure b { font-size:.95rem; }
|
|
284
|
+
.ledger-categories b, .measure-changes b { color:var(--ink); }
|
|
285
|
+
.interval-toggle { align-items:center; min-height:32px; padding:2px 8px; font:600 .75rem/1.5 var(--sans); color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:5px; }
|
|
286
|
+
.interval-toggle:hover { border-color:var(--focus); }
|
|
287
|
+
.ledger-group-body { padding:4px 16px 10px; }
|
|
288
|
+
.ledger-project { color:var(--gold); display:inline-block; margin-top:4px; font-size:.8rem; text-decoration:underline; text-underline-offset:3px; }
|
|
264
289
|
.ledger-lines { list-style:none; padding:0; margin:0; }
|
|
265
|
-
.ledger-entry {
|
|
290
|
+
.ledger-entry { padding-block:7px; font-size:.9rem; line-height:1.55; }
|
|
266
291
|
.ledger-entry + .ledger-entry { border-top:1px solid var(--line); }
|
|
267
|
-
.type-label { color:var(--muted); font-size:12px; }
|
|
268
292
|
.change-cell { overflow-wrap:anywhere; color:var(--ink); }
|
|
269
293
|
.ledger-project:hover,.change-cell:hover { color:var(--gold); text-decoration:underline; text-underline-offset:3px; }
|
|
270
|
-
.impact-tag { display:inline-block; margin-right:5px; padding:0 4px; border:1px solid var(--line); border-radius:3px; font:500 11px/16px var(--sans); color:var(--gold); vertical-align:1px; }
|
|
271
294
|
.log-entry { scroll-margin-top:100px; }
|
|
272
295
|
.log-entry:target { background:var(--gold-soft); outline:2px solid var(--gold-soft); color:var(--ink); }
|
|
273
296
|
.legacy-text,.period-note { white-space:pre-line; overflow-wrap:anywhere; }
|
|
274
|
-
@media (max-width:
|
|
297
|
+
@media (max-width:760px) {
|
|
275
298
|
.ledger-tools { align-items:flex-start; padding:5px 0 10px; }
|
|
276
299
|
.ledger-count { width:100%; }
|
|
277
300
|
.enhanced .ledger-filters.enhanced-only { width:100%; gap:5px; }
|
|
278
301
|
.ledger-search input { width:96px; }
|
|
279
302
|
.ledger-filters select { max-width:135px; padding-inline:5px; }
|
|
280
|
-
.window-head { padding:
|
|
281
|
-
.
|
|
303
|
+
.window-head, .ledger-group-head { grid-template-columns:minmax(0,1fr); padding:10px; }
|
|
304
|
+
.ledger-categories { justify-content:flex-start; gap:4px 9px; }
|
|
305
|
+
.ledger-totals { gap:5px; padding-block:6px; border-block:1px solid var(--line); }
|
|
306
|
+
.stat-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
|
|
307
|
+
.stat-summary { padding-inline:12px; }
|
|
282
308
|
.ledger-window { margin:10px 0 16px; }
|
|
283
|
-
.ledger-group { padding-inline:
|
|
284
|
-
.ledger-entry { grid-template-columns:minmax(2.7rem,max-content) minmax(0,1fr); font-size:13px; line-height:19px; padding-block:4px; }
|
|
285
|
-
.type-label { font-size:11px; }
|
|
309
|
+
.ledger-group-body { padding-inline:10px; }
|
|
286
310
|
.log-entry { scroll-margin-top:110px; }
|
|
287
311
|
}
|
|
288
312
|
.home-catalog { margin-top: 32px; }
|
|
289
|
-
.
|
|
290
|
-
.
|
|
291
|
-
.
|
|
292
|
-
.
|
|
293
|
-
.activity-table thead { font-size: 12px; color: #c1cdd8; }
|
|
294
|
-
.activity-table tbody tr { border-top: 1px solid #9bafbd48; }
|
|
295
|
-
.activity-table tbody th { font-weight: 550; }
|
|
296
|
-
.activity-value { display:flex; align-items:center; gap:8px; justify-content:flex-end; }
|
|
297
|
-
.activity-value i { width:clamp(1.5rem,4vw,4rem); height:4px; border-radius:4px; background:linear-gradient(to right,#e4c48c var(--share),#76889b55 var(--share)); }
|
|
298
|
-
.activity-table a:hover { color: #f7e8ce; text-decoration: underline; text-underline-offset: 4px; }
|
|
299
|
-
.activity-figure .text-link { color: #e4c48c; margin-top: 7px; }
|
|
300
|
-
.card-stats, .detail-stats { display: flex; flex-wrap: wrap; gap: 10px clamp(16px, 4vw, 36px); }
|
|
313
|
+
.ledger-entry[data-entry] { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; align-items:baseline; }
|
|
314
|
+
.ledger-entry[hidden] { display:none; }
|
|
315
|
+
.task-category { font-size:.76rem; font-weight:600; color:var(--ink); background:color-mix(in srgb,var(--kind) 14%,transparent); border-inline-start:3px solid var(--kind); border-radius:3px; padding:1px 6px; }
|
|
316
|
+
.card-stats { display: flex; flex-wrap: wrap; gap: 10px clamp(16px, 4vw, 36px); }
|
|
301
317
|
.card-stats { margin: 1px 0 13px; }
|
|
302
318
|
.card-stats dt { font-size: 11px; color: var(--muted); }
|
|
303
|
-
.card-stats dd
|
|
304
|
-
.detail-stats dd { font-size: 26px; }
|
|
305
|
-
.task-breakdown { margin-block:14px 4px; }
|
|
306
|
-
.mix-bar { display:flex; gap:2px; height:5px; border-radius:3px; overflow:hidden; }
|
|
319
|
+
.card-stats dd { color: var(--ink); font: 600 20px/1.4 var(--mono); }
|
|
307
320
|
[data-kind="功能"] { --kind:var(--gold); }
|
|
308
321
|
[data-kind="修复"] { --kind:#6383a4; } [data-kind="重构"] { --kind:#9a7ca0; }
|
|
309
322
|
[data-kind="优化"] { --kind:#559588; } [data-kind="维护"] { --kind:#87917c; }
|
|
310
|
-
.mix-
|
|
311
|
-
.mix-legend { display:flex;
|
|
312
|
-
.mix-legend div { display:flex; align-items:baseline; gap:5px; }
|
|
323
|
+
.mix-legend { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; font-size:.85rem; }
|
|
324
|
+
.mix-legend div { display:flex; align-items:baseline; gap:6px; padding:3px 10px; background:var(--soft); border-radius:5px; }
|
|
313
325
|
.mix-legend dt { color:var(--muted); }
|
|
314
|
-
.mix-legend dd { color:var(--ink); font-variant-numeric:tabular-nums; }
|
|
315
|
-
.mix-legend [data-kind]::before { content:""; align-self:center; width:
|
|
326
|
+
.mix-legend dd { color:var(--ink); font:650 1.15rem/1.55 var(--mono); font-variant-numeric:tabular-nums; }
|
|
327
|
+
.mix-legend [data-kind]::before { content:""; align-self:center; width:8px; height:8px; border-radius:2px; background:var(--kind); }
|
|
328
|
+
.stat-summary > .mix-legend, .detail-head > .mix-legend {
|
|
329
|
+
display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,8.2rem),1fr)); gap:10px; margin-top:16px;
|
|
330
|
+
}
|
|
331
|
+
:is(.stat-summary,.detail-head) > .mix-legend > div {
|
|
332
|
+
display:grid; grid-template-columns:auto 1fr; align-items:center; column-gap:8px; row-gap:4px;
|
|
333
|
+
padding:12px 14px 13px; border-block-start:3px solid var(--kind,var(--line)); background:var(--soft);
|
|
334
|
+
}
|
|
335
|
+
:is(.stat-summary,.detail-head) > .mix-legend dt { color:var(--ink); font-weight:600; }
|
|
336
|
+
:is(.stat-summary,.detail-head) > .mix-legend dd { grid-column:1/-1; font-size:clamp(1.35rem,2vw,1.8rem); line-height:1.1; }
|
|
337
|
+
@media (max-width:600px) {
|
|
338
|
+
:is(.stat-summary,.detail-head) > .mix-legend { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
|
|
339
|
+
:is(.stat-summary,.detail-head) > .mix-legend > div { padding:8px; column-gap:4px; }
|
|
340
|
+
}
|
|
341
|
+
#home-statistics { margin-top:20px; }
|
|
316
342
|
.ledger { margin-top: 24px; }
|
|
317
343
|
.ledger > h2 { font: 700 24px/1.4 var(--serif); }
|
|
318
|
-
.
|
|
319
|
-
.ledger-group-head { display: flex; align-items: baseline; gap: 6px 14px; justify-content: space-between; }
|
|
320
|
-
.group-count, .entry-context, .commit-only { color: var(--muted); font-size: 12px; }
|
|
321
|
-
.group-count { flex-shrink: 0; text-align: right; }
|
|
322
|
-
.entry-context { display: flex; flex-wrap: wrap; gap: 3px 12px; }
|
|
323
|
-
a.entry-context, .entry-context a { text-decoration: underline; text-underline-offset: 2px; }
|
|
324
|
-
.ledger .empty-panel button { margin-top: 12px; }
|
|
344
|
+
.commit-only { color:var(--muted); font-size:.8rem; margin-block:6px; }
|
|
325
345
|
|
|
326
346
|
@media (max-width: 600px) {
|
|
327
347
|
.home-catalog { margin-top: 22px; }
|
|
328
|
-
|
|
329
|
-
|
|
348
|
+
}
|
|
349
|
+
@media (min-width:761px) and (max-width:1040px) {
|
|
350
|
+
.window-head, .ledger-group-head { grid-template-columns:minmax(0,1fr) minmax(15rem,1.1fr); }
|
|
351
|
+
.ledger-categories { grid-column:1 / -1; justify-content:flex-start; }
|
|
330
352
|
}
|
|
@@ -70,21 +70,24 @@ export function projectMetrics(project, className, stats = project.stats) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export function categoryBreakdown(stats) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return `<div class="task-breakdown"><div class="mix-bar" aria-hidden="true">${active.map(category =>
|
|
76
|
-
`<i data-kind="${category}" style="flex-grow:${stats.byCategory[category]}"></i>`).join('')}</div>
|
|
77
|
-
<dl aria-label="任务分类" class="mix-legend">${active.map(category => `<div data-kind="${category}" data-stat="${category}"><dt>${category}</dt><dd>${formatCount(stats.byCategory[category])}</dd></div>`).join('')}
|
|
78
|
-
${stats.added != null && stats.byCategory['功能'] > 0 ? `<div><dt>功能中新增</dt><dd>${formatCount(stats.added)}</dd></div>` : ''}</dl></div>`;
|
|
73
|
+
return `<dl aria-label="任务分类" class="mix-legend">${categories.map(category => `<div data-kind="${category}" data-stat="${category}"><dt>${category}</dt><dd>${formatCount(stats.byCategory?.[category])}</dd></div>`).join('')}
|
|
74
|
+
${stats.added != null && stats.byCategory?.['功能'] > 0 ? `<div><dt>功能中新增</dt><dd>${formatCount(stats.added)}</dd></div>` : ''}</dl>`;
|
|
79
75
|
}
|
|
80
76
|
|
|
81
|
-
export function statStrip(stats, commitLabel = '记录区间提交') {
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
export function statStrip(stats, commitLabel = '记录区间提交', {headCommits} = {}) {
|
|
78
|
+
const metrics = [
|
|
79
|
+
['commits', commitLabel, stats.commits],
|
|
80
|
+
['lines-added', '新增代码行', stats.linesAdded],
|
|
81
|
+
['lines-deleted', '删除代码行', stats.linesDeleted],
|
|
82
|
+
['changes', '已记录任务', stats.changes],
|
|
83
|
+
];
|
|
84
|
+
if (headCommits != null && headCommits !== stats.commits) metrics.push(['head-commits', '仓库累计提交', headCommits]);
|
|
85
|
+
return `<dl class="stat-strip">${metrics.map(([key,label,value]) =>
|
|
86
|
+
`<div data-stat="${key}"><dt>${label}</dt><dd>${formatCount(value)}</dd></div>`).join('')}</dl>${categoryBreakdown(stats)}`;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
export function statSummary(id, title, stats, scope) {
|
|
87
|
-
return `<section class="stat-summary" id="${id}" aria-labelledby="${id}-title"><h2 id="${id}-title">${title}</h2>${scope ? `<p>${scope}</p>` : ''}${statStrip(stats)}
|
|
90
|
+
return `<section class="stat-summary" id="${id}" aria-labelledby="${id}-title"><h2 id="${id}-title">${title}</h2>${scope ? `<p>${scope}</p>` : ''}${statStrip(stats)}<p class="metric-scope">代码行按各区间首尾的 Git 文本差异统计,含配置和文档。</p></section>`;
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
export function intervalCount(period) {
|
|
@@ -1,69 +1,74 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { categories, itemId, statistics, windowLabel } from './model.mjs';
|
|
2
2
|
import { crumbs, escapeHtml as esc, formatCount, logPath, projectPath, statSummary, symbol } from './layout.mjs';
|
|
3
3
|
|
|
4
|
-
export const impactLabels = markers => (markers ?? []).map(name => `<span class="impact-tag">${esc(name)}</span>`).join('');
|
|
5
|
-
export const monthLabel = key => key === 'undated' ? '日期未记录' : `${key.slice(0, 4)} 年 ${Number(key.slice(5))} 月`;
|
|
6
|
-
|
|
7
4
|
function row(root, project, {period, index}) {
|
|
8
5
|
const item = period.items[index];
|
|
9
6
|
const [category, text, markers, meta] = item ?? [
|
|
10
7
|
'区间说明', period.note || (period.baseline ? '建立日志记录基线' : '完成本次区间核对'),
|
|
11
8
|
];
|
|
12
9
|
const url = root + logPath(project) + (item ? '#' + itemId(period, index) : '#range-' + period.key);
|
|
13
|
-
|
|
14
|
-
? `<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
return `<li class="ledger-entry" data-kind="${esc(category)}"${item ? ' data-entry' : ''} data-search="${esc([category, meta?.area, meta?.date, ...(markers ?? [])].filter(Boolean).join(' '))}">
|
|
11
|
+
${item ? `<span class="task-category">${esc(category)}</span>` : ''}<a class="change-cell" href="${esc(url)}">${esc(text)}</a></li>`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const totals = [
|
|
15
|
+
['changes', '任务'], ['linesAdded', '新增代码行'], ['linesDeleted', '删除代码行'],
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
function ledgerStats(stats) {
|
|
19
|
+
return `<span class="ledger-totals">${totals.map(([key, label]) => `<span class="ledger-measure measure-${key}"><span>${label}</span><b data-metric="${key}">${formatCount(stats[key])}</b></span>`).join('')}</span>
|
|
20
|
+
<span class="ledger-categories">${categories.map(category => `<span data-kind="${category}">${category} <b data-category-count="${category}">${formatCount(stats.byCategory?.[category])}</b></span>`).join('')}</span>`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function groupDetails(root, key, {project, periods}, showProject, label) {
|
|
24
|
+
const id = `window-${key}-${project.id}`;
|
|
25
|
+
const stats = statistics(periods);
|
|
26
|
+
const rows = periods.flatMap(period => {
|
|
27
|
+
const tasks = period.items.map((item, index) => ({period,index}));
|
|
28
|
+
if (period.note || period.baseline || !tasks.length) tasks.push({period,index:-1});
|
|
29
|
+
return tasks;
|
|
30
|
+
});
|
|
31
|
+
const {linesAdded, linesDeleted} = stats;
|
|
32
|
+
return `<details class="ledger-group tone-${project.color}" data-ledger-repo="${esc(project.id)}" data-repo-name="${esc(project.name)}" data-totals="${esc(JSON.stringify({linesAdded, linesDeleted}))}">
|
|
33
|
+
<summary class="${showProject ? 'ledger-group-head' : 'window-head'} ledger-disclosure" id="${esc(id)}">
|
|
34
|
+
<span class="ledger-heading">${showProject ? `<i></i>${esc(project.name)}` : esc(label)}</span>
|
|
35
|
+
${ledgerStats(stats)}
|
|
36
|
+
</summary>
|
|
37
|
+
<div class="ledger-group-body" id="${esc(id)}-tasks"><ul class="ledger-lines" role="list">
|
|
38
|
+
${rows.map(item => row(root, project, item)).join('')}
|
|
39
|
+
</ul>${showProject ? `<a class="ledger-project" href="${esc(root + projectPath(project))}">查看项目</a>` : ''}</div>
|
|
40
|
+
</details>`;
|
|
21
41
|
}
|
|
22
42
|
|
|
23
|
-
function
|
|
24
|
-
const {key, groups
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
${groups.map(({project
|
|
29
|
-
|
|
30
|
-
return `<section class="ledger-group tone-${project.color}" data-ledger-repo="${esc(project.id)}" data-commits="${projectCommits}" data-repo-name="${esc(project.name)}">
|
|
31
|
-
${showProject ? `<div class="ledger-group-head"><h4><a class="ledger-project" href="${esc(root + projectPath(project))}"><i></i>${esc(project.name)}</a></h4><span class="group-count">${formatCount(projectCommits)} 次 Git 提交</span></div>` : ''}
|
|
32
|
-
${rows.length || legacy ? `<ul class="ledger-lines" role="list">
|
|
33
|
-
${rows.map(item => row(root, project, item)).join('')}
|
|
34
|
-
${legacy ? `<li class="ledger-entry" data-kind="区间说明"><span class="type-label">旧版日志</span><div><p class="legacy-text">${esc(legacy)}</p><a class="entry-context" href="${esc(root + logPath(project))}#legacy">查看旧版原文</a></div></li>` : ''}
|
|
35
|
-
</ul>` : '<p class="commit-only">此月有 Git 提交,暂无任务记录。</p>'}
|
|
36
|
-
</section>`;
|
|
37
|
-
}).join('')}
|
|
43
|
+
function windowSection(root, window, showProject) {
|
|
44
|
+
const {key, groups} = window;
|
|
45
|
+
const label = window.label ?? windowLabel(window);
|
|
46
|
+
const labelId = showProject ? `window-title-${key}` : `window-${key}-${groups[0].project.id}`;
|
|
47
|
+
return `<section class="ledger-window" id="window-${esc(key)}" data-window="${esc(key)}" aria-labelledby="${esc(labelId)}">
|
|
48
|
+
${showProject ? `<header class="window-head"><div class="ledger-heading"><h3 id="${esc(labelId)}">${esc(label)}</h3><button type="button" class="interval-toggle enhanced-only" data-window-toggle data-window-label="${esc(label)}" aria-label="${esc(label)},展开全部项目任务" aria-expanded="false" aria-controls="${esc(groups.map(({project}) => `window-${key}-${project.id}-tasks`).join(' '))}">展开全部</button></div>${ledgerStats(window.stats)}</header>` : ''}
|
|
49
|
+
${groups.map(group => groupDetails(root, key, group, showProject, label)).join('')}
|
|
38
50
|
</section>`;
|
|
39
51
|
}
|
|
40
52
|
|
|
41
|
-
export function
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const count = monthCount || !hasUndated
|
|
48
|
-
? `${monthCount} 个月${hasUndated ? '及日期未记录条目' : ''}`
|
|
49
|
-
: '日期未记录条目';
|
|
50
|
-
return `<section class="ledger" aria-labelledby="ledger-title"><h2 id="ledger-title">月度明细</h2>
|
|
51
|
-
<div class="ledger-tools"><p class="ledger-count" id="timeline-count" aria-live="polite">${count}${showProject ? ` · ${projectCount} 个项目` : ''} · ${formatCount(taskCount)} 项任务</p>
|
|
52
|
-
${months.length ? `<search class="ledger-filters enhanced-only" aria-label="筛选月度明细">
|
|
53
|
+
export function rangeLedger(root, projects, windows, {showProject = true} = {}) {
|
|
54
|
+
const taskCount = windows.reduce((total, window) => total + window.stats.changes, 0);
|
|
55
|
+
const projectCount = new Set(windows.flatMap(window => window.groups.map(group => group.project.id))).size;
|
|
56
|
+
return `<section class="ledger" aria-labelledby="ledger-title"><h2 id="ledger-title">区间明细</h2>
|
|
57
|
+
<div class="ledger-tools"><p class="ledger-count" id="timeline-count" aria-live="polite">${windows.length} 个区间${showProject ? ` · ${projectCount} 个项目` : ''} · ${formatCount(taskCount)} 项任务</p>
|
|
58
|
+
${windows.length ? `<search class="ledger-filters enhanced-only" aria-label="筛选区间明细">
|
|
53
59
|
<label class="ledger-search">${symbol('search')}<input id="timeline-query" type="search" aria-label="筛选关键词" placeholder="筛选关键词" autocomplete="off"></label>
|
|
54
60
|
${showProject ? `<label><span class="sr">项目</span><select id="timeline-project"><option value="">全部项目</option>${projects.map(p => `<option value="${esc(p.id)}">${esc(p.name)}</option>`).join('')}</select></label>` : ''}
|
|
55
|
-
<label><span class="sr"
|
|
61
|
+
<label><span class="sr">区间</span><select id="timeline-window"><option value="">全部区间</option>${windows.map(window => `<option value="${esc(window.key)}">${esc(window.label ?? windowLabel(window))}</option>`).join('')}</select></label>
|
|
56
62
|
<label><span class="sr">类别</span><select id="timeline-category"><option value="">全部类别</option>${[...categories, '区间说明'].map(c => `<option>${esc(c)}</option>`).join('')}</select></label>
|
|
63
|
+
<button type="button" id="reset-timeline" class="interval-toggle" hidden>清除筛选</button>
|
|
57
64
|
</search>` : ''}</div>
|
|
58
|
-
${
|
|
59
|
-
<div id="timeline-empty" class="empty-panel"${
|
|
65
|
+
${windows.map(window => windowSection(root, window, showProject)).join('')}
|
|
66
|
+
<div id="timeline-empty" class="empty-panel"${windows.length ? ' hidden' : ''}><h3>${windows.length ? '没有符合条件的记录' : '暂无区间记录'}</h3></div>
|
|
60
67
|
</section>`;
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
export function changelog(root, projects, windows, stats) {
|
|
64
|
-
|
|
65
|
-
group.periods.some(period => !period.commitMonths))).map(window => window.to);
|
|
66
|
-
return `${crumbs(root, [['跨项目变更']])}<header class="page-head"><h1>跨项目变更</h1><p>按月份查看任务与 Git 提交,可按项目、类别及关键词筛选。</p></header>
|
|
71
|
+
return `${crumbs(root, [['跨项目变更']])}<header class="page-head"><h1>跨项目变更</h1><p>按采集区间查看各项目的任务和 Git 变更。</p></header>
|
|
67
72
|
${statSummary('site-statistics', '全站累计', stats)}
|
|
68
|
-
${
|
|
73
|
+
${rangeLedger(root, projects, windows)}`;
|
|
69
74
|
}
|