website: v1.0.25 — 四语言站点 + 更新下载与日志

- 单页 + 语言层:assets/i18n.js(147 键 × zh-CN/zh-TW/en/ja)+
  i18n-apply.js(data-i18n / data-i18n-html / data-i18n-attr 三种挂键方式,
  首帧前定语言,?lang= → localStorage → navigator → zh-CN)
- 导航栏新增语言切换;html[lang]、title、meta description / og:* 同步
- 版本号/下载直链 → v1.0.25;近期更新补 1.0.25 / 1.0.24,裁到 5 条
- style.css 仅追加(语言选择器样式 + 首帧防闪),既有规则零改动
- README 补语言层说明与发版清单
This commit is contained in:
Bill committed 2026-10-10 15:18:50 +08:00
1 parent 7a1b11dad7
commit b89f9c6c95
5 files changed
+1229 -149

No files matched your search

+44
View File
@@ -770,3 +770,47 @@ section { position: relative; }
html { scroll-behavior: auto; }
*, *::before, *::after { transition: none !important; }
}
/* ---- 语言切换(i18n 层新增,只消费既有令牌,不改动上面任何规则) ---- */
.lang-select {
appearance: none;
-webkit-appearance: none;
height: 38px;
padding: 0 30px 0 13px;
border-radius: 19px;
border: 1px solid var(--border-strong);
background-color: var(--surface);
color: var(--text-2);
font-family: var(--mono);
font-size: 12.5px;
font-weight: 500;
letter-spacing: 0.02em;
cursor: pointer;
flex-shrink: 0;
/* 下拉箭头:两个主题各一份 data URI(内联 SVG 用不了 currentColor),色值取自 --text-2 */
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2399a49c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 11px center;
background-size: 10px 6px;
transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}
.lang-select:hover { color: var(--accent-text); border-color: var(--accent); transform: translateY(-1px); }
.lang-select:active { transform: translateY(0) scale(0.98); }
.lang-select option { background: var(--surface); color: var(--text); }
html[data-theme='light'] .lang-select {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2359615a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* 非中文用户首帧先藏住 body,等 i18n 应用完由 assets/i18n-apply.js 摘掉该属性(另有 2.5s 兜底定时器) */
html[data-i18n-pending] body { visibility: hidden; }
@media (max-width: 640px) {
.lang-select {
height: 32px;
padding: 0 24px 0 10px;
font-size: 11.5px;
background-position: right 8px center;
background-size: 9px 5px;
}
}