Skip to content

Commit

Permalink
chore: 运行 prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
MingcongBai committed Sep 23, 2024
1 parent 4bee00d commit d58931b
Show file tree
Hide file tree
Showing 58 changed files with 644 additions and 1,408 deletions.
9 changes: 2 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import js from '@eslint/js';
export default [
// vue插件的推荐配置
...pluginVue.configs[
('flat/base',
'flat/essential',
'flat/strongly-recommended')
('flat/base', 'flat/essential', 'flat/strongly-recommended')
],
// eslint推荐的js监控
js.configs.recommended,
Expand All @@ -34,10 +32,7 @@ export default [
}
]
},
ignores: [
'auto-imports.d.ts',
'components.d.ts'
]
ignores: ['auto-imports.d.ts', 'components.d.ts']
},
// 这个配置会关闭eslint与prettier冲突的配置,防止出现prettier格式完eslint爆红
eslintConfigPrettier
Expand Down
13 changes: 3 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link
rel="icon"
type="image/svg+xml"
href="/assets/aosc.svg" />
<meta
name="viewport"
content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/assets/aosc.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>社区门户 | 安同开源社区 (AOSC)</title>
</head>
<body class="bg-floral">
<div id="app"></div>
<script
type="module"
src="/src/main.js"></script>
<script type="module" src="/src/main.js"></script>
</body>
</html>
3 changes: 1 addition & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
useThemeStore
} from './stores/miscellaneous.js';
const highBrightnessControllerStore =
useHighBrightnessControllerStore();
const highBrightnessControllerStore = useHighBrightnessControllerStore();
const router = useRouter();
router.afterEach((to, from) => {
Expand Down
10 changes: 2 additions & 8 deletions src/components/AccordionNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,12 @@ const props = defineProps({
});
</script>
<template>
<span
v-for="(item, index) in navigationList"
:key="item.title">
<span v-for="(item, index) in navigationList" :key="item.title">
<span :class="spanClass" v-if="index !== 0">
<slot>|</slot>
</span>
<AppLink
:to="
item.url
? item.url
: { path: item.path, hash: item.hash }
"
:to="item.url ? item.url : { path: item.path, hash: item.hash }"
:class="linkClass">
{{ item.title }}</AppLink
>
Expand Down
3 changes: 1 addition & 2 deletions src/components/AppH2.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup></script>
<template>
<h2
class="font-semibold text-[1.2em] mb-2 features">
<h2 class="font-semibold text-[1.2em] mb-2 features">
<slot></slot>
</h2>
</template>
Expand Down
9 changes: 3 additions & 6 deletions src/components/AppHighlight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ const props = defineProps({
const codeRef = ref(null);
onMounted(() => {
codeRef.value.innerHTML = hljs.highlight(
props.code,
{
language: props.lang
}
).value;
codeRef.value.innerHTML = hljs.highlight(props.code, {
language: props.lang
}).value;
});
function copy() {
Expand Down
10 changes: 2 additions & 8 deletions src/components/AppLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@ const props = defineProps({
});
const isExternalLink = computed(() => {
return (
typeof props.to === 'string' &&
props.to.startsWith('http')
);
return typeof props.to === 'string' && props.to.startsWith('http');
});
</script>

<template>
<a
v-if="isExternalLink"
:href="to"
:class="props.class">
<a v-if="isExternalLink" :href="to" :class="props.class">
<slot></slot>
</a>
<router-link v-else v-bind="$props">
Expand Down
11 changes: 3 additions & 8 deletions src/components/AppMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ const yamlDoc = ref({});
const newsDate = ref('');
(async () => {
let [res, err] = await requestGetJson(
`/news/${route.params.newsPath}`
);
let [res, err] = await requestGetJson(`/news/${route.params.newsPath}`);
if (res) {
// 将头信息和内容分开,头信息为yml格式
[mdRes.value, yamlDoc.value] =
requestToYaml(res);
[mdRes.value, yamlDoc.value] = requestToYaml(res);
setTitle(yamlDoc.value['title']);
}
})();
Expand All @@ -35,9 +32,7 @@ const newsDate = ref('');
:title="yamlDoc['title']"
:right-text="newsDate"
class="absolute w-[calc(59.5vw-1px)]" />
<v-md-preview
:text="mdRes"
class="pt-[50px]"></v-md-preview>
<v-md-preview :text="mdRes" class="pt-[50px]"></v-md-preview>
</div>
</template>

Expand Down
10 changes: 3 additions & 7 deletions src/components/AppSupport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ const props = defineProps({
required: true
}
});
const highBrightnessControllerStore =
useHighBrightnessControllerStore();
const highBrightnessControllerStore = useHighBrightnessControllerStore();
watch(
() =>
highBrightnessControllerStore.obj[route.path],
() => highBrightnessControllerStore.obj[route.path],
() => {
switch (route.hash) {
case '#support':
Expand All @@ -38,9 +36,7 @@ const support = ref();
<CategorySecond title="支持文档" id="support" />
<div ref="support" class="pt-4 pb-[60px] px-16">
<ul class="list-disc">
<li
v-for="item in navigationList"
:key="item.title">
<li v-for="item in navigationList" :key="item.title">
<AppLink
:to="
item.url
Expand Down
4 changes: 1 addition & 3 deletions src/components/CategorySecond.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const props = defineProps({
{{ props.rightText }}
</router-link>
<!-- 右箭头 -->
<v-icon
v-if="showRightChevron"
name="bi-chevron-double-right" />
<v-icon v-if="showRightChevron" name="bi-chevron-double-right" />
</span>
</div>
</template>
Expand Down
13 changes: 3 additions & 10 deletions src/components/PageNotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,14 @@ onMounted(() => {
<div class="pl-[1px]">
<category-second title="错误页" />
<div class="p-[20px]">
<h1 class="text-4xl font-bold"
>找不到页面 (404)</h1
>
<h1 class="text-4xl font-bold">找不到页面 (404)</h1>
<p class="my-[20px]"
>您想要访问的页面:{{
curUrl
}}
在站点上不存在。请检查您输入的网页地址
>您想要访问的页面:{{ curUrl }} 在站点上不存在。请检查您输入的网页地址
(URL) 是否正确。</p
>
<p
>如果该页面链接是其他网页中所引用的,请
<AppLink
target="_blank"
to="https://aosc.io/contact/"
<AppLink target="_blank" to="https://aosc.io/contact/"
>与我们联系</AppLink
>。
</p>
Expand Down
12 changes: 4 additions & 8 deletions src/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ $green: #a7ecad;
$bg-secondary: #3f6075;

:root {
--font-family-monospace: 'Source Code Pro',
'Menlo', 'Consolas', 'DejaVu Sans Mono',
-apple-system, monospace;
--font-family-monospace: 'Source Code Pro', 'Menlo', 'Consolas',
'DejaVu Sans Mono', -apple-system, monospace;
}

@media (min-width: 1280px) {
Expand Down Expand Up @@ -330,16 +329,13 @@ td {
border: 1px dashed #fff;
}

.vuepress-markdown-body
div[class*='v-md-pre-wrapper-']
pre,
.vuepress-markdown-body div[class*='v-md-pre-wrapper-'] pre,
.vuepress-markdown-body
div[class*='v-md-pre-wrapper-']
pre[class*='v-md-prism-'] {
z-index: 0;
}

.vuepress-markdown-body
div[class*='v-md-pre-wrapper-']::before {
.vuepress-markdown-body div[class*='v-md-pre-wrapper-']::before {
z-index: 0;
}
9 changes: 2 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import './css/index.scss';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import {
OhVueIcon,
addIcons
} from 'oh-vue-icons';
import { OhVueIcon, addIcons } from 'oh-vue-icons';
import AppLink from './components/AppLink.vue';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import {
Expand Down Expand Up @@ -55,9 +52,7 @@ import './utils/highlightjs';
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
const app = createApp(App);
for (const [key, component] of Object.entries(
ElementPlusIconsVue
)) {
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
app.use(VueMonacoEditorPlugin, {
Expand Down
74 changes: 27 additions & 47 deletions src/pages/about/AboutIndex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ import AppH2 from '/src/components/AppH2.vue';
<category-second title="关于社区" />
<div class="p-6">
<p>
安同开源社区(Anthon Open Source
Community,简称 AOSC)成立于 2011
安同开源社区(Anthon Open Source Community,简称 AOSC)成立于 2011
年末,是一个由计算机爱好者志愿组织工作,主要活动于线上的开源社区。我社的主要工作目标分为技术、文化和社会三个方面。
</p>
<br />

<p>
技术方面,社区的主要项目为安同
OS(英译:AOSC
OS),是一款以“简明可靠”为设计及维护目标的
Linux 发行版。安同 OS 主要面向有一定 Linux
技术方面,社区的主要项目为安同 OS(英译:AOSC
OS),是一款以“简明可靠”为设计及维护目标的 Linux 发行版。安同 OS
主要面向有一定 Linux
使用经验的用户,针对个人桌面设备优化体验,致力于为用户提供开箱即用、系统管理简洁和可靠的工作环境。在维护安同
OS 的同时,我们亦通过开发小熊猫包管理
(oma) 、libLoL
OS 的同时,我们亦通过开发小熊猫包管理 (oma) 、libLoL
龙架构新旧世界兼容层等周边软件项目,进一步提升系统的使用体验。作为一个贡献者主要为汉语母语用户的社区,我们也通过包括字体搭配及渲染调优、直接参与上游软件本地化工作和软件选择等手段,改善简中环境的使用体验。
</p>
<br />
Expand All @@ -33,11 +30,9 @@ import AppH2 from '/src/components/AppH2.vue';

<p>
社会方面,我社重视围绕开源软件生态协作共进及技能共享。作为一个成员成分丰富的社区,我们自
2011
年成立起便以不同方式参与社会工作,协同各地区
Linux
爱好者、校园社团和企业单位宣扬开源软件的广泛应用。自
2015 年起,社区每年暑期均会举办名为 AOSCC
2011 年成立起便以不同方式参与社会工作,协同各地区 Linux
爱好者、校园社团和企业单位宣扬开源软件的广泛应用。自 2015
年起,社区每年暑期均会举办名为 AOSCC
的年度聚会,邀请包括社区贡献者、成员、校园社团、企业和个人参与,在向外界宣传社区工作的同时,为爱好者和行业代表提供了分享技术技巧和行业知识及动向的平台。近年来,我社每年还以导师身份安排贡献者参与国内外的开源项目推进活动,如中国科学院软件研究所的“开源之夏”活动,带领国内外高校学生锻炼应用和研发能力、积累专业经验。
</p>
</div>
Expand All @@ -50,16 +45,13 @@ import AppH2 from '/src/components/AppH2.vue';
><br />
<app-h2>安同 OS</app-h2>
<p
>安同 OS(英译:AOSC
OS)是一款以“简明可靠”为设计及维护目标的
Linux 发行版。本系统主要面向有一定 Linux
>安同 OS(英译:AOSC OS)是一款以“简明可靠”为设计及维护目标的 Linux
发行版。本系统主要面向有一定 Linux
使用经验的用户,针对个人桌面设备优化体验,致力于为用户提供开箱即用和简便可靠的工作环境。</p
><br />
<p
>AOSC OS 支持众多处理器架构,包括
x86_64、AArch64、基于 MIPS 的龙芯 3
和龙架构(LoongArch 新世界),以及如
RISC-V
>AOSC OS 支持众多处理器架构,包括 x86_64、AArch64、基于 MIPS 的龙芯 3
和龙架构(LoongArch 新世界),以及如 RISC-V
等新兴架构;在提供架构支持的同时,我们也有针对不同设备类型进行体验测试和调优,致力于在各种不同架构和类型的设备上实现开箱即用的体验。</p
>
<app-h2>星霞 OS</app-h2>
Expand All @@ -75,12 +67,9 @@ import AppH2 from '/src/components/AppH2.vue';
>
<app-h2>libLoL</app-h2>
<p
>libLoL (LoongArch on LoongArch) 旧世界
ABI 常用于为龙芯官方的 Loongnix
参考发行和统信 UOS 设计的商业软件,如腾讯
QQ、金山 WPS for Linux
和龙芯浏览器等。由于这些应用程序尚未移植到新世界
ABI
>libLoL (LoongArch on LoongArch) 旧世界 ABI 常用于为龙芯官方的 Loongnix
参考发行和统信 UOS 设计的商业软件,如腾讯 QQ、金山 WPS for Linux
和龙芯浏览器等。由于这些应用程序尚未移植到新世界 ABI
上,本运行时旨在为新世界发行版用户提供运行上述应用程序的便利。</p
>
<app-h2>Ciel</app-h2>
Expand All @@ -98,33 +87,24 @@ import AppH2 from '/src/components/AppH2.vue';
<category-second title="历史沿革" />
<div class="p-6">
<p
>安同开源社区 (AOSC)
的最初形态是由白铭骢与他的两位同学于 2011
>安同开源社区 (AOSC) 的最初形态是由白铭骢与他的两位同学于 2011
年末创立的安同开发团队
(Anthon.Dev)。开发团队因组织管理不善于一年内夭折,而后于
2012 年末重组为开源社区并延续至今。</p
(Anthon.Dev)。开发团队因组织管理不善于一年内夭折,而后于 2012
年末重组为开源社区并延续至今。</p
><br />
<p
>我社主要项目安同 OS
最初名为“AnthonOS”,是一款基于现已弃用的
SUSE Studio 制作的 openSUSE
衍生发行版。一年后转而基于 Debian
衍生开发,着重于
CJK(中文、日文及韩文)支持并基于 KDE 4
设计了一套定制用户界面。2014
年,得益于原东方之心 Linux 开发者 Icenowy
Zheng 的帮助,社区以 Anthon :Next
为名立项,将安同 OS 转为独立构建。 安同 OS
独立后更名为 AOSC OS,即我社目前维护的通用
Linux 发行版。随后几年,维护者们不断扩充
AOSC OS
>我社主要项目安同 OS 最初名为“AnthonOS”,是一款基于现已弃用的 SUSE
Studio 制作的 openSUSE 衍生发行版。一年后转而基于 Debian
衍生开发,着重于 CJK(中文、日文及韩文)支持并基于 KDE 4
设计了一套定制用户界面。2014 年,得益于原东方之心 Linux 开发者 Icenowy
Zheng 的帮助,社区以 Anthon :Next 为名立项,将安同 OS 转为独立构建。
安同 OS 独立后更名为 AOSC OS,即我社目前维护的通用 Linux
发行版。随后几年,维护者们不断扩充 AOSC OS
的软件源体积,并引入了多架构支持。如今,得力于开发者们的持续贡献,AOSC
OS
的软硬件支持仍在不断扩充壮大,并围绕其发起了众多支持性项目。</p
OS 的软硬件支持仍在不断扩充壮大,并围绕其发起了众多支持性项目。</p
><br />
<p
>我社的年度聚会 AOSCC 始于 2014
年的暑期贡献者聚会,后于 2015
>我社的年度聚会 AOSCC 始于 2014 年的暑期贡献者聚会,后于 2015
年开始组织暑期线下聚会,在各企业和院校社团赞助的场地举办。每年聚会均邀请开源软件业界相关人士参与和分享经验,免费开放给各地社区好友参与。</p
>
</div>
Expand Down
Loading

0 comments on commit d58931b

Please sign in to comment.