Skip to content

Commit

Permalink
chore: updated docs & login hint (#22)
Browse files Browse the repository at this point in the history
* chore: update docs

* chore: add login hint

* chore: fix styles

* chore: update styles
  • Loading branch information
thezzisu authored Jan 18, 2024
1 parent c493b32 commit c87b3e3
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/4c3391ef.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@aoi-js/frontend": patch
5 changes: 4 additions & 1 deletion apps/frontend/src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{{ t('pages.signin') }}
</VCardTitle>
<VDivider />
<VAlert v-if="hint" type="info" class="ma-4 mb-0 u-whitespace-pre" :text="hint" />
<RouterView />
</VCard>
</VCol>
Expand All @@ -17,11 +18,13 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useAppState } from '@/stores/app'
import { useRouter, useRoute } from 'vue-router'
import { useRouter } from 'vue-router'
const { t } = useI18n()
const router = useRouter()
const appState = useAppState()
if (appState.loggedIn) router.replace('/')
const hint = import.meta.env.VITE_LOGIN_HINT
</script>
60 changes: 51 additions & 9 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,72 @@ import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'The AOI Project',
description: 'The ultimate online judge solution',
description: '终极在线评测解决方案',
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
themeConfig: {
logo: '/logo.svg',

nav: [
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/getting-started' }
{ text: '首页', link: '/' },
{ text: '开始使用', link: '/getting-started' }
],

sidebar: [
{
text: 'Getting Started',
items: [{ text: 'Getting Started', link: '/getting-started' }]
text: '开始使用',
items: [{ text: '开始使用', link: '/getting-started' }]
},
{
text: 'Guides',
text: '教程',
items: [
{ text: 'Admin Guide', link: '/admin-guide' },
{ text: 'Dev Guide', link: '/dev-guide' }
{ text: '运维指南', link: '/admin-guide' },
{ text: '开发指南', link: '/dev-guide' }
]
}
],

socialLinks: [{ icon: 'github', link: 'https://github.com/fedstackjs/aoi' }]
socialLinks: [{ icon: 'github', link: 'https://github.com/fedstackjs/aoi' }],

editLink: {
pattern: 'https://github.com/fedstackjs/aoi/edit/main/docs/:path',
text: 'Edit this page on GitHub'
},

footer: {
message: 'Released under the AGPL-3.0 License.',
copyright: 'Copyright © 2022-present FedStack'
}
},
locales: {
root: {
label: '中文',
lang: 'zh'
},
en: {
label: 'English',
lang: 'en',
title: 'The AOI Project',
description: 'The ultimate online judge solution',
themeConfig: {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/getting-started' }
],

sidebar: [
{
text: 'Getting Started',
items: [{ text: 'Getting Started', link: '/getting-started' }]
},
{
text: 'Guides',
items: [
{ text: 'Admin Guide', link: '/admin-guide' },
{ text: 'Dev Guide', link: '/dev-guide' }
]
}
]
}
}
}
})
18 changes: 18 additions & 0 deletions docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,21 @@
--vp-home-hero-image-filter: blur(72px);
}
}

@keyframes float {
0% {
transform: translateX(-50%) translateY(-50%)
}

50% {
transform: translateX(-50%) translateY(-60%)
}

to {
transform: translateX(-50%) translateY(-50%)
}
}

#VPContent div.VPHero.has-image.VPHomeHero div.image img.VPImage {
animation: float 6s ease-in-out infinite;
}
5 changes: 5 additions & 0 deletions docs/en/admin-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
outline: deep
---

# AOI Admin Guide
5 changes: 5 additions & 0 deletions docs/en/dev-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
outline: deep
---

# AOI Dev Guide
5 changes: 5 additions & 0 deletions docs/en/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
outline: deep
---

# Getting Started
28 changes: 28 additions & 0 deletions docs/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: 'The AOI Project'
text: 'All in One Solution for Online Judge'
tagline: 'The ultimate, scalable, performant online judge infrastructure'
image: /logo.svg
actions:
- theme: brand
text: Getting Started
link: /getting-started
- theme: alt
text: Admin Guide
link: /admin-guide
- theme: alt
text: Dev Guide
link: /dev-guide

features:
- title: Out of the Box
details: Containerized, cloud-native deployment with Docker and Kubernetes
- title: Builtin Scalability
details: Horizontal scalability with fully stateless design
- title: Full Customization
details: Customized UI&UX with fully decoupled frontend, judger and ranker
---
27 changes: 15 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,29 @@
layout: home

hero:
name: 'The AOI Project'
text: 'All in One Solution for Online Judge'
tagline: 'The ultimate, scalable, performant online judge infrastructure'
name: 'AOI评测系统'
text: '一体化在线评测方案'
tagline: '全功能,可扩展,高性能的评测基础设施'
image: /logo.svg
actions:
- theme: brand
text: Getting Started
text: 开始使用
link: /getting-started
- theme: alt
text: Admin Guide
text: 运维文档
link: /admin-guide
- theme: alt
text: Dev Guide
text: 开发文档
link: /dev-guide

features:
- title: Out of the Box
details: Containerized, cloud-native deployment with Docker and Kubernetes
- title: Builtin Scalability
details: Horizontal scalability with fully stateless design
- title: Full Customization
details: Customized UI&UX with fully decoupled frontend, judger and ranker
- icon: 📦
title: 开箱即用
details: 使用Docker与K8s快速容器化部署
- icon: 📈
title: 无限扩展
details: 纯无状态设计,可无限水平扩展
- icon: 🎨
title: 完全定制
details: 完全可定制的前端、评测机、排名系统
---

0 comments on commit c87b3e3

Please sign in to comment.