Compare commits

...

6 Commits

Author SHA1 Message Date
90632dcd25 add url
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled
2026-04-02 06:18:47 -06:00
5308047b2d update 2026-01-19 10:49:09 +08:00
e575ccd71a fix 2026-01-18 21:18:04 +08:00
e28197aa41 update 2026-01-15 14:58:45 +08:00
76d69745b5 update 2026-01-15 14:33:59 +08:00
46b94a3218 update 2026-01-15 11:17:42 +08:00
8 changed files with 231 additions and 62 deletions

View File

@@ -1,6 +1,7 @@
VITE_OJ=https://oj.xuyue.cc VITE_OJ=https://oj.xuyue.cc
VITE_CODE=https://code.xuyue.cc VITE_CODE=https://code.xuyue.cc
VITE_WEB=https://web.xuyue.cc VITE_WEB=https://web.xuyue.cc
VITE_SHUATI=https://ti.xuyue.cc
VITE_BOOK=https://book.xuyue.cc VITE_BOOK=https://book.xuyue.cc
VITE_HUABU=https://huabu.xuyue.cc VITE_HUABU=https://huabu.xuyue.cc
VITE_PPT=https://ppt.xuyue.cc/py VITE_PPT=https://ppt.xuyue.cc/py

View File

@@ -33,7 +33,7 @@ jobs:
CI: false CI: false
- uses: easingthemes/ssh-deploy@main - uses: easingthemes/ssh-deploy@main
env: with:
SSH_PRIVATE_KEY: ${{ secrets.KEY }} SSH_PRIVATE_KEY: ${{ secrets.KEY }}
REMOTE_HOST: ${{ secrets.HOST }} REMOTE_HOST: ${{ secrets.HOST }}
REMOTE_PORT: ${{ matrix.remote_port }} REMOTE_PORT: ${{ matrix.remote_port }}

30
app.js
View File

@@ -28,7 +28,6 @@ export function initApp() {
const languageButton = document.getElementById("languageButton") const languageButton = document.getElementById("languageButton")
const languageList = document.getElementById("languageList") const languageList = document.getElementById("languageList")
const titleEl = document.querySelector(".title") const titleEl = document.querySelector(".title")
const subtitleEl = document.querySelector(".subtitle")
const designThemeLabelEl = document.querySelector( const designThemeLabelEl = document.querySelector(
'[data-i18n="designThemeLabel"]', '[data-i18n="designThemeLabel"]',
) )
@@ -68,18 +67,30 @@ export function initApp() {
} }
} }
function updateSubtitle(language = currentLanguage) { function setTitleText(titleText) {
if (!subtitleEl) return if (!titleEl) return
if (pins.length) { const cursorEl = titleEl.querySelector(".title-cursor")
subtitleEl.textContent = t("pinnedSubtitle", language) if (cursorEl) {
let textNode = [...titleEl.childNodes].find(
(node) => node.nodeType === Node.TEXT_NODE && node.nodeValue?.trim(),
)
if (!textNode) {
textNode = document.createTextNode(titleText)
titleEl.insertBefore(textNode, cursorEl)
} else {
textNode.nodeValue = titleText
}
} else { } else {
subtitleEl.textContent = subtitleEl.dataset.text || "" titleEl.textContent = titleText
} }
titleEl.dataset.text = titleText
} }
function getDocumentLang(language) { function getDocumentLang(language) {
if (language === "zh-Hant") return "zh-Hant" if (language === "zh-Hant") return "zh-Hant"
if (language === "zh-Hans") return "zh-Hans" if (language === "zh-Hans") return "zh-Hans"
if (language === "wenyan") return "zh-Hans"
if (language === "mars") return "zh-Hans"
if (language === "ja") return "ja" if (language === "ja") return "ja"
if (language === "ko") return "ko" if (language === "ko") return "ko"
return "en" return "en"
@@ -113,8 +124,7 @@ export function initApp() {
document.title = t("appTitle", language) document.title = t("appTitle", language)
if (titleEl) { if (titleEl) {
const titleText = t("appTitle", language) const titleText = t("appTitle", language)
titleEl.textContent = titleText setTitleText(titleText)
titleEl.dataset.text = titleText
} }
if (designThemeLabelEl) { if (designThemeLabelEl) {
designThemeLabelEl.textContent = t("designThemeLabel", language) designThemeLabelEl.textContent = t("designThemeLabel", language)
@@ -162,7 +172,6 @@ export function initApp() {
getLabel: getThemeLabel, getLabel: getThemeLabel,
}) })
setSelectedLanguageUI(language) setSelectedLanguageUI(language)
updateSubtitle(language)
renderSites({ container: sitesContainer, sites, pins, language }) renderSites({ container: sitesContainer, sites, pins, language })
} }
@@ -179,9 +188,6 @@ export function initApp() {
titleEl.dataset.text = titleEl.textContent?.trim() || "" titleEl.dataset.text = titleEl.textContent?.trim() || ""
} }
if (subtitleEl && !subtitleEl.dataset.text) {
subtitleEl.dataset.text = subtitleEl.textContent?.trim() || ""
}
const initialTheme = getInitialTheme() const initialTheme = getInitialTheme()
setTheme(initialTheme) setTheme(initialTheme)

90
data.js
View File

@@ -10,19 +10,29 @@ export const sites = [
url: import.meta.env.VITE_OJ, url: import.meta.env.VITE_OJ,
title: { title: {
"zh-Hans": "判题狗", "zh-Hans": "判题狗",
mars: "判↗題★犬",
wenyan: "判题犬",
garbled: "è½◽",
bin: "011",
"zh-Hant": "判題狗", "zh-Hant": "判題狗",
en: "Judge Dog", en: "Judge Dog",
ja: "判定犬", ja: "判定犬",
ko: "판정개", ko: "판정개",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "⚖️",
}, },
description: { description: {
"zh-Hans": "在线判题网站", "zh-Hans": "在线判题网站",
mars: "線↗上氵☆判↘題钅★網",
wenyan: "判题之所",
garbled: "烫锟ä¢烫糊",
bin: "010011",
"zh-Hant": "在線判題網站", "zh-Hant": "在線判題網站",
en: "Online judge platform", en: "Online judge platform",
ja: "オンライン判定サイト", ja: "オンライン判定サイト",
ko: "온라인 판정 사이트", ko: "온라인 판정 사이트",
meow: "喵喵喵喵喵喵", meow: "喵喵喵喵喵喵",
emoji: "🌐🧪✅",
}, },
icon: "noto--dog-face.svg", icon: "noto--dog-face.svg",
}, },
@@ -30,19 +40,29 @@ export const sites = [
url: import.meta.env.VITE_CODE, url: import.meta.env.VITE_CODE,
title: { title: {
"zh-Hans": "自测猫", "zh-Hans": "自测猫",
mars: "自↘測☆~貓",
wenyan: "自试猫",
garbled: "ä¢å",
bin: "001",
"zh-Hant": "自測貓", "zh-Hant": "自測貓",
en: "Self Test Cat", en: "Self Test Cat",
ja: "自テスト猫", ja: "自テスト猫",
ko: "자가테스트猫", ko: "자가테스트猫",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "🧪",
}, },
description: { description: {
"zh-Hans": "代码运行网站", "zh-Hans": "代码运行网站",
mars: "代↗碼☆運↘?行→★站",
wenyan: "行码之所",
garbled: "¿屯屯糊¢◾",
bin: "100011",
"zh-Hant": "代碼運行網站", "zh-Hant": "代碼運行網站",
en: "Code runner", en: "Code runner",
ja: "コード実行サイト", ja: "コード実行サイト",
ko: "코드 실행 사이트", ko: "코드 실행 사이트",
meow: "喵喵喵喵喵喵", meow: "喵喵喵喵喵喵",
emoji: "💻▶️",
}, },
icon: "noto--cat-face.svg", icon: "noto--cat-face.svg",
}, },
@@ -50,19 +70,29 @@ export const sites = [
url: import.meta.env.VITE_WEB, url: import.meta.env.VITE_WEB,
title: { title: {
"zh-Hans": "哈基米", "zh-Hans": "哈基米",
mars: "哈↗基?★米",
wenyan: "哈基米",
garbled: "¿▣▦",
bin: "010",
"zh-Hant": "哈基米", "zh-Hant": "哈基米",
en: "Hakimi", en: "Hakimi",
ja: "ハキミ", ja: "ハキミ",
ko: "하키미", ko: "하키미",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "🌐🧩",
}, },
description: { description: {
"zh-Hans": "Web 前端开发", "zh-Hans": "Web 前端开发",
mars: "網☆↗頁☆前↘端孒★開↗發",
wenyan: "网页前端之作",
garbled: "ä▦▨斤¨è□¿",
bin: "01111110",
"zh-Hant": "Web 前端開發", "zh-Hant": "Web 前端開發",
en: "Web frontend development", en: "Web frontend development",
ja: "Webフロントエンド開発", ja: "Webフロントエンド開発",
ko: "웹 프론트엔드 개발", ko: "웹 프론트엔드 개발",
meow: "喵喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵喵",
emoji: "🖥️🎨",
}, },
icon: "noto--honeybee.svg", icon: "noto--honeybee.svg",
}, },
@@ -70,19 +100,29 @@ export const sites = [
url: import.meta.env.VITE_SHUATI, url: import.meta.env.VITE_SHUATI,
title: { title: {
"zh-Hans": "刷题鸭", "zh-Hans": "刷题鸭",
mars: "刷勒↘題★鴨",
wenyan: "习题鸭",
garbled: "¿æä",
bin: "110",
"zh-Hant": "刷題鴨", "zh-Hant": "刷題鴨",
en: "Practice Duck", en: "Practice Duck",
ja: "演習アヒル", ja: "演習アヒル",
ko: "문제풀이오리", ko: "문제풀이오리",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "🦆📝",
}, },
description: { description: {
"zh-Hans": "梁老师的刷题网站", "zh-Hans": "梁老师的刷题网站",
mars: "梁師↗刷钅↘題←★網",
wenyan: "梁师习题之所",
garbled: "糊¿拷èç¿□¨",
bin: "00011101",
"zh-Hant": "梁老師的刷題網站", "zh-Hant": "梁老師的刷題網站",
en: "Practice problems by Mr. Liang", en: "Practice problems by Mr. Liang",
ja: "梁先生の演習サイト", ja: "梁先生の演習サイト",
ko: "량 선생님의 문제풀이 사이트", ko: "량 선생님의 문제풀이 사이트",
meow: "喵喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵喵",
emoji: "📚📝",
}, },
icon: "noto--paintbrush.svg", icon: "noto--paintbrush.svg",
}, },
@@ -90,19 +130,29 @@ export const sites = [
url: import.meta.env.VITE_BOOK, url: import.meta.env.VITE_BOOK,
title: { title: {
"zh-Hans": "编程书", "zh-Hans": "编程书",
mars: "編~↗程☆書☆",
wenyan: "程式书",
garbled: "¬拷拷",
bin: "000",
"zh-Hant": "編程書", "zh-Hant": "編程書",
en: "Coding Books", en: "Coding Books",
ja: "プログラミング書", ja: "プログラミング書",
ko: "프로그래밍 책", ko: "프로그래밍 책",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "📚💻",
}, },
description: { description: {
"zh-Hans": "编程和计算机相关知识汇总", "zh-Hans": "编程和计算机相关知识汇总",
mars: "編↗程→☆計↘算★機☆知↗識→↘彙→★總",
wenyan: "程式及计算机知识总览",
garbled: "拷¨锟斤锟¬锟¬ä▧斤¨",
bin: "100101111000",
"zh-Hant": "編程和計算機相關知識匯總", "zh-Hant": "編程和計算機相關知識匯總",
en: "CS knowledge summary", en: "CS knowledge summary",
ja: "プログラミング/コンピュータ知識まとめ", ja: "プログラミング/コンピュータ知識まとめ",
ko: "프로그래밍/컴퓨터 지식 모음", ko: "프로그래밍/컴퓨터 지식 모음",
meow: "喵喵喵喵喵喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵喵喵喵喵喵",
emoji: "🧠📚",
}, },
icon: "noto--bookmark-tabs.svg", icon: "noto--bookmark-tabs.svg",
}, },
@@ -110,19 +160,29 @@ export const sites = [
url: import.meta.env.VITE_BLOCKLY, url: import.meta.env.VITE_BLOCKLY,
title: { title: {
"zh-Hans": "小方块", "zh-Hans": "小方块",
mars: "小↘方★塊",
wenyan: "小方块",
garbled: "¨糊”",
bin: "110",
"zh-Hant": "小方塊", "zh-Hant": "小方塊",
en: "Little Blocks", en: "Little Blocks",
ja: "小さなブロック", ja: "小さなブロック",
ko: "작은 블록", ko: "작은 블록",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "🧱🧩",
}, },
description: { description: {
"zh-Hans": "搭积木,学编程", "zh-Hans": "搭积木,学编程",
mars: "搭↗積★木↘學訁☆?編↗★程",
wenyan: "以积木习程式",
garbled: "◽¬拷ç¿斤锟",
bin: "1101101",
"zh-Hant": "搭積木,學編程", "zh-Hant": "搭積木,學編程",
en: "Learn coding with blocks", en: "Learn coding with blocks",
ja: "ブロックでプログラミング", ja: "ブロックでプログラミング",
ko: "블록으로 프로그래밍 배우기", ko: "블록으로 프로그래밍 배우기",
meow: "喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵",
emoji: "🧱💻",
}, },
icon: "twemoji--brick.svg", icon: "twemoji--brick.svg",
}, },
@@ -130,19 +190,29 @@ export const sites = [
url: import.meta.env.VITE_HUABU, url: import.meta.env.VITE_HUABU,
title: { title: {
"zh-Hans": "白板", "zh-Hans": "白板",
mars: "白↗板☆",
wenyan: "白板",
garbled: "¿拷",
bin: "01",
"zh-Hant": "白板", "zh-Hant": "白板",
en: "Whiteboard", en: "Whiteboard",
ja: "ホワイトボード", ja: "ホワイトボード",
ko: "화이트보드", ko: "화이트보드",
meow: "喵喵", meow: "喵喵",
emoji: "🧑‍🏫📋",
}, },
description: { description: {
"zh-Hans": "在线板书", "zh-Hans": "在线板书",
mars: "線↗上☆☆板↘書",
wenyan: "线上板书",
garbled: "¬¿■¿",
bin: "0001",
"zh-Hant": "在線板書", "zh-Hant": "在線板書",
en: "Online whiteboard", en: "Online whiteboard",
ja: "オンライン板書", ja: "オンライン板書",
ko: "온라인 판서", ko: "온라인 판서",
meow: "喵喵喵喵", meow: "喵喵喵喵",
emoji: "📝🌐",
}, },
icon: "noto--artist-palette.svg", icon: "noto--artist-palette.svg",
}, },
@@ -150,19 +220,29 @@ export const sites = [
url: import.meta.env.VITE_PPT, url: import.meta.env.VITE_PPT,
title: { title: {
"zh-Hans": "Python PPT", "zh-Hans": "Python PPT",
mars: "P☆ytho→n↗PPT★",
wenyan: "蟒语课札",
garbled: "锟¢¥烫拷□锟▧▢è",
bin: "1001011111",
"zh-Hant": "Python PPT", "zh-Hant": "Python PPT",
en: "Python PPT", en: "Python PPT",
ja: "Python PPT", ja: "Python PPT",
ko: "Python PPT", ko: "Python PPT",
meow: "喵喵喵喵喵喵", meow: "喵喵喵喵喵喵",
emoji: "🐍📽️",
}, },
description: { description: {
"zh-Hans": "Python 第一学期上课用", "zh-Hans": "Python 第一学期上课用",
mars: "Pyth★o★n↗←首學★期↘課☆用",
wenyan: "蟒语首学期课用",
garbled: "糊”èå▢噪□¬▦◽烫拷ä¬",
bin: "00000010111011",
"zh-Hant": "Python 第一學期上課用", "zh-Hant": "Python 第一學期上課用",
en: "Python semester 1 materials", en: "Python semester 1 materials",
ja: "Python 1学期授業用", ja: "Python 1学期授業用",
ko: "Python 1학기 수업용", ko: "Python 1학기 수업용",
meow: "喵喵喵喵喵喵喵喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵喵喵喵喵喵喵喵",
emoji: "🐍🎓1⃣",
}, },
icon: "material-icon-theme--python.svg", icon: "material-icon-theme--python.svg",
}, },
@@ -170,19 +250,29 @@ export const sites = [
url: import.meta.env.VITE_PY, url: import.meta.env.VITE_PY,
title: { title: {
"zh-Hans": "Python 项目", "zh-Hans": "Python 项目",
mars: "P→ytho吖n↘項★目",
wenyan: "蟒语诸业",
garbled: "▧ç¬ä▧◾”斤糊",
bin: "101110111",
"zh-Hant": "Python 項目", "zh-Hant": "Python 項目",
en: "Python Projects", en: "Python Projects",
ja: "Python プロジェクト", ja: "Python プロジェクト",
ko: "Python 프로젝트", ko: "Python 프로젝트",
meow: "喵喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵喵",
emoji: "🐍🧰",
}, },
description: { description: {
"zh-Hans": "Python 第二学期上课用", "zh-Hans": "Python 第二学期上课用",
mars: "Python↘次→學孒★期↗課☆用",
wenyan: "蟒语次学期课用",
garbled: "屯▤½¨ååç锟■噪屯屯◼¿",
bin: "11110110110010",
"zh-Hant": "Python 第二學期上課用", "zh-Hant": "Python 第二學期上課用",
en: "Python semester 2 materials", en: "Python semester 2 materials",
ja: "Python 2学期授業用", ja: "Python 2学期授業用",
ko: "Python 2학기 수업용", ko: "Python 2학기 수업용",
meow: "喵喵喵喵喵喵喵", meow: "喵喵喵喵喵喵喵",
emoji: "🐍🎓2⃣",
}, },
icon: "material-icon-theme--folder-python-open.svg", icon: "material-icon-theme--folder-python-open.svg",
}, },

99
i18n.js
View File

@@ -59,6 +59,54 @@ export const I18N = {
beianIcp: "저장 ICP 2023044109", beianIcp: "저장 ICP 2023044109",
beianMps: "저장 공안 33100402331786", beianMps: "저장 공안 33100402331786",
}, },
wenyan: {
appTitle: "物联网专业线上学塾",
pinnedSubtitle: "置顶",
designThemeLabel: "设计之式",
themeToggleLabel: "易其主题",
themeToggleTitle: "更晦明",
moonAlt: "月",
sunAlt: "日",
languageLabel: "语言",
beianIcp: "浙ICP备2023044109号",
beianMps: "浙公安备33100402331786号",
},
mars: {
appTitle: "物↗聯☆網↘專★業☆線★↗上★~學↘塾",
pinnedSubtitle: "置↗頂★內→↘容氵",
designThemeLabel: "設↗計☆主↘題",
themeToggleLabel: "切↗換★主↘…題孒",
themeToggleTitle: "切↗換★晦钅↘明~",
moonAlt: "月",
sunAlt: "日",
languageLabel: "語↗言",
beianIcp: "浙↗ICP☆★備吖202訁3044109★號",
beianMps: "浙↘公★勒安備33氵100勒40孒2★331786號",
},
garbled: {
appTitle: "糊斤▥烫斤拷▦噪¿ä¢ç”èä",
pinnedSubtitle: "¨¢糊◾¬¿",
designThemeLabel: "¬æ◽ä◾▩",
themeToggleLabel: "ä斤¿è▣拷",
themeToggleTitle: "▥¬糊¬烫è拷ç¿",
moonAlt: "¥æ½",
sunAlt: "¥▤锟",
languageLabel: "¿锟屯",
beianIcp: "å锟æ¨å屯¥◾▨",
beianMps: "¿噪斤ä屯斤½æ”屯ç▩",
},
bin: {
appTitle: "0101010101010101",
pinnedSubtitle: "010101",
designThemeLabel: "0101010101",
themeToggleLabel: "01010101",
themeToggleTitle: "010101010101010101",
moonAlt: "0101",
sunAlt: "1010",
languageLabel: "010101",
beianIcp: "01010101010101010101",
beianMps: "0101010101010101010101",
},
meow: { meow: {
appTitle: "喵喵喵喵喵喵喵喵喵喵喵喵", appTitle: "喵喵喵喵喵喵喵喵喵喵喵喵",
pinnedSubtitle: "喵喵喵喵", pinnedSubtitle: "喵喵喵喵",
@@ -71,6 +119,18 @@ export const I18N = {
beianIcp: "喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵", beianIcp: "喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵",
beianMps: "喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵", beianMps: "喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵喵",
}, },
emoji: {
appTitle: "📡🎓📚🌐🧠",
pinnedSubtitle: "📌",
designThemeLabel: "🎨",
themeToggleLabel: "🌓",
themeToggleTitle: "🌗/🌕",
moonAlt: "🌙",
sunAlt: "☀️",
languageLabel: "🌐",
beianIcp: "🧾 ICP 2023044109",
beianMps: "🛡️ MPS 33100402331786",
},
} }
export const DESIGN_THEME_LABELS = { export const DESIGN_THEME_LABELS = {
@@ -104,12 +164,42 @@ export const DESIGN_THEME_LABELS = {
terminal: "터미널", terminal: "터미널",
cyberpunk: "사이버펑크", cyberpunk: "사이버펑크",
}, },
wenyan: {
fluent: "流光",
"material-you": "物材",
terminal: "终端",
cyberpunk: "赛博",
},
mars: {
fluent: "流↗光",
"material-you": "材↘質",
terminal: "終↗★端",
cyberpunk: "賽↘!博",
},
garbled: {
fluent: "◼è▦",
"material-you": "拷▤屯ä锟◽",
terminal: "¥¬▤▨¿¿",
cyberpunk: "◼çæ¥烫¥",
},
bin: {
fluent: "0101",
"material-you": "010101",
terminal: "01010101",
cyberpunk: "0101010101",
},
meow: { meow: {
fluent: "喵喵", fluent: "喵喵",
"material-you": "喵喵喵", "material-you": "喵喵喵",
terminal: "喵喵", terminal: "喵喵",
cyberpunk: "喵喵喵喵", cyberpunk: "喵喵喵喵",
}, },
emoji: {
fluent: "💧",
"material-you": "🧱",
terminal: "⌨️",
cyberpunk: "⚡",
},
} }
export const LANGUAGE_NAMES = { export const LANGUAGE_NAMES = {
@@ -118,7 +208,12 @@ export const LANGUAGE_NAMES = {
en: "English", en: "English",
ja: "日本語", ja: "日本語",
ko: "한국어", ko: "한국어",
wenyan: "文言文",
mars: "非★主☆流",
garbled: "GBK乱码",
bin: "计算机语",
meow: "喵喵喵", meow: "喵喵喵",
emoji: "😅😅😅",
} }
export const LANGUAGE_KEY = "language" export const LANGUAGE_KEY = "language"
@@ -127,9 +222,7 @@ export const SUPPORTED_LANGUAGES = Object.keys(LANGUAGE_NAMES)
export function getLocalizedText(value, language) { export function getLocalizedText(value, language) {
if (!value) return "" if (!value) return ""
if (typeof value === "object") { if (typeof value === "object") {
return ( return value[language] || value["zh-Hans"]
value[language] || value["zh-Hans"]
)
} }
return value return value
} }

View File

@@ -11,9 +11,9 @@
<body> <body>
<div class="theme-controls"> <div class="theme-controls">
<label class="design-theme"> <label class="design-theme">
<span class="visually-hidden" data-i18n="designThemeLabel" <span class="visually-hidden" data-i18n="designThemeLabel">
>设计主题</span 设计主题
> </span>
<button <button
class="design-theme-button" class="design-theme-button"
id="designThemeButton" id="designThemeButton"
@@ -73,7 +73,16 @@
<li role="option" data-value="ja" aria-selected="false">日本語</li> <li role="option" data-value="ja" aria-selected="false">日本語</li>
<li role="option" data-value="ko" aria-selected="false">한국어</li> <li role="option" data-value="ko" aria-selected="false">한국어</li>
<li role="option" data-value="en" aria-selected="false">English</li> <li role="option" data-value="en" aria-selected="false">English</li>
<li role="option" data-value="wenyan" aria-selected="false">
文言文
</li>
<li role="option" data-value="mars" aria-selected="false">
非→主←流
</li>
<li role="option" data-value="garbled" aria-selected="false">GBK</li>
<li role="option" data-value="bin" aria-selected="false">计算机语</li>
<li role="option" data-value="meow" aria-selected="false">喵喵喵</li> <li role="option" data-value="meow" aria-selected="false">喵喵喵</li>
<li role="option" data-value="emoji" aria-selected="false">😅😅😅</li>
</ul> </ul>
</label> </label>
<button <button
@@ -97,8 +106,9 @@
<div id="app"> <div id="app">
<div class="container"> <div class="container">
<main class="main"> <main class="main">
<h1 class="title" data-i18n="appTitle">物联网专业の在线学习平台</h1> <h1 class="title" data-i18n="appTitle">
<h2 class="subtitle"></h2> 物联网专业の在线学习平台<span class="title-cursor" aria-hidden="true"></span>
</h1>
<div class="grid" id="sites"></div> <div class="grid" id="sites"></div>
</main> </main>
<div class="beian"> <div class="beian">

View File

@@ -3,8 +3,7 @@ import { getLocalizedText } from "./i18n.js"
const renderItem = (site, language) => { const renderItem = (site, language) => {
const title = getLocalizedText(site.title, language) const title = getLocalizedText(site.title, language)
const description = getLocalizedText(site.description, language) const description = getLocalizedText(site.description, language)
const iconName = const iconName = language === "meow" ? "noto--cat-face.svg" : site.icon
language === "meow" ? "noto--cat-face.svg" : site.icon
return ` return `
<a href="${site.url}" target="_blank" class="card"> <a href="${site.url}" target="_blank" class="card">
<div class="title-icon"> <div class="title-icon">

View File

@@ -397,7 +397,7 @@ html[data-theme="dark"]:not([data-design-theme="terminal"])
} }
.main { .main {
padding: 3rem 0; padding: 4rem 3rem 0 3rem;
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -412,11 +412,15 @@ html[data-theme="dark"]:not([data-design-theme="terminal"])
font-size: 2.5rem; font-size: 2.5rem;
font-weight: 600; font-weight: 600;
text-align: center; text-align: center;
margin-bottom: 0.5rem; margin: 1rem 0;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: -0.02em; letter-spacing: -0.02em;
} }
.title-cursor {
display: none;
}
/* Fluent 2 风格的标题渐变 - 使用 Fluent 蓝系 */ /* Fluent 2 风格的标题渐变 - 使用 Fluent 蓝系 */
.title { .title {
background: var(--title-gradient); background: var(--title-gradient);
@@ -583,8 +587,7 @@ html[data-theme="dark"]:not([data-design-theme="terminal"])
} }
.beian { .beian {
margin-bottom: 24px; margin: 24px 0;
margin-top: 32px;
text-align: center; text-align: center;
} }
@@ -918,41 +921,9 @@ html[data-design-theme="cyberpunk"] .title {
animation: cyberpunk-rgbShift 4.5s ease-in-out infinite; animation: cyberpunk-rgbShift 4.5s ease-in-out infinite;
} }
html[data-design-theme="cyberpunk"] .title::before,
html[data-design-theme="cyberpunk"] .title::after {
content: attr(data-text);
position: absolute;
left: 0;
top: 0;
width: 100%;
pointer-events: none;
opacity: 0.65;
mix-blend-mode: screen;
}
html[data-design-theme="cyberpunk"] .title::before { html[data-design-theme="cyberpunk"] .title-cursor {
transform: translate3d(-2px, 0, 0); display: none;
color: rgba(255, 0, 255, 0.85);
animation: cyberpunk-glitch 6.2s steps(2, end) infinite;
}
html[data-design-theme="cyberpunk"] .title::after {
transform: translate3d(2px, 0, 0);
color: rgba(0, 212, 255, 0.85);
animation: cyberpunk-glitch 5.3s steps(2, end) infinite reverse;
}
html[data-design-theme="cyberpunk"] .subtitle {
color: var(--cyber-muted-fg);
letter-spacing: 0.14em;
text-transform: uppercase;
}
html[data-design-theme="cyberpunk"] .subtitle::after {
content: "\2588";
margin-left: 8px;
color: rgba(var(--accent-rgb), 0.85);
animation: cyberpunk-blink 1s step-end infinite;
} }
html[data-design-theme="cyberpunk"] .card { html[data-design-theme="cyberpunk"] .card {
@@ -1036,7 +1007,6 @@ html[data-design-theme="cyberpunk"] .beian a:hover {
html[data-design-theme="cyberpunk"] .title, html[data-design-theme="cyberpunk"] .title,
html[data-design-theme="cyberpunk"] .title::before, html[data-design-theme="cyberpunk"] .title::before,
html[data-design-theme="cyberpunk"] .title::after, html[data-design-theme="cyberpunk"] .title::after,
html[data-design-theme="cyberpunk"] .subtitle::after,
html[data-design-theme="cyberpunk"] .card { html[data-design-theme="cyberpunk"] .card {
animation: none !important; animation: none !important;
transition-duration: 0.01ms !important; transition-duration: 0.01ms !important;