hyperbook 0.33.3 → 0.34.0
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/dist/assets/client.js +83 -0
- package/dist/assets/code.css +246 -0
- package/dist/assets/content.css +434 -0
- package/dist/assets/directive-alert/style.css +111 -0
- package/dist/assets/directive-archive/client.js +23 -0
- package/dist/assets/directive-archive/style.css +33 -0
- package/dist/assets/directive-audio/client.js +88 -0
- package/dist/assets/directive-audio/style.css +56 -0
- package/dist/assets/directive-audio/wavesurfer.min.js +1 -0
- package/dist/assets/directive-bookmarks/client.js +24 -0
- package/dist/assets/directive-bookmarks/style.css +55 -0
- package/dist/assets/directive-collapsible/style.css +66 -0
- package/dist/assets/directive-download/client.js +23 -0
- package/dist/assets/directive-download/style.css +33 -0
- package/dist/assets/directive-embed/style.css +24 -0
- package/dist/assets/directive-excalidraw/client.js +2 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-Bold.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-Medium.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-Regular.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Cascadia.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Virgil.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ar-SA-json-db7c644ccbeb85d54a47.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/az-AZ-json-08a6de50238dbb21926c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/bg-BG-json-42fb0378311f3ade2627.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/bn-BD-json-9ad9e5ae95c4c66297b1.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ca-ES-json-a6b2c18f7e85cfd11599.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/cs-CZ-json-ea03835d73f9b921f7c4.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/da-DK-json-a94944ac6fa9756d2fac.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/de-DE-json-d82053ab52357510811b.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/el-GR-json-4cbc2dbda5a5df636ee1.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/es-ES-json-7afb66536ee40d852fa2.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/eu-ES-json-671a4afcfce7b0a7660b.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/fa-IR-json-76b039039b043cc4280c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/fi-FI-json-64c8902f10425e1b2e81.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/fr-FR-json-d16a471290ba26a6c66a.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/gl-ES-json-d11c7966c3c2f95756e0.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/he-IL-json-a7bc2a673875b2e655e1.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/hi-IN-json-4947c9dace32cc3c6eef.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/hu-HU-json-0419027d32efac73d518.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/id-ID-json-6542dd92ab54a2c1c48e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/it-IT-json-ab410570df07304cb0ca.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ja-JP-json-2cb067da0fb518e73564.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/kaa-json-4d0a4868835d0334a549.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/kab-KAB-json-0d400ba2836cc0752cd6.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/kk-KZ-json-2224f237cc93465f126f.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/km-KH-json-cbe8e2e8d26d30a3175c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ko-KR-json-c2387972637d47f15765.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ku-TR-json-bafa8865ed7002bb249e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/lt-LT-json-9b7e91a51b90ee551cad.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/lv-LV-json-f7f9363e42ee2e3a7c67.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/mr-IN-json-ad1359c30c334d05eee0.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/my-MM-json-3ba296b6fcf2a2197a7c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/nb-NO-json-798d785698d467e76fcf.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/nl-NL-json-2cf913fe2f491c5d7075.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/nn-NO-json-aa607835ad9408789c5f.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/oc-FR-json-644a5eaa1311f70cb697.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pa-IN-json-165c5c2760688033b2cc.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pl-PL-json-35c1f168f53af24b657a.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pt-BR-json-370215dc506c58ee3217.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pt-PT-json-6f3d80656622a222b4e2.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ro-RO-json-3c32b962880e225d3416.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ru-RU-json-e1f4ed9d2d074f778304.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/si-LK-json-4921d4298abfa256fe6f.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/sk-SK-json-27b59d7e026675f929c4.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/sl-SI-json-efb839ef0456f5c72e6e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/sv-SE-json-cfab3adbd37dd273c61e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ta-IN-json-2fa1854af68381c61913.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/th-TH-json-9a390d3cc7a7a6226b63.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/tr-TR-json-fc9b16e9dc2be2660439.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/uk-UA-json-82753e98dced302ac187.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/vi-VN-json-9c1c2a9fa9d6b5a58223.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/zh-CN-json-069c304b5011429be615.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/zh-HK-json-d9bf1e4e2d1f8650c680.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/zh-TW-json-5a3fa7cacfa83c411d89.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/vendor-677e88ca78c86bddf13d.js +2 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/vendor-677e88ca78c86bddf13d.js.LICENSE.txt +32 -0
- package/dist/assets/directive-excalidraw/hyperbook-excalidraw.umd.js +186 -0
- package/dist/assets/directive-excalidraw/style.css +10 -0
- package/dist/assets/directive-mermaid/client.js +50 -0
- package/dist/assets/directive-mermaid/mermaid.min.js +2225 -0
- package/dist/assets/directive-mermaid/style.css +7 -0
- package/dist/assets/directive-onlineide/client.js +14 -0
- package/dist/assets/directive-onlineide/style.css +24 -0
- package/dist/assets/directive-pagelist/style.css +18 -0
- package/dist/assets/directive-protect/client.js +80 -0
- package/dist/assets/directive-protect/style.css +54 -0
- package/dist/assets/directive-qr/style.css +77 -0
- package/dist/assets/directive-scratchblock/client.js +30 -0
- package/dist/assets/directive-scratchblock/scratchblocks.min.js +6773 -0
- package/dist/assets/directive-scratchblock/style.css +0 -0
- package/dist/assets/directive-scratchblock/translations.js +4851 -0
- package/dist/assets/directive-slideshow/client.js +64 -0
- package/dist/assets/directive-slideshow/style.css +117 -0
- package/dist/assets/directive-sqlide/client.js +14 -0
- package/dist/assets/directive-sqlide/style.css +24 -0
- package/dist/assets/directive-struktog/style.css +571 -0
- package/dist/assets/directive-tabs/client.js +37 -0
- package/dist/assets/directive-tabs/style.css +66 -0
- package/dist/assets/directive-term/style.css +0 -0
- package/dist/assets/directive-tiles/style.css +92 -0
- package/dist/assets/directive-video/style.css +27 -0
- package/dist/assets/directive-youtube/style.css +16 -0
- package/dist/assets/math/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/assets/math/katex.min.css +1105 -0
- package/dist/assets/normalize.css +349 -0
- package/dist/assets/shell.css +699 -0
- package/dist/assets/side-drawer.js +206 -0
- package/dist/index.js +28 -23
- package/package.json +9 -5
- package/LICENSE.md +0 -21
- package/dist/templates/default/.hyperbook/package.json +0 -50
- package/dist/templates/default/.hyperbook/src/index.css +0 -14
- package/dist/templates/default/.hyperbook/src/pages/[[...page]].js +0 -57
- package/dist/templates/default/.hyperbook/src/pages/_app.js +0 -135
- package/dist/templates/default/.hyperbook/src/pages/_document.js +0 -11
- package/dist/templates/default/.hyperbook/src/pages/api/save.js +0 -39
- package/dist/templates/default/.hyperbook/src/pages/glossary/[...term].js +0 -59
- package/dist/templates/default/.hyperbook/src/pages/glossary/index.js +0 -28
- package/dist/templates/default/.hyperbook/src/useScrollHash.js +0 -14
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
figure {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.hyperbook-markdown {
|
|
7
|
+
background: var(--color-background);
|
|
8
|
+
color: var(--color-text);
|
|
9
|
+
font-family: hyperbook-body, sans-serif;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.hyperbook-markdown a {
|
|
13
|
+
color: var(--color-brand);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* IE 8–11 and Prince don’t recognize the `wbr` element,
|
|
18
|
+
* but a pseudo-element can achieve the same effect with IE 9+ and Prince.
|
|
19
|
+
*/
|
|
20
|
+
.hyperbook-markdown wbr:before {
|
|
21
|
+
/* Unicode zero width space */
|
|
22
|
+
content: "\200B";
|
|
23
|
+
white-space: normal;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.hyperbook-markdown img {
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hyperbook-markdown figure.lightbox {
|
|
31
|
+
position: fixed;
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: center;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
padding: 1em;
|
|
41
|
+
z-index: 10000;
|
|
42
|
+
margin: 0px;
|
|
43
|
+
background: rgba(0, 0, 0, 0.5);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hyperbook-markdown figure.lightbox img {
|
|
47
|
+
min-width: 100%;
|
|
48
|
+
min-height: 100%;
|
|
49
|
+
cursor: zoom-out;
|
|
50
|
+
object-fit: contain;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.hyperbook-markdown table {
|
|
54
|
+
border-color: var(--color-spacer);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hyperbook-markdown table tr {
|
|
58
|
+
background-color: var(--color-nav);
|
|
59
|
+
border-color: var(--color-spacer);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.hyperbook-markdown h2 {
|
|
63
|
+
border-bottom-color: var(--color-spacer);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.hyperbook-markdown ul.bookmarks li {
|
|
67
|
+
border-color: var(--color-spacer);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hyperbook-markdown ul.bookmarks li:hover {
|
|
71
|
+
background: var(--color-nav);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hyperbook-markdown ul.bookmarks li:last-of-type {
|
|
75
|
+
border-color: var(--color-spacer);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media screen and (max-width: 600px) {
|
|
79
|
+
.hyperbook-markdown table td {
|
|
80
|
+
border-bottom-color: var(--color-spacer);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.hyperbook-markdown figure.normal {
|
|
85
|
+
text-align: center;
|
|
86
|
+
margin-top: 10px;
|
|
87
|
+
margin-bottom: 10px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.hyperbook-markdown figure.normal img {
|
|
91
|
+
cursor: zoom-in;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.hyperbook-markdown figure.normal figcaption {
|
|
95
|
+
font-style: italic;
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
max-width: 400px;
|
|
98
|
+
margin: 0 auto;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.hyperbook-markdown a.heading {
|
|
102
|
+
position: relative;
|
|
103
|
+
text-decoration: none;
|
|
104
|
+
padding-left: 16px;
|
|
105
|
+
margin-left: -16px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.hyperbook-markdown a.heading:hover::before {
|
|
109
|
+
position: absolute;
|
|
110
|
+
content: "📎";
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
top: 50%;
|
|
113
|
+
transform: translateY(-50%);
|
|
114
|
+
left: 0px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.hyperbook-markdown .inline {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
color: var(--color-text);
|
|
121
|
+
border-width: 1px;
|
|
122
|
+
border-style: solid;
|
|
123
|
+
background: var(--color-nav) !important;
|
|
124
|
+
border-color: var(--color-spacer);
|
|
125
|
+
font-family: hyperbook-code, monospace;
|
|
126
|
+
padding: 0em 0.4em 0em 0em;
|
|
127
|
+
border-radius: 6px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.hyperbook-markdown ul,
|
|
131
|
+
.hyperbook-markdown ol {
|
|
132
|
+
margin-top: 0;
|
|
133
|
+
margin-bottom: 0;
|
|
134
|
+
padding-left: 2em;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.hyperbook-markdown ol ol,
|
|
138
|
+
.hyperbook-markdown ul ol {
|
|
139
|
+
list-style-type: lower-roman;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.hyperbook-markdown ul ul ol,
|
|
143
|
+
.hyperbook-markdown ul ol ol,
|
|
144
|
+
.hyperbook-markdown ol ul ol,
|
|
145
|
+
.hyperbook-markdown ol ol ol {
|
|
146
|
+
list-style-type: lower-alpha;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.hyperbook-markdown ul ul,
|
|
150
|
+
.hyperbook-markdown ul ol,
|
|
151
|
+
.hyperbook-markdown ol ol,
|
|
152
|
+
.hyperbook-markdown ol ul {
|
|
153
|
+
margin-top: 0;
|
|
154
|
+
margin-bottom: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.hyperbook-markdown li+li {
|
|
158
|
+
margin-top: 0.25em;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hyperbook-markdown li>p {
|
|
162
|
+
margin-top: 16px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.hyperbook-markdown p,
|
|
166
|
+
.hyperbook-markdown blockquote,
|
|
167
|
+
.hyperbook-markdown ol,
|
|
168
|
+
.hyperbook-markdown ul,
|
|
169
|
+
.hyperbook-markdown table,
|
|
170
|
+
.hyperbook-markdown pre,
|
|
171
|
+
.hyperbook-markdown details {
|
|
172
|
+
margin-top: 0;
|
|
173
|
+
margin-bottom: 10px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.hyperbook-markdown blockquote {
|
|
177
|
+
width: 90%;
|
|
178
|
+
margin: 20px auto;
|
|
179
|
+
font-style: italic;
|
|
180
|
+
padding: 1.2em 30px 1.2em 75px;
|
|
181
|
+
border-left: 8px solid var(--color-brand);
|
|
182
|
+
line-height: 1.5;
|
|
183
|
+
position: relative;
|
|
184
|
+
background: var(--color-nav);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.hyperbook-markdown blockquote::before {
|
|
188
|
+
content: "\201C";
|
|
189
|
+
color: var(--color-brand);
|
|
190
|
+
font-size: 4em;
|
|
191
|
+
position: absolute;
|
|
192
|
+
left: 10px;
|
|
193
|
+
top: -10px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.hyperbook-markdown blockquote::after {
|
|
197
|
+
content: "";
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.hyperbook-markdown table {
|
|
201
|
+
border-width: 1px;
|
|
202
|
+
border-style: solid;
|
|
203
|
+
border-collapse: collapse;
|
|
204
|
+
width: 100%;
|
|
205
|
+
table-layout: fixed;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.hyperbook-markdown table caption {
|
|
209
|
+
font-size: 1.5em;
|
|
210
|
+
margin: 0.5em 0 0.75em;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.hyperbook-markdown table tr {
|
|
214
|
+
border-width: 1px;
|
|
215
|
+
border-style: solid;
|
|
216
|
+
padding: 0.35em;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.hyperbook-markdown table th,
|
|
220
|
+
.hyperbook-markdown table td {
|
|
221
|
+
padding: 0.625em;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.hyperbook-markdown table th {
|
|
225
|
+
font-size: 0.85em;
|
|
226
|
+
letter-spacing: 0.1em;
|
|
227
|
+
text-transform: uppercase;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@media screen and (max-width: 600px) {
|
|
231
|
+
.hyperbook-markdown table {
|
|
232
|
+
border: 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.hyperbook-markdown table caption {
|
|
236
|
+
font-size: 1.3em;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.hyperbook-markdown table thead {
|
|
240
|
+
border: none;
|
|
241
|
+
clip: rect(0 0 0 0);
|
|
242
|
+
height: 1px;
|
|
243
|
+
margin: -1px;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
padding: 0;
|
|
246
|
+
position: absolute;
|
|
247
|
+
width: 1px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.hyperbook-markdown table tr {
|
|
251
|
+
border-bottom-width: 3px;
|
|
252
|
+
display: block;
|
|
253
|
+
margin-bottom: 0.625em;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.hyperbook-markdown table td {
|
|
257
|
+
border-bottom-width: 1px;
|
|
258
|
+
border-bottom-style: solid;
|
|
259
|
+
display: block;
|
|
260
|
+
font-size: 0.8em;
|
|
261
|
+
text-align: right;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.hyperbook-markdown table td::before {
|
|
265
|
+
/*
|
|
266
|
+
* aria-label has no advantage, it won't be read inside a table
|
|
267
|
+
content: attr(aria-label);
|
|
268
|
+
*/
|
|
269
|
+
content: attr(data-label);
|
|
270
|
+
float: left;
|
|
271
|
+
font-weight: bold;
|
|
272
|
+
text-transform: uppercase;
|
|
273
|
+
margin-right: 8px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.hyperbook-markdown table td:last-child {
|
|
277
|
+
border-bottom: 0;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.hyperbook-markdown h1,
|
|
282
|
+
.hyperbook-markdown h2,
|
|
283
|
+
.hyperbook-markdown h3,
|
|
284
|
+
.hyperbook-markdown h4,
|
|
285
|
+
.hyperbook-markdown h5,
|
|
286
|
+
.hyperbook-markdown h6 {
|
|
287
|
+
font-family: hyperbook-heading, sans-serif;
|
|
288
|
+
margin-top: 24px;
|
|
289
|
+
margin-bottom: 16px;
|
|
290
|
+
font-weight: 600;
|
|
291
|
+
line-height: 1.25;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.hyperbook-markdown h1 {
|
|
295
|
+
font-size: 1.75em;
|
|
296
|
+
font-weight: 700;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.hyperbook-markdown h2 {
|
|
300
|
+
font-weight: 600;
|
|
301
|
+
padding-bottom: 0.3em;
|
|
302
|
+
font-size: 1.5em;
|
|
303
|
+
border-bottom-width: 1px;
|
|
304
|
+
border-bottom-style: solid;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.hyperbook-markdown h3 {
|
|
308
|
+
font-weight: 600;
|
|
309
|
+
font-size: 1.25em;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.hyperbook-markdown h4 {
|
|
313
|
+
font-weight: 600;
|
|
314
|
+
font-size: 1em;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.hyperbook-markdown h5 {
|
|
318
|
+
font-weight: 600;
|
|
319
|
+
font-size: 0.875em;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.hyperbook-markdown h6 {
|
|
323
|
+
font-weight: 600;
|
|
324
|
+
font-size: 0.85em;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.hyperbook-markdown p {
|
|
328
|
+
margin-top: 0;
|
|
329
|
+
margin-bottom: 10px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.hyperbook-markdown h1,
|
|
333
|
+
.hyperbook-markdown h2,
|
|
334
|
+
.hyperbook-markdown h3,
|
|
335
|
+
.hyperbook-markdown h4,
|
|
336
|
+
.hyperbook-markdown h5,
|
|
337
|
+
.hyperbook-markdown h6 {
|
|
338
|
+
display: flex;
|
|
339
|
+
align-items: center;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.hyperbook-markdown .bookmark {
|
|
343
|
+
margin-left: 10px;
|
|
344
|
+
background: none;
|
|
345
|
+
border: none;
|
|
346
|
+
opacity: 0.5;
|
|
347
|
+
font-size: 16px;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.hyperbook-markdown .bookmark:hover {
|
|
351
|
+
opacity: 1;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.hyperbook-markdown .bookmark.active {
|
|
355
|
+
opacity: 1;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.hyperbook-markdown ul.bookmarks {
|
|
359
|
+
padding-left: 0;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.hyperbook-markdown ul.bookmarks li {
|
|
363
|
+
list-style-type: none;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.hyperbook-markdown #toc-toggle>.bar1,
|
|
367
|
+
.hyperbook-markdown #toc-toggle>.bar2,
|
|
368
|
+
.hyperbook-markdown #toc-toggle>.bar3,
|
|
369
|
+
.hyperbook-markdown #toc-toggle>.bar4 {
|
|
370
|
+
background-color: var(--color-text);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.hyperbook-markdown #toc-toggle {
|
|
374
|
+
background: var(--color-background);
|
|
375
|
+
border-color: var(--color-nav-border);
|
|
376
|
+
cursor: pointer;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
#toc-drawer {
|
|
380
|
+
overflow-y: auto;
|
|
381
|
+
background: var(--color-nav);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.toc-drawer-content {
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-direction: column;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.toc-drawer-content>nav {
|
|
390
|
+
padding: 20px;
|
|
391
|
+
flex: 1;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.toc-drawer-content>nav li a {
|
|
395
|
+
display: block;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.toc-drawer-content>nav li a:hover {
|
|
399
|
+
text-decoration: underline;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.hyperbook-markdown #toc-toggle {
|
|
403
|
+
position: fixed;
|
|
404
|
+
padding: 4px;
|
|
405
|
+
top: 90px;
|
|
406
|
+
right: 20px;
|
|
407
|
+
border-radius: 50%;
|
|
408
|
+
height: 40px;
|
|
409
|
+
width: 40px;
|
|
410
|
+
border-style: solid;
|
|
411
|
+
border-width: 1px;
|
|
412
|
+
opacity: 0.7;
|
|
413
|
+
z-index: 1000;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.hyperbook-markdown #toc-toggle:hover {
|
|
417
|
+
opacity: 1;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.hyperbook-markdown #toc-toggle>.bar1,
|
|
421
|
+
.hyperbook-markdown #toc-toggle>.bar3 {
|
|
422
|
+
width: 20px;
|
|
423
|
+
height: 2px;
|
|
424
|
+
margin: 2px 3px;
|
|
425
|
+
transition: 0.4s;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.hyperbook-markdown #toc-toggle>.bar2,
|
|
429
|
+
.hyperbook-markdown #toc-toggle>.bar4 {
|
|
430
|
+
width: 25px;
|
|
431
|
+
height: 2px;
|
|
432
|
+
margin: 2px 3px;
|
|
433
|
+
transition: 0.4s;
|
|
434
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.directive-alert>p {
|
|
2
|
+
margin-bottom: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.directive-alert {
|
|
6
|
+
letter-spacing: 0;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
font-size: inherit;
|
|
9
|
+
line-height: 1.6rem;
|
|
10
|
+
word-spacing: 0.05rem;
|
|
11
|
+
border-bottom-right-radius: 2px;
|
|
12
|
+
border-top-right-radius: 2px;
|
|
13
|
+
padding: 8px 12px 8px 20px;
|
|
14
|
+
margin-bottom: 16px;
|
|
15
|
+
position: relative;
|
|
16
|
+
border-left-width: 4px;
|
|
17
|
+
border-left-style: solid;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.directive-alert::before {
|
|
21
|
+
border-radius: 100%;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
left: -12px;
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
position: absolute;
|
|
30
|
+
height: 20px;
|
|
31
|
+
width: 20px;
|
|
32
|
+
text-align: center;
|
|
33
|
+
top: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.directive-alert.success {
|
|
37
|
+
border-left-style: solid;
|
|
38
|
+
border-left-width: 4px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.directive-alert.success::before {
|
|
42
|
+
content: "✓";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.directive-alert.info {
|
|
46
|
+
border-left-style: solid;
|
|
47
|
+
border-left-width: 4px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.directive-alert.info::before {
|
|
51
|
+
content: "i";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.directive-alert.warn {
|
|
55
|
+
border-left-style: solid;
|
|
56
|
+
border-left-width: 4px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.directive-alert.warn::before {
|
|
60
|
+
content: "!";
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.directive-alert.error {
|
|
64
|
+
border-left-style: solid;
|
|
65
|
+
border-left-width: 4px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.directive-alert.error::before {
|
|
69
|
+
content: "x";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.directive-alert {
|
|
73
|
+
background-color: var(--color-nav);
|
|
74
|
+
border-left-color: var(--color-nav-border);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.directive-alert::before {
|
|
78
|
+
color: #fff;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.directive-alert.success {
|
|
82
|
+
border-left-color: #00c851;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.directive-alert.success::before {
|
|
86
|
+
background-color: #00c851;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.directive-alert.info {
|
|
90
|
+
border-left-color: #33b5e5;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.directive-alert.info::before {
|
|
94
|
+
background-color: #33b5e5;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.directive-alert.warn {
|
|
98
|
+
border-left-color: #f0b429;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.directive-alert.warn::before {
|
|
102
|
+
background-color: #f0b429;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.directive-alert.error {
|
|
106
|
+
border-left-color: #ef4e4e;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.directive-alert.error::before {
|
|
110
|
+
background-color: #ef4e4e;
|
|
111
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
hyperbook.download = (function () {
|
|
2
|
+
function init() {
|
|
3
|
+
const els = document.getElementsByClassName("directive-archive");
|
|
4
|
+
for (let el of els) {
|
|
5
|
+
const labelEl = el.getElementsByClassName("label")[0];
|
|
6
|
+
|
|
7
|
+
const src = el.href;
|
|
8
|
+
|
|
9
|
+
fetch(src).then((r) => {
|
|
10
|
+
const isOnline = r.ok;
|
|
11
|
+
if (isOnline) {
|
|
12
|
+
labelEl.classList.remove("offline");
|
|
13
|
+
labelEl.innerHTML.replace("(Offline)", "");
|
|
14
|
+
} else {
|
|
15
|
+
labelEl.classList.add("offline");
|
|
16
|
+
labelEl.innerHTML += " (Offline)";
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
init();
|
|
23
|
+
})();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.directive-archive {
|
|
2
|
+
border-color: var(--color-spacer);
|
|
3
|
+
background: var(--color-nav);
|
|
4
|
+
display: flex;
|
|
5
|
+
text-decoration: none;
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
border-style: solid;
|
|
8
|
+
border-width: 1px;
|
|
9
|
+
margin-bottom: 10px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.directive-archive:hover {
|
|
13
|
+
background: transparent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.directive-archive>.icon {
|
|
17
|
+
display: flex;
|
|
18
|
+
border-right-color: var(--color-spacer);
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 60px;
|
|
22
|
+
border-right-style: solid;
|
|
23
|
+
border-right-width: 1px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.directive-archive>.label {
|
|
27
|
+
flex: 1;
|
|
28
|
+
padding: 12px 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.directive-archive>.offline {
|
|
32
|
+
text-decoration: line-through;
|
|
33
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
hyperbook.audio = (function () {
|
|
2
|
+
/**
|
|
3
|
+
* @param {number} seconds
|
|
4
|
+
*/
|
|
5
|
+
function secondsToTimestamp(seconds) {
|
|
6
|
+
seconds = Math.floor(seconds);
|
|
7
|
+
var h = Math.floor(seconds / 3600);
|
|
8
|
+
var m = Math.floor((seconds - h * 3600) / 60);
|
|
9
|
+
var s = seconds - h * 3600 - m * 60;
|
|
10
|
+
|
|
11
|
+
let th = h < 10 ? "0" + h : h;
|
|
12
|
+
let tm = m < 10 ? "0" + m : m;
|
|
13
|
+
let ts = s < 10 ? "0" + s : s;
|
|
14
|
+
if (h > 0) {
|
|
15
|
+
return th + ":" + tm + ":" + ts;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return tm + ":" + ts;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const wavesurferInstances = {};
|
|
22
|
+
|
|
23
|
+
function init() {
|
|
24
|
+
const els = document.getElementsByClassName("wave");
|
|
25
|
+
for (let el of els) {
|
|
26
|
+
const src = el.getAttribute("data-src");
|
|
27
|
+
const id = el.id;
|
|
28
|
+
|
|
29
|
+
const wavesurfer = window.WaveSurfer.create({
|
|
30
|
+
container: el,
|
|
31
|
+
cursorWidth: 4,
|
|
32
|
+
barWidth: 4,
|
|
33
|
+
barGap: 5,
|
|
34
|
+
barRadius: 2,
|
|
35
|
+
height: 64,
|
|
36
|
+
url: src,
|
|
37
|
+
});
|
|
38
|
+
wavesurfer.on("ready", () => update(id));
|
|
39
|
+
wavesurfer.on("audioprocess", () => update(id));
|
|
40
|
+
wavesurfer.on("pause", () => update(id));
|
|
41
|
+
wavesurfer.on("finish", () => update(id));
|
|
42
|
+
wavesurfer.on("play", () => update(id));
|
|
43
|
+
wavesurferInstances[id] = wavesurfer;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
init();
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param {string} id
|
|
51
|
+
*/
|
|
52
|
+
function update(id) {
|
|
53
|
+
const el = document.getElementById(id);
|
|
54
|
+
const ws = wavesurferInstances[id];
|
|
55
|
+
if (!el || !ws) return;
|
|
56
|
+
|
|
57
|
+
const playerEl = el.parentElement;
|
|
58
|
+
const directiveEl = playerEl.parentElement;
|
|
59
|
+
const playEl = playerEl.getElementsByClassName("play")[0];
|
|
60
|
+
const durationEl = directiveEl.getElementsByClassName("duration")[0];
|
|
61
|
+
|
|
62
|
+
const duration = ws.getDuration();
|
|
63
|
+
const time = ws.getCurrentTime();
|
|
64
|
+
const isPlaying = ws.isPlaying();
|
|
65
|
+
|
|
66
|
+
if (isPlaying) {
|
|
67
|
+
playEl.classList.add("playing");
|
|
68
|
+
} else {
|
|
69
|
+
playEl.classList.remove("playing");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
durationEl.innerHTML = ` ${secondsToTimestamp(time)}/${secondsToTimestamp(duration)}`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param {string} id
|
|
77
|
+
*/
|
|
78
|
+
function togglePlayPause(id) {
|
|
79
|
+
if (wavesurferInstances[id]) {
|
|
80
|
+
wavesurferInstances[id].playPause();
|
|
81
|
+
update(id);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
togglePlayPause,
|
|
87
|
+
};
|
|
88
|
+
})();
|