feat: add announcements page and publishing workflow

This commit is contained in:
2026-11-01 21:46:19 +08:00
parent 0cea76de81
commit d8e708caec
15 changed files with 345 additions and 36 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ const t = (key: string) => i18n.global.t(key)
const escape = (value: string) => value.replace(/[&<>"']/g, char => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[char]!)
const text = (key: string) => `<span data-i18n="${key}">${escape(t(key))}</span>`
const navigation = [
['mirrors', '/'], ['news', 'https://www.itouc.cn/announcements/'], ['status', '/status'],
['mirrors', '/'], ['news', '/announcements'], ['status', '/status'],
['feedback', 'https://git.itouc.cn/ITStudio_OUC/OUCMirror-WebUI/issues'],
].map(([key, href]) => `<a class="nav-link${key === 'mirrors' ? ' active' : ''}" href="${href}">${text(`common.nav.${key}`)}</a>`).join('')
const languages = Object.entries(directoryMessages).map(([locale, messages]) => `<button class="language-option" data-locale="${locale}" lang="${locale}">${escape(messages.common.languageName)}</button>`).join('')