mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-26 15:15:06 +08:00
📝 [docs]: 新增统计信息
This commit is contained in:
parent
c805db3371
commit
0f9683de89
@ -24,5 +24,12 @@ export const en = defineConfig({
|
|||||||
copyright: ThemeConfig.copyright
|
copyright: ThemeConfig.copyright
|
||||||
},
|
},
|
||||||
outline: ThemeConfig.getOutLine("Page Content"),
|
outline: ThemeConfig.getOutLine("Page Content"),
|
||||||
|
|
||||||
|
langMenuLabel: 'Language',
|
||||||
|
returnToTopLabel: 'Back to top',
|
||||||
|
sidebarMenuLabel: 'Menu',
|
||||||
|
darkModeSwitchLabel: 'Theme',
|
||||||
|
lightModeSwitchTitle: 'Light Mode',
|
||||||
|
darkModeSwitchTitle: 'Dark Mode',
|
||||||
},
|
},
|
||||||
})
|
})
|
@ -24,5 +24,12 @@ export const zh = defineConfig({
|
|||||||
copyright: ThemeConfig.copyright
|
copyright: ThemeConfig.copyright
|
||||||
},
|
},
|
||||||
outline: ThemeConfig.getOutLine("页面内容"),
|
outline: ThemeConfig.getOutLine("页面内容"),
|
||||||
|
|
||||||
|
langMenuLabel: '语言',
|
||||||
|
returnToTopLabel: '返回顶部',
|
||||||
|
sidebarMenuLabel: '菜单',
|
||||||
|
darkModeSwitchLabel: '主题',
|
||||||
|
lightModeSwitchTitle: '轻色模式',
|
||||||
|
darkModeSwitchTitle: '深色模式',
|
||||||
},
|
},
|
||||||
})
|
})
|
@ -1,10 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import DefaultTheme from "vitepress/theme";
|
import DefaultTheme from "vitepress/theme";
|
||||||
import {ref, onMounted, onUnmounted, watch} from "vue";
|
import {ref, onMounted, onUnmounted} from "vue";
|
||||||
import {statsApi, GithubStats, RepoUrl, StarMapUrl} from "./scripts/statsApi";
|
import {statsApi, GithubStats, RepoUrl, StarMapUrl} from "./scripts/statsApi";
|
||||||
import {getTextRef, updateRefData} from "./scripts/i18n";
|
import {getTextRef, updateRefData} from "./scripts/i18n";
|
||||||
import { onBeforeRouteUpdate } from 'vue-router';
|
import {onBeforeRouteUpdate} from 'vue-router';
|
||||||
import {useData} from "vitepress";
|
|
||||||
|
|
||||||
const {Layout} = DefaultTheme;
|
const {Layout} = DefaultTheme;
|
||||||
|
|
||||||
@ -104,9 +103,10 @@ onBeforeRouteUpdate(() => {
|
|||||||
<Layout>
|
<Layout>
|
||||||
<template #home-features-before>
|
<template #home-features-before>
|
||||||
<div class="stats-bar-content">
|
<div class="stats-bar-content">
|
||||||
<div class="button" @click="updateRefData">Update</div>
|
|
||||||
<div class="stats-bar">
|
<div class="stats-bar">
|
||||||
<div class="stats-info">
|
<div class="stats-info">
|
||||||
|
<div class="stats-title">{{ getTextRef('stats') }}</div>
|
||||||
|
<div class="sections">
|
||||||
<div v-for="section in Object.values(dataSections)" :key="section.name" class="section">
|
<div v-for="section in Object.values(dataSections)" :key="section.name" class="section">
|
||||||
<a :href="section.link" target="_blank">
|
<a :href="section.link" target="_blank">
|
||||||
<div class="section-tab">
|
<div class="section-tab">
|
||||||
@ -117,6 +117,7 @@ onBeforeRouteUpdate(() => {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="starmap">
|
<div class="starmap">
|
||||||
<iframe src="https://starmap.liteyuki.icu/" width="100%" height="300px"></iframe>
|
<iframe src="https://starmap.liteyuki.icu/" width="100%" height="300px"></iframe>
|
||||||
</div>
|
</div>
|
||||||
@ -147,7 +148,19 @@ onBeforeRouteUpdate(() => {
|
|||||||
flex-direction: column; /* 默认纵向布局 */
|
flex-direction: column; /* 默认纵向布局 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats-info {
|
.stats-info{
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sections {
|
||||||
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||||
@ -232,7 +245,7 @@ onBeforeRouteUpdate(() => {
|
|||||||
|
|
||||||
.stats-info {
|
.stats-info {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
margin: 20px;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.starmap {
|
.starmap {
|
||||||
|
@ -4,6 +4,7 @@ import {useData} from "vitepress";
|
|||||||
|
|
||||||
const i18nData = {
|
const i18nData = {
|
||||||
en: {
|
en: {
|
||||||
|
stats: 'Stats',
|
||||||
online: 'Online',
|
online: 'Online',
|
||||||
offline: 'Offline',
|
offline: 'Offline',
|
||||||
total: 'Total',
|
total: 'Total',
|
||||||
@ -22,6 +23,7 @@ const i18nData = {
|
|||||||
resourceStore: 'Resources Store',
|
resourceStore: 'Resources Store',
|
||||||
},
|
},
|
||||||
zh: {
|
zh: {
|
||||||
|
stats: '统计信息',
|
||||||
online: '在线',
|
online: '在线',
|
||||||
offline: '离线',
|
offline: '离线',
|
||||||
total: '实例',
|
total: '实例',
|
||||||
|
@ -3,7 +3,6 @@ layout: home
|
|||||||
|
|
||||||
hero:
|
hero:
|
||||||
name: "LiteyukiBot"
|
name: "LiteyukiBot"
|
||||||
text: "Litedoc"
|
|
||||||
tagline: "An integrated chat bot application and management framework"
|
tagline: "An integrated chat bot application and management framework"
|
||||||
actions:
|
actions:
|
||||||
- theme: brand
|
- theme: brand
|
||||||
|
@ -3,7 +3,6 @@ layout: home
|
|||||||
|
|
||||||
hero:
|
hero:
|
||||||
name: "轻雪机器人"
|
name: "轻雪机器人"
|
||||||
text: "文档"
|
|
||||||
tagline: "一个综合性的聊天机器人应用及管理框架"
|
tagline: "一个综合性的聊天机器人应用及管理框架"
|
||||||
actions:
|
actions:
|
||||||
- theme: brand
|
- theme: brand
|
||||||
|
Loading…
Reference in New Issue
Block a user