From 15495f3dad6360da3c0231f60cb64e34700c024a Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Wed, 28 Sep 2022 18:41:02 +0000 Subject: [PATCH] feat: add `CONTRIBUTING.md` document. efa51c0a06a8955cde339a7ae145ad2f1f896937 --- docs/cron.html | 22 +-- docs/docker.html | 24 +-- docs/git.html | 4 +- docs/javascript.html | 40 ++-- docs/jest.html | 14 +- docs/json.html | 46 ++--- docs/markdown.html | 6 +- docs/package.json.html | 24 +-- docs/quickreference.html | 417 +++++++++++++++++++++++++++++++++++++++ docs/semver.html | 32 +-- docs/sketch.html | 34 ++-- docs/toml.html | 6 +- docs/typescript.html | 22 +-- docs/vscode.html | 42 ++-- style/style.css | 177 +++++++++-------- 15 files changed, 672 insertions(+), 238 deletions(-) create mode 100644 docs/quickreference.html diff --git a/docs/cron.html b/docs/cron.html index 8baa8b73..131e62a4 100644 --- a/docs/cron.html +++ b/docs/cron.html @@ -26,7 +26,7 @@ └───────────────────── 分钟 (0..59)
- +
@@ -61,9 +61,9 @@ -
字段, - * ? / L #
+

示例

- +
@@ -120,9 +120,9 @@ -
Example每次重启 (非标准)
+

特殊字符串

- +
@@ -163,9 +163,9 @@ -
特殊字符串每小时运行一次,“0 * * * *” (非标准)
+

Crontab 命令

- +
@@ -194,9 +194,9 @@ -
-crontab`
-

特殊字符

- +
+

特殊字符

+ @@ -233,7 +233,7 @@ -
特殊字符可以代替“*”并允许用于月份和星期几。使用仅限于 cron 表达式中的 月份中的某天星期几
+

Also see

  • Devhints (devhints.io)
  • diff --git a/docs/docker.html b/docs/docker.html index d6269289..1fa7e70d 100644 --- a/docs/docker.html +++ b/docs/docker.html @@ -33,7 +33,7 @@
  • nginx - 要使用的镜像

一般命令

- +
@@ -90,11 +90,11 @@ -
Example杀死一个容器
+

参数 <container> 可以是容器 id 或名称

Docker 容器

启动和停止

- +
@@ -135,9 +135,9 @@ -
Description连接到现有容器
+

说明

- +
@@ -182,7 +182,7 @@ -
Example列出对容器所做的更改
+

创建容器

docker create [options] IMAGE
   -a, --attach               # 附加标准输出/错误
@@ -211,7 +211,7 @@
 

Docker Images

操控

- +
@@ -256,7 +256,7 @@ -
Example推送镜像
+

构建镜像

$ docker build .
 $ docker build github.com/creack/docker-firefox
@@ -303,7 +303,7 @@
 

各种各样的

Docker Hub

- +
@@ -328,7 +328,7 @@ -
Docker 语法将镜像上传到 docker hub。
+

注册表命令

登录到注册表

$ docker login
@@ -351,7 +351,7 @@
 $ docker push eon01/nginx localhost:5000/myadmin/nginx
 

批量清除

- +
@@ -372,7 +372,7 @@ -
实例删除所有图像
+

卷 volume

检查卷

$ docker volume ls
diff --git a/docs/git.html b/docs/git.html
index 67fd0ead..57037910 100644
--- a/docs/git.html
+++ b/docs/git.html
@@ -22,7 +22,7 @@
 

将存储库克隆到指定目录

$ git clone git_url 指定目录
 
-

做出改变

+

做出改变

在工作目录中显示修改后的文件,为您的下一次提交暂存

$ git status
 
@@ -238,7 +238,7 @@ # 远程有俩相同目录,通过这种方式清除掉,然后提交记录 $ git rm -r --cached <目录/文件>
-

修改远程 Commit 记录

+

修改远程 Commit 记录

$ git rebase -i HEAD~3
 # 表示要修改当前版本的倒数第三次状态
 # 将要更改的记录行首单词 pick 改为 edit
diff --git a/docs/javascript.html b/docs/javascript.html
index 821107ec..0b5c1150 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -96,7 +96,7 @@
 // 字符串插值
 `Tommy is ${age} years old.`;
 
-

字符串

+

字符串

var abc = "abcdefghijklmnopqrstuvwxyz";
 var esc = 'I don\'t \n know';    // \n 换行
 var len = abc.length;            // 字符串长度
@@ -118,7 +118,7 @@
 // 数字转为十六进制 (16)、八进制 (8) 或二进制 (2)
 128.toString(16);             
 
-

数字

+

数字

var pi = 3.141;
 pi.toFixed(0);    // 返回 3             
 pi.toFixed(2);    // 返回 3.14 - 使用金钱
@@ -167,7 +167,7 @@
 // 随机整数,从 1
 Math.floor(Math.random() * 5) + 1;  
 
-

全局函数

+

全局函数

// 像脚本代码一样执行字符串
 eval();                     
 // 从数字返回字符串
@@ -194,7 +194,7 @@
 parseInt();                 
 

JavaScript 条件

-

操作符

+

操作符

true || false;       // true
 10 > 5 || 10 > 20;   // true
 false || false;      // false
@@ -304,7 +304,7 @@
   return 'BOOM!';
 }
 
-

箭头函数 (ES6)

+

箭头函数 (ES6)

有两个参数

const sum = (param1, param2) => { 
   return param1 + param2; 
@@ -364,7 +364,7 @@
 }
 

JavaScript 范围

-

范围

+

范围

function myFunction() {
   var pizzaName = "Margarita";
   // 这里的代码可以使用 PizzaName
@@ -604,7 +604,7 @@
 // => 1
 // => 2
 
-

label 语句

+

label 语句

var num = 0;
 
 outPoint:
@@ -629,7 +629,7 @@
 // => orange
 // => banana
 
-

for await...of

+

for await...of

async function* asyncGenerator() {
   var i = 0;
   while (i < 3) {
@@ -656,7 +656,7 @@
   i++;
 }
 
-

JavaScript 迭代器(Iterators)

+

JavaScript 迭代器(Iterators)

分配给变量的函数

let plusFive = (number) => {
   return number + 5;  
@@ -705,7 +705,7 @@
   return n > 5;
 });
 
-

JavaScript 对象(Objects)

+

JavaScript 对象(Objects)

访问属性

const apple = { 
   color: 'Green',
@@ -731,7 +731,7 @@
 };
 console.log(classElection.place); // undefined
 
-

可变的

+

可变的

const student = {
   name: 'Sheldon',
   score: 100,
@@ -786,7 +786,7 @@
 // 通过引用,因此是可变的。
 console.log(origObj.color);
 
-

工厂函数

+

工厂函数

// 一个接受 'name','age' 和 'breed' 的工厂函数,
 //  参数返回一个自定义的 dog 对象。
 const dogFactory = (name, age, breed) => {
@@ -845,7 +845,7 @@
 myCat.name = 'Yankee';
 

JavaScript Classes

-

静态方法/字段

+

静态方法/字段

class Dog {
   constructor(name) {
     this._name = name;  
@@ -999,7 +999,7 @@
 console.log(myMath.duplicate(5))    // 10
 

JavaScript Promises

-

Promise

+

Promise

创建 promises

new Promise((resolve, reject) => {
   if (ok) {
@@ -1077,7 +1077,7 @@
   console.error(err);
 });
 
-

Promise.all()

+

Promise.all()

const promise1 = new Promise((resolve, reject) => {
   setTimeout(() => {
     resolve(3);
@@ -1110,7 +1110,7 @@
   console.error(err)
 });
 
-

避免嵌套的 Promise 和 .then()

+

避免嵌套的 Promise 和 .then()

const promise = new Promise((resolve, reject) => {  
   setTimeout(() => {
     resolve('*');
@@ -1129,7 +1129,7 @@
 promise.then(twoStars).then(oneDot).then(print);
 

JavaScript Async-Await

-

异步

+

异步

function helloWorld() {
   return new Promise(resolve => {
     setTimeout(() => {
@@ -1226,7 +1226,7 @@
 };
 req.send();
 
-

POST

+

POST

const data = { weight: '1.5 KG' };
 const xhr = new XMLHttpRequest();
 // 初始化一个请求。
@@ -1244,7 +1244,7 @@
   console.log(xhr.response);
 }
 
-

fetch api

+

fetch api

fetch(url, {
     method: 'POST',
     headers: {
@@ -1291,7 +1291,7 @@
   console.log(jsonResponse);
 })
 
-

async await 语法

+

async await 语法

const getSuggestions = async () => {
   const wordQuery = inputField.value;
   const endpoint = `${url}${queryParams}${wordQuery}`;
diff --git a/docs/jest.html b/docs/jest.html
index 47c1b0c4..807d6e96 100644
--- a/docs/jest.html
+++ b/docs/jest.html
@@ -21,7 +21,7 @@
   
  • 快照, 轻松编写持续追踪大型对象的测试,并在测试旁或代码内显示实时快照。
  • 代码覆盖, 无需其他操作,您仅需添加 --coverage 参数来生成代码覆盖率报告。
  • -

    测试结构

    +

    测试结构

    describe('makePoniesPink', () => {
       beforeAll(() => {
         /* 在所有测试之前运行 */
    @@ -128,7 +128,7 @@
       expect.anything(),
     ])
     
    -

    模拟函数

    +

    模拟函数

    // const fn = jest.fn()
     // const fn = jest.fn().mockName('Unicorn') -- 命名为 mock, Jest 22+
     // 函数被调用
    @@ -248,7 +248,7 @@
       
  • toThrowErrortoThrow
  • 异步测试

    -

    实例

    +

    实例

    请参阅 Jest 文档中的 更多示例

    在异步测试中指定一些预期的断言是一个很好的做法,所以如果你的断言根本没有被调用,测试将会失败。

    test('async test', () => {
    @@ -271,7 +271,7 @@
       expect(result).toBe(true)
     })
     
    -

    done() 回调

    +

    done() 回调

    test('async test', (done) => {
       expect.assertions(1)
     
    @@ -300,7 +300,7 @@
     

    从你的测试中 返回 一个 Promise

    模拟

    -

    模拟函数

    +

    模拟函数

    test('call the callback', () => {
       const callback = jest.fn()
       fn(callback)
    @@ -387,7 +387,7 @@
         .spyOn(location, 'title', 'set')
         .mockImplementation(() => {})
     
    -

    定时器模拟

    +

    定时器模拟

    为使用本机计时器函数(setTimeoutsetIntervalclearTimeoutclearInterval)的代码编写同步测试。

    // 启用假计时器
     jest.useFakeTimers()
    @@ -425,7 +425,7 @@
       set: setTitle,
     })
     
    -

    清除和恢复模拟

    +

    清除和恢复模拟

    对于一个模拟

    // 清除模拟使用日期
     // (fn.mock.calls、fn.mock.instances)
    diff --git a/docs/json.html b/docs/json.html
    index a94145ce..2db89d75 100644
    --- a/docs/json.html
    +++ b/docs/json.html
    @@ -36,7 +36,7 @@
     }
     

    类型

    - +
    @@ -73,9 +73,9 @@ -
    类型Null 或 Empty
    -

    字符串

    - +
    +

    字符串

    + @@ -120,7 +120,7 @@ -
    后跟四个十六进制数字
    +

    示例

    {
       "url": "https://quickref.me",
    @@ -132,29 +132,29 @@
     
    { "foo": 'bar' }
     

    Have to be delimited by double quotes

    -

    数字

    - +

    数字

    +
    - - + + - + - + - + -
    TypeDescription类型说明
    IntegerDigits 1-9, 0 and positive or negative数字 1-9、0 和正数或负数
    FractionFractions like 0.3, 3.90.3、3.9 等分数
    ExponentExponent like e, e+, e-, E, E+, E指数,如 e、e+、e-、E、E+、E
    +

    示例

    {
       "positive" : 12,
    @@ -247,7 +247,7 @@
     };
     

    - +
    @@ -276,8 +276,8 @@ -
    undefined
    -

    访问嵌套

    + +

    访问嵌套

    let myObject = {
         "ref": {
             "name": 0,
    @@ -306,7 +306,7 @@
     };
     

    - +
    @@ -335,8 +335,8 @@ -
    undefined
    -

    访问对象数组

    + +

    访问对象数组

    let myArray = [
       {
         "name": "Jason",
    @@ -365,7 +365,7 @@
     ];
     

    - +
    @@ -394,7 +394,7 @@ -
    TypeError: Cannot read...
    +

    访问阵列

    let myArray = [
       "Jason",
    @@ -406,7 +406,7 @@
     ];
     

    - +
    @@ -427,7 +427,7 @@ -
    undefined
    +

    另见

    • JSON (json.org)
    • diff --git a/docs/markdown.html b/docs/markdown.html index 3051c051..b4caa63c 100644 --- a/docs/markdown.html +++ b/docs/markdown.html @@ -34,7 +34,7 @@ > > 嵌套 > > 块引用
      -

    无序列表

    +

    无序列表

    * Item 1
     * Item 2
         * item 3a
    @@ -100,7 +100,7 @@
     

    内联代码

    `Inline code` 周围有反引号
     
    -

    表格

    +

    表格

    |     左栏     |     中间栏     |     右栏     |
     |:------------|:-------------:|-------------:|
     | 单元格 1     |   居中         |        $1600 |
    @@ -113,7 +113,7 @@
       单元格 2   |   单元格 3     |     $12
     

    Markdown 表格生成器:tableconvert.com

    -

    图片

    +

    图片

    ![GitHub Logo](/images/logo.png)
     
     ![Alt Text](url)
    diff --git a/docs/package.json.html b/docs/package.json.html
    index 0dae1007..3a4595fc 100644
    --- a/docs/package.json.html
    +++ b/docs/package.json.html
    @@ -45,7 +45,7 @@
       
  • name 和 version 字段一起用于创建唯一ID
  • 如果没有 nameversion 字段,您的包将无法安装

    -

    安装 name

    +

    安装 name

    yarn add [包名]
     # or
     npm install [包名]
    @@ -64,7 +64,7 @@
     }
     

    帮助使用者了解包的功能的字符串,包管理器也会把这个字符串作为搜索关键词。

    -

    license

    +

    license

    所有包都应该指定许可证,以便让用户了解他们是在什么授权下使用此包,以及此包还有哪些附加限制。

    {
       "license": "MIT",
    @@ -97,7 +97,7 @@
     }
     

    是包的项目主页或者文档首页。

    -

    repository

    +

    repository

    {
       "repository": {
         "type": "git", "url": "https://github.com/user/repo.git"
    @@ -128,7 +128,7 @@
     }
     

    作者信息,一个人。

    -

    contributors

    +

    contributors

    {
       "contributors": [
         { "name": "Your Friend", "email": "friend@xxx.com", "url": "http://friends-xx.com" }
    @@ -196,7 +196,7 @@
     

    如果您的主声明文件名为 index.d.ts 并且位于包的根目录(index.js旁边),则不需要标记 types 属性,建议这样做。

    打包包字段

    -

    esnext

    +

    esnext

    完整的提案在这里。 简短说明:

    • esnext:ES模块中使用阶段4功能(或更旧版本)的源代码,未编译。
    • @@ -240,7 +240,7 @@

      有一些特殊的脚本名称。 如果定义了 preinstall 脚本,它会在包安装前被调用。 出于兼容性考虑,installpostinstallprepublish 脚本会在包完成安装后被调用。

      start 脚本的默认值为 node server.js

      参考文档:npm docs

      -

    特定的 scripts

    +

    特定的 scripts

    对于以下脚本,npm 支持 package.json 文件的 scripts 默认命令字段:

    • prepublish: 在打包并发布包之前运行,以及在没有任何参数的本地 npm 安装之前运行。 (见下文)
    • @@ -280,7 +280,7 @@

      配置中的键作为环境变量公开给脚本(scripts)。

    依赖描述类字段

    你的包很可能依赖其他包。你可以在你的 package.json 文件里指定那些依赖。

    -

    dependencies

    +

    dependencies

    这些是你的包的开发版和发布版都需要的依赖。

    {
       "dependencies": {
    @@ -306,7 +306,7 @@
       你可以指定一个确切的版本、一个最小的版本 (比如 >=) 或者一个版本范围 (比如 >= ... <)。 包也可以指向本地的一个目录文件夹。
       参考文档:npm docs.
     

    -

    workspaces

    +

    workspaces

    {
       "name": "my-workspaces-powered-project",
       "workspaces": [
    @@ -337,7 +337,7 @@
     }
     

    这些是只在你的包开发期间需要,但是生产环境不会被安装的包。

    -

    peerDependencies

    +

    peerDependencies

    {
       "peerDependencies": {
         "package-3": "^2.7.18"
    @@ -378,7 +378,7 @@
     

    系统

    你可以提供和你的包关联的系统级的信息,比如操作系统兼容性之类。

    -

    engines

    +

    engines

    指定使用你的包客户必须使用的版本,这将检查 process.versions 以及当前 yarn 版本。

    {
       "engines": {
    @@ -411,7 +411,7 @@
     }
     

    如果你不想你的包发布到包管理器(npm 或者 私有包管理),设置为 true

    -

    publishConfig

    +

    publishConfig

    这些配置值将在你的包发布时使用。比如,你可以给包打标签。

    {
       "publishConfig": {
    @@ -429,7 +429,7 @@
     }
     

    请注意,如果你的 package.json 包含 "flat": true 并且其它包依赖你的包 (比如你在构建一个库,而不是应用), 其它那些包也需要在它们的 package.json 加上 "flat": true,或者在命令行上用 yarn install --flat 安装。

    -

    resolutions

    +

    resolutions

    {
       "resolutions": {
         "transitive-package-1": "0.0.29",
    diff --git a/docs/quickreference.html b/docs/quickreference.html
    new file mode 100644
    index 00000000..2e27229f
    --- /dev/null
    +++ b/docs/quickreference.html
    @@ -0,0 +1,417 @@
    +
    +
    +
    +
    +Quick Reference 备忘清单
    + &  quickreference cheatsheet &  Quick Reference
    +
    +
    +
    +
    +
    +

    Quick Reference 备忘清单

    +

    这是您可以在 Quick Reference 备忘单上使用的样式参考,快速参与贡献!

    +

    入门

    +

    本地编译预览

    +

    简单的将仓库克隆下来本地调试页面展示。

    +

    克隆仓库

    +
    git clone git@github.com:jaywcjlove/reference.git
    +
    +

    安装依赖编译生成 HTML 页面

    +
    npm i         # 安装依赖
    +npm run build # 编译输出 HTML
    +
    +

    HTML 存放在仓库根目录下的 dist 目录中,将 dist/index.html 静态页面在浏览器中打开预览。

    +

    介绍

    +

    在备忘清单采用 HTML 注释语法,标识网站布局和一些样式,目的是为了在 GitHub 中也是正常毫无瑕疵的预览 Markdown

    +
    ### 卡片标题
    +<!--rehype:wrap-class=col-span-2-->
    +
    +卡片 Markdown 内容展示,下面注释语法为文字内容改变样式
    +<!--rehype:style=color: red;-->
    +
    +

    使用 col-span-2 类标识,卡片占 2 列位置

    +

    注释语法介绍

    +
      +
    • 在某个 Markdown 语法下方或者后面,添加 HTML注释
    • +
    • <!--rehype: 开始,--> 结束,包裹参数内容
    • +
    • 内容采用 URL 参数的字符拼接方式
    • +
    +

    语法

    +

    <!--rehype: + key=value + & + key=value + -->
    标识开始 + 参数 + 分隔符 + 参数 + 标识结束

    +

    示例

    +
    ### H2 部分
    +<!--rehype:body-class=cols-2-->
    +
    +### H3 部分
    +<!--rehype:wrap-class=row-span-2-->
    +
    +

    示例,三行占位,标题红色

    +
    ### 标题
    +<!--rehype:wrap-class=row-span-3&style=color:red;-->
    +
    +

    参数说明

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    说明
    body-style包裹所有卡片外壳的样式
    body-class用于卡片栏布局,添加
    wrap-style卡片栏添加 CSS 样式
    wrap-class用于卡片占位,添加
    +

    文字颜色

    +
    _我是红色_<!--rehype:style=color: red;-->
    +**加粗红色**<!--rehype:style=color: red;-->
    +
    +

    上面添加注释样式,文字 我是红色 文字变

    +

    文字大小

    +
    **加粗变大红色**
    +<!--rehype:style=color: red;font-size: 18px-->
    +
    +

    上面添加注释样式,文字 加粗变大红色并且

    +

    强制换行

    +
    \```js
    +function () {}
    +\```
    +<!--rehype:className=wrap-text -->
    +
    +

    如果代码块内容太长,使用强制换行类解决

    +

    展示表格表头

    +
    | Key | value | 
    +| ---- | ---- |
    +| `键` ||
    +<!--rehype:className=show-header-->
    +
    +

    注释配置添加 show-header 类,放置在表格下面,表头将被展示出来。

    +

    布局

    +

    H2 部分

    +
    H2 部分
    +---
    +
    +### 卡片 1 (H3 部分)
    +### 卡片 2 (H3 部分)
    +### 卡片 3 (H3 部分)
    +
    +

    上面实例 H2 部分 标题下面有三个卡片,默认 3 栏布局。

    +
    H2 部分
    +---
    +<!--rehype:body-class=cols-2-->
    +### 卡片 1 (H3 部分)
    +### 卡片 2 (H3 部分)
    +### 卡片 3 (H3 部分)
    +
    +

    使用注释配置为 H2 部分 添加 col-span-2 类,将 3 栏布局变成 2 栏布局。

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    说明
    cols-11 栏卡片布局
    cols-22 栏卡片布局
    cols-33 栏卡片布局
    cols-44 栏卡片布局
    cols-55 栏卡片布局
    +

    占位布局 style 写法

    +
    ### H3 部分
    +<!--rehype:wrap-style=grid-row: span 2/span 2;-->
    +
    +

    放在 ### H3 部分 下面的注释配置,与 <!--rehype:wrap-class=row-span-2--> 相同,设置 2 行占位布局。

    +

    卡片栏布局 style 写法

    +
    ## H2 部分
    +<!--rehype:body-style=grid-template-columns: repeat(2,minmax(0,1fr));-->
    +
    +

    放在 ## H2 部分 下面的注释配置,与 <!--rehype:body-class=cols-2--> 相同,设置 2 栏布局。

    +

    H3 部分

    +
    ### 卡片 1 (H3 部分)
    +<!--rehype:wrap-class=row-span-2-->
    +### 卡片 2 (H3 部分)
    +<!--rehype:wrap-class=col-span-3-->
    +### 卡片 3 (H3 部分)
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    说明
    col-span-22 列占位
    col-span-33 列占位
    col-span-44 列占位
    row-span-22 行占位
    row-span-33 行占位
    row-span-44 行占位
    +

    卡片 1 列布局

    +
    ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
    +┆   H3 Title 1  ┆
    +╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
    +╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
    +2 ┆ ┆ 3 ┆ ┆ 4 ┆
    +╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
    +
    +

    Markdown 源码

    +
    ### H3 Title 1
    +<!--rehype:wrap-class=col-span-3-->
    +### Title 2
    +
    +### Title 3
    +
    +### Title 4
    +
    +

    默认 3 列布局,第一标题添加 col-span-3 占位类

    +

    表格

    +

    基本表格

    +

    Date

    + + + + + + + + + + + + + + + + + + + + + +
    %m/%d/%Y06/05/2013
    %A, %B %e, %YSunday, June 5, 2013
    %b %e %aJun 5 Sun
    +

    Time

    + + + + + + + + + + + + + + + + + +
    %H:%M23:05
    %I:%M %p11:05 PM
    +

    标题为 H4 的基本表格。

    +

    快捷键

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    VVector
    PPencil
    TText
    LLine
    RRectangle
    OOval
    URounded
    +

    展示标题

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    PrefixExampleWhat
    ////hr[@class='edge']Anywhere
    ././aRelative
    //html/body/divRoot
    +

    <!--rehype:className=show-header-->

    +

    列表

    +

    一栏(默认)

    +
      +
    • Item 1
    • +
    • Item 2
    • +
    • Item 3
    • +
    +

    四列

    +
      +
    • Item 1
    • +
    • Item 2
    • +
    • Item 3
    • +
    • Item 4
    • +
    • Item 5
    • +
    • Item 6
    • +
    • Item 7
    • +
    • Item 8
    • +
    +

    <!--rehype:className=cols-4-->

    +

    没有标记

    +
      +
    • Item 1
    • +
    • Item 2
    • +
    • Item 3
    • +
    • Item 4
    • +
    • Item 5
    • +
    • Item 6
    • +
    +

    <!--rehype:className=cols-3 style-none-->

    +

    H2 部分 - 5列效果展示

    +

    One

    +
    ...
    +
    +

    Two

    +
    ...
    +
    +

    Three

    +
    ...
    +
    +

    Four

    +
    ...
    +
    +

    Five

    +
    ...
    +
    +

    H3 部分 - 占位效果展示

    +

    row-span-2

    +
    ...
    +
    +

    <!--rehype:wrap-class=row-span-2-->

    +

    col-span-2

    +
    ...
    +
    +

    <!--rehype:wrap-class=col-span-2-->

    +

    红色标题

    +
    ...
    +
    +

    <!--rehype:style=background:#e91e63;-->

    +

    黄色标题

    +
    ...
    +
    +

    <!--rehype:style=background:#d7a100;-->

    +

    col-span-3

    +
    ...
    +
    +

    卡片子项

    +

    每个部分可以有以下子项:

    +

    H4 子标题

    +
      +
    • pre
    • +
    • table
    • +
    • ul
    • +
    +

    H4 子标题

    +
      +
    • pre
    • +
    • table
    • +
    • ul
    • +
    +

    H3 部分

    +

    每个盒子(卡片)都是一个 H3 部分。 盒子将包含 H3 自身内的所有东西。

    +

    这是一个包含段落的基本部分。

    + +
    © 2022 Kenny Wang, All rights reserved.
    + diff --git a/docs/semver.html b/docs/semver.html index b0291f23..31f1388e 100644 --- a/docs/semver.html +++ b/docs/semver.html @@ -19,7 +19,7 @@
  • npm 的语义版本器 (npmjs.com)
  • Semver

    - +
    @@ -40,7 +40,7 @@ -
    -当你做了向下兼容的问题修正
    +

    简单范围

      1.2.3
      =1.2.3
    @@ -49,8 +49,8 @@
     >=1.2.3
     

    请注意,后缀版本(1.2.3-rc1)不匹配。

    -

    范围

    - +

    范围

    +
    @@ -125,9 +125,9 @@ -
    范围
    -

    连字符范围

    - +
    +

    连字符范围

    + @@ -140,9 +140,9 @@ -
    范围>=1.2.3 <=2.3.4
    +

    部分向右

    - +
    @@ -159,9 +159,9 @@ -
    范围>=1.2.3 <3.0.0
    +

    部分向左

    - +
    @@ -174,11 +174,11 @@ -
    范围1.2.0 - 2.3.0
    +

    当右侧为部分(例如,2.3)时,假定缺失的部分为x(例如, 2.3.x)。

    如果左边是部分的(例如,1.2),则假定缺少的部分为0(例如, 1.2.0)。

    组合范围

    - +
    @@ -195,12 +195,12 @@ -
    范围或 (双竖线分隔)
    +

    预发布

    1.2.3-prerelease+build
     

    解释

    - +
    @@ -225,7 +225,7 @@ -
    范围表示定义了公共 API
    +

    另见

    快捷键

    插入

    - +
    - + @@ -62,9 +62,9 @@ -
    快捷键插入描述
    (Text) 文本
    -

    类型

    - +
    +

    类型

    + @@ -125,9 +125,9 @@ -
    快捷键特殊字符
    -

    画布视图

    - +
    +

    画布视图

    + @@ -196,9 +196,9 @@ -
    画布视图移动画布
    +

    窗口

    - +
    @@ -235,9 +235,9 @@ -
    快捷键进入全屏
    +

    编辑形状

    - +
    @@ -282,9 +282,9 @@ -
    编辑形状更改矢量点样式
    +

    编辑图层

    - +
    @@ -333,9 +333,9 @@ -
    快捷键切换边框
    +

    排列图层、组和画板

    - +
    @@ -404,7 +404,7 @@ -
    排列图层、组和画板选择下面的页面
    +

    另见

    • Sketch 官网 (sketch.com)
    • diff --git a/docs/toml.html b/docs/toml.html index c2d24aaf..d4d205b1 100644 --- a/docs/toml.html +++ b/docs/toml.html @@ -74,7 +74,7 @@ array2 = ["Commas", "are", "delimiter"] array3 = [8001, 8001, 8002]
      -

    友好数组

    +

    友好数组

    array1 = [ "Don't mix", "different", "types" ]
     array2 = [ [ 1.2, 2.4 ], ["all", 'strings', """are the same""", '''type'''] ]
     array3 = [
    @@ -119,7 +119,7 @@
     [table1.nested_table]
     	baz = "bat"
     
    -

    类数组

    +

    类数组

    [[comments]]
     author = "Nate"
     text = "Great Article!"
    @@ -175,7 +175,7 @@
     [ g .  h  .i ]   # same as [g.h.i]
     [ j . "ʞ" .'l' ] # same as [j."ʞ".'l']
     
    -

    Inline Table

    +

    Inline Table

    name = { first = "Tom", last = "Preston-Werner" }
     point = { x = 1, y = 2 }
     animal = { type.name = "pug" }
    diff --git a/docs/typescript.html b/docs/typescript.html
    index 685345f1..4b0b8b95 100644
    --- a/docs/typescript.html
    +++ b/docs/typescript.html
    @@ -47,7 +47,7 @@
     

    避免

    Object, String, Number, Boolean
     
    -

    通用语法

    +

    通用语法

    /** 可选择从现有接口或类型(Response, HTTPAble)中获取属性 */
     interface JSONResponse extends Response, HTTPAble {
       version: number;
    @@ -172,7 +172,7 @@
     
    const data: import("./data").data
     

    这些功能非常适合构建库、描述现有的 JavaScript 代码,您可能会发现在大多数 TypeScript 应用程序中很少使用它们。

    -

    对象字面量语法

    +

    对象字面量语法

    type JSONResponse = {
       version: number;                        // 字段
       /** In bytes */                         // 附加文档
    @@ -201,7 +201,7 @@
     //    void, bio: (nv: string) => void }
     

    类似于类型系统的映射语句,允许输入类型更改新类型的结构。

    -

    模板联合类型

    +

    模板联合类型

    type SupportedLangs =  "en" | "pt" | "zh";
     type FooterLocaleIDs = "header" | "footer";
     type AllLocaleIDs = `${SupportedLangs}_${FooterLocaleIDs}_id`;
    @@ -210,7 +210,7 @@
     //         | "pt_header_id" | "pt_footer_id"
     //         | "zh_header_id" | "zh_footer_id"
     
    -

    条件类型

    +

    条件类型

    type HasFourLegs<Animal> = Animal extends { legs: 4 } ? Animal : never
     type Animals = Bird | Dog | Ant | Wolf;
     type FourLegs = HasFourLegs<Animals>
    @@ -251,7 +251,7 @@
       input // number[]
     }
     
    -

    任务

    +

    任务

    const data1 = {
       name: "Zagreus"
     }
    @@ -369,7 +369,7 @@
     

    所以,小心不要这样做:

    class C implements Bag {}
     
    -

    通用语法

    +

    通用语法

    // 确保类符合一组接口或类型  ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈▶┈┈╮
     // 子类这个类 ┈┈┈┈┈┈┈┈↘                 ┈┈┈┈┈┈┈┈┈┈┈┈┈┴┈┈┈┈┈┈┈
     class User extends Account implements Updatable, Serializable {
    @@ -438,7 +438,7 @@
     class Dog extends Animal { getName(): { ... } }
     

    一个类可以被声明为不可实现,但可以在类型系统中被子类化。 class 成员也可以。

    -

    装饰器和属性

    +

    装饰器和属性

    import { Syncable, triggersSync, preferCache, required } from "mylib"
     
     @Syncable
    @@ -822,7 +822,7 @@
       }
     }
     
    -

    函数组件

    +

    函数组件

    interface FooProp {
       name: string;
       X: number;
    @@ -857,7 +857,7 @@
       // ...
     }
     
    -

    函数子组件

    +

    函数子组件

    interface MenuProps extends React.LiHTMLAttributes<HTMLUListElement> { ... }
     const InternalMenu = (props: MenuProps, ref?: React.ForwardedRef<HTMLUListElement>) => (
       <ul {...props} ref={ref} />
    @@ -876,7 +876,7 @@
     <Menu.Item />     // ✅ ok
     <Menu.SubMenu />  // ✅ ok
     
    -

    有效组件

    +

    有效组件

    declare namespace JSX {
       interface ElementClass {
         render: any;
    @@ -900,7 +900,7 @@
     <NotAValidFactoryFunction />; // ❌ error
     

    默认情况下,JSX.ElementClass 是 {},但可以对其进行扩展,以将 JSX 的使用限制为仅限于符合适当接口的类型。

    -

    类组件

    +

    类组件

    type Props = {
       header: React.ReactNode;
       body: React.ReactNode;
    diff --git a/docs/vscode.html b/docs/vscode.html
    index 76854edf..bc549631 100644
    --- a/docs/vscode.html
    +++ b/docs/vscode.html
    @@ -13,7 +13,7 @@
     

    这个 VSCode (Visual Studio Code) 快速参考备忘单显示了它的键盘快捷键和命令。

    Windows

    一般的

    - +
    @@ -46,9 +46,9 @@ -
    -键盘快捷键
    -

    基本编辑

    - +
    +

    基本编辑

    + @@ -157,9 +157,9 @@ -
    -切换自动换行
    +

    导航

    - +
    @@ -208,9 +208,9 @@ -
    -切换 Tab 移动焦点
    +

    搜索和替换

    - +
    @@ -247,9 +247,9 @@ -
    -切换区分大小写/正则表达式/整个单词
    +

    多光标和选择

    - +
    @@ -306,9 +306,9 @@ -
    -列(框)选择页上/下
    +

    丰富的语言编辑

    - +
    @@ -365,9 +365,9 @@ -
    -更改文件语言
    +

    编辑管理

    - +
    @@ -404,9 +404,9 @@ -
    -移动活动编辑器组
    +

    文件管理

    - +
    @@ -471,9 +471,9 @@ -
    -在新窗口/实例中显示活动文件
    +

    展示

    - +
    @@ -542,9 +542,9 @@ -
    -Zen 模式(Esc Esc 退出)
    +

    调试

    - +
    @@ -605,7 +605,7 @@ -
    -滚动到顶部/底部
    +
    © 2022 Kenny Wang, All rights reserved.
    diff --git a/style/style.css b/style/style.css index 2187adf3..437eef82 100644 --- a/style/style.css +++ b/style/style.css @@ -21,6 +21,91 @@ body { blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; } +h1,h2,h3,h4,h5,h6 { + font-size: inherit; + font-weight: inherit +} +ol, ul, menu { + list-style: none; + margin: 0; + padding: 0; +} + +.wrap-body > p > code { + --text-opacity: 1; + color: rgb(5 150 105/var(--text-opacity)); +} + +table { + width: 100%; + text-indent: 0; + border-color: inherit; + border-collapse: collapse +} + +table td:not(:last-child)>code, ul li > code, kbd { + background-color: rgb(51 65 85/0.5); + color: rgb(203 213 225/1); + box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000; + letter-spacing: 0.075rem; + padding: 0.1em 0.54em; + border: 1px solid rgb(204,204,204); + border-color: rgb(51 65 85/1); + line-height: 1.5; + font-family: Arial,Helvetica,sans-serif; + font-size: 12px; + display: inline-block; + border-radius: 3px; +} + +table tr+tr { + border-top: solid 1px #ececec94; + border-color: rgb(51 65 85/0.5); +} + +table td:first-child { + white-space: nowrap; +} +table td, table th { + padding: 9px 14px; + text-align: left; +} +table tr th:last-child, table tr td:last-child { + text-align: right; +} + +table thead th { + white-space: nowrap; + font-weight: normal; + color: rgb(16 185 129/1); +} + +table thead { + display: none; + border-bottom: solid 1px rgba(85,102,119,0.3); +} + +table.show-header thead { + display: table-header-group; +} + +tt, code { + font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + font-size: 1em; +} +pre:only-child { + height: 100%; +} + +pre { + margin-top: 0; + margin-bottom: 0; + font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + word-wrap: normal; + line-height: 1.5; + overflow: hidden; + padding: 1rem; +} .max-container a { color: rgb(2 132 199/1); @@ -241,7 +326,7 @@ body.home .h1wrap p { width: 100%; } -.wrap-header.h3wrap > .wrap-body p:last-child { +.wrap-header.h3wrap > .wrap-body p:not(:first-child):last-child { margin-top: auto; } @@ -267,12 +352,6 @@ body.home .h1wrap p { text-align: center; } -ol, ul, menu { - list-style: none; - margin: 0; - padding: 0; -} - .h4wrap > .wrap-body ul, .h4wrap > .wrap-body ol, .h4wrap > .wrap-body dl, @@ -346,87 +425,25 @@ ol, ul, menu { box-shadow: 0 0 #0000, 0 0 #0000, 0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3); } -table { - text-indent: 0; - border-color: inherit; - border-collapse: collapse -} - - -table td:not(:last-child)>code, ul li > code, kbd { - background-color: rgb(51 65 85/0.5); - color: rgb(203 213 225/1); - box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000; - letter-spacing: 0.075rem; - padding: 0.1em 0.54em; - border: 1px solid rgb(204,204,204); - border-color: rgb(51 65 85/1); - line-height: 1.6; - font-family: Arial,Helvetica,sans-serif; - font-size: 12px; - display: inline-block; - border-radius: 3px; -} - -table tr+tr { - border-top: solid 1px #ececec94; - border-color: rgb(51 65 85/0.5); -} - -table td:first-child { - white-space: nowrap; -} -table td, table th { - padding: 9px 14px; - text-align: left; -} -table tr th:last-child, table tr td:last-child { - text-align: right; -} - -table thead th { - white-space: nowrap; - font-weight: normal; - color: rgb(16 185 129/1); -} - -table thead { - display: table-header-group; - border-bottom: solid 1px rgba(85,102,119,0.3); -} - -.table-thead-hide thead { - display: none; -} - -tt, code { - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; - font-size: 1em; -} -pre:only-child { - height: 100%; -} - -pre { - margin-top: 0; - margin-bottom: 0; - font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; - word-wrap: normal; - line-height: 1.5; - overflow: hidden; - padding: 1rem; -} - .code-highlight { display: block; overflow-x: auto; } .cols-1 { - grid-template-columns: repeat(1,minmax(0,1fr)); + grid-template-columns: repeat(1,minmax(0,1fr)) !important; } .cols-2 { - grid-template-columns: repeat(2,minmax(0,1fr)); + grid-template-columns: repeat(2,minmax(0,1fr)) !important; +} +.cols-3 { + grid-template-columns: repeat(3,minmax(0,1fr)) !important; +} +.cols-4 { + grid-template-columns: repeat(4,minmax(0,1fr)) !important; +} +.cols-5 { + grid-template-columns: repeat(5,minmax(0,1fr)) !important; } .col-span-2 { grid-column: span 2/span 2;