Skip to content

Commit 799ef08

Browse files
committed
添加内置文档汉化的源文件,更新打包流程
1 parent 79866db commit 799ef08

File tree

123 files changed

+8967
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+8967
-1
lines changed

demo-cn.zip

10.1 KB
Binary file not shown.

demo-cn/!!!meta.json

Lines changed: 4660 additions & 0 deletions
Large diffs are not rendered by default.

demo-cn/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
</head>
7+
<frameset cols="25%,75%">
8+
<frame name="navigation" src="navigation.html">
9+
<frame name="detail" src="%E7%A4%BA%E4%BE%8B%E7%AC%94%E8%AE%B0/%E7%AC%94%E8%AE%B0.html">
10+
</frameset>
11+
</html>

demo-cn/navigation.html

Lines changed: 528 additions & 0 deletions
Large diffs are not rendered by default.

demo-cn/style.css

Lines changed: 343 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,343 @@
1+
/* !!!!!! TRILIUM CUSTOM CHANGES !!!!!! */
2+
3+
.printed-content .ck-widget__selection-handle, .printed-content .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */
4+
display: none;
5+
}
6+
7+
/*
8+
* CKEditor 5 (v27.1.0) content styles.
9+
* Generated on Wed, 21 Apr 2021 07:00:21 GMT.
10+
* For more information, check out https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html
11+
*/
12+
13+
:root {
14+
--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);
15+
--ck-color-mention-text: hsl(341, 100%, 30%);
16+
--ck-highlight-marker-blue: hsl(201, 97%, 72%);
17+
--ck-highlight-marker-green: hsl(120, 93%, 68%);
18+
--ck-highlight-marker-pink: hsl(345, 96%, 73%);
19+
--ck-highlight-marker-yellow: hsl(60, 97%, 73%);
20+
--ck-highlight-pen-green: hsl(112, 100%, 27%);
21+
--ck-highlight-pen-red: hsl(0, 85%, 49%);
22+
--ck-image-style-spacing: 1.5em;
23+
--ck-todo-list-checkmark-size: 16px;
24+
}
25+
26+
/* ckeditor5-highlight/theme/highlight.css */
27+
.ck-content .marker-yellow {
28+
background-color: var(--ck-highlight-marker-yellow);
29+
}
30+
/* ckeditor5-highlight/theme/highlight.css */
31+
.ck-content .marker-green {
32+
background-color: var(--ck-highlight-marker-green);
33+
}
34+
/* ckeditor5-highlight/theme/highlight.css */
35+
.ck-content .marker-pink {
36+
background-color: var(--ck-highlight-marker-pink);
37+
}
38+
/* ckeditor5-highlight/theme/highlight.css */
39+
.ck-content .marker-blue {
40+
background-color: var(--ck-highlight-marker-blue);
41+
}
42+
/* ckeditor5-highlight/theme/highlight.css */
43+
.ck-content .pen-red {
44+
color: var(--ck-highlight-pen-red);
45+
background-color: transparent;
46+
}
47+
/* ckeditor5-highlight/theme/highlight.css */
48+
.ck-content .pen-green {
49+
color: var(--ck-highlight-pen-green);
50+
background-color: transparent;
51+
}
52+
/* ckeditor5-font/theme/fontsize.css */
53+
.ck-content .text-tiny {
54+
font-size: .7em;
55+
}
56+
/* ckeditor5-font/theme/fontsize.css */
57+
.ck-content .text-small {
58+
font-size: .85em;
59+
}
60+
/* ckeditor5-font/theme/fontsize.css */
61+
.ck-content .text-big {
62+
font-size: 1.4em;
63+
}
64+
/* ckeditor5-font/theme/fontsize.css */
65+
.ck-content .text-huge {
66+
font-size: 1.8em;
67+
}
68+
/* ckeditor5-image/theme/imagestyle.css */
69+
.ck-content .image-style-side {
70+
float: right;
71+
margin-left: var(--ck-image-style-spacing);
72+
max-width: 50%;
73+
}
74+
/* ckeditor5-image/theme/imagestyle.css */
75+
.ck-content .image-style-align-left {
76+
float: left;
77+
margin-right: var(--ck-image-style-spacing);
78+
}
79+
/* ckeditor5-image/theme/imagestyle.css */
80+
.ck-content .image-style-align-center {
81+
margin-left: auto;
82+
margin-right: auto;
83+
}
84+
/* ckeditor5-image/theme/imagestyle.css */
85+
.ck-content .image-style-align-right {
86+
float: right;
87+
margin-left: var(--ck-image-style-spacing);
88+
}
89+
/* ckeditor5-code-block/theme/codeblock.css */
90+
.ck-content pre {
91+
padding: 1em;
92+
color: hsl(0, 0%, 20.8%);
93+
background: hsla(0, 0%, 78%, 0.3);
94+
border: 1px solid hsl(0, 0%, 77%);
95+
border-radius: 2px;
96+
text-align: left;
97+
direction: ltr;
98+
tab-size: 4;
99+
white-space: pre-wrap;
100+
font-style: normal;
101+
min-width: 200px;
102+
}
103+
/* ckeditor5-code-block/theme/codeblock.css */
104+
.ck-content pre code {
105+
background: unset;
106+
padding: 0;
107+
border-radius: 0;
108+
}
109+
/* ckeditor5-html-embed/theme/htmlembed.css */
110+
.ck-content .raw-html-embed {
111+
margin: 1em auto;
112+
min-width: 15em;
113+
font-style: normal;
114+
}
115+
/* ckeditor5-horizontal-line/theme/horizontalline.css */
116+
.ck-content hr {
117+
margin: 15px 0;
118+
height: 4px;
119+
background: hsl(0, 0%, 87%);
120+
border: 0;
121+
}
122+
/* ckeditor5-image/theme/imagecaption.css */
123+
.ck-content .image > figcaption {
124+
display: table-caption;
125+
caption-side: bottom;
126+
word-break: break-word;
127+
color: hsl(0, 0%, 20%);
128+
background-color: hsl(0, 0%, 97%);
129+
padding: .6em;
130+
font-size: .75em;
131+
outline-offset: -1px;
132+
}
133+
/* ckeditor5-image/theme/imageresize.css */
134+
.ck-content .image.image_resized {
135+
max-width: 100%;
136+
display: block;
137+
box-sizing: border-box;
138+
}
139+
/* ckeditor5-image/theme/imageresize.css */
140+
.ck-content .image.image_resized img {
141+
width: 100%;
142+
}
143+
/* ckeditor5-image/theme/imageresize.css */
144+
.ck-content .image.image_resized > figcaption {
145+
display: block;
146+
}
147+
/* ckeditor5-image/theme/image.css */
148+
.ck-content .image {
149+
display: table;
150+
clear: both;
151+
text-align: center;
152+
margin: 1em auto;
153+
}
154+
/* ckeditor5-image/theme/image.css */
155+
.ck-content .image img {
156+
display: block;
157+
margin: 0 auto;
158+
max-width: 100%;
159+
min-width: 50px;
160+
}
161+
/* ckeditor5-language/theme/language.css */
162+
.ck-content span[lang] {
163+
font-style: italic;
164+
}
165+
/* ckeditor5-basic-styles/theme/code.css */
166+
.ck-content code {
167+
background-color: hsla(0, 0%, 78%, 0.3);
168+
padding: .15em;
169+
border-radius: 2px;
170+
}
171+
/* ckeditor5-block-quote/theme/blockquote.css */
172+
.ck-content blockquote {
173+
overflow: hidden;
174+
padding-right: 1.5em;
175+
padding-left: 1.5em;
176+
margin-left: 0;
177+
margin-right: 0;
178+
font-style: italic;
179+
border-left: solid 5px hsl(0, 0%, 80%);
180+
}
181+
/* ckeditor5-block-quote/theme/blockquote.css */
182+
.ck-content[dir="rtl"] blockquote {
183+
border-left: 0;
184+
border-right: solid 5px hsl(0, 0%, 80%);
185+
}
186+
/* ckeditor5-table/theme/table.css */
187+
.ck-content .table {
188+
margin: 1em auto;
189+
display: table;
190+
}
191+
/* ckeditor5-table/theme/table.css */
192+
.ck-content .table table {
193+
border-collapse: collapse;
194+
border-spacing: 0;
195+
width: 100%;
196+
height: 100%;
197+
border: 1px double hsl(0, 0%, 70%);
198+
}
199+
/* ckeditor5-table/theme/table.css */
200+
.ck-content .table table td,
201+
.ck-content .table table th {
202+
min-width: 2em;
203+
padding: .4em;
204+
border: 1px solid hsl(0, 0%, 75%);
205+
}
206+
/* ckeditor5-table/theme/table.css */
207+
.ck-content .table table th {
208+
font-weight: bold;
209+
background: hsla(0, 0%, 0%, 5%);
210+
}
211+
/* ckeditor5-table/theme/table.css */
212+
.ck-content[dir="rtl"] .table th {
213+
text-align: right;
214+
}
215+
/* ckeditor5-table/theme/table.css */
216+
.ck-content[dir="ltr"] .table th {
217+
text-align: left;
218+
}
219+
/* ckeditor5-page-break/theme/pagebreak.css */
220+
.ck-content .page-break {
221+
position: relative;
222+
clear: both;
223+
padding: 5px 0;
224+
display: flex;
225+
align-items: center;
226+
justify-content: center;
227+
}
228+
/* ckeditor5-page-break/theme/pagebreak.css */
229+
.ck-content .page-break::after {
230+
content: '';
231+
position: absolute;
232+
border-bottom: 2px dashed hsl(0, 0%, 77%);
233+
width: 100%;
234+
}
235+
/* ckeditor5-page-break/theme/pagebreak.css */
236+
.ck-content .page-break__label {
237+
position: relative;
238+
z-index: 1;
239+
padding: .3em .6em;
240+
display: block;
241+
text-transform: uppercase;
242+
border: 1px solid hsl(0, 0%, 77%);
243+
border-radius: 2px;
244+
font-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;
245+
font-size: 0.75em;
246+
font-weight: bold;
247+
color: hsl(0, 0%, 20%);
248+
background: hsl(0, 0%, 100%);
249+
box-shadow: 2px 2px 1px hsla(0, 0%, 0%, 0.15);
250+
-webkit-user-select: none;
251+
-moz-user-select: none;
252+
-ms-user-select: none;
253+
user-select: none;
254+
}
255+
/* ckeditor5-media-embed/theme/mediaembed.css */
256+
.ck-content .media {
257+
clear: both;
258+
margin: 1em 0;
259+
display: block;
260+
min-width: 15em;
261+
}
262+
/* ckeditor5-list/theme/todolist.css */
263+
.ck-content .todo-list {
264+
list-style: none;
265+
}
266+
/* ckeditor5-list/theme/todolist.css */
267+
.ck-content .todo-list li {
268+
margin-bottom: 5px;
269+
}
270+
/* ckeditor5-list/theme/todolist.css */
271+
.ck-content .todo-list li .todo-list {
272+
margin-top: 5px;
273+
}
274+
/* ckeditor5-list/theme/todolist.css */
275+
.ck-content .todo-list .todo-list__label > input {
276+
-webkit-appearance: none;
277+
display: inline-block;
278+
position: relative;
279+
width: var(--ck-todo-list-checkmark-size);
280+
height: var(--ck-todo-list-checkmark-size);
281+
vertical-align: middle;
282+
border: 0;
283+
left: -25px;
284+
margin-right: -15px;
285+
right: 0;
286+
margin-left: 0;
287+
}
288+
/* ckeditor5-list/theme/todolist.css */
289+
.ck-content .todo-list .todo-list__label > input::before {
290+
display: block;
291+
position: absolute;
292+
box-sizing: border-box;
293+
content: '';
294+
width: 100%;
295+
height: 100%;
296+
border: 1px solid hsl(0, 0%, 20%);
297+
border-radius: 2px;
298+
transition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;
299+
}
300+
/* ckeditor5-list/theme/todolist.css */
301+
.ck-content .todo-list .todo-list__label > input::after {
302+
display: block;
303+
position: absolute;
304+
box-sizing: content-box;
305+
pointer-events: none;
306+
content: '';
307+
left: calc( var(--ck-todo-list-checkmark-size) / 3 );
308+
top: calc( var(--ck-todo-list-checkmark-size) / 5.3 );
309+
width: calc( var(--ck-todo-list-checkmark-size) / 5.3 );
310+
height: calc( var(--ck-todo-list-checkmark-size) / 2.6 );
311+
border-style: solid;
312+
border-color: transparent;
313+
border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;
314+
transform: rotate(45deg);
315+
}
316+
/* ckeditor5-list/theme/todolist.css */
317+
.ck-content .todo-list .todo-list__label > input[checked]::before {
318+
background: hsl(126, 64%, 41%);
319+
border-color: hsl(126, 64%, 41%);
320+
}
321+
/* ckeditor5-list/theme/todolist.css */
322+
.ck-content .todo-list .todo-list__label > input[checked]::after {
323+
border-color: hsl(0, 0%, 100%);
324+
}
325+
/* ckeditor5-list/theme/todolist.css */
326+
.ck-content .todo-list .todo-list__label .todo-list__label__description {
327+
vertical-align: middle;
328+
}
329+
/* ckeditor5-mention/theme/mention.css */
330+
.ck-content .mention {
331+
background: var(--ck-color-mention-background);
332+
color: var(--ck-color-mention-text);
333+
}
334+
@media print {
335+
/* ckeditor5-page-break/theme/pagebreak.css */
336+
.ck-content .page-break {
337+
padding: 0;
338+
}
339+
/* ckeditor5-page-break/theme/pagebreak.css */
340+
.ck-content .page-break::after {
341+
display: none;
342+
}
343+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<html>
2+
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="stylesheet" href="../style.css">
7+
<base target="_parent">
8+
</head>
9+
10+
<body class="ck-content">
11+
<h1>Trilium 扩展</h1>
12+
13+
<p><strong>扩展Trilium的各种功能</strong>
14+
15+
</p>
16+
<p>Trilium 里面只要笔记的属性`Owned attrs`里面有一些特殊的属性就能变成功能扩展插件
17+
<br />笔记可以放在任何位置, 不一定要放在根目录, 只要对应的属性正确就行</p>
18+
<p> </p>
19+
<p><strong>笔记渲染 Render Note</strong>
20+
21+
<br />首先需要一个`HTML`类型的笔记作为渲染模板</p>
22+
<p>笔记可以设置为`Render Note`, 通过添加relation, 设置`renderNote`属性关联上面的模板</p>
23+
<p>如果模板是包含js的, 则js必须设置为`JS frontend`类型的笔记, 并且要移动到模板页面的目录下, 否则不会生效</p>
24+
<p>具体可以参考自带的统计功能</p>
25+
<p> </p>
26+
<p><strong>主题</strong>
27+
28+
<br />可以自定义主题样式
29+
<br />只要文件有`#appTheme`的属性就行</p>
30+
<p>主题名称是文件的名称, 给appTheme赋值也没用</p>
31+
<p> </p>
32+
<p><strong>统计</strong>
33+
34+
<br />自带的统计功能</p>
35+
</body>
36+
37+
</html>

0 commit comments

Comments
 (0)