nattoppet 2.1.1 → 4.0.1
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/GUIDE.md +732 -0
- package/common.ymd +33 -13
- package/compiler.ts +169 -0
- package/form.css +87 -0
- package/form.js +64 -0
- package/form.ymd +36 -0
- package/katex.css +1 -0
- package/katex.ymd +13 -0
- package/koa.css +157 -0
- package/{koa/after.ymd → koa.ymd} +18 -1
- package/nattoppet-dev.ts +94 -0
- package/nattoppet-init.ts +142 -0
- package/nattoppet-native.ts +116 -0
- package/nattoppet.ts +35 -0
- package/package.json +54 -14
- package/ppt.css +304 -0
- package/ppt.js +83 -0
- package/{ppt/after.ymd → ppt.ymd} +17 -1
- package/readme.md +28 -15
- package/{stdlib.js → stdlib.ts} +48 -36
- package/tml.css +125 -0
- package/tml.js +3 -0
- package/{tml/after.ymd → tml.ymd} +19 -1
- package/vue.css +91 -0
- package/vue.ymd +23 -0
- package/.editorconfig +0 -15
- package/assets/katex.css +0 -1
- package/assets/manuscript.cls +0 -30
- package/compiler.js +0 -120
- package/koa/before.ymd +0 -12
- package/koa/koa.less +0 -179
- package/native/Cargo.toml +0 -13
- package/native/build.rs +0 -12
- package/native/src/main.rs +0 -22
- package/nattoppet-dev.js +0 -58
- package/nattoppet-native.js +0 -49
- package/nattoppet.js +0 -26
- package/ppt/before.ymd +0 -8
- package/ppt/ppt.coffee +0 -61
- package/ppt/ppt.less +0 -222
- package/tml/before.ymd +0 -10
- package/tml/tml.coffee +0 -1
- package/tml/tml.less +0 -145
- package/vue/after.ymd +0 -9
- package/vue/before.ymd +0 -9
- package/vue/vue.less +0 -101
package/tml.css
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
html {
|
|
2
|
+
font-family: sans-serif;
|
|
3
|
+
font-size: 18px;
|
|
4
|
+
line-height: 1.5;
|
|
5
|
+
text-align: justify;
|
|
6
|
+
color: #33333d;
|
|
7
|
+
-webkit-user-select: none;
|
|
8
|
+
hyphens: auto;
|
|
9
|
+
}
|
|
10
|
+
@media (max-width: 625px) {
|
|
11
|
+
html {
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
body {
|
|
16
|
+
margin: 15px 0;
|
|
17
|
+
}
|
|
18
|
+
@media (min-width: 1200px) {
|
|
19
|
+
body {
|
|
20
|
+
height: calc(100vh - 45px);
|
|
21
|
+
column-width: 540px;
|
|
22
|
+
column-gap: 0;
|
|
23
|
+
column-fill: auto;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
article {
|
|
27
|
+
margin: 40px 0 0 15px;
|
|
28
|
+
padding: 0 20px;
|
|
29
|
+
}
|
|
30
|
+
@media (max-width: 625px) {
|
|
31
|
+
article {
|
|
32
|
+
margin-left: 8px;
|
|
33
|
+
padding-left: 10px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
article:first-child {
|
|
37
|
+
margin-top: 0;
|
|
38
|
+
}
|
|
39
|
+
article:nth-child(3n) {
|
|
40
|
+
border-left: solid #ECE335;
|
|
41
|
+
}
|
|
42
|
+
article:nth-child(3n+1) {
|
|
43
|
+
border-left: solid #1CBF5F;
|
|
44
|
+
}
|
|
45
|
+
article:nth-child(3n+2) {
|
|
46
|
+
border-left: solid #2C8DD5;
|
|
47
|
+
}
|
|
48
|
+
h2 {
|
|
49
|
+
position: relative;
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0.8rem 0 0.7rem;
|
|
52
|
+
break-inside: avoid;
|
|
53
|
+
border-bottom: 0.5px solid #ddd;
|
|
54
|
+
}
|
|
55
|
+
h2:before {
|
|
56
|
+
top: 0.9rem;
|
|
57
|
+
font-size: 1.4rem;
|
|
58
|
+
}
|
|
59
|
+
@media (max-width: 625px) {
|
|
60
|
+
h2:before {
|
|
61
|
+
left: -0.8rem;
|
|
62
|
+
top: 1rem;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
h2:hover:before {
|
|
66
|
+
opacity: 1;
|
|
67
|
+
}
|
|
68
|
+
h2 a {
|
|
69
|
+
color: #2c3e50;
|
|
70
|
+
}
|
|
71
|
+
h3 {
|
|
72
|
+
position: relative;
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0.8rem 0 0;
|
|
75
|
+
break-inside: avoid;
|
|
76
|
+
}
|
|
77
|
+
p {
|
|
78
|
+
margin: 1.2rem 0;
|
|
79
|
+
}
|
|
80
|
+
pre {
|
|
81
|
+
background-color: #fafaf9;
|
|
82
|
+
}
|
|
83
|
+
code {
|
|
84
|
+
font-family: monospace;
|
|
85
|
+
font-size: 0.8rem;
|
|
86
|
+
padding: 0.1rem;
|
|
87
|
+
}
|
|
88
|
+
a {
|
|
89
|
+
color: #42b983;
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
}
|
|
92
|
+
a:hover {
|
|
93
|
+
text-decoration: underline;
|
|
94
|
+
}
|
|
95
|
+
blockquote {
|
|
96
|
+
margin: 2rem 0;
|
|
97
|
+
padding: 0 1.2rem;
|
|
98
|
+
font-style: italic;
|
|
99
|
+
}
|
|
100
|
+
blockquote p {
|
|
101
|
+
margin-left: 0;
|
|
102
|
+
}
|
|
103
|
+
img {
|
|
104
|
+
break-inside: avoid;
|
|
105
|
+
}
|
|
106
|
+
.full {
|
|
107
|
+
display: block;
|
|
108
|
+
margin: 1rem 0;
|
|
109
|
+
width: 100%;
|
|
110
|
+
}
|
|
111
|
+
.half {
|
|
112
|
+
display: block;
|
|
113
|
+
margin: 1rem 0;
|
|
114
|
+
width: 50%;
|
|
115
|
+
}
|
|
116
|
+
.end-symbol {
|
|
117
|
+
text-align: center;
|
|
118
|
+
display: none;
|
|
119
|
+
margin-top: 1rem;
|
|
120
|
+
}
|
|
121
|
+
@media (min-width: 1200px) {
|
|
122
|
+
.end-symbol {
|
|
123
|
+
display: block;
|
|
124
|
+
}
|
|
125
|
+
}
|
package/tml.js
ADDED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<meta name=viewport content="width=device-width, initial-scale=1.0">
|
|
3
|
+
<meta name=author content="ylxdzsw@gmail.com">
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>[title] | ylxdzsw's blog</title>
|
|
6
|
+
|
|
7
|
+
<style>
|
|
8
|
+
[mixin] tml.css
|
|
9
|
+
</style>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
[mixin] tml.js
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
[eval*] this.index = 0
|
|
16
|
+
|
|
17
|
+
[#slot]
|
|
18
|
+
|
|
1
19
|
[eval] this.index > 0 ? "</article>" : ''
|
|
2
20
|
|
|
3
21
|
<div class="end-symbol">* * * * *</div>
|
|
@@ -9,4 +27,4 @@ const header = title.trim() ? `<h2><a id="${id}" href="#${id}">${interpret(title
|
|
|
9
27
|
const close = this.index > 1 ? "</article>" : ''
|
|
10
28
|
close + "<article>" + header
|
|
11
29
|
|
|
12
|
-
[mixin]
|
|
30
|
+
[mixin] common.ymd
|
package/vue.css
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
html {
|
|
2
|
+
font-family: sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
text-align: justify;
|
|
5
|
+
hyphens: auto;
|
|
6
|
+
color: #33333d;
|
|
7
|
+
}
|
|
8
|
+
@media (max-width: 625px) {
|
|
9
|
+
html {
|
|
10
|
+
font-size: 15px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
max-width: 720px;
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
padding: 0 1rem 1rem;
|
|
17
|
+
}
|
|
18
|
+
@media (max-width: 625px) {
|
|
19
|
+
body {
|
|
20
|
+
padding: 0 0.8rem 0.8rem;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
h2,
|
|
24
|
+
h3 {
|
|
25
|
+
margin: 2rem 0 0;
|
|
26
|
+
position: relative;
|
|
27
|
+
}
|
|
28
|
+
h2:before,
|
|
29
|
+
h3:before {
|
|
30
|
+
content: "#";
|
|
31
|
+
color: #42b983;
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: -1rem;
|
|
34
|
+
top: 0;
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
opacity: 0;
|
|
37
|
+
}
|
|
38
|
+
@media (min-width: 625px) {
|
|
39
|
+
h2:hover:before,
|
|
40
|
+
h3:hover:before {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
h2 a,
|
|
45
|
+
h3 a {
|
|
46
|
+
color: #2c3e50;
|
|
47
|
+
}
|
|
48
|
+
h2 {
|
|
49
|
+
font-family: serif;
|
|
50
|
+
padding-bottom: 0.7rem;
|
|
51
|
+
border-bottom: 0.5px solid #ddd;
|
|
52
|
+
}
|
|
53
|
+
h2:before {
|
|
54
|
+
top: 0.1em;
|
|
55
|
+
font-size: 0.9em;
|
|
56
|
+
}
|
|
57
|
+
pre {
|
|
58
|
+
border: 1px solid #bcd;
|
|
59
|
+
background-color: #ebf1f5;
|
|
60
|
+
padding: 0.8rem;
|
|
61
|
+
overflow-x: auto;
|
|
62
|
+
}
|
|
63
|
+
pre code {
|
|
64
|
+
font-size: 0.8rem;
|
|
65
|
+
}
|
|
66
|
+
code {
|
|
67
|
+
font-family: monospace;
|
|
68
|
+
color: #222;
|
|
69
|
+
}
|
|
70
|
+
ul ol {
|
|
71
|
+
padding-left: 1.5rem;
|
|
72
|
+
margin: 1.2rem 0;
|
|
73
|
+
}
|
|
74
|
+
a {
|
|
75
|
+
color: #42b983;
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
}
|
|
78
|
+
a:hover {
|
|
79
|
+
text-decoration: underline;
|
|
80
|
+
}
|
|
81
|
+
blockquote {
|
|
82
|
+
margin: 1.2rem 0;
|
|
83
|
+
padding: 0 1rem;
|
|
84
|
+
border-left: 4px solid #42b983;
|
|
85
|
+
}
|
|
86
|
+
blockquote.warn {
|
|
87
|
+
border-left-color: tomato;
|
|
88
|
+
}
|
|
89
|
+
blockquote p {
|
|
90
|
+
margin-left: 0;
|
|
91
|
+
}
|
package/vue.ymd
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<meta name=viewport content="width=device-width, initial-scale=1.0">
|
|
3
|
+
<meta name=author content="ylxdzsw@gmail.com">
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>[title] | ylxdzsw's blog</title>
|
|
6
|
+
|
|
7
|
+
<style>
|
|
8
|
+
[mixin] vue.css
|
|
9
|
+
</style>
|
|
10
|
+
|
|
11
|
+
[eval*] this.index = 0
|
|
12
|
+
|
|
13
|
+
[#slot]
|
|
14
|
+
|
|
15
|
+
[h2]=
|
|
16
|
+
const id = 'sec' + this.index++
|
|
17
|
+
`<h2><a id="${id}" href="#${id}">${interpret(capture_until('\n'))}</a></h2>`
|
|
18
|
+
|
|
19
|
+
[h3]=
|
|
20
|
+
const id = 'sec' + this.index++
|
|
21
|
+
`<h3><a id="${id}" href="#${id}">${interpret(capture_until('\n'))}</a></h3>`
|
|
22
|
+
|
|
23
|
+
[mixin] common.ymd
|
package/.editorconfig
DELETED