Skip to content

Commit 5516203

Browse files
committed
website: update header styles.
1 parent 781b18f commit 5516203

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

website/src/component/Header/index.module.less

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@
2020
.menus {
2121
display: flex;
2222
a {
23-
border-bottom: transparent solid 2px;
2423
transition: all .3s;
25-
margin-top: 5px;
2624
color: #333;
25+
border-radius: 3px;
26+
padding: 2px 8px 2px 8px;
27+
display: flex;
28+
align-items: center;
2729
}
2830
a + a {
29-
margin-left: 16px;
31+
margin-left: 6px;
3032
}
3133
:global(.active), a:hover {
32-
color: #1890ff;
33-
border-bottom: #1890ff solid 2px;
34+
background: #f0f1f2;
35+
color: #0366d6;
3436
}
3537
}
3638

website/src/pages/docs/development/components/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
当前 [`react-native-uiw`](https://github.com/uiwjs/react-native-uiw) 项目工程,使用 [Yarn](https://classic.yarnpkg.com/lang/en/) & [lerna](https://github.com/lerna/lerna) 构建 `monorepo`,整个里面包含 `example` 示例、`packages` 组件包、`website` 文档网站。
55

6-
> `⚠️注意事项:示例依赖不可随意更新`<!--rehype:style=background: #da0000; color: #fff;-->
6+
> 🚧 `注意事项:示例依赖不可随意更新`<!--rehype:style=background: #da0000; color: #fff;-->
77
> 1. 🪲 添加新依赖包,需要配置 [nohoist](https://github.com/uiwjs/react-native-uiw/blob/46f73cf7ca5404184df7fa996a33f821d45cf0e7/package.json#L62-L80),以解决子包依赖不存在的问题。
88
> 2. 📦 如果依赖本地包,React Native 示例需要更改 [metro](https://github.com/facebook/metro) 配置 [metro.config.js](https://github.com/uiwjs/react-native-uiw/blob/9a300184608c71615167c517433bb9aed606f0ec/example/examples/metro.config.js#L12)
99
> 3. 🐛Pod 版本请根据项目安装,可以在 `ios/Podfile`<!--rehype:style=color: #e00000;--> 中确定使用那个版本的 `pod`
@@ -70,7 +70,7 @@ pod install --repo-update --verbose
7070
```
7171

7272

73-
> 目前 [react-native@0.64](https://github.com/facebook/react-native) 需要 `pod v1.10.0+`<!--rehype:style=color: #0ab100;--> 以上的版本,可以在 `ios/Podfile`<!--rehype:style=color: #e00000;--> 中确定使用那个版本的 `pod`
73+
> 🚧 目前 [react-native@0.64](https://github.com/facebook/react-native) 需要 `pod v1.10.0+`<!--rehype:style=color: #0ab100;--> 以上的版本,可以在 `ios/Podfile`<!--rehype:style=color: #e00000;--> 中确定使用那个版本的 `pod`
7474
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
7575
7676
### `第 2 步`<!--rehype:style=background: #a5d4ff;--> 启动实时编译包
@@ -106,7 +106,7 @@ yarn run ios
106106

107107
我们通过 [`yarn workspaces`](https://classic.yarnpkg.com/en/docs/workspaces) 这个功能可以减轻 `monorepo` 开发人员的痛苦,并在效率(尽可能多地提升)和可用性之间取得平衡。
108108

109-
> 如果需要将文档网站和实例运行起来,需要先安装依赖和编译包。使用 [`yarn workspaces`](https://classic.yarnpkg.com/en/docs/workspaces),组件文档是从 `node_modules` 中加载,需要编译(或监听)输出到 `node_modules` 中。
109+
> 🚧 如果需要将文档网站和实例运行起来,需要先安装依赖和编译包。使用 [`yarn workspaces`](https://classic.yarnpkg.com/en/docs/workspaces),组件文档是从 `node_modules` 中加载,需要编译(或监听)输出到 `node_modules` 中。
110110
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
111111
112112
### `问题是什么 ?`
@@ -115,13 +115,13 @@ yarn run ios
115115

116116
为了减少冗余,大多数包管理器采用某种提升方案,来尽可能多地提取和扁平化所有相关模块到一个集中位置。 在一个独立的项目中,依赖树可以像这样减少:
117117

118-
![](./standalone.svg)
118+
![](./standalone.svg)<!--rehype:style=max-width: 580px;-->
119119

120120
使用 `hoist`,我们能够消除重复的 `A@1.0``B@1.0`,同时保留版本变化 (`B@2.0`) 并保持相同的根 `package-1/node_modules`。 大多数crawlers/loaders/bundlers 可以通过从项目根目录向下遍历 `node_modules` 树来非常有效地定位模块。
121121

122122
然后是 `monorepo` 项目,它引入了一个新的层次结构,不需要通过 `node_modules` 链接。在这样的项目中,模块可能分散在多个位置:
123123

124-
![](./monorepo-2.svg)
124+
![](./monorepo-2.svg)<!--rehype:style=max-width: 580px;-->
125125

126126
[`yarn workspaces`](https://classic.yarnpkg.com/en/docs/workspaces) 可以通过将模块提升到其父项目的 `node_modules`: `monorepo/node_modules` 来跨子项目/包共享模块。 当考虑到这些包很可能相互依赖(拥有 monorepo 的主要原因)时,这种优化变得更加突出,即更高程度的冗余。
127127

@@ -191,7 +191,7 @@ module.exports = {
191191
};
192192
```
193193

194-
> 注意:虽然配置模块依赖映射,可以隐射到具体的模块/包目录中,但是还是会报错,因为模块中的依赖路径导致错误。
194+
> 🚧 注意:虽然配置模块依赖映射,可以隐射到具体的模块/包目录中,但是还是会报错,因为模块中的依赖路径导致错误。
195195
<!--rehype:style=border-left: 8px solid #ffe564;background-color: #ffe56440;padding: 12px 16px;-->
196196
197197
在 TypeScript 任然会出错,将在 [`example/examples/tsconfig.json`](https://github.com/uiwjs/react-native-uiw/blob/fe25f853fcdbe3590c3ac89924bf71326f11c58c/example/examples/tsconfig.json#L40-L44) 中配置,导入重新映射到相对于 `baseUrl` 的查找位置的一系列目录。

website/src/pages/docs/environment-setup/ios/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ brew install watchman
2929

3030
如果您已经在系统上安装了 Xcode,请确保它是 10 版或更新版本。
3131

32-
![Xcode](./001.png)
32+
![Xcode](./001.png)<!--rehype:style=max-width: 480px;-->
3333

3434

3535
### `在 Xcode 中安装 iOS 模拟器`
3636

3737
要安装模拟器,请打开 `Xcode` > `Preferences...` 并选择 `Components` 选项卡。 选择您要使用的 iOS 相应版本的模拟器。
3838

39-
![Xcode Preferences Components](./002.png)
39+
![Xcode Preferences Components](./002.png)<!--rehype:style=max-width: 480px;-->
4040

4141
### `CocoaPods`
4242

@@ -153,7 +153,7 @@ npx react-native run-ios
153153

154154
在您的 `iOS` 模拟器中点击 `⌘R`<!--rehype:style=color: red;background: #ffd2d2;--> 以重新加载应用程序并查看您的更改!
155155

156-
<img src="./003.png" alt="⌘D" width="220" />
156+
![⌘D](./003.png)<!--rehype:style=max-width: 250px;-->
157157

158158
您还可以在 `iOS` 模拟器中使用 `⌘D`<!--rehype:style=color: red;background: #ffd2d2;--> 或者 `DD`<!--rehype:style=color: red;background: #ffd2d2;--> 调出 `Debug` 菜单。如果在真机调试请 `摇一摇`<!--rehype:style=color: red;background: #ffd2d2;--> 手机调出菜单。
159159

0 commit comments

Comments
 (0)