Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version3: go-live in 2024 #622

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 63 additions & 51 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,13 @@ module.exports = {
position: 'left',
},
{
label: 'Basics',
label: 'Frontend',
position: 'right',
// no `to` means activeBaseRegex gets ignored, so it's a must
to: 'docs/data-structures/01-get-started/01-asymptotic-notations',
to: 'docs/javascript/01-basic/01-js-engine',
activeBaseRegex:
'docs/(algorithms|data-structures|design-patterns|http|browser|web-security|linux|git|macos)/',
'docs/(javascript|typescript|html|css|react|webpack|nodejs|vite|data-viz-guide|svg)/',
items: [
{
to: 'docs/data-structures/01-get-started/01-asymptotic-notations',
activeBasePath: 'docs/data-structures/',
label: 'Data Structures',
},
{
to: 'docs/algorithms/01-get-started/01-overview',
activeBasePath: 'docs/algorithms/',
label: 'Algorithms',
},
{
to: 'docs/design-patterns/1.get-started',
activeBasePath: 'docs/design-patterns/',
label: 'Design Patterns',
},
{
to: 'docs/http/1.get-started',
activeBasePath: 'docs/http/',
Expand All @@ -137,31 +122,6 @@ module.exports = {
activeBasePath: 'docs/web-security/',
label: 'Web Security',
},
{
to: 'docs/linux/1.get-started/1.introduction',
activeBasePath: 'docs/linux/',
label: 'Linux',
},
{
to: 'docs/git/01-get-started',
activeBasePath: 'docs/git/',
label: 'Git',
},
{
to: 'docs/macos/01-get-started',
activeBasePath: 'docs/macos/',
label: 'macOS',
},
],
},
{
label: 'Frontend',
position: 'right',
// no `to` means activeBaseRegex gets ignored, so it's a must
to: 'docs/javascript/01-basic/01-js-engine',
activeBaseRegex:
'docs/(javascript|typescript|html|css|react|webpack|nodejs|vite|svg)/',
items: [
{
to: 'docs/javascript/01-basic/01-js-engine',
activeBasePath: 'docs/javascript/',
Expand Down Expand Up @@ -202,11 +162,6 @@ module.exports = {
activeBasePath: 'docs/nodejs/',
label: 'NodeJS',
},
{
to: 'docs/svg/01-get-started',
activeBasePath: 'docs/svg/',
label: 'SVG',
},
],
},
{
Expand All @@ -217,6 +172,26 @@ module.exports = {
activeBaseRegex:
'docs/(python|shell|sqlalchemy|sql|redis|fastapi|docker|kubernetes|nginx)/', // `/` can avoid the confusion such as `javascript`
items: [
{
to: 'docs/data-structures/01-get-started/01-asymptotic-notations',
activeBasePath: 'docs/data-structures/',
label: 'Data Structures',
},
{
to: 'docs/algorithms/01-get-started/01-overview',
activeBasePath: 'docs/algorithms/',
label: 'Algorithms',
},
{
to: 'docs/linux/1.get-started/1.introduction',
activeBasePath: 'docs/linux/',
label: 'Linux',
},
{
to: 'docs/design-patterns/1.get-started',
activeBasePath: 'docs/design-patterns/',
label: 'Design Patterns',
},
{
to: 'docs/python/01-get-started/01-history',
activeBasePath: 'docs/python/',
Expand Down Expand Up @@ -260,17 +235,40 @@ module.exports = {
],
},
{
label: 'Data & AI',
label: 'User Experience',
position: 'right',
// no `to` means activeBaseRegex gets ignored, so it's a must
to: 'docs/data-viz-guide/1.get-started/1.overview',
activeBaseRegex: 'docs/(data-viz-guide)/',
to: 'docs/data-structures/01-get-started/01-asymptotic-notations',
items: [

{
to: 'docs/git/01-get-started',
activeBasePath: 'docs/git/',
label: 'Git',
},
{
to: 'docs/macos/01-get-started',
activeBasePath: 'docs/macos/',
label: 'macOS',
},
],
},
{
label: 'Visualization',
position: 'right',
// no `to` means activeBaseRegex gets ignored, so it's a must
to: 'docs/data-structures/01-get-started/01-asymptotic-notations',
items: [
{
to: 'docs/data-viz-guide/1.get-started/1.overview',
activeBasePath: 'docs/data-viz-guide/',
label: 'Data Viz Guide',
},
{
to: 'docs/svg/01-get-started',
activeBasePath: 'docs/svg/',
label: 'SVG',
},
],
},
{
Expand All @@ -297,6 +295,20 @@ module.exports = {
},
],
},
{
label: 'Metaverse',
position: 'right',
// no `to` means activeBaseRegex gets ignored, so it's a must
to: 'docs/project-mgmt/01-get-started',
activeBaseRegex: 'docs/(project-mgmt|product-mgmt|people-mgmt)/',
items: [
{
to: 'docs/project-mgmt/01-get-started',
activeBasePath: 'docs/project-mgmt/',
label: 'AR/MR/VR',
},
],
},
{
href: `https://github.com/${githubOrg}/${githubRepo}`,
position: 'right',
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.1.0",
"@docusaurus/core": "^2.4.1",
"@docusaurus/plugin-pwa": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@docusaurus/remark-plugin-npm2yarn": "^2.4.1",
"@docusaurus/theme-live-codeblock": "^2.4.1",
"@docusaurus/core": "^2.4.3",
"@docusaurus/plugin-pwa": "^2.4.3",
"@docusaurus/preset-classic": "^2.4.3",
"@docusaurus/remark-plugin-npm2yarn": "^2.4.3",
"@docusaurus/theme-live-codeblock": "^2.4.3",
"@http-util/request": "^0.1.0",
"@node-rs/jieba": "^1.7.0",
"classnames": "^2.3.1",
Expand All @@ -61,7 +61,7 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.18.2",
"@docusaurus/module-type-aliases": "^2.4.1",
"@docusaurus/module-type-aliases": "^2.4.3",
"@tsconfig/docusaurus": "^2.0.0",
"@types/react": "^17.0.1",
"@types/react-helmet": "^6.1.0",
Expand Down
52 changes: 52 additions & 0 deletions src/pages/Management/PartIntro/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from 'react';
import Oval from '../../../components/Oval';
import styles from './index.module.css';
import cx from 'classnames';

const PartIntro = ({
title,
titlePosition = 'left',
content,
id,
intro = {},
linksMapping
}) => {
return (
<div
className={cx(styles.container, styles[`titleFrom--${titlePosition}`])}
id={id}>
<div className={styles.textIntro}>
{/* <div className={styles.decorationLine}></div> */}
<h1 className={styles.heading}>{title}</h1>
<p className={cx(styles.text, styles.paragraph)}>
<cite>{intro.pre}</cite>
</p>
<h2 className={cx(styles.text, styles.emphasis)}>{intro.emphasis}</h2>
<p className={cx(styles.text, styles.paragraph)}>{intro.post}</p>
</div>
<div className={styles.categoryIntro}>
{content?.map(tech => (
<div className={styles.techColumn} key={tech.title}>
<Oval className={cx(styles.oval, styles.white)}>
<img src={tech.icon} className={styles.image} />
</Oval>
<h2 className={styles.sectionHeading}>{tech.title}</h2>
<ul>
{tech?.list?.map(v => (
<li
className={cx(styles.contentItem, {
[styles.contentItemCreated]: linksMapping.find(mapping => mapping.label === v.name)
})}
key={v.name}>
<a href={linksMapping.find(mapping => mapping.label === v.name)?.to} >{v.name}</a>
</li>
))}
</ul>
</div>
))}
</div>
</div>
);
};

export default PartIntro;
Loading