Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
.\_data\navigation.ts | is #13
Browse files Browse the repository at this point in the history
  • Loading branch information
cryals committed Aug 25, 2024
1 parent ef75a6c commit e5958ef
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 72 deletions.
76 changes: 5 additions & 71 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from 'vitepress';
import { telegram } from './support/icons.ts';
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs';
import { nav, sidebar } from '../_data/navigation.ts';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "NEWERA STATION",
description: "Space Station 14 Project",
Expand All @@ -11,77 +11,11 @@ export default defineConfig({
base: '/newera-station/',
head: [['link', { rel: 'icon', href: '/newera-station/newera.png' }]],
themeConfig: {
nav,
sidebar,
search: {
provider: 'local'
},
nav: [
{ text: 'Главная', link: '/' },
{ text: 'База Знаний', link: '/main' },
{ text: 'SUNRISE WIKIPEDIA', link: 'https://wiki.sunrise14.top/' }
],
sidebar: [
{
text: 'Space Station 14',
items: [
{ text: 'Начать Игру', link: '/quick-starts' },
{
text: 'Ресурсы',
collapsed: true,
items: []
},
{
text: 'Основы',
collapsed: true,
items: []
},
{
text: 'Предметы',
collapsed: true,
items: []
},
{
text: 'Ведомственные СРП',
collapsed: true,
items: [{ text: 'СРП командования', link: '/department/command' },]
},
{
text: 'Сервис',
collapsed: true,
items: []
},
{
text: 'Медицина',
collapsed: true,
items: []
},
{
text: 'Снабжение',
collapsed: true,
items: []
},
{
text: 'Инженерия',
collapsed: true,
items: []
},
{
text: 'Наука',
collapsed: true,
items: []
},
{
text: 'Безопасность',
collapsed: true,
items: [{ text: 'Корпоративный Закон', link: '/security/corp-laws' },]
},
{
text: 'Игровые механики',
collapsed: true,
items: []
}
]
}
],
socialLinks: [
{ icon: 'discord', link: 'https://discord.gg/newera-station' },
{ icon: { svg: telegram }, link: 'https://t.me/NEWERA_OFF' },
Expand All @@ -90,7 +24,7 @@ export default defineConfig({
},
markdown: {
config(md) {
md.use(tabsMarkdownPlugin)
md.use(tabsMarkdownPlugin);
}
}
});
36 changes: 36 additions & 0 deletions .vitepress/support/details.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!-- .vitepress/components/Details.vue -->
<template>
<details>
<summary><slot name="summary"></slot></summary>
<slot></slot>
</details>
</template>

<style scoped>
details {
background-color: #f9f9f9;
border: 1px solid #ddd;
border-radius: 4px;
padding: 10px;
margin-bottom: 1em;
}

details[open] > summary {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}

summary {
cursor: pointer;
font-weight: bold;
padding: 5px 10px;
margin: -10px -10px 10px -10px;
background-color: #f4f4f4;
border: 1px solid #ddd;
border-radius: 4px;
}

details[open] > summary {
border-bottom: none;
}
</style>
71 changes: 71 additions & 0 deletions _data/navigation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// _data/navigation.ts
export const nav = [
{ text: 'Главная', link: '/' },
{ text: 'База Знаний', link: '/main' },
{ text: 'SUNRISE WIKIPEDIA', link: 'https://wiki.sunrise14.top/' }
];

export const sidebar = [
{
text: 'Space Station 14',
items: [
{ text: 'Начать Игру', link: '/quick-starts' },
{
text: 'Ресурсы',
collapsed: true,
items: []
},
{
text: 'Основы',
collapsed: true,
items: []
},
{
text: 'Предметы',
collapsed: true,
items: []
},
{
text: 'Ведомственные СРП',
collapsed: true,
items: [{ text: 'СРП командования', link: '/department/command' },]
},
{
text: 'Сервис',
collapsed: true,
items: []
},
{
text: 'Медицина',
collapsed: true,
items: []
},
{
text: 'Снабжение',
collapsed: true,
items: []
},
{
text: 'Инженерия',
collapsed: true,
items: []
},
{
text: 'Наука',
collapsed: true,
items: []
},
{
text: 'Безопасность',
collapsed: true,
items: [{ text: 'Корпоративный Закон', link: '/security/corp-laws' },]
},
{
text: 'Игровые механики',
collapsed: true,
items: []
}
]
}
];

Loading

0 comments on commit e5958ef

Please sign in to comment.