Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
ZengXiaoPi committed Aug 7, 2023
0 parents commit 75397a7
Show file tree
Hide file tree
Showing 19 changed files with 7,895 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vercel
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Simpfun Wiki
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
7 changes: 7 additions & 0 deletions blog/2023-8-6-open.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 极好的开站
authors: [zxp]
tags: [simpfun]
---

zzzz
5 changes: 5 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
zxp:
name: 曾小皮-ZengXiaoPi
title: 简幻欢维基站运营
url: https://github.com/ZengXiaoPi
image_url: https://q.qlogo.cn/g?b=qq&nk=1768506869&s=100
5 changes: 5 additions & 0 deletions docs/main.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 主页
---

# 测试页
132 changes: 132 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').Config} */
const config = {
title: '简幻欢社区维基',
tagline: 'Not Offical',
url: 'https://sfe.zxpweb.link',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'ZengXiaoPi', // Usually your GitHub org/user name.
projectName: 'Simpfun_Wiki', // Usually your repo name.

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/ZengXiaoPi/Simpfun_Wiki/edit/main/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/ZengXiaoPi/Simpfun_Wiki/edit/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Simpfun 维基',
logo: {
alt: 'Simpfun',
src: 'img/Simpfun.png',
},
items: [
{
type: 'doc',
docId: 'main',
position: 'left',
label: '主页',
},
{to: '/blog', label: '博客', position: 'left'},
{
href: 'https://github.com/ZengXiaoPi/Simpfun_Wiki',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: '文档',
items: [
{
label: '进入维基',
to: '/docs/main',
},
],
},
{
title: '友情链接',
items: [
{
label: '简幻欢',
href: 'https://simpfun.cn',
},
{
label: '简幻云',
href: 'https://simpcloud.cn',
},
{
label: 'BiliBili',
href: 'https://space.bilibili.com/1493209225',
},
],
},
{
title: '别的东西',
items: [
{
label: '博客',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/ZengXiaoPi/Simpfun_Wiki',
},
],
},
],
copyright: `Simpfun Wiki Team 版权所有 由 Docusaurus 构建。`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};

module.exports = config;
41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.1",
"@docusaurus/preset-classic": "2.0.1",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
}
31 changes: 31 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
};

module.exports = sidebars;
57 changes: 57 additions & 0 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';

const FeatureList = [
{
title: '社区维基',
description: (
<>
我们的源码在 Github 开源!
欢迎加入我们的编写!
</>
),
},
{
title: '免费试用',
description: (
<>
您可以自由免费查看本维基,
不需要一分钱。
</>
),
},
{
title: '最新内容',
description: (
<>
本维基已同步 SFE v4.0 的信息。
</>
),
},
];

function Feature({Svg, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
}

export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}
11 changes: 11 additions & 0 deletions src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}

.featureSvg {
height: 200px;
width: 200px;
}
30 changes: 30 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
41 changes: 41 additions & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';

import styles from './index.module.css';

function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/main">
⏱️ 立刻查看
</Link>
</div>
</div>
</header>
);
}

export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Simpfun Wiki`}
description="Simpfun Wiki">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}
Loading

0 comments on commit 75397a7

Please sign in to comment.