fronde 0.3.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/fronde +15 -30
- data/lib/ext/nil_time.rb +25 -0
- data/lib/ext/r18n.rb +37 -0
- data/lib/ext/time.rb +39 -0
- data/lib/ext/time_no_time.rb +23 -0
- data/lib/fronde/cli/commands.rb +97 -104
- data/lib/fronde/cli/data/Rakefile +8 -0
- data/lib/fronde/cli/data/config.yml +13 -0
- data/lib/fronde/cli/data/gitignore +6 -0
- data/lib/fronde/cli/data/zsh_completion +37 -0
- data/lib/fronde/cli/helpers.rb +55 -0
- data/lib/fronde/cli/opt_parse.rb +140 -0
- data/lib/fronde/cli/throbber.rb +110 -0
- data/lib/fronde/cli.rb +42 -42
- data/lib/fronde/config/data/org-config.el +25 -0
- data/lib/fronde/config/data/ox-fronde.el +158 -0
- data/lib/fronde/config/data/themes/umaneti/css/htmlize.css +364 -0
- data/lib/fronde/config/data/themes/umaneti/css/style.css +250 -0
- data/lib/fronde/config/data/themes/umaneti/img/bottom.png +0 -0
- data/lib/fronde/config/data/themes/umaneti/img/content.png +0 -0
- data/lib/fronde/config/data/themes/umaneti/img/tic.png +0 -0
- data/lib/fronde/config/data/themes/umaneti/img/top.png +0 -0
- data/lib/fronde/config/helpers.rb +62 -0
- data/lib/fronde/config/lisp.rb +80 -0
- data/lib/fronde/config.rb +148 -98
- data/lib/fronde/emacs.rb +23 -20
- data/lib/fronde/index/atom_generator.rb +55 -66
- data/lib/fronde/index/data/all_tags.org +19 -0
- data/lib/fronde/index/data/template.org +26 -0
- data/lib/fronde/index/data/template.xml +37 -0
- data/lib/fronde/index/org_generator.rb +72 -88
- data/lib/fronde/index.rb +57 -86
- data/lib/fronde/org/file.rb +299 -0
- data/lib/fronde/org/file_extracter.rb +101 -0
- data/lib/fronde/org.rb +105 -0
- data/lib/fronde/preview.rb +43 -39
- data/lib/fronde/slug.rb +54 -0
- data/lib/fronde/source/gemini.rb +34 -0
- data/lib/fronde/source/html.rb +67 -0
- data/lib/fronde/source.rb +209 -0
- data/lib/fronde/sync/neocities.rb +220 -0
- data/lib/fronde/sync/rsync.rb +46 -0
- data/lib/fronde/sync.rb +32 -0
- data/lib/fronde/templater.rb +101 -71
- data/lib/fronde/version.rb +1 -1
- data/lib/tasks/cli.rake +33 -0
- data/lib/tasks/org.rake +58 -43
- data/lib/tasks/site.rake +66 -31
- data/lib/tasks/sync.rake +37 -40
- data/lib/tasks/tags.rake +11 -7
- data/locales/en.yml +61 -14
- data/locales/fr.yml +69 -14
- metadata +77 -95
- data/lib/fronde/config/lisp_config.rb +0 -340
- data/lib/fronde/config/org-config.el +0 -19
- data/lib/fronde/config/ox-fronde.el +0 -121
- data/lib/fronde/org_file/class_methods.rb +0 -72
- data/lib/fronde/org_file/extracter.rb +0 -72
- data/lib/fronde/org_file/htmlizer.rb +0 -43
- data/lib/fronde/org_file.rb +0 -298
- data/lib/fronde/utils.rb +0 -229
@@ -0,0 +1,364 @@
|
|
1
|
+
/**
|
2
|
+
* This file has been generated with the `org-html-htmlize-generate-css'
|
3
|
+
* command of org mode, with the Dracula theme enabled.
|
4
|
+
* The Dracula theme is released under an MIT license and thus the
|
5
|
+
* following is also released under this license.
|
6
|
+
* See https://github.com/dracula/emacs for details.
|
7
|
+
*/
|
8
|
+
|
9
|
+
pre.src {
|
10
|
+
color: #f8f8f2;
|
11
|
+
background-color: #282a36;
|
12
|
+
padding: .6em 1em;
|
13
|
+
padding-top: .6em !important; /* Override default style */
|
14
|
+
overflow: visible !important; /* Fix default style */
|
15
|
+
}
|
16
|
+
pre.src a:hover {
|
17
|
+
text-decoration: underline;
|
18
|
+
}
|
19
|
+
pre.src::before {
|
20
|
+
color: #282a36;
|
21
|
+
border-color: #282a36;
|
22
|
+
}
|
23
|
+
.org-src-container {
|
24
|
+
overflow: auto;
|
25
|
+
}
|
26
|
+
.org-src-container label.org-src-name {
|
27
|
+
display: block;
|
28
|
+
text-align: center;
|
29
|
+
font-size: .9em;
|
30
|
+
color: #666666;
|
31
|
+
}
|
32
|
+
.org-src-container label.org-src-name+pre.src {
|
33
|
+
margin-top: .5em;
|
34
|
+
}
|
35
|
+
|
36
|
+
.org-bold {
|
37
|
+
/* bold */
|
38
|
+
font-weight: bold;
|
39
|
+
}
|
40
|
+
.org-bold-italic {
|
41
|
+
/* bold-italic */
|
42
|
+
font-weight: bold;
|
43
|
+
font-style: italic;
|
44
|
+
}
|
45
|
+
|
46
|
+
.org-builtin {
|
47
|
+
/* font-lock-builtin-face */
|
48
|
+
color: #ffb86c;
|
49
|
+
}
|
50
|
+
.org-button {
|
51
|
+
/* button */
|
52
|
+
color: #8be9fd;
|
53
|
+
text-decoration: underline;
|
54
|
+
}
|
55
|
+
.org-comment {
|
56
|
+
/* font-lock-comment-face */
|
57
|
+
color: #6272a4;
|
58
|
+
}
|
59
|
+
.org-comment-delimiter {
|
60
|
+
/* font-lock-comment-delimiter-face */
|
61
|
+
color: #6272a4;
|
62
|
+
}
|
63
|
+
.org-constant {
|
64
|
+
/* font-lock-constant-face */
|
65
|
+
color: #8be9fd;
|
66
|
+
}
|
67
|
+
.org-cursor {
|
68
|
+
/* cursor */
|
69
|
+
background-color: #8be9fd;
|
70
|
+
}
|
71
|
+
.org-doc {
|
72
|
+
/* font-lock-doc-face */
|
73
|
+
color: #6272a4;
|
74
|
+
}
|
75
|
+
.org-error {
|
76
|
+
/* error */
|
77
|
+
color: #ffc0cb;
|
78
|
+
font-weight: bold;
|
79
|
+
}
|
80
|
+
.org-escape-glyph {
|
81
|
+
/* escape-glyph */
|
82
|
+
color: #00ffff;
|
83
|
+
}
|
84
|
+
.org-file-name-shadow {
|
85
|
+
/* file-name-shadow */
|
86
|
+
color: #b3b3b3;
|
87
|
+
}
|
88
|
+
.org-fringe {
|
89
|
+
/* fringe */
|
90
|
+
color: #b6b6b2;
|
91
|
+
background-color: #282a36;
|
92
|
+
}
|
93
|
+
.org-function-name {
|
94
|
+
/* font-lock-function-name-face */
|
95
|
+
color: #50fa7b;
|
96
|
+
font-weight: bold;
|
97
|
+
}
|
98
|
+
.org-glyphless-char {
|
99
|
+
/* glyphless-char */
|
100
|
+
font-size: 60%;
|
101
|
+
}
|
102
|
+
.org-header-line {
|
103
|
+
/* header-line */
|
104
|
+
background-color: #282a36;
|
105
|
+
}
|
106
|
+
.org-header-line-highlight {
|
107
|
+
/* header-line-highlight */
|
108
|
+
color: #ccccc7;
|
109
|
+
background-color: #464752;
|
110
|
+
}
|
111
|
+
.org-help-argument-name {
|
112
|
+
/* help-argument-name */
|
113
|
+
font-style: italic;
|
114
|
+
}
|
115
|
+
.org-highlight {
|
116
|
+
/* highlight */
|
117
|
+
color: #ccccc7;
|
118
|
+
background-color: #464752;
|
119
|
+
}
|
120
|
+
.org-hl-line {
|
121
|
+
/* hl-line */
|
122
|
+
background-color: #44475a;
|
123
|
+
}
|
124
|
+
.org-homoglyph {
|
125
|
+
/* homoglyph */
|
126
|
+
color: #00ffff;
|
127
|
+
}
|
128
|
+
.org-italic {
|
129
|
+
/* italic */
|
130
|
+
font-style: italic;
|
131
|
+
}
|
132
|
+
.org-keyword {
|
133
|
+
/* font-lock-keyword-face */
|
134
|
+
color: #ff79c6;
|
135
|
+
font-weight: bold;
|
136
|
+
}
|
137
|
+
.org-lazy-highlight {
|
138
|
+
/* lazy-highlight */
|
139
|
+
color: #e2e2dc;
|
140
|
+
background-color: #464752;
|
141
|
+
}
|
142
|
+
.org-line-number-current-line {
|
143
|
+
/* line-number-current-line */
|
144
|
+
color: #b3b3b3;
|
145
|
+
background-color: #282a36;
|
146
|
+
}
|
147
|
+
.org-link {
|
148
|
+
/* link */
|
149
|
+
color: #8be9fd;
|
150
|
+
text-decoration: underline;
|
151
|
+
}
|
152
|
+
.org-link-visited {
|
153
|
+
/* link-visited */
|
154
|
+
color: #ee82ee;
|
155
|
+
text-decoration: underline;
|
156
|
+
}
|
157
|
+
.org-linum {
|
158
|
+
/* linum */
|
159
|
+
color: #565761;
|
160
|
+
background-color: #282a36;
|
161
|
+
font-style: italic;
|
162
|
+
}
|
163
|
+
.org-match {
|
164
|
+
/* match */
|
165
|
+
background-color: #3a5fcd;
|
166
|
+
}
|
167
|
+
.org-negation-char {
|
168
|
+
/* font-lock-negation-char-face */
|
169
|
+
color: #8be9fd;
|
170
|
+
}
|
171
|
+
.org-next-error {
|
172
|
+
/* next-error */
|
173
|
+
color: #282a36;
|
174
|
+
background-color: #f1fa8c;
|
175
|
+
}
|
176
|
+
.org-nobreak-hyphen {
|
177
|
+
/* nobreak-hyphen */
|
178
|
+
color: #00ffff;
|
179
|
+
}
|
180
|
+
.org-nobreak-space {
|
181
|
+
/* nobreak-space */
|
182
|
+
color: #00ffff;
|
183
|
+
text-decoration: underline;
|
184
|
+
}
|
185
|
+
.org-outline-1 {
|
186
|
+
/* outline-1 */
|
187
|
+
color: #50fa7b;
|
188
|
+
}
|
189
|
+
.org-outline-2 {
|
190
|
+
/* outline-2 */
|
191
|
+
color: #bd93f9;
|
192
|
+
}
|
193
|
+
.org-outline-3 {
|
194
|
+
/* outline-3 */
|
195
|
+
color: #8be9fd;
|
196
|
+
}
|
197
|
+
.org-outline-4 {
|
198
|
+
/* outline-4 */
|
199
|
+
color: #ffb86c;
|
200
|
+
}
|
201
|
+
.org-outline-5 {
|
202
|
+
/* outline-5 */
|
203
|
+
color: #ffb86c;
|
204
|
+
}
|
205
|
+
.org-outline-6 {
|
206
|
+
/* outline-6 */
|
207
|
+
color: #0189cc;
|
208
|
+
}
|
209
|
+
.org-outline-7 {
|
210
|
+
/* outline-7 */
|
211
|
+
color: #ffb86c;
|
212
|
+
}
|
213
|
+
.org-outline-8 {
|
214
|
+
/* outline-8 */
|
215
|
+
color: #f1fa8c;
|
216
|
+
}
|
217
|
+
.org-page-break-lines {
|
218
|
+
/* page-break-lines */
|
219
|
+
color: #6272a4;
|
220
|
+
}
|
221
|
+
.org-preprocessor {
|
222
|
+
/* font-lock-preprocessor-face */
|
223
|
+
color: #ffb86c;
|
224
|
+
}
|
225
|
+
.org-py-builtins {
|
226
|
+
/* py-builtins-face */
|
227
|
+
color: #ffb86c;
|
228
|
+
}
|
229
|
+
.org-py-class-name {
|
230
|
+
/* py-class-name-face */
|
231
|
+
color: #bd93f9;
|
232
|
+
}
|
233
|
+
.org-py-decorators {
|
234
|
+
/* py-decorators-face */
|
235
|
+
color: #ff79c6;
|
236
|
+
font-weight: bold;
|
237
|
+
}
|
238
|
+
.org-py-def-class {
|
239
|
+
/* py-def-class-face */
|
240
|
+
color: #ff79c6;
|
241
|
+
font-weight: bold;
|
242
|
+
}
|
243
|
+
.org-py-exception-name {
|
244
|
+
/* py-exception-name-face */
|
245
|
+
color: #ffb86c;
|
246
|
+
}
|
247
|
+
.org-py-import-from {
|
248
|
+
/* py-import-from-face */
|
249
|
+
color: #ff79c6;
|
250
|
+
font-weight: bold;
|
251
|
+
}
|
252
|
+
.org-py-number {
|
253
|
+
/* py-number-face */
|
254
|
+
color: #f8f8f2;
|
255
|
+
background-color: #282a36;
|
256
|
+
}
|
257
|
+
.org-py-object-reference {
|
258
|
+
/* py-object-reference-face */
|
259
|
+
color: #ff79c6;
|
260
|
+
font-weight: bold;
|
261
|
+
}
|
262
|
+
.org-py-pseudo-keyword {
|
263
|
+
/* py-pseudo-keyword-face */
|
264
|
+
color: #ff79c6;
|
265
|
+
font-weight: bold;
|
266
|
+
}
|
267
|
+
.org-py-try-if {
|
268
|
+
/* py-try-if-face */
|
269
|
+
color: #ff79c6;
|
270
|
+
font-weight: bold;
|
271
|
+
}
|
272
|
+
.org-py-variable-name {
|
273
|
+
/* py-variable-name-face */
|
274
|
+
color: #f8f8f2;
|
275
|
+
background-color: #282a36;
|
276
|
+
}
|
277
|
+
.org-py-xxx-tag {
|
278
|
+
/* py-XXX-tag-face */
|
279
|
+
color: #f1fa8c;
|
280
|
+
}
|
281
|
+
.org-query-replace {
|
282
|
+
/* query-replace */
|
283
|
+
color: #ffb86c;
|
284
|
+
background-color: #464752;
|
285
|
+
font-weight: bold;
|
286
|
+
}
|
287
|
+
.org-regexp-grouping-backslash {
|
288
|
+
/* font-lock-regexp-grouping-backslash */
|
289
|
+
font-weight: bold;
|
290
|
+
}
|
291
|
+
.org-regexp-grouping-construct {
|
292
|
+
/* font-lock-regexp-grouping-construct */
|
293
|
+
font-weight: bold;
|
294
|
+
}
|
295
|
+
.org-region {
|
296
|
+
/* region */
|
297
|
+
color: #282a36;
|
298
|
+
background-color: #f1fa8c;
|
299
|
+
}
|
300
|
+
.org-shadow {
|
301
|
+
/* shadow */
|
302
|
+
color: #b3b3b3;
|
303
|
+
}
|
304
|
+
.org-show-paren-match {
|
305
|
+
/* show-paren-match */
|
306
|
+
background-color: #4f94cd;
|
307
|
+
}
|
308
|
+
.org-show-paren-match-expression {
|
309
|
+
/* show-paren-match-expression */
|
310
|
+
background-color: #4f94cd;
|
311
|
+
}
|
312
|
+
.org-show-paren-mismatch {
|
313
|
+
/* show-paren-mismatch */
|
314
|
+
color: #ffffff;
|
315
|
+
background-color: #a020f0;
|
316
|
+
}
|
317
|
+
.org-string {
|
318
|
+
/* font-lock-string-face */
|
319
|
+
color: #f1fa8c;
|
320
|
+
}
|
321
|
+
.org-success {
|
322
|
+
/* success */
|
323
|
+
color: #00ff00;
|
324
|
+
font-weight: bold;
|
325
|
+
}
|
326
|
+
.org-tooltip {
|
327
|
+
/* tooltip */
|
328
|
+
color: #000000;
|
329
|
+
background-color: #ffffe0;
|
330
|
+
}
|
331
|
+
.org-trailing-whitespace {
|
332
|
+
/* trailing-whitespace */
|
333
|
+
background-color: #ffb86c;
|
334
|
+
}
|
335
|
+
.org-type {
|
336
|
+
/* font-lock-type-face */
|
337
|
+
color: #bd93f9;
|
338
|
+
}
|
339
|
+
.org-underline {
|
340
|
+
/* underline */
|
341
|
+
text-decoration: underline;
|
342
|
+
}
|
343
|
+
.org-variable-name {
|
344
|
+
/* font-lock-variable-name-face */
|
345
|
+
color: #f8f8f2;
|
346
|
+
}
|
347
|
+
.org-vertical-border {
|
348
|
+
/* vertical-border */
|
349
|
+
color: #373844;
|
350
|
+
}
|
351
|
+
.org-warning {
|
352
|
+
/* warning */
|
353
|
+
color: #ffb86c;
|
354
|
+
}
|
355
|
+
.org-warning-1 {
|
356
|
+
/* font-lock-warning-face */
|
357
|
+
color: #ffb86c;
|
358
|
+
background-color: #373844;
|
359
|
+
}
|
360
|
+
.org-which-func {
|
361
|
+
/* which-func */
|
362
|
+
color: #50fa7b;
|
363
|
+
font-weight: bold;
|
364
|
+
}
|
@@ -0,0 +1,250 @@
|
|
1
|
+
body {
|
2
|
+
font-size: 10pt;
|
3
|
+
color: #000000;
|
4
|
+
font-family: sans-serif;
|
5
|
+
margin: 0;
|
6
|
+
}
|
7
|
+
|
8
|
+
h1 {color: #ffba53;}
|
9
|
+
|
10
|
+
h2 {color: #68a5c3;}
|
11
|
+
|
12
|
+
h3 {color:#ffba53;}
|
13
|
+
|
14
|
+
a[hreflang]:after {
|
15
|
+
content: "\00a0[" attr(hreflang) "]";
|
16
|
+
color: #cccccc;
|
17
|
+
background: transparent;
|
18
|
+
}
|
19
|
+
|
20
|
+
a, a:visited {color: #666666;}
|
21
|
+
a:hover {text-decoration: none;}
|
22
|
+
|
23
|
+
img {border: 0;}
|
24
|
+
|
25
|
+
blockquote {
|
26
|
+
font-style: italic;
|
27
|
+
border-left: 4px solid #666666;
|
28
|
+
padding-left: 1em;
|
29
|
+
}
|
30
|
+
|
31
|
+
acronym {
|
32
|
+
border-bottom:dotted 1px #666666;
|
33
|
+
cursor:help;
|
34
|
+
}
|
35
|
+
|
36
|
+
code {
|
37
|
+
font-family: monospace;
|
38
|
+
color: #bb1111;
|
39
|
+
}
|
40
|
+
h2 code {color: #68a5c3;}
|
41
|
+
h3 code {color: #ffba53;}
|
42
|
+
h4 code {color: #000000;}
|
43
|
+
|
44
|
+
ul {
|
45
|
+
list-style: url('/assets/umaneti/img/tic.png');
|
46
|
+
padding-left: 2em;
|
47
|
+
}
|
48
|
+
|
49
|
+
ol {padding-left: 2em;}
|
50
|
+
|
51
|
+
p, li {
|
52
|
+
text-align: justify;
|
53
|
+
line-height: 1.75em;
|
54
|
+
}
|
55
|
+
|
56
|
+
dt {
|
57
|
+
font-weight: bold;
|
58
|
+
}
|
59
|
+
|
60
|
+
.underline {
|
61
|
+
text-decoration: underline;
|
62
|
+
}
|
63
|
+
|
64
|
+
.org-center {
|
65
|
+
text-align: center;
|
66
|
+
}
|
67
|
+
|
68
|
+
fieldset {border: 0;}
|
69
|
+
|
70
|
+
input, textarea {
|
71
|
+
border: 1px solid #cccccc;
|
72
|
+
margin: 3px 0px;
|
73
|
+
background: #ffffff;
|
74
|
+
}
|
75
|
+
input:hover,
|
76
|
+
input:focus,
|
77
|
+
textarea:hover,
|
78
|
+
textarea:focus {
|
79
|
+
border: 1px solid #ffba53;
|
80
|
+
background: #ffffff;
|
81
|
+
}
|
82
|
+
|
83
|
+
/* Sidebar */
|
84
|
+
|
85
|
+
nav#table-of-contents {
|
86
|
+
width: 300px;
|
87
|
+
position: fixed;
|
88
|
+
top: 0px;
|
89
|
+
left: 0px;
|
90
|
+
padding: 1em 10px;
|
91
|
+
height: 100%;
|
92
|
+
height: calc(100% - 2em);
|
93
|
+
overflow: auto;
|
94
|
+
background-color: #666666;
|
95
|
+
color: #cccccc;
|
96
|
+
}
|
97
|
+
nav#table-of-contents a,
|
98
|
+
nav#table-of-contents a:hover,
|
99
|
+
nav#table-of-contents a:visited {
|
100
|
+
color: #cccccc;
|
101
|
+
text-decoration: none;
|
102
|
+
display: inline-block;
|
103
|
+
padding: .2em .5em;
|
104
|
+
width: 100%;
|
105
|
+
width: calc(100% - 1em);
|
106
|
+
}
|
107
|
+
nav#table-of-contents a code { color: #cccccc; }
|
108
|
+
|
109
|
+
#text-table-of-contents ul { padding-left: 0; }
|
110
|
+
#text-table-of-contents li {
|
111
|
+
font-weight: bold;
|
112
|
+
list-style: none;
|
113
|
+
line-height: 2em;
|
114
|
+
}
|
115
|
+
#text-table-of-contents li:hover {
|
116
|
+
background-color: #444444;
|
117
|
+
}
|
118
|
+
#text-table-of-contents li li {
|
119
|
+
font-weight: normal;
|
120
|
+
}
|
121
|
+
#text-table-of-contents li li:hover {
|
122
|
+
background-color: #222222;
|
123
|
+
}
|
124
|
+
#text-table-of-contents li li li:hover {
|
125
|
+
background-color: #000000;
|
126
|
+
}
|
127
|
+
|
128
|
+
/* Main content */
|
129
|
+
|
130
|
+
#content, #postamble {
|
131
|
+
max-width: 800px;
|
132
|
+
margin: 0 auto;
|
133
|
+
padding: 0 1.5em;
|
134
|
+
background-image: url('/assets/umaneti/img/top.png');
|
135
|
+
background-position: top left;
|
136
|
+
background-repeat: repeat-x;
|
137
|
+
}
|
138
|
+
|
139
|
+
nav#table-of-contents ~ #content,
|
140
|
+
nav#table-of-contents ~ #postamble {
|
141
|
+
margin: 0 0 0 320px;
|
142
|
+
}
|
143
|
+
|
144
|
+
div.tipblock,
|
145
|
+
div.warningblock,
|
146
|
+
div.cautionblock,
|
147
|
+
div.noteblock {
|
148
|
+
border-width: 1px;
|
149
|
+
border-style: solid;
|
150
|
+
margin: 1.2em;
|
151
|
+
padding: 0 1em;
|
152
|
+
box-shadow: 3px 3px 3px #eeeeee;
|
153
|
+
}
|
154
|
+
div.tipblock::before,
|
155
|
+
div.warningblock::before,
|
156
|
+
div.cautionblock::before,
|
157
|
+
div.noteblock::before {
|
158
|
+
font-size: 2em;
|
159
|
+
margin-top: 0.3em;
|
160
|
+
padding-right: .5em;
|
161
|
+
position: absolute;
|
162
|
+
}
|
163
|
+
div.tipblock > *,
|
164
|
+
div.warningblock > *,
|
165
|
+
div.cautionblock > *,
|
166
|
+
div.noteblock > * {
|
167
|
+
margin-left: 4em;
|
168
|
+
}
|
169
|
+
|
170
|
+
div.warningblock {
|
171
|
+
border-color: #ffba53;
|
172
|
+
}
|
173
|
+
div.warningblock::before {
|
174
|
+
content: "⚠️";
|
175
|
+
border-right: 1px solid #ffba53;
|
176
|
+
}
|
177
|
+
div.noteblock {
|
178
|
+
border-color: #68a5c3;
|
179
|
+
}
|
180
|
+
div.noteblock::before {
|
181
|
+
content: "ℹ️";
|
182
|
+
border-right: 1px solid #68a5c3;
|
183
|
+
}
|
184
|
+
div.tipblock {
|
185
|
+
border-color: #87C25D;
|
186
|
+
}
|
187
|
+
div.tipblock::before {
|
188
|
+
content: "💡";
|
189
|
+
border-right: 1px solid #87C25D;
|
190
|
+
}
|
191
|
+
div.cautionblock {
|
192
|
+
border-color: #ff5555;
|
193
|
+
}
|
194
|
+
div.cautionblock::before {
|
195
|
+
content: "🔥";
|
196
|
+
border-right: 1px solid #ff5555;
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
@media screen and (max-width: 660px) {
|
201
|
+
nav#table-of-contents {
|
202
|
+
display: none;
|
203
|
+
}
|
204
|
+
#content, #postamble {
|
205
|
+
max-width: 95%;
|
206
|
+
margin: 0;
|
207
|
+
}
|
208
|
+
nav#table-of-contents ~ #content,
|
209
|
+
nav#table-of-contents ~ #postamble {
|
210
|
+
max-width: 95%;
|
211
|
+
margin: 0;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
#postamble {
|
216
|
+
border-top: 1px solid #cccccc;
|
217
|
+
font-size: .8em;
|
218
|
+
text-align: center;
|
219
|
+
line-height: 1.5em;
|
220
|
+
padding: 1em 1.5em;
|
221
|
+
}
|
222
|
+
|
223
|
+
.post-meta {
|
224
|
+
font-size: .9em;
|
225
|
+
font-style: italic;
|
226
|
+
}
|
227
|
+
|
228
|
+
/* Header */
|
229
|
+
#content header {
|
230
|
+
padding: 1em;
|
231
|
+
padding-bottom: 1.5em;
|
232
|
+
}
|
233
|
+
#content header h1 {
|
234
|
+
text-align: center;
|
235
|
+
}
|
236
|
+
|
237
|
+
#preamble nav ul {
|
238
|
+
list-style: none;
|
239
|
+
padding-left: 0;
|
240
|
+
}
|
241
|
+
#preamble li {
|
242
|
+
display: inline;
|
243
|
+
line-height: 1em;
|
244
|
+
}
|
245
|
+
#preamble li::before {
|
246
|
+
content: " · ";
|
247
|
+
}
|
248
|
+
#preamble li:first-child::before {
|
249
|
+
content: "";
|
250
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'liquid'
|
4
|
+
require 'digest/md5'
|
5
|
+
|
6
|
+
module Fronde
|
7
|
+
module Config
|
8
|
+
# Various utilitaries methods
|
9
|
+
module Helpers
|
10
|
+
def self.extract_lang_from_env(default)
|
11
|
+
(ENV['LANG'] || default).split('_', 2).first
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.migrate(config)
|
15
|
+
return config unless config.has_key?('public_folder')
|
16
|
+
|
17
|
+
warn R18n.t.fronde.error.config.deprecated_public_folder
|
18
|
+
old_pub_folder = config.delete('public_folder')
|
19
|
+
return config if config.has_key?('html_public_folder')
|
20
|
+
|
21
|
+
config['html_public_folder'] = old_pub_folder
|
22
|
+
config
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.ensure_expanded_paths(config)
|
26
|
+
%w[html gemini].each do |what|
|
27
|
+
key = "#{what}_public_folder"
|
28
|
+
config[key] = File.expand_path config[key]
|
29
|
+
end
|
30
|
+
config
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.render_liquid_template(content, data)
|
34
|
+
template = Liquid::Template.parse(content)
|
35
|
+
template.render(data)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Filter for liquid templates
|
40
|
+
module Filters
|
41
|
+
def cast_lisp_value(value, key)
|
42
|
+
return 't' if value.is_a?(TrueClass)
|
43
|
+
return 'nil' if value.nil? || value.is_a?(FalseClass)
|
44
|
+
|
45
|
+
value = value.strip
|
46
|
+
lisp_keywords = ['t', 'nil', '1', '-1', '0']
|
47
|
+
if key.end_with?('-function') || lisp_keywords.include?(value)
|
48
|
+
return value
|
49
|
+
end
|
50
|
+
|
51
|
+
value.gsub!('"', '\"')
|
52
|
+
%("#{value}")
|
53
|
+
end
|
54
|
+
|
55
|
+
def md5(value)
|
56
|
+
Digest::MD5.hexdigest(value)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
Liquid::Template.register_filter(Fronde::Config::Filters)
|