Skip to content

Commit

Permalink
chore(n): adjustment structure
Browse files Browse the repository at this point in the history
n
  • Loading branch information
hejialianghe committed Aug 4, 2024
1 parent 32fc591 commit 6e58807
Show file tree
Hide file tree
Showing 20 changed files with 1,047 additions and 954 deletions.
20 changes: 14 additions & 6 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const {NavItemsZH,SidebarZH} = require('./config/index')
const {NavItemsZH,SidebarZH,NavItemsEN,SidebarEN} = require('./config/index')

module.exports = {
title: 'web全栈体系',
Expand Down Expand Up @@ -54,12 +54,22 @@ module.exports = {
],
locales: {
'/': {
selectText: '选择语言',
label: '简体中文',
selectText: '选择语言',
ariaLabel: '选择语言',
editLinkText: '在 GitHub 上编辑此页',
lastUpdated: '上次更新',
nav: NavItemsZH,
sidebar: SidebarZH
},
'/en/': {
selectText: 'Languages',
'/en-US/': {
label: 'English',
selectText: 'Languages',
ariaLabel: 'Select language',
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
nav: NavItemsEN,
sidebar: SidebarEN,
},
},
},
Expand All @@ -70,8 +80,6 @@ module.exports = {
lang: 'zh-CN', // 将会被设置为 <html> 的 lang 属性
title: 'web全栈体系',
description: '你好,朋友',
nav: NavItemsZH,
sidebar: SidebarZH
},
'/en-US/': {
lang: 'en-US',
Expand Down
7 changes: 6 additions & 1 deletion docs/.vuepress/config/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

const NavItemsZH = require('./nav/zh')
const SidebarZH = require('./sidebar/zh')
const NavItemsEN = require('./nav/en')
const SidebarEN = require('./sidebar/en')


module.exports ={
NavItemsZH
NavItemsZH,
SidebarZH,
NavItemsEN,
SidebarEN
}
29 changes: 29 additions & 0 deletions docs/.vuepress/config/nav/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const NavItemsEN = [
{
text: 'Algorithm Booklet',
link: '/en-US/algorithm/complexity.html'
},
{
text: 'Web System',
link: '/en-US/guide/'
},
{
text: 'Framework Principles',
link: '/en-US/fp/react/build-react.html'
},
{
text: 'code',
items: [
{
text: 'GitHub',
link: 'https://github.com/hejialianghe/Senior-FrontEnd'
},
{
text: 'Gitee',
link: 'https://gitee.com/hejialianghe/Senior-FrontEnd'
}
]
}
]

module.exports = NavItemsEN
13 changes: 12 additions & 1 deletion docs/.vuepress/config/nav/zh.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
const NavItemsZH = [
{
text: '算法小册',
link: '/algorithm/complexity.html'
},
{
text: 'web体系',
link: '/guide/'
},
{
text: '框架原理',
link: '/fp/react/build-react.html'
},
{
text: 'GitHub',
link: 'https://github.com/hejialianghe/Senior-FrontEnd',
},
{ text: 'Blog', link: 'http://youliaowu.com/' },
{ text: 'Gitee', link: 'https://gitee.com/hejialianghe/Senior-FrontEnd' },
]

Expand Down
37 changes: 37 additions & 0 deletions docs/.vuepress/config/sidebar/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const { getGuideSidebar } = require('./shared')

const SidebarEN = {
'/en-US/algorithm/': [{
title: 'Data Structures and Algorithms',
collapsable: false,
children: [
['complexity', 'Complexity'],
['dataStructure', 'Data Structure'],
['thinking', 'Problem-Solving Approach'],
['sort', 'Sorting Algorithms'],
['base', 'Real Questions'],
],
}],
"/en-US/fp/": [
{
title: 'React',
collapsable: false,
children: [
['react/build-react', '[Translation]build-your-own-react'],
['react/react-hooks', 'React Hooks'],
],
},
{
title: 'Vue2',
collapsable: false,
children: [
['vue2/', 'Introduction'],
['vue2/dataResponse', 'Reactivity'],
['vue2/virtualdomAndDiff', 'Virtual DOM and Diff'],
],
},
],
'/en-US/': getGuideSidebar(),
}

module.exports = SidebarEN
29 changes: 1 addition & 28 deletions docs/.vuepress/config/sidebar/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@
['vue/serverSideRender', '服务端渲染'],
],
},
{
title: 'Vue2.0源码',
collapsable: false,
children: [
['vue2.0/', '前言'],
['vue2.0/dataResponse', '响应式'],
['vue2.0/virtualdomAndDiff', 'virtualdom和DIff'],
],
},
{
title: 'react',
collapsable: false,
Expand Down Expand Up @@ -89,17 +80,6 @@
collapsable: false,
children: [['applets/performance', '小程序进阶']],
},
{
title: '数据结构与算法',
collapsable: false,
children: [
['algorithm/complexity', '复杂度'],
['algorithm/dataStructure', '数据结构'],
['algorithm/thinking', '解题思路'],
['algorithm/sort', '排序算法专题'],
['algorithm/base', '真题'],
],
},
{
title: '项目实战',
collapsable: false,
Expand All @@ -108,14 +88,7 @@
['projectPractice/demo', '实现一个同构的demo'],
['projectPractice/nextjs', 'Nextjs'],
],
},
{
title: '杂项',
collapsable: false,
children: [
['sundry/react', 'react杂项'],
],
},
}
]

return sidebar
Expand Down
31 changes: 31 additions & 0 deletions docs/.vuepress/config/sidebar/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,38 @@
const {getGuideSidebar} = require('./shared')

const SidebarZH = {
'/algorithm/':[{
title: '数据结构与算法',
collapsable: false,
children: [
['complexity', '复杂度'],
['dataStructure', '数据结构'],
['thinking', '解题思路'],
['sort', '排序算法专题'],
['base', '真题'],
],
}],
"/fp/":[
{
title: 'React',
collapsable: false,
children: [
['react/build-react','[译]build-your-own-react'],
['react/react-hooks','react-hooks'],
],
},
{
title: 'Vue2',
collapsable: false,
children: [
['vue2/', '前言'],
['vue2/dataResponse', '响应式'],
['vue2/virtualdomAndDiff', 'virtualdom和DIff'],
],
},
],
'/': getGuideSidebar(),

}


Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/theme/components/Carousel.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="carousel">
<Marquee>
<!-- <Marquee>
<MarqueeItem>Please manually refresh this page for new updates!</MarqueeItem>
</Marquee>
</Marquee> -->
</div>
</template>

Expand Down
2 changes: 0 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ features:
details: 数据结构 解题思路
- title: 项目实战
details: 同构项目
- title: 杂项
details: react原理、js基础等
# footer: MAYI | Copyright © 2020-present(版权所有,转载请注来源)
---
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/en-US/fp/vue2/virtualdomAndDiff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Translating...
46 changes: 23 additions & 23 deletions docs/sundry/react.md → docs/fp/react/build-react.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
## 【译】build-your-own-react

<h3>背景</h3>
## 背景

我们将从头开始重写react,遵循真实的React代码架构,没有优化和非必要功能。

如果您读过我之前的[build your own React](https://engineering.hexacta.com/didact-learning-how-react-works-by-building-it-from-scratch-51007984e5c5),不同之处在于这篇文章基于 React16.8,所以我们现在可以使用hooks并删除与class相关的所有代码。
如果您读过我之前的[build your own React](https://pomb.us/build-your-own-react/),不同之处在于这篇文章基于 React16.8,所以我们现在可以使用hooks并删除与class相关的所有代码。

你可以在 Didact 存储库中找到旧博客文章和代码的历史记录。还有一个演讲涵盖了相同的内容。但这是一个独立的帖子。

<h3>目录</h3>
## 目录

- Step0: Review(回顾)
- Step1: The createElement Function(createElement 函数)
* Step2: render Function
* Step3: Concurrent Mode (并行模式)
* Step4: Fibers
* Step5: Render 和 Commit 阶段
* Step6: Reconciliation (协调算法)
* Step7: Function Components(函数组件)
* Step8: Hooks

* [Step0: Review(回顾)](#0)
* [Step1: The createElement Function(createElement 函数)](#1)
* [Step2: render Function](#2)
* [Step3: Concurrent Mode (并行模式)](#3)
* [Step4: Fibers](#4)
* [Step5: Render 和 Commit 阶段](#5)
* [Step6: Reconciliation (协调算法)](#6)
* [Step7: Function Components 函数组件](#7)
* [Step8: Hooks](#8)
## 详细

<h3>Step0: Review(回顾)</h3> <a name="0"> </a>
### Step0: Review(回顾)

我们先回顾一些基本概念,如果你对React、JSX、DOM元素的工作原理比较了解,你可以跳过这一步。

Expand Down Expand Up @@ -116,7 +116,7 @@ node.appendChild(text)
container.appendChild(node)
```
---
<h3>Step1: The createElement Function(createElement 函数)</h3> <a name="1"></a>
### Step1: The createElement Function(createElement 函数)

让我们从另一个app重新开始。这一次,我们将用我们自己的React版本替换官方React代码。

Expand Down Expand Up @@ -201,16 +201,16 @@ function createTextElement(text) {
```

---
<h3>Step2:render Function <a name="2"></a></h3>
### Step2:render Function
---
<h3>Step3: Concurrent Mode (并行模式) <a name="3"></a></h3>
### Step3: Concurrent Mode (并行模式)
---
<h3> Step4: Fibers <a name="4"></a></h3>
### Step4: Fibers
---
<h3>Step5: Render 和 Commit 阶段 <a name="5"></a></h3>
### Step5: Render 和 Commit 阶段
---
<h3>Step6: Reconciliation (协调算法)<a name="6"></a></h3>
### Step6: Reconciliation (协调算法)
---
<h3> Step7: Function Components 函数组件 <a name="7"></a></h3>
### Step7: Function Components 函数组件
---
<h3> Step8: Hooks <a name="8"></a></h3>
### Step8: Hooks
Loading

0 comments on commit 6e58807

Please sign in to comment.