这是您可以在 Quick Reference 备忘单上使用的样式参考,快速参与贡献!
简单的将仓库克隆下来本地调试页面展示。
git clone git@github.com:jaywcjlove/reference.git
npm i         # 安装依赖
npm run build # 编译输出 HTML
npm run start # 监听 md 文件编译输出 HTML
HTML 存放在仓库根目录下的 dist 目录中,将 dist/index.html 静态页面在浏览器中打开预览。
在备忘清单采用 HTML 注释语法,标识网站布局和一些样式,目的是为了在 GitHub 中也是正常毫无瑕疵的预览 Markdown。
### 卡片标题
<!--rehype:wrap-class=col-span-2-->
卡片 Markdown 内容展示,下面注释语法为文字内容改变样式
<!--rehype:style=color: red;-->
使用 col-span-2 类标识,卡片占 2 列位置
<!--rehype: 开始,--> 结束,包裹参数内容<!--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 类,放置在表格下面,表头将被展示出来。
import React from "react";
import "./Student.css";
export const Student = (
  <div className="Student"></div>
);
上面 {1,4-5} 行代码高亮,下面是 Markdown 代码示例
  ```jsx {1,4-5}
代码行高亮可以和代码行号一起使用。
添加注释配置 <!--rehype:tooltips--> 添加一个 Tooltips 提示。
### H3 部分(卡片)背景颜色
<!--rehype:wrap-style=background: #00c69357;-->
### 红色标题
<!--rehype:style=background:#e91e63;-->
在 H3 标题下面添加样式标注 <!--rehype:style=background:#e91e63;-->
| Key | value | 
|---|---|
| 快捷键 | 说明 | 
| 快捷键 | 说明 | 
列表添加 <!--rehype:className=shortcuts--> 样式类,展示快捷键样式。
export const Student = <div>学生</div>;
const school = <div>学校</div>;
下面是 Markdown 代码示例
  ```jsx showLineNumbers
标记语言后面添加 showLineNumbers 标识
| :- | - | 
|---|---|
| shortcuts | 快捷键样式 | 
| wrap-text | 超出换行 | 
| show-header | 展示表头 | 
| style-none | 隐藏 <ul>列表样式 | 
| style-list | <table>单元格行展示 | 
| :- | - | 
|---|---|
| <yel> | |
| <pur> | |
| <code>或`` | 绿色 | 
| <del>或~~删除~~ | 
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 类,将 32 栏布局。
| 类 | 说明 | 
|---|---|
| cols-1 | 1栏卡片布局 | 
| cols-2 | 2栏卡片布局 | 
| cols-3 | 3栏卡片布局 | 
| cols-4 | 4栏卡片布局 | 
| cols-5 | 5栏卡片布局 | 
| cols-{1~6} | 1~6栏卡片布局 | 
### H3 部分
<!--rehype:wrap-style=grid-row: span 2/span 2;-->
放在 ### H3 部分 下面的注释配置,与 <!--rehype:wrap-class=row-span-2--> 相同,设置 2 行占位布局。
## H2 部分
<!--rehype:body-style=grid-template-columns: repeat(2,minmax(0,1fr));-->
放在 ## H2 部分 下面的注释配置,与 <!--rehype:body-class=cols-2--> 相同,设置 2 栏布局。
### 卡片 1 (H3 部分)
<!--rehype:wrap-class=row-span-2-->
### 卡片 2 (H3 部分)
<!--rehype:wrap-class=col-span-3-->
### 卡片 3 (H3 部分)
| 类 | 说明 | 
|---|---|
| col-span-2 | 2列占位 | 
| col-span-3 | 3列占位 | 
| col-span-4 | 4列占位 | 
| col-span-5 | 5列占位 | 
| row-span-2 | 2行占位 | 
| row-span-3 | 3行占位 | 
| row-span-4 | 4行占位 | 
| row-span-5 | 5行占位 | 
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆   H3 Title 1  ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 2 ┆ ┆ 3 ┆ ┆ 4 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### H3 Title 1
<!--rehype:wrap-class=col-span-3-->
### Title 2
### Title 3
### Title 4
第一标题添加 col-span-3 占位类
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
┆   ┆ ╰┈┈┈╯ ╰┈┈┈╯
┆   ┆ ╭┈┈┈╮ ╭┈┈┈╮
┆   ┆ ┆ 4 ┆ ┆ 5 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
<!--rehype:wrap-class=row-span-2-->
### Title 2
### Title 3
### Title 4
### Title 5
在 Title 1 标题添加 row-span-2 占位类
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈╯ ┆   ┆ ╰┈┈┈╯
╭┈┈┈╮ ┆   ┆ ╭┈┈┈╮
┆ 4 ┆ ┆   ┆ ┆ 5 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
### Title 2
<!--rehype:wrap-class=row-span-2-->
### Title 3
### Title 4
### Title 5
在 Title 2 标题添加 row-span-2 占位类
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈╯ ╰┈┈┈╯ ┆   ┆
╭┈┈┈╮ ╭┈┈┈╮ ┆   ┆
┆ 4 ┆ ┆ 5 ┆ ┆   ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
### Title 2
### Title 3
<!--rehype:wrap-class=row-span-2-->
### Title 4
### Title 5
在 Title 3 标题添加 row-span-2 占位类
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯ 
╭┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 4 ┆ ┆ 5       ┆
╰┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
### Title 2
### Title 3
### Title 4
### Title 5
<!--rehype:wrap-class=col-span-2-->
在 Title 5 标题添加 col-span-2 占位类
╭┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
┆ 1 ┆ ┆ 2       ┆
╰┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 3 ┆ ┆ 4 ┆ ┆ 5 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
### Title 2
<!--rehype:wrap-class=col-span-2-->
### Title 3
### Title 4
### Title 5
在 Title 2 标题添加 col-span-2 占位类
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈╮
┆ 4       ┆ ┆ 5 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
### Title 2
### Title 3
### Title 4
<!--rehype:wrap-class=col-span-2-->
### Title 5
在 Title 4 标题添加 col-span-2 占位类
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆     H3 Title 1      ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 2 ┆ ┆ 3 ┆ ┆ 4 ┆ ┆ 5 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
H2 部分
----
<!--rehype:body-class=cols-4-->
### Title 1
<!--rehype:wrap-class=col-span-4-->
### Title 2
### Title 3
### Title 4
### Title 5
在 H2 部分 标题添加 cols-4,和 Title 1 添加 col-span-4 合并栏
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈╮
┆ 1       ┆ ┆ 2 ┆
┆         ┆ ╰┈┈┈╯
┆         ┆ ╭┈┈┈╮
┆         ┆ ┆ 3 ┆
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈╯
╭┈┈┈╮ ╭┈┈┈╮ ╭┈┈┈╮
┆ 4 ┆ ┆ 5 ┆ ┆ 6 ┆
╰┈┈┈╯ ╰┈┈┈╯ ╰┈┈┈╯
上面布局效果 Markdown 源码:
### Title 1
<!--rehype:wrap-class=col-span-2 row-span-2-->
### Title 2
### Title 3
### Title 4
### Title 5
### Title 6
在 Title 1 标题添加 col-span-2 和 row-span-2 占位类,使用 空格 间隔。
| :- | :- | 
|---|---|
| %m/%d/%Y | 06/05/2013 | 
| %A, %B %e, %Y | Sunday, June 5, 2013 | 
| %b %e %a | Jun 5 Sun | 
| :- | :- | 
|---|---|
| %H:%M | 23:05 | 
| %I:%M %p | 11:05 PM | 
标题为 H4 的基本表格。
| :- | :- | 
|---|---|
| V | Vector | 
| P | Pencil | 
| T | Text | 
| L | Line | 
| R | Rectangle | 
| O | Oval | 
| U | Rounded | 
| Prefix | Example | What | 
|---|---|---|
| // | //hr[@class='edge'] | Anywhere | 
| ./ | ./a | Relative | 
| / | /html/body/div | Root | 
<!--rehype:className=show-header-->
| :- | :- | 
|---|---|
| visualEffectState.inactive | 后台应一直显示为非激活状态。 | 
| titleBarStylestring (win/mac) | 窗口标题栏样式。默认值 (default) | 
| titleBarStyle.default | 分别返回 mac 或者 win 的标准标题栏 | 
<!--rehype:className=style-list-->
| :- | :- | 
|---|---|
| visualEffectState.inactive | 后台应一直显示为非激活状态。 | 
| titleBarStylestring (win/mac) | 窗口标题栏样式。默认值 (default) | 
| titleBarStyle.default | 分别返回 mac 或者 win 的标准标题栏 | 
<!--rehype:className=style-list-arrow-->
<!--rehype:className=cols-4-->
$ git branch -m <new_name>
$ git push origin -u <new_name>
$ git push origin --delete <old>
<!--rehype:className=style-timeline-->
<!--rehype:className=cols-3 style-none-->
<!--rehype:className=style-round-->
<!--rehype:className=style-arrow-->
...
...
...
...
...
...
<!--rehype:wrap-class=row-span-2-->
...
<!--rehype:wrap-class=col-span-2-->
...
<!--rehype:style=background:#e91e63;-->
...
<!--rehype:style=background:#d7a100;-->
...
每个部分可以有以下子项:
每个盒子(卡片)都是一个 H3 部分。 盒子将包含 H3 自身内的所有东西。
这是一个包含段落的基本部分。
注释配置:
`<!--rehype:wrap-style=background: #1b5064;-->`