Skip to content

feat: move HouLiXieBuRou/website-nuxt here #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 137 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
a460bf6
test
HouLiXieBuRou Sep 30, 2024
81228c4
feat: 剪切板迁移,高亮代码更新
HouLiXieBuRou Oct 12, 2024
df62019
feat: 左菜单功能更新
HouLiXieBuRou Oct 14, 2024
c0cd7b9
fix: 首屏加载完成全布局混乱修复,左菜单栏功能更新
HouLiXieBuRou Oct 15, 2024
d65f221
fix: 左栏回到首页 button 动画修复,随高度变化出现更敏捷
HouLiXieBuRou Oct 15, 2024
6668c24
fix: 修复底栏文字不垂直居中
HouLiXieBuRou Oct 15, 2024
8f1585d
fix: 修复底栏文字不垂直居中
HouLiXieBuRou Oct 15, 2024
e8a7bd5
chore: 删除 console.log
HouLiXieBuRou Oct 21, 2024
d23fdf6
chore: 静态数据不需要 reactive
HouLiXieBuRou Oct 21, 2024
0a1426a
feat: 数据请求方式更新,采用 nuxt 官方封装的 useFetch
HouLiXieBuRou Oct 21, 2024
291235f
chore: 删除无用导入,此标的会被 nuxt 自动接管
HouLiXieBuRou Oct 21, 2024
13e802c
fix: 修复生产环境下数据获取异常问题
HouLiXieBuRou Oct 22, 2024
020706e
chore: 暂时屏蔽 v-icon 标签,待寻找替代品
HouLiXieBuRou Oct 22, 2024
01e408b
feat: 网络请求改为 nuxt 原生 useFetch
HouLiXieBuRou Oct 23, 2024
32d1f21
feat: 配置文件更新
HouLiXieBuRou Oct 23, 2024
98752b0
chore: 使无子元素的标签自闭合
HouLiXieBuRou Oct 23, 2024
c0168f8
chore: package.json 、package-lock.json 文件更新
HouLiXieBuRou Oct 23, 2024
af856e8
fix: 修复了该页面缩放不正确问题
HouLiXieBuRou Oct 24, 2024
2bbef92
fix: 回到页首 button 出现时机修复
HouLiXieBuRou Oct 25, 2024
5dab68d
feat: download 页面服务端渲染规则更新,现在下载数据五分钟更新一次
HouLiXieBuRou Oct 28, 2024
8386ae0
fix: 高亮导航效果修复,防止对已有导航进行的修改不全面导致导航异常
HouLiXieBuRou Oct 29, 2024
c7c48d5
feat: 下载栏以及内容按钮样式更新,更简洁高效
HouLiXieBuRou Oct 29, 2024
17e7697
feat: 服务端渲染配置更新
HouLiXieBuRou Oct 29, 2024
9c66074
chore: css 样式合并,所有的子页面共有样式抽象到上层路由 app.vue 里添加
HouLiXieBuRou Oct 29, 2024
7a0a5fc
test
HouLiXieBuRou Nov 6, 2024
b5d8bd9
fix: 静态编译判断 useFetch 的 status 会导致错误,删除该判断
HouLiXieBuRou Nov 12, 2024
0d20f1e
fix: 修复从别处路由至 /download 时页面跳转需等待网络请求完成,并更新了 loading 样式
HouLiXieBuRou Nov 13, 2024
2c0e318
feat: 新闻按照语言分类
HouLiXieBuRou Nov 14, 2024
6bdf24d
Temporary storage work
HouLiXieBuRou Nov 27, 2024
49d5971
fix: 修复 barleft 页面未国际化字段;修复菜单栏自动缩放问题
HouLiXieBuRou Dec 20, 2024
77f8633
feat: 在 herder 栏目添加手动切换语言 button
HouLiXieBuRou Dec 23, 2024
e2d758a
feat: 提取 layouts; 给部分超链接补充上了跳转高亮动画;new list 页面错误修复
HouLiXieBuRou Dec 31, 2024
bc9f93f
feat: 新闻内容的累计更新
HouLiXieBuRou Dec 31, 2024
ec5346d
feat: 为多语言支持所需的工具函数添加了注释
HouLiXieBuRou Dec 31, 2024
86a4922
feat: left bar 样式调整,像老版对齐,缩短字 left 边距
HouLiXieBuRou Jan 3, 2025
68b6f17
feat: mascot 页面布局更新
HouLiXieBuRou Feb 6, 2025
30f574c
feat: tailwindcss 升级到4.0.9
HouLiXieBuRou Feb 27, 2025
0e35674
feat: 同步 website-2023 对下载页面的修改,并格式化了 locals 目录下的所有 json 文件
HouLiXieBuRou Mar 11, 2025
c163b42
fix: 修复静态构建时的内存泄露
HouLiXieBuRou Mar 26, 2025
21f95e4
fix: 修复 download 页面静态编译错误
HouLiXieBuRou Mar 27, 2025
9d3e712
fix(footer): fix footer width on narrow viewports
SkyBird233 May 30, 2025
d11e2db
fix: remove border radius from summer background
SkyBird233 May 30, 2025
c4a38c1
fix: remove unnecessary alignment class from CategorySecond component
SkyBird233 May 30, 2025
406b506
fix: warnings about prop types in BarHeader
SkyBird233 May 30, 2025
e5c8ab2
fix: move i18n.config.ts to resolve a warning
SkyBird233 May 30, 2025
af8d3b2
fix: correct variable reference for contact link in DownloadDetailsAp…
SkyBird233 May 30, 2025
3db1eeb
fix: add custom element configuration for ms-store-badge in nuxt.conf…
SkyBird233 May 30, 2025
e4e2a22
fix: override pinceau version to solve sourcemap warnings
SkyBird233 May 30, 2025
f5953df
chore: disable dark mode until it’s implemented
SkyBird233 Jun 21, 2025
dcf4a5d
fix: hover:no-underline not working after tailwindcss 4
SkyBird233 Jun 21, 2025
a497a91
fix: Element Plus theme styles not applied to generated components
SkyBird233 Jun 21, 2025
3f28125
chore: update @nuxt/content to v3.6.1 and remove docus for now
SkyBird233 Jun 22, 2025
38653a0
feat: refactor NewsCategoryList to use queryCollection directly
SkyBird233 Jun 25, 2025
25b41cf
chore: adjust content structure
SkyBird233 Jun 25, 2025
2a89f51
refactor: use simpler language code format
SkyBird233 Jun 26, 2025
ff035b8
chore: update nuxt and nuxtjs/i18n
SkyBird233 Jun 26, 2025
63ae9c4
fix: update news list and news detail page
SkyBird233 Jun 26, 2025
a7e022c
feat: add heti for article styling
SkyBird233 Jun 27, 2025
ed1d2fa
feat: update CategorySecond component styling and enhance layout in n…
SkyBird233 Jul 2, 2025
ad9392c
refactor: simplify ESLint configuration and integrate with Nuxt
SkyBird233 Jul 2, 2025
692ef93
chore: run eslint --fix
SkyBird233 Jul 2, 2025
c85b315
fix: errors and warnings reported by eslint
SkyBird233 Jul 2, 2025
b0411af
chore: run prettier --write
SkyBird233 Jul 2, 2025
ec7c406
feat: update gallery page to use async data fetching
SkyBird233 Jul 2, 2025
b23eb18
chore: remove old fileServe folder
SkyBird233 Jul 2, 2025
d601a91
fix: remove rounded corner of main1.svg
SkyBird233 Jul 2, 2025
937c89c
fix: bring icons back
SkyBird233 Jul 3, 2025
61b42b6
fix: adjust icon alignment in CategorySecond component
SkyBird233 Jul 3, 2025
5e0b3e2
refactor: optimize reactivity in BarHeader and BarLeft components
SkyBird233 Jul 3, 2025
f95caf0
fix: update axios to version 1.10.0 by npm audit fix
SkyBird233 Jul 3, 2025
7f50382
refactor: remove unused yaml import and requestToYaml function
SkyBird233 Jul 3, 2025
56783fe
refactor: remove unnecessary whitespace at the beginning of the news …
SkyBird233 Jul 3, 2025
5651f5b
feat: add responsive styling for images and update proxy configuratio…
SkyBird233 Jul 3, 2025
1198544
fix: update nuxt-monaco-editor to 1.3.2
SkyBird233 Jul 4, 2025
0c501e0
fix: correct data handling in paste detail component and update icon …
SkyBird233 Jul 4, 2025
7522f92
fix: update vite proxy configuration for pasteApi and pasteContent
SkyBird233 Jul 4, 2025
94ee035
fix: update links to use correct locale paths
SkyBird233 Jul 4, 2025
1c1b552
chore: bump @pinia/nuxt
SkyBird233 Jul 4, 2025
b7af7da
chore: update pangu to 7.0.0
SkyBird233 Jul 4, 2025
bd6b3fe
chore: update dependencies for @nuxt/content and better-sqlite3
SkyBird233 Jul 4, 2025
aef9aea
fix: update DownloadDetailsMain and DownloadWslDetails templates with…
SkyBird233 Jul 4, 2025
f485e50
fix: remove v-pangu directive and add spaceWord utility for better pe…
SkyBird233 Jul 4, 2025
f92ea7a
feat: update DownloadWslDetails component with source selection and d…
SkyBird233 Jul 5, 2025
c246f47
fix: various fixes across main pages
SkyBird233 Jul 5, 2025
e641dc8
feat: add ProsePre component and refactor CodeHighlight and CopyIcon …
SkyBird233 Jul 5, 2025
0cfd867
chore: bump @nuxt/content and better-sqlite3
SkyBird233 Jul 5, 2025
ab66b7f
chore: add @nuxt/seo
SkyBird233 Jul 5, 2025
49b68c9
feat: simple seo setup
SkyBird233 Jul 5, 2025
a0d3620
chore: disable ogImage and schemaOrg
SkyBird233 Jul 6, 2025
1088425
fix: regular page titles and liblol's translation keys
SkyBird233 Jul 6, 2025
b9976b9
fix: update titles for other pages
SkyBird233 Jul 6, 2025
1be8c38
feat: internationalize SEO and head management
SkyBird233 Jul 6, 2025
13acf2b
chore: run prettier
SkyBird233 Jul 6, 2025
82cb4b8
feat: dynamically generate language switching list and language switc…
SkyBird233 Jul 6, 2025
9f31eb7
chore: move development packages to devDependencies
SkyBird233 Jul 6, 2025
cf1e0d8
chore: run npm update
SkyBird233 Jul 6, 2025
7b169e9
fix: add a workaround for form-data
SkyBird233 Jul 6, 2025
fdc23d0
fix: add site url configuration and update comments in nuxt.config.ts
SkyBird233 Jul 6, 2025
f42b610
chore: bump deps
SkyBird233 Jul 6, 2025
c3acbbe
fix: remove unused styles in default layout to restore missing styles in
SkyBird233 Jul 9, 2025
af4209a
feat: lazy load Mocano Editor
SkyBird233 Jul 9, 2025
f6e98b8
chore: set og:site_name
SkyBird233 Jul 9, 2025
39cd254
refactor: simplify seasonal theming
SkyBird233 Jul 10, 2025
f491793
fix: download button's font size in SSG
SkyBird233 Jul 12, 2025
00cbcf4
fix: fix the app upper component and how to use it in l10n
HouLiXieBuRou Jul 22, 2025
ae45ca5
chore: modify the behavior of the formatting program and rerun it npx…
HouLiXieBuRou Jul 23, 2025
b7948e7
fix: 所有单个 html 标签下应用了多个变量的 vue 模板语法,为所有变量添加 span 包裹
HouLiXieBuRou Jul 24, 2025
4b6f41b
fix: some spacing issue
SkyBird233 Jul 24, 2025
82d2b09
fix: remove redundant whitespaces in locales/zh-cn
SkyBird233 Jul 24, 2025
523a2fb
feat: override heti font stack to fix Chinese quote width
SkyBird233 Jul 24, 2025
6db05f4
fix: 修复路由 /aosc-os/relnote/asahi 英文下的界面
HouLiXieBuRou Jul 28, 2025
4f76b4c
chore: refactor category lists
SkyBird233 Jul 26, 2025
e56923e
chore: add AOSCC content
SkyBird233 Jul 26, 2025
f4d086f
feat: add AOSCC pages
SkyBird233 Jul 26, 2025
742b952
feat: update AOSCC list in events page
SkyBird233 Jul 26, 2025
0472ea4
fix: links in AOSCC content
SkyBird233 Jul 26, 2025
6420db1
chore: add crowdsourcing content
SkyBird233 Jul 27, 2025
43f9fd8
feat: add crowdsourcing pages
SkyBird233 Jul 27, 2025
66e88ec
chore: update static resources
SkyBird233 Jul 27, 2025
6bca367
fix: update locale files for sponsors page
SkyBird233 Jul 27, 2025
a2de30f
fix: update sponsors page
SkyBird233 Jul 27, 2025
27f52b4
chore: update news
SkyBird233 Jul 27, 2025
f2ac6bd
fix: news categories
SkyBird233 Jul 27, 2025
db9f5f3
Merge branch 'website-nuxt/main' into website-nuxt
SkyBird233 Jul 31, 2025
4a96995
chore: update README files from the old nuxt branch
SkyBird233 Jul 31, 2025
f909929
feat: update README files
SkyBird233 Jul 31, 2025
5a80fbd
chore: add a build script for Cloudflare pages
SkyBird233 Aug 1, 2025
5cc793d
fix: try to fix build-cf.sh for nuxt
SkyBird233 Aug 1, 2025
2fa9def
fix: try to fix build-cf.sh for nuxt
SkyBird233 Aug 1, 2025
8ffc054
fix: 修复新闻页面里 h2 h3 标签被错误的识别为链接
HouLiXieBuRou Jul 31, 2025
fb018a4
Revert "fix: 修复新闻页面里 h2 h3 标签被错误的识别为链接"
SkyBird233 Jul 31, 2025
dfcae3f
chore: remove sticky headings for news pages for anchor links
SkyBird233 Jul 31, 2025
83887a4
fix: prevent h2 from showing underline on hovering
SkyBird233 Jul 31, 2025
59c0ff2
feat: 新闻展示页去除各级标题被选中时的下划线,并且首标题现在也会生成链接
HouLiXieBuRou Aug 1, 2025
7ccbb48
feat: show paragraph mark when hovering on h2 titles with link
SkyBird233 Aug 1, 2025
ebfbb72
fix: link color of markdown content
SkyBird233 Aug 2, 2025
3cee84a
feat: add noindex metadata to paste detail page
SkyBird233 Aug 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 17 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,24 @@
# Binary assets
public/assets/gallery/
public/assets/news/
public/assets/coffee-break/
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Runtime files
auto-imports.d.ts
components.d.ts
# Node dependencies
node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
website
website.zip
deply/website.zip
public/newsCategories
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
# Misc
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
pasteServer/paste/*
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pasteServer/*
makeCategory/*
deploy/*
website/*
utils/*
auto-imports.d.ts
components.d.ts
content/*
fileServe/*
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"semi": true,
"bracketSameLine": true,
"arrowParens": "always",
"htmlWhitespaceSensitivity": "strict",
"htmlWhitespaceSensitivity": "ignore",
"vueIndentScriptAndStyle": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 80,
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindStylesheet": "./src/style.css"
"tailwindStylesheet": "./assets/css/main.css"
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"commentTranslate.hover.enabled": true
}
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ Windows home page from 2001 - 2004:
- [Reference 1, Windows XP home from late 2001](https://web.archive.org/web/20011211230629/http://microsoft.com/windowsxp/default.asp)
- [Reference 2, Windows XP mid-cycle home from 2004](https://web.archive.org/web/20040204080626/http://www.microsoft.com/china/windows/default.mspx)

Technically speaking, this website is built as a client-side rendered Web
application. In the near future, we plan to refactor this website into one
that is powered by server-side rendering or static site generator to help
with performance and indexability.
Technically speaking, this a statically generated site built with Nuxt.

This website is not yet optimised for mobile, legacy (Afterglow-targeted),
and functionally-limited browsers. We are currently evaluating plans to
Expand All @@ -47,19 +44,19 @@ To install Node.js + NPM on AOSC OS:
oma install nodejs
```

Then, build and serve the website locally:
Then, build and preview the website locally:

```
npm i
npm run dev
npm run generate
npm run preview
```

Submitting news
---

All news articles are written in Markdown and stored in `/public/news`, with
extra assets (images, etc.) stored in `/assets/...`. All assets should be
referenced from the site (`/assets/...`, not `https://...`).
All news articles are written in Markdown and stored in `/content/{language}/news`, with
extra assets (images, etc.) stored in `/public/...`. All assets should be
referenced from the site (`/...`, not `https://...`).

News articles should contain a header:

Expand All @@ -86,8 +83,9 @@ home: true

### Localising news articles

To localise a news article, use a language code suffix such as `.zh-cn`, i.e.:
To localize a news article, just add a file with the same name to the
corresponding language folder such as `/content/zh/`, i.e.:

```
2024-09-18-aosc-os-relnote.zh-cn.md
/content/zh/news/2024-09-18-aosc-os-relnote.md
```
14 changes: 7 additions & 7 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [参考甲:Windows XP 主页(2001 年末)](https://web.archive.org/web/20011211230629/http://microsoft.com/windowsxp/default.asp)
- [参考乙:Windows XP 中期主页(2004 年)](https://web.archive.org/web/20040204080626/http://www.microsoft.com/china/windows/default.mspx)

技术架构方面,该网站为客户端渲染 (client-side render) 的单页 Web 应用程序,我们计划在未来一段时间就将网站转写为服务端渲染 (server-side render) 或静态生成网站 (static site generator),提高网站的可索引性及性能
技术架构方面,该网站是使用 Nuxt 构建,采用静态网站生成技术

目前网站亦未对移动端、低性能(星霞 OS 目标)设备及功能受限的浏览器优化,我们计划在后续研判是否通过实现专用网站解决此问题。

Expand All @@ -30,17 +30,17 @@
oma install nodejs
```

而后,使用如下命令启动网站构建及服务
而后,使用如下命令启动网站构建及预览

```
npm i
npm run dev
npm run generate
npm run preview
```

提交新闻
---

本站新闻使用 Markdown 格式编写,存放于 `/public/news`;额外文件(如图片等)存放于 `/assets/...`。引用额外文件时,应使用站内引用(`/assets/...`)而非站外引用(`https://...`)。
本站新闻使用 Markdown 格式编写,存放于 `/content/{language}/news`;额外文件(如图片等)存放于 `/public/...`。引用额外文件时,应使用站内引用(`/...`)而非站外引用(`https://...`)。

新闻文件均带有文件头,如下例:

Expand All @@ -67,8 +67,8 @@ home: true

### 新闻本地化

本地化新闻文章时,在文件名后加语言代号作为后缀即可(如 `.zh-cn`):
本地化新闻文章时,在对应语言文件夹下添加同名文件即可(如 `/content/en/`):

```
2024-09-18-aosc-os-relnote.zh-cn.md
/content/en/news/2024-09-18-aosc-os-relnote.md
```
53 changes: 53 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<script setup lang="js">
const highBrightnessControllerStore = useHighBrightnessControllerStore();
const router = useRouter();
const { t } = useI18n();

useHead({
title: t('seo.head.title'),
titleTemplate: (title) => `${title} | ${t('seo.site.name')}`,
link: [{ rel: 'icon', type: 'image/svg+xml', href: '/aosc.svg' }],
script: [
{
// This script will execute before the browser renders the <body>,
// ensuring the correct season class is set from the very beginning.
textContent:
'document.documentElement.classList.add(["spring","summer","autumn","winter"][(new Date().getMonth()+10)%12/3|0])',
type: 'text/javascript',
tagPosition: 'head'
}
]
});

useSeoMeta({
description: t('seo.seo.description'),
ogImage: '/aosc.svg',
ogSiteName: t('seo.site.name')
});

router.afterEach((to, _from) => {
highBrightnessControllerStore.obj[to.path] =
!highBrightnessControllerStore.obj[to.path];
});

const { $mitt } = useNuxtApp();
const bodyRef = useTemplateRef('mainBody');
onMounted(() => {
const mutationObserver =
window.MutationObserver ||
window.WebKitMutationObserver ||
window.MozMutationObserver;
const observer = new mutationObserver(() => {
$mitt.emit('routeSwitching');
});
observer.observe(bodyRef.value, {
childList: true
});
});
</script>

<template>
<NuxtLayout>
<div ref="mainBody" class="flex-1 pl-[1px]"><NuxtPage /></div>
</NuxtLayout>
</template>
9 changes: 8 additions & 1 deletion src/style.css → assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
--color-black: #000;

--text-*: initial;

--text-xl: 1.5rem;
--text-2xl: 1.8rem;
--text-3xl: 2rem;
Expand All @@ -34,6 +35,7 @@
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}

a:hover {
text-decoration: underline;
}
Expand All @@ -46,6 +48,11 @@ body {
font-family: 'Noto Sans CJK SC', sans-serif;
font-size: 12pt;
min-width: 800px;

/* Global style for Element Plus created components (located outside #app) */
--el-color-primary: var(--primary);
--el-border-radius-base: 0;
--el-popover-border-radius: 0;
}

@media (min-width: 960px) {
Expand All @@ -61,7 +68,7 @@ body {
/* flex: 0 0 100%; */
}

.shadow {
.myShadow {
box-shadow: 0px 0px 10px #999;
background: #fafafa;
}
Expand Down
Loading