cbvirtua 1.0.48 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/canvas-example-main/canvas-example-main/.github/workflows/main.yml +62 -0
- package/canvas-example-main/canvas-example-main/README.md +13 -0
- package/canvas-example-main/canvas-example-main/curved.html +52 -0
- package/canvas-example-main/canvas-example-main/eslint.config.js +30 -0
- package/canvas-example-main/canvas-example-main/index.html +13 -0
- package/canvas-example-main/canvas-example-main/package.json +51 -0
- package/canvas-example-main/canvas-example-main/pnpm-lock.yaml +4760 -0
- package/canvas-example-main/canvas-example-main/postcss.config.js +6 -0
- package/canvas-example-main/canvas-example-main/public/vite.svg +1 -0
- package/canvas-example-main/canvas-example-main/src/App.tsx +17 -0
- package/canvas-example-main/canvas-example-main/src/assets/github.svg +1 -0
- package/canvas-example-main/canvas-example-main/src/assets/react.svg +1 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/demo.css +539 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/demo_index.html +418 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/iconfont.css +55 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/iconfont.js +1 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/iconfont.json +79 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/iconfont.ttf +0 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/iconfont.woff +0 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/iconfont.woff2 +0 -0
- package/canvas-example-main/canvas-example-main/src/components/Iconfont/index.tsx +39 -0
- package/canvas-example-main/canvas-example-main/src/main.css +9 -0
- package/canvas-example-main/canvas-example-main/src/main.tsx +10 -0
- package/canvas-example-main/canvas-example-main/src/pages/2048/g2048.ts +14 -0
- package/canvas-example-main/canvas-example-main/src/pages/2048/index.tsx +21 -0
- package/canvas-example-main/canvas-example-main/src/pages/clock/index.tsx +103 -0
- package/canvas-example-main/canvas-example-main/src/pages/demo/index.tsx +21 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/editor/index.module.less +3 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/editor/index.tsx +99 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/header/index.module.less +5 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/header/index.tsx +5 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/material/index.module.less +59 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/material/index.tsx +85 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/setting/index.module.less +7 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/components/setting/index.tsx +5 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/core/application.ts +35 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/core/cmp/base.ts +17 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/core/cmp/factory.ts +14 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/core/cmp/shape.tsx +43 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/core/editor.ts +61 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/core/type.ts +6 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/index.module.less +7 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/index.tsx +32 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/store/component-config.ts +61 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/store/components.ts +43 -0
- package/canvas-example-main/canvas-example-main/src/pages/editor/store/layout.ts +40 -0
- package/canvas-example-main/canvas-example-main/src/pages/home/index.tsx +59 -0
- package/canvas-example-main/canvas-example-main/src/pages/jigsaw/index.tsx +3 -0
- package/canvas-example-main/canvas-example-main/src/pages/minesweeper/bomber.png +0 -0
- package/canvas-example-main/canvas-example-main/src/pages/minesweeper/index.tsx +138 -0
- package/canvas-example-main/canvas-example-main/src/pages/minesweeper/mark.png +0 -0
- package/canvas-example-main/canvas-example-main/src/pages/minesweeper/minesweeper.ts +345 -0
- package/canvas-example-main/canvas-example-main/src/pages/minesweeper/utils.ts +24 -0
- package/canvas-example-main/canvas-example-main/src/pages/pageflip/index.tsx +200 -0
- package/canvas-example-main/canvas-example-main/src/pages/pageflip/page1.jpg +0 -0
- package/canvas-example-main/canvas-example-main/src/pages/practice/draw/index.ts +367 -0
- package/canvas-example-main/canvas-example-main/src/pages/practice/index.module.less +26 -0
- package/canvas-example-main/canvas-example-main/src/pages/practice/index.tsx +54 -0
- package/canvas-example-main/canvas-example-main/src/pages/shape-editor/control.ts +174 -0
- package/canvas-example-main/canvas-example-main/src/pages/shape-editor/editor.ts +91 -0
- package/canvas-example-main/canvas-example-main/src/pages/shape-editor/index.raw.tsx +159 -0
- package/canvas-example-main/canvas-example-main/src/pages/shape-editor/index.tsx +36 -0
- package/canvas-example-main/canvas-example-main/src/pages/shape-editor/shape.ts +248 -0
- package/canvas-example-main/canvas-example-main/src/router.tsx +53 -0
- package/canvas-example-main/canvas-example-main/src/utils/storage.ts +48 -0
- package/canvas-example-main/canvas-example-main/src/vite-env.d.ts +1 -0
- package/canvas-example-main/canvas-example-main/tailwind.config.js +8 -0
- package/canvas-example-main/canvas-example-main/tsconfig.app.json +30 -0
- package/canvas-example-main/canvas-example-main/tsconfig.json +7 -0
- package/canvas-example-main/canvas-example-main/tsconfig.node.json +22 -0
- package/canvas-example-main/canvas-example-main/vite.config.ts +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Router from './router';
|
|
2
|
+
import GithubSvg from './assets/github.svg';
|
|
3
|
+
|
|
4
|
+
export default function Component() {
|
|
5
|
+
return (
|
|
6
|
+
<div>
|
|
7
|
+
<Router />
|
|
8
|
+
<a
|
|
9
|
+
className="w-[50px] h-[50px] flex items-center justify-center fixed right-0 top-0 cursor-pointer z-[999]"
|
|
10
|
+
href="https://github.com/xjq7/canvas-example"
|
|
11
|
+
target="_blank"
|
|
12
|
+
>
|
|
13
|
+
<img src={GithubSvg} className="w-[40px] h-[40px]" />
|
|
14
|
+
</a>
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1729058372695" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1466" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M64 512c0 195.2 124.8 361.6 300.8 422.4 22.4 6.4 19.2-9.6 19.2-22.4v-76.8c-134.4 16-140.8-73.6-150.4-89.6-19.2-32-60.8-38.4-48-54.4 32-16 64 3.2 99.2 57.6 25.6 38.4 76.8 32 105.6 25.6 6.4-22.4 19.2-44.8 35.2-60.8-144-22.4-201.6-108.8-201.6-211.2 0-48 16-96 48-131.2-22.4-60.8 0-115.2 3.2-121.6 57.6-6.4 118.4 41.6 124.8 44.8 32-9.6 70.4-12.8 112-12.8 41.6 0 80 6.4 112 12.8 12.8-9.6 67.2-48 121.6-44.8 3.2 6.4 25.6 57.6 6.4 118.4 32 38.4 48 83.2 48 131.2 0 102.4-57.6 188.8-201.6 214.4 22.4 22.4 38.4 54.4 38.4 92.8v112c0 9.6 0 19.2 16 19.2C832 876.8 960 710.4 960 512c0-246.4-201.6-448-448-448S64 265.6 64 512z" fill="#040000" p-id="1467"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
/* Logo 字体 */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: "iconfont logo";
|
|
4
|
+
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
|
5
|
+
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
|
6
|
+
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
|
7
|
+
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
|
8
|
+
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.logo {
|
|
12
|
+
font-family: "iconfont logo";
|
|
13
|
+
font-size: 160px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* tabs */
|
|
20
|
+
.nav-tabs {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nav-tabs .nav-more {
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
height: 42px;
|
|
29
|
+
line-height: 42px;
|
|
30
|
+
color: #666;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#tabs {
|
|
34
|
+
border-bottom: 1px solid #eee;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#tabs li {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
width: 100px;
|
|
40
|
+
height: 40px;
|
|
41
|
+
line-height: 40px;
|
|
42
|
+
text-align: center;
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
border-bottom: 2px solid transparent;
|
|
45
|
+
position: relative;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
margin-bottom: -1px;
|
|
48
|
+
color: #666;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
#tabs .active {
|
|
53
|
+
border-bottom-color: #f00;
|
|
54
|
+
color: #222;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tab-container .content {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 页面布局 */
|
|
62
|
+
.main {
|
|
63
|
+
padding: 30px 100px;
|
|
64
|
+
width: 960px;
|
|
65
|
+
margin: 0 auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.main .logo {
|
|
69
|
+
color: #333;
|
|
70
|
+
text-align: left;
|
|
71
|
+
margin-bottom: 30px;
|
|
72
|
+
line-height: 1;
|
|
73
|
+
height: 110px;
|
|
74
|
+
margin-top: -50px;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
*zoom: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.main .logo a {
|
|
80
|
+
font-size: 160px;
|
|
81
|
+
color: #333;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.helps {
|
|
85
|
+
margin-top: 40px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.helps pre {
|
|
89
|
+
padding: 20px;
|
|
90
|
+
margin: 10px 0;
|
|
91
|
+
border: solid 1px #e7e1cd;
|
|
92
|
+
background-color: #fffdef;
|
|
93
|
+
overflow: auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.icon_lists {
|
|
97
|
+
width: 100% !important;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
*zoom: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.icon_lists li {
|
|
103
|
+
width: 100px;
|
|
104
|
+
margin-bottom: 10px;
|
|
105
|
+
margin-right: 20px;
|
|
106
|
+
text-align: center;
|
|
107
|
+
list-style: none !important;
|
|
108
|
+
cursor: default;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.icon_lists li .code-name {
|
|
112
|
+
line-height: 1.2;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.icon_lists .icon {
|
|
116
|
+
display: block;
|
|
117
|
+
height: 100px;
|
|
118
|
+
line-height: 100px;
|
|
119
|
+
font-size: 42px;
|
|
120
|
+
margin: 10px auto;
|
|
121
|
+
color: #333;
|
|
122
|
+
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
|
123
|
+
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
|
124
|
+
transition: font-size 0.25s linear, width 0.25s linear;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.icon_lists .icon:hover {
|
|
128
|
+
font-size: 100px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.icon_lists .svg-icon {
|
|
132
|
+
/* 通过设置 font-size 来改变图标大小 */
|
|
133
|
+
width: 1em;
|
|
134
|
+
/* 图标和文字相邻时,垂直对齐 */
|
|
135
|
+
vertical-align: -0.15em;
|
|
136
|
+
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
|
137
|
+
fill: currentColor;
|
|
138
|
+
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
|
139
|
+
normalize.css 中也包含这行 */
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.icon_lists li .name,
|
|
144
|
+
.icon_lists li .code-name {
|
|
145
|
+
color: #666;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* markdown 样式 */
|
|
149
|
+
.markdown {
|
|
150
|
+
color: #666;
|
|
151
|
+
font-size: 14px;
|
|
152
|
+
line-height: 1.8;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.highlight {
|
|
156
|
+
line-height: 1.5;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.markdown img {
|
|
160
|
+
vertical-align: middle;
|
|
161
|
+
max-width: 100%;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.markdown h1 {
|
|
165
|
+
color: #404040;
|
|
166
|
+
font-weight: 500;
|
|
167
|
+
line-height: 40px;
|
|
168
|
+
margin-bottom: 24px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.markdown h2,
|
|
172
|
+
.markdown h3,
|
|
173
|
+
.markdown h4,
|
|
174
|
+
.markdown h5,
|
|
175
|
+
.markdown h6 {
|
|
176
|
+
color: #404040;
|
|
177
|
+
margin: 1.6em 0 0.6em 0;
|
|
178
|
+
font-weight: 500;
|
|
179
|
+
clear: both;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.markdown h1 {
|
|
183
|
+
font-size: 28px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.markdown h2 {
|
|
187
|
+
font-size: 22px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.markdown h3 {
|
|
191
|
+
font-size: 16px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.markdown h4 {
|
|
195
|
+
font-size: 14px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.markdown h5 {
|
|
199
|
+
font-size: 12px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.markdown h6 {
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.markdown hr {
|
|
207
|
+
height: 1px;
|
|
208
|
+
border: 0;
|
|
209
|
+
background: #e9e9e9;
|
|
210
|
+
margin: 16px 0;
|
|
211
|
+
clear: both;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.markdown p {
|
|
215
|
+
margin: 1em 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.markdown>p,
|
|
219
|
+
.markdown>blockquote,
|
|
220
|
+
.markdown>.highlight,
|
|
221
|
+
.markdown>ol,
|
|
222
|
+
.markdown>ul {
|
|
223
|
+
width: 80%;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.markdown ul>li {
|
|
227
|
+
list-style: circle;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.markdown>ul li,
|
|
231
|
+
.markdown blockquote ul>li {
|
|
232
|
+
margin-left: 20px;
|
|
233
|
+
padding-left: 4px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.markdown>ul li p,
|
|
237
|
+
.markdown>ol li p {
|
|
238
|
+
margin: 0.6em 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.markdown ol>li {
|
|
242
|
+
list-style: decimal;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.markdown>ol li,
|
|
246
|
+
.markdown blockquote ol>li {
|
|
247
|
+
margin-left: 20px;
|
|
248
|
+
padding-left: 4px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.markdown code {
|
|
252
|
+
margin: 0 3px;
|
|
253
|
+
padding: 0 5px;
|
|
254
|
+
background: #eee;
|
|
255
|
+
border-radius: 3px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.markdown strong,
|
|
259
|
+
.markdown b {
|
|
260
|
+
font-weight: 600;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.markdown>table {
|
|
264
|
+
border-collapse: collapse;
|
|
265
|
+
border-spacing: 0px;
|
|
266
|
+
empty-cells: show;
|
|
267
|
+
border: 1px solid #e9e9e9;
|
|
268
|
+
width: 95%;
|
|
269
|
+
margin-bottom: 24px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.markdown>table th {
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
color: #333;
|
|
275
|
+
font-weight: 600;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.markdown>table th,
|
|
279
|
+
.markdown>table td {
|
|
280
|
+
border: 1px solid #e9e9e9;
|
|
281
|
+
padding: 8px 16px;
|
|
282
|
+
text-align: left;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.markdown>table th {
|
|
286
|
+
background: #F7F7F7;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.markdown blockquote {
|
|
290
|
+
font-size: 90%;
|
|
291
|
+
color: #999;
|
|
292
|
+
border-left: 4px solid #e9e9e9;
|
|
293
|
+
padding-left: 0.8em;
|
|
294
|
+
margin: 1em 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.markdown blockquote p {
|
|
298
|
+
margin: 0;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.markdown .anchor {
|
|
302
|
+
opacity: 0;
|
|
303
|
+
transition: opacity 0.3s ease;
|
|
304
|
+
margin-left: 8px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.markdown .waiting {
|
|
308
|
+
color: #ccc;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.markdown h1:hover .anchor,
|
|
312
|
+
.markdown h2:hover .anchor,
|
|
313
|
+
.markdown h3:hover .anchor,
|
|
314
|
+
.markdown h4:hover .anchor,
|
|
315
|
+
.markdown h5:hover .anchor,
|
|
316
|
+
.markdown h6:hover .anchor {
|
|
317
|
+
opacity: 1;
|
|
318
|
+
display: inline-block;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.markdown>br,
|
|
322
|
+
.markdown>p>br {
|
|
323
|
+
clear: both;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
.hljs {
|
|
328
|
+
display: block;
|
|
329
|
+
background: white;
|
|
330
|
+
padding: 0.5em;
|
|
331
|
+
color: #333333;
|
|
332
|
+
overflow-x: auto;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.hljs-comment,
|
|
336
|
+
.hljs-meta {
|
|
337
|
+
color: #969896;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.hljs-string,
|
|
341
|
+
.hljs-variable,
|
|
342
|
+
.hljs-template-variable,
|
|
343
|
+
.hljs-strong,
|
|
344
|
+
.hljs-emphasis,
|
|
345
|
+
.hljs-quote {
|
|
346
|
+
color: #df5000;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.hljs-keyword,
|
|
350
|
+
.hljs-selector-tag,
|
|
351
|
+
.hljs-type {
|
|
352
|
+
color: #a71d5d;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.hljs-literal,
|
|
356
|
+
.hljs-symbol,
|
|
357
|
+
.hljs-bullet,
|
|
358
|
+
.hljs-attribute {
|
|
359
|
+
color: #0086b3;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.hljs-section,
|
|
363
|
+
.hljs-name {
|
|
364
|
+
color: #63a35c;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.hljs-tag {
|
|
368
|
+
color: #333333;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.hljs-title,
|
|
372
|
+
.hljs-attr,
|
|
373
|
+
.hljs-selector-id,
|
|
374
|
+
.hljs-selector-class,
|
|
375
|
+
.hljs-selector-attr,
|
|
376
|
+
.hljs-selector-pseudo {
|
|
377
|
+
color: #795da3;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.hljs-addition {
|
|
381
|
+
color: #55a532;
|
|
382
|
+
background-color: #eaffea;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.hljs-deletion {
|
|
386
|
+
color: #bd2c00;
|
|
387
|
+
background-color: #ffecec;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.hljs-link {
|
|
391
|
+
text-decoration: underline;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* 代码高亮 */
|
|
395
|
+
/* PrismJS 1.15.0
|
|
396
|
+
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
|
397
|
+
/**
|
|
398
|
+
* prism.js default theme for JavaScript, CSS and HTML
|
|
399
|
+
* Based on dabblet (http://dabblet.com)
|
|
400
|
+
* @author Lea Verou
|
|
401
|
+
*/
|
|
402
|
+
code[class*="language-"],
|
|
403
|
+
pre[class*="language-"] {
|
|
404
|
+
color: black;
|
|
405
|
+
background: none;
|
|
406
|
+
text-shadow: 0 1px white;
|
|
407
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
408
|
+
text-align: left;
|
|
409
|
+
white-space: pre;
|
|
410
|
+
word-spacing: normal;
|
|
411
|
+
word-break: normal;
|
|
412
|
+
word-wrap: normal;
|
|
413
|
+
line-height: 1.5;
|
|
414
|
+
|
|
415
|
+
-moz-tab-size: 4;
|
|
416
|
+
-o-tab-size: 4;
|
|
417
|
+
tab-size: 4;
|
|
418
|
+
|
|
419
|
+
-webkit-hyphens: none;
|
|
420
|
+
-moz-hyphens: none;
|
|
421
|
+
-ms-hyphens: none;
|
|
422
|
+
hyphens: none;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
pre[class*="language-"]::-moz-selection,
|
|
426
|
+
pre[class*="language-"] ::-moz-selection,
|
|
427
|
+
code[class*="language-"]::-moz-selection,
|
|
428
|
+
code[class*="language-"] ::-moz-selection {
|
|
429
|
+
text-shadow: none;
|
|
430
|
+
background: #b3d4fc;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
pre[class*="language-"]::selection,
|
|
434
|
+
pre[class*="language-"] ::selection,
|
|
435
|
+
code[class*="language-"]::selection,
|
|
436
|
+
code[class*="language-"] ::selection {
|
|
437
|
+
text-shadow: none;
|
|
438
|
+
background: #b3d4fc;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
@media print {
|
|
442
|
+
|
|
443
|
+
code[class*="language-"],
|
|
444
|
+
pre[class*="language-"] {
|
|
445
|
+
text-shadow: none;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Code blocks */
|
|
450
|
+
pre[class*="language-"] {
|
|
451
|
+
padding: 1em;
|
|
452
|
+
margin: .5em 0;
|
|
453
|
+
overflow: auto;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
:not(pre)>code[class*="language-"],
|
|
457
|
+
pre[class*="language-"] {
|
|
458
|
+
background: #f5f2f0;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/* Inline code */
|
|
462
|
+
:not(pre)>code[class*="language-"] {
|
|
463
|
+
padding: .1em;
|
|
464
|
+
border-radius: .3em;
|
|
465
|
+
white-space: normal;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.token.comment,
|
|
469
|
+
.token.prolog,
|
|
470
|
+
.token.doctype,
|
|
471
|
+
.token.cdata {
|
|
472
|
+
color: slategray;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.token.punctuation {
|
|
476
|
+
color: #999;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.namespace {
|
|
480
|
+
opacity: .7;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.token.property,
|
|
484
|
+
.token.tag,
|
|
485
|
+
.token.boolean,
|
|
486
|
+
.token.number,
|
|
487
|
+
.token.constant,
|
|
488
|
+
.token.symbol,
|
|
489
|
+
.token.deleted {
|
|
490
|
+
color: #905;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.token.selector,
|
|
494
|
+
.token.attr-name,
|
|
495
|
+
.token.string,
|
|
496
|
+
.token.char,
|
|
497
|
+
.token.builtin,
|
|
498
|
+
.token.inserted {
|
|
499
|
+
color: #690;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.token.operator,
|
|
503
|
+
.token.entity,
|
|
504
|
+
.token.url,
|
|
505
|
+
.language-css .token.string,
|
|
506
|
+
.style .token.string {
|
|
507
|
+
color: #9a6e3a;
|
|
508
|
+
background: hsla(0, 0%, 100%, .5);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.token.atrule,
|
|
512
|
+
.token.attr-value,
|
|
513
|
+
.token.keyword {
|
|
514
|
+
color: #07a;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.token.function,
|
|
518
|
+
.token.class-name {
|
|
519
|
+
color: #DD4A68;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.token.regex,
|
|
523
|
+
.token.important,
|
|
524
|
+
.token.variable {
|
|
525
|
+
color: #e90;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.token.important,
|
|
529
|
+
.token.bold {
|
|
530
|
+
font-weight: bold;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.token.italic {
|
|
534
|
+
font-style: italic;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.token.entity {
|
|
538
|
+
cursor: help;
|
|
539
|
+
}
|