1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
| | <div id="org-demo" style="counter-set: chk 0">
<asside class="label-left">元数据</asside>
<pre class="label-left">
#+title: <span class="org-document-title">Example Org File</span>
#+author: <span class="org-document-info">TEC</span>
#+date: <span class="org-document-info">2020-10-27</span></pre>
<details open>
<summary>
<asside class="right" style="position: relative; z-index: -1">
<h4>概述显示</h4> <!-- TODO: I don't know if this is the best way to phrase it -->
章节标题与折叠让结构化编辑小菜一碟。
纯文本使得将 Org 文件同步或者加入版本管理十分容易。
</asside>
<pre><span class="org-level-1">* Revamp orgmode.org website</span></pre>
</summary>
<asside class="left">
<h4>日程</h4>
列出你所有文件中的待办事项。
过滤内容,并且直接更改其内容。
</asside>
<pre>
The <i>/beauty/</i> of org <b>*must*</b> be shared.</pre>
<details class="replace">
<summary>
<pre><span class="org-link">[[https://upload.wikimedia.org/wikipedia/commons/b/bd/Share_Icon.svg]]</span></pre>
</summary>
<img src="https://upload.wikimedia.org/wikipedia/commons/b/bd/Share_Icon.svg" alt="share icon" style="height: 3em; margin-left: 1.5em"/>
</details>
<details open class="br">
<summary>
<pre><span class="org-level-2">** <span class="org-done">DONE Make screenshots</span></span></pre>
</summary>
<pre> <span class="org-special-keyword">CLOSED:</span> <span class="org-date">[2020-09-03 Thu 18:24]</span>
</pre>
</details>
<details open>
<summary>
<pre><span class="org-level-2">** <span class="org-done">DONE Restyle Site CSS</span></span></pre>
</summary>
<pre>
Go through <span class="org-link"><a href="/resources/style/org.css">[[file:style.scss][stylesheet]]</a></span>
</pre>
</details>
<input type="checkbox" class="chk" id="chk1" checked />
<input type="checkbox" class="chk" id="chk2" checked />
<input type="checkbox" class="chk extra" id="chk3" />
<input type="checkbox" class="chk" id="chk4" />
<input type="checkbox" class="chk" id="chk5" checked />
<input type="checkbox" class="chk extra" id="chk6" />
<input type="checkbox" class="chk" id="chk7" />
<details>
<summary>
<pre><span class="org-level-2">** <span class="org-todo">TODO</span> Check CSS on main pages <span class="count-res"></span></span></pre>
</summary>
<pre class="countme">
<label for="chk1"><span class="org-list-dt">-</span> Index page</label>
<label for="chk2"><span class="org-list-dt">-</span> Quickstart</label>
<label for="chk3"><span class="org-list-dt">-</span> Features</label>
<label for="chk4"><span class="org-list-dt">-</span> Releases</label>
<label for="chk5"><span class="org-list-dt">-</span> Install</label>
<label for="chk6"><span class="org-list-dt">-</span> Manual</label>
<label for="chk7"><span class="org-list-dt">-</span> Contribute</label>
</pre>
</details>
</details>
<details open class="label-left">
<summary>
<asside class="label-left">文本</asside>
<pre><span class="org-level-1">* Learn Org</span></pre>
</summary>
<pre>
Org makes easy things trivial and complex things practical.
You don't need to learn Org before using Org: read the quickstart
page and you should be good to go. If you need more, Org will be
here for you as well: dive into the manual and join the community!
</pre>
<details open>
<summary>
<pre><span class="org-level-2">** Feedback</span></pre>
</summary>
<pre>
<span class="org-special-keyword">#+include: "other/feedback.org*manual" :only-contents t</span></pre>
</details>
</details>
<details open>
<summary>
<pre>
<span class="org-level-1">* Check CSS minification ratios</span>
</pre>
</summary>
<asside class="right">
<h4>Babel</h4>
在 Org 里进行文学编程。
用的是缓存区里类似笔记本的实时代码运行功能。
</asside>
<asside class="label-left">代码</asside>
<details open>
<summary><pre class="label-left" style="background-color: #ccc4"><span class="org-block-begin-line">#+begin_src python</span></pre></summary>
<pre class="src label-left" style="background-color: #fff4">
<span class="org-keyword">from</span> pathlib <span class="org-keyword">import</span> Path
<span class="org-variable-name">cssRatios</span> = []
<span class="org-keyword">for</span> css_min <span class="org-keyword">in</span> Path(<span class="org-string">"resources/style"</span>).glob(<span class="org-string">"*.min.css"</span>):
<span class="org-variable-name">css</span> = css_min.with_suffix(<span class="org-string">''</span>).with_suffix(<span class="org-string">'.css'</span>)
cssRatios.append([css.name,
<span class="org-string">"{:.0f}% minified ({:4.1f} KiB)"</span>.<span class="org-builtin">format</span>( <b>100</b> *
css_min.stat().st_size / css.stat().st_size,
css_min.stat().st_size / <b>1000</b>)])
<span class="org-keyword">return</span> cssRatios
</pre>
<pre class="label-left" style="background-color: #ccc4"><span class="org-block-end-line">#+end_src</span></pre>
</details>
<details open>
<summary>
<asside class="label-left">运行结果</asside>
<pre class="label-left br"><span class="org-block-begin-line">#+RESULTS:</span></pre>
</summary>
<pre class="label-left"><span class="org-table">| index.css | 76% minified ( 1.4 KiB) |
| org-demo.css | 77% minified ( 2.8 KiB) |
| errors.css | 74% minified ( 4.9 KiB) |
| org.css | 75% minified (10.7 KiB) |
</span></pre>
</details>
</details>
</div>
|