diff --git a/README.md b/README.md index 1efb8565..19d814a2 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,31 @@ # 7Wate 知识库 - ![Alt](https://repobeats.axiom.co/api/embed/b6e6a199e422ce596ea7423372746b6debadaa7d.svg "Repobeats analytics image") +## 目录 +- 博客 +- 维基 + - 开发 + - 算法 + - 运维 + - 安全 + - 其他 +- 社区 +- 职业 +- 生活 +- 艺术 ## 协议 + - 本站所有**原创**内容,采用 [GPL-3.0](http://www.thebigfly.com/gnu/FDLv1.3/) 协议。 - 本站所有**引用第三方**原创内容,所属**版权均归原作者**所有。如有侵权冒犯,请[邮件联系](mailto:admin@7wate.com)删除。 - - **Docusaurus** is [MIT licensed.](https://github.com/facebook/docusaurus/blob/main/LICENSE) +- **Docusaurus** is [MIT licensed.](https://github.com/facebook/docusaurus/blob/main/LICENSE) ## 致谢 感谢第三方原创作者的共享! -感觉 Docusaurus 官方的维护开发! \ No newline at end of file +感觉 Docusaurus 官方的维护开发! diff --git a/algo/home.md b/algo/home.md new file mode 100644 index 00000000..a5074bb6 --- /dev/null +++ b/algo/home.md @@ -0,0 +1,11 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + +算法算法 ~ 🤩🤩🤩 + + + diff --git a/dev/home.md b/dev/home.md new file mode 100644 index 00000000..37d41c20 --- /dev/null +++ b/dev/home.md @@ -0,0 +1,11 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + +开发开发 ~ 🤩🤩🤩 + + + diff --git a/docusaurus.config.js b/docusaurus.config.js index 5534a8ae..ae9c736d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -84,6 +84,97 @@ const config = { breadcrumbs:false, }, ], + [ + "@docusaurus/plugin-content-docs", + { + id: "dev", + path: "dev", + routeBasePath: "dev", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "algo", + path: "algo", + routeBasePath: "algo", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "ops", + path: "ops", + routeBasePath: "ops", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "safe", + path: "safe", + routeBasePath: "safe", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "othe", + path: "othe", + routeBasePath: "othe", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "org", + path: "org", + routeBasePath: "org", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], + [ + "@docusaurus/plugin-content-docs", + { + id: "work", + path: "work", + routeBasePath: "work", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://git.7wate.com/zhouzhongping/wiki/src/branch/master", + showLastUpdateAuthor:true, + showLastUpdateTime:true, + breadcrumbs:false, + }, + ], [ "@docusaurus/plugin-google-analytics", { @@ -127,7 +218,7 @@ const config = { }, ], navbar: { - title: "7Wate`s Wiki", + title: "📚 7Wate`s Wiki", hideOnScroll: true, // logo: { // alt: 'Site Logo', @@ -139,15 +230,40 @@ const config = { // height: 32, // }, items: [ - { to: "/blog", label: "博客", position: "right" }, + { to: "/blog", label: "👨🏻‍🌾 博客", position: "right" }, { - type: "doc", - docId: "home", position: "right", - label: "维基", + label: "👨🏻‍🎓 维基", + items: [ + { + label: "开发", + to: "/dev", + }, + { + label: "算法", + to: "/algo", + }, + { + label: "运维", + to: "/ops", + }, + { + label: "安全", + to: "/safe", + }, + { + label: "其他", + to: "/docs", + }, + + ], }, - { to: "/life", label: "生活", position: "right" }, - { to: "/art", label: "艺术", position: "right" }, + { to: "/org", label: "🤶 社区", position: "right" }, + { to: "/work", label: "👨‍💻 职业", position: "right" }, + { to: "/life", label: "🚴🏻‍♀️ 生活", position: "right" }, + { to: "/art", label: "👨‍🎨 艺术", position: "right" }, + + ], }, footer: { diff --git a/ops/home.md b/ops/home.md new file mode 100644 index 00000000..127fb181 --- /dev/null +++ b/ops/home.md @@ -0,0 +1,11 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + +运维运维 ~ 🤩🤩🤩 + + + diff --git a/org/home.md b/org/home.md new file mode 100644 index 00000000..550c3cf4 --- /dev/null +++ b/org/home.md @@ -0,0 +1,11 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + +社区社区 ~ 🤩🤩🤩 + + + diff --git a/othe/home.md b/othe/home.md new file mode 100644 index 00000000..d2f89a52 --- /dev/null +++ b/othe/home.md @@ -0,0 +1,12 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + + +其他其他 ~ 🤩🤩🤩 + + + diff --git a/safe/home.md b/safe/home.md new file mode 100644 index 00000000..094fc869 --- /dev/null +++ b/safe/home.md @@ -0,0 +1,11 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + +安全安全 ~ 🤩🤩🤩 + + + diff --git a/src/components/HomepageFeatures.js b/src/components/HomepageFeatures.js new file mode 100644 index 00000000..a2c8f352 --- /dev/null +++ b/src/components/HomepageFeatures.js @@ -0,0 +1,60 @@ +import React from 'react' +import clsx from 'clsx' +import styles from './HomepageFeatures.module.css' + +const FeatureList = [ + { + title: '支持 Markdown', + Svg: require('../../static/img/undraw_docusaurus_react.svg').default, + // description: ( + // <> + // 你只须专注于使用 Markdown/MDX 格式编写文档和文章即可, Docusaurus + // 会自动生成可以对外发布的静态 HTML 文件。 借助 MDX,你甚至可以将 JSX + // 组件嵌入到 Markdown 中。 + // + // ), + }, + { + title: 'Easy to Use', + Svg: require('../../static/img/undraw_docusaurus_mountain.svg').default, + // description: <>内容可搜索,让你轻松地在文档中找到所需的内容。, + }, + { + title: '基于 React 技术构建', + Svg: require('../../static/img/undraw_docusaurus_tree.svg').default, + // description: ( + // <> + // Docusaurus lets you focus on your docs, and we'll do the chores. Go + // ahead and move your docs into the docs directory. + // + // ), + }, +] + +function Feature({ Svg, title, description }) { + return ( +
+
+ +
+
+

{title}

+

{description}

+
+
+ ) +} + +export default function HomepageFeatures() { + return ( +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+ ) +} diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures.module.css similarity index 100% rename from src/components/HomepageFeatures/styles.module.css rename to src/components/HomepageFeatures.module.css diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js deleted file mode 100644 index 78f410ba..00000000 --- a/src/components/HomepageFeatures/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import clsx from 'clsx'; -import styles from './styles.module.css'; - -const FeatureList = [ - { - title: 'Easy to Use', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, - description: ( - <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. - - ), - }, - { - title: 'Focus on What Matters', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, - description: ( - <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. - - ), - }, - { - title: 'Powered by React', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, - description: ( - <> - Extend or customize your website layout by reusing React. Docusaurus can - be extended while reusing the same header and footer. - - ), - }, -]; - -function Feature({Svg, title, description}) { - return ( -
-
- -
-
-

{title}

-

{description}

-
-
- ); -} - -export default function HomepageFeatures() { - return ( -
-
-
- {FeatureList.map((props, idx) => ( - - ))} -
-
-
- ); -} diff --git a/src/components/MyMDX.js b/src/components/MyMDX.js new file mode 100644 index 00000000..9287bf79 --- /dev/null +++ b/src/components/MyMDX.js @@ -0,0 +1,14 @@ +import React from "react" +export function Highlight({ children, color }) { + return ( + + {children} + + ) +} diff --git a/src/components/redirect.js b/src/components/redirect.js new file mode 100644 index 00000000..5425702e --- /dev/null +++ b/src/components/redirect.js @@ -0,0 +1,27 @@ +import React from 'react' +import { Redirect } from '@docusaurus/router' +import { useEffect } from 'react' + +export function Open({ go }) { + useEffect(() => { + window.open(go, '_blank') + }, []) + return ( +
+ {redirectContent()} + 👉 或者手动点击本篇文章阅读地址:   + + {go} + +
+ ) +} + +function redirectContent() { + return ( +
+

✨ 为了更好的浏览体验,浏览器将自动跳转至其他页面阅读。

+

🖐 请允许浏览器自动跳转~

+
+ ) +} diff --git a/src/css/custom.css b/src/css/custom.css index 2bc6a4cf..e245f1cd 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -5,26 +5,165 @@ */ /* You can override the default Infima variables here. */ + +/* @import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital@1&family=Poppins:wght@500&display=swap"); */ +/* @import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital@1&family=Poppins:wght@500&display=swap"); */ +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap'); :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-color-primary: #25c2a0; + --ifm-color-primary-dark: rgb(33, 175, 144); + --ifm-color-primary-darker: rgb(31, 165, 136); + --ifm-color-primary-darkest: rgb(26, 136, 112); + --ifm-color-primary-light: rgb(70, 203, 174); + --ifm-color-primary-lighter: rgb(102, 212, 189); + --ifm-color-primary-lightest: rgb(146, 224, 208); --ifm-code-font-size: 95%; - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + --site-announcement-bar-stripe-color1: hsl(167deg 68% 85%); + --site-announcement-bar-stripe-color2: hsl(167deg 68% 95%); } -/* 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); +.docusaurus-highlight-code-line { + background-color: rgba(0, 0, 0, 0.1); + display: block; + margin: 0 calc(-1 * var(--ifm-pre-padding)); + padding: 0 var(--ifm-pre-padding); +} + +html[data-theme='dark'] .docusaurus-highlight-code-line { + background-color: rgba(0, 0, 0, 0.3); +} + +html { + font-family: 'Noto Sans', sans-serif; + font-style: normal; +} + +/* 小空调自定义样式 */ +/* #airConditioning { + padding-left: 30px; + border-left: 0.5px solid var(--ifm-color-emphasis-300); + float: right; + margin-top: -630px; + height: 651px; + overflow: hidden; + zoom: 80%; +} */ + +/* tg comments */ +#comments-app-27ZP8kvt-1 { + overflow: auto; + border: none; + height: 186px; +} + +/* @media screen and (max-width: 767px) { + #airConditioning { + display: none; + } +} */ + +/* html[data-theme="dark"] #airConditioning { + padding-left: 30px; + border-left: 1px solid var(--ifm-color-emphasis-300); + float: right; + margin-top: -660px; + height: 651px; + overflow: hidden; +} */ + +hr { + border: 0.5px solid rgb(245, 244, 244); + padding: 0; + margin: 0; + width: 90%; + color: rgb(201, 120, 120); +} +blockquote { + transition: all 0.5s ease-in-out; + /* background: var(--ifm-color-primary-lighter); */ + /* border-bottom: #25c2a0 1px solid; */ + background-color: #f8f8f9; + font-size: 0.9em; + border-image-source: linear-gradient(to left, #8f41e9, #f8f8f8); + box-shadow: 1px 1px 5px 5px rgba(139, 138, 138, 0.01); + padding: 5px 10px; + margin: 10px 0; + border-radius: 5px; +} +blockquote:hover { + /* border-left: 2px solid var(--ifm-color-primary); */ + border-image-source: linear-gradient(to left, #8f41e9, var(--ifm-color-primary)); + border-image-slice: 1; + box-shadow: 1px 1px 10px 5px rgba(0, 0, 0, 0); +} + +html[data-theme='dark'] blockquote { + background-color: rgba(0, 0, 0, 0.3); +} + +code { + color: var(--ifm-color-primary); + font-family: 'Noto Sans'; +} + +.markdown > h2 { + border-left: var(--ifm-color-primary-dark) 3px solid; + padding-left: 10px; + line-height: 100%; + border-left: var(--ifm-color-primary-dark) 7px solid; + border-radius: 1px; +} +.markdown > h3 { + padding-left: 10px; + line-height: 100%; + border-left: var(--ifm-color-primary-darker) 4px solid; + border-radius: 1px; +} +.markdown img { + display: block; + margin: 1rem auto; +} + +img-annotation { + display: block; + color: #a9b1bb; + margin: -1rem 0 1rem; + text-align: center; + font-size: 0.7rem; +} + +p { + margin: 15px 0 15px 10px; +} +/* 徽章居左 */ +.Badges { + display: inline-block !important; + margin: 0.5rem 0.3rem !important; +} + +/* 公告栏 */ +div[class^='announcementBar_'] { + background: repeating-linear-gradient( + 35deg, + var(--site-announcement-bar-stripe-color1), + var(--site-announcement-bar-stripe-color1) 20px, + var(--site-announcement-bar-stripe-color2) 10px, + var(--site-announcement-bar-stripe-color2) 40px + ); + font-weight: 700; +} + +/* 滚动槽 */ +::-webkit-scrollbar-track { + -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3); + border-radius: 10px; +} +/* 滚动条滑块 */ +::-webkit-scrollbar-thumb { + border-radius: 10px; + background: rgba(0, 0, 0, 0.1); + -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5); +} +::-webkit-scrollbar-thumb:window-inactive { + background: rgba(255, 0, 0, 0.4); } diff --git a/src/pages/back_index.js b/src/pages/back_index.js deleted file mode 100644 index 54c5b7da..00000000 --- a/src/pages/back_index.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import clsx from 'clsx'; -import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import styles from './index.module.css'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; - -function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); - return ( -
-
-

欢迎访问 7Wate 维基站点

- {/*
- - Docusaurus Tutorial - 5min ⏱️ - -
*/} -
-
- ); -} - -export default function Home() { - const {siteConfig} = useDocusaurusContext(); - return ( - - -
- -
-
- ); -} diff --git a/src/pages/index.js b/src/pages/index.js new file mode 100644 index 00000000..622837ba --- /dev/null +++ b/src/pages/index.js @@ -0,0 +1,103 @@ +import React from 'react' +import clsx from 'clsx' +import Layout from '@theme/Layout' +import Link from '@docusaurus/Link' +import useDocusaurusContext from '@docusaurus/useDocusaurusContext' +import styles from './index.module.css' +import HomepageFeatures from '../components/HomepageFeatures' +import Head from '@docusaurus/Head' +import HeroImg from '../../static/img/Hero.jpg' + +const svgList = [ + { + title: 'github', + Svg: require('../../static/img/github.svg').default, + color: 'black', + link: 'https://github.com/7Wate/wiki', + }, + { + title: 'bilibili', + Svg: require('../../static/img/bilibili.svg').default, + link: 'https://space.bilibili.com/223211771', + }, + { + title: 'wechat', + Svg: require('../../static/img/wechat.svg').default, + color: '#2979ff', + link: 'https://static.7wate.com/img/2022/06/16/d6dfd36f35293.jpg', + }, +] +const Svg = ({ Svg, color, title, link }) => { + return ( + + + + ) +} + +function HomepageHeader() { + const { siteConfig } = useDocusaurusContext() + return ( +
+
+

{siteConfig.title}

+

{siteConfig.tagline}

+
+ + 🖱Click Here! + +
+
+
+ ) +} + +function MyHero() { + return ( +
+
+

+ Always
For Freedom. +

+

+ 一个喜欢异想天开的家伙 💨 +
+ 在这里记录知识,希望对你也有帮助。 +

+
+ {/* + + Get Started.
开启学习之旅. +
*/} +
+ {svgList.map((item, index) => { + return + })} +
+
+
+
+ HeroImg +
+
+ ) +} +export default function Home() { + const { siteConfig } = useDocusaurusContext() + return ( + + {/* */} +
+ + {/* */} +
+
+ ) +} diff --git a/src/pages/index.md b/src/pages/index.md deleted file mode 100644 index af879072..00000000 --- a/src/pages/index.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: homepage ---- -
-
- -## Hi there 👋, 欢迎访问 7wate 维基知识库 ~ - - - -
- - -![Alt](https://repobeats.axiom.co/api/embed/b6e6a199e422ce596ea7423372746b6debadaa7d.svg "Repobeats analytics image") diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 9f71a5da..63749b41 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -10,7 +10,7 @@ overflow: hidden; } -@media screen and (max-width: 996px) { +@media screen and (max-width: 966px) { .heroBanner { padding: 2rem; } @@ -21,3 +21,101 @@ align-items: center; justify-content: center; } + +/* ----------------------------------------------------- */ +/* myCustomCSS */ +.myHeroContainer { + display: flex; + margin: 0; + padding: 0; + flex-direction: row; + background-color: #f5f4f4; + width: 100%; + overflow: hidden; + padding: 2.5rem 6rem; +} +.leftContainer { + padding: 3rem 0 0 1rem; + font-size: 40px; + flex: 2; +} +.rightContainer { + /* width: 70%; */ + flex: 1.7; +} + +.rightContainer img { + width: 100%; + height: 100%; + object-fit: contain; +} + +.leftContainer_h1 { + color: rgb(58, 58, 58); + font-size: 4rem; +} +.leftContainer_p { + color: #565451; + font-size: 1.5rem; +} +.buttonContainer { + display: flex; + flex-direction: row; + /* justify-content: center; */ + align-items: center; + margin-top: 4rem; + width: 20rem; + flex-wrap: wrap; + row-gap: 2rem; +} + +.button { + padding: 0.6rem 2rem; + background-color: #ffae33; + color: white; + border: none; + border-radius: 0.6rem; + font-size: 1.2rem; + font-weight: bold; + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); +} +.button:hover { + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); +} +.button:active { + transform: scale(0.98); +} + +.buttonLeftText { + display: inline-block; + margin: 0 0 10px 20px; + height: 2rem; + font-size: 0.8rem; + color: #565451; +} +.svgContainer { + width: 13rem; + display: flex; + flex-direction: row; + justify-content: space-around; +} +.svg { + /* font-size: 20px; */ + width: 2.5rem; +} +.hero_a { + text-decoration: none; + color: white; +} +.hero_a:hover { + text-decoration: none; + color: white; +} +@media screen and (max-width: 966px) { + .myHeroContainer { + display: flex; + justify-content: center; + align-items: center; + flex-direction: row; + } +} diff --git a/src/pages/markdown-page.md b/src/pages/markdown-page.md new file mode 100644 index 00000000..46293cfa --- /dev/null +++ b/src/pages/markdown-page.md @@ -0,0 +1,9 @@ +--- +title: Markdown page example +--- + +# Markdown page example + +# Hi there! + +You don't need React to write simple standalone pages. diff --git a/static/img/Hero.jpg b/static/img/Hero.jpg new file mode 100644 index 00000000..2dcfee98 Binary files /dev/null and b/static/img/Hero.jpg differ diff --git a/static/img/bilibili.svg b/static/img/bilibili.svg new file mode 100644 index 00000000..79b88abb --- /dev/null +++ b/static/img/bilibili.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/github.svg b/static/img/github.svg new file mode 100644 index 00000000..afc00039 --- /dev/null +++ b/static/img/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/wechat.svg b/static/img/wechat.svg new file mode 100644 index 00000000..c71b00e1 --- /dev/null +++ b/static/img/wechat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/zhihu.svg b/static/img/zhihu.svg new file mode 100644 index 00000000..c283d23e --- /dev/null +++ b/static/img/zhihu.svg @@ -0,0 +1 @@ +Zhihu \ No newline at end of file diff --git a/work/home.md b/work/home.md new file mode 100644 index 00000000..ef11b1dd --- /dev/null +++ b/work/home.md @@ -0,0 +1,11 @@ +--- +slug: / +sidebar_position: 1 +--- + +# Home + +职业职业 ~ 🤩🤩🤩 + + +