rdoc-babel 1.2.0 → 1.4.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.
@@ -1,4 +1,18 @@
1
1
 
2
+ :root {
3
+ --default-font: "Noto Sans", Verdana, Geneva, Arial, Helvetica, sans-serif;
4
+ --heading-font: Georgia, Palatino, "Times New Roman", Times, serif;
5
+ --fixed-font: Consolas, Monaco, "Lucida Console", monospace;
6
+ --link-color: #00C; /* less aggressive than pure blue */
7
+ --link-hover-background: #ffa; /* pale yellow */
8
+ --link-to-non-documented-color: #555; /* grey */
9
+ --index-background: #f5f5f5; /* pale grey */
10
+ --pre-background: #f8f8f8; /* very pale grey */
11
+ --code-background: #f4f4f4; /* pale grey */
12
+ --current-index-link-color: firebrick;
13
+ --current-index-link-background: #fcfcfc;
14
+ }
15
+
2
16
  /*
3
17
  * ===============
4
18
  * General reset
@@ -8,7 +22,7 @@
8
22
  * { padding: 0; margin: 0; }
9
23
 
10
24
  body {
11
- font-family: "Noto Sans", Verdana, Geneva, Arial, Helvetica, sans-serif;
25
+ font-family: var(--default-font);
12
26
  background-color: white;
13
27
  color: black;
14
28
  font-size: 10pt;
@@ -23,6 +37,11 @@ td {
23
37
  padding-right: 1ex;
24
38
  }
25
39
 
40
+ blockquote {
41
+ border-left: 2px solid silver;
42
+ padding-left: 12px;
43
+ }
44
+
26
45
  ul { margin-left: 1.5em; }
27
46
  li { margin-top: 0.5ex; }
28
47
 
@@ -31,12 +50,12 @@ ol li { margin-top: 1em; }
31
50
 
32
51
  /* label lists: classic DT/DD */
33
52
 
34
- .label-list dt {
53
+ .label-list > dt {
35
54
  margin-top: 1ex;
36
55
  font-weight: bold;
37
56
  }
38
- .label-list dt code { font-size: 100%; }
39
- .label-list dd { margin-left: 2em; }
57
+ .label-list > dt > code { font-size: 100%; }
58
+ .label-list > dd { margin-left: 2em; }
40
59
 
41
60
  /* note lists: DT and DD on same row, no space between rows */
42
61
 
@@ -45,10 +64,10 @@ dl.note-list {
45
64
  grid-template-columns: max-content auto;
46
65
  margin-left: 1ex;
47
66
  }
48
- dl.note-list dt { grid-column-start: 1; }
49
- dl.note-list dd { grid-column-start: 2; margin-left: 2ex; }
50
- dl.note-list dd p { margin-top: 0; }
51
- dl.note-list dd pre {
67
+ dl.note-list > dt { grid-column-start: 1; }
68
+ dl.note-list > dd { grid-column-start: 2; margin-left: 2ex; }
69
+ dl.note-list > dd > p { margin-top: 0; }
70
+ dl.note-list > dd > pre {
52
71
  margin-top: 2px;
53
72
  padding-top: 0.5ex;
54
73
  padding-bottom: 0.5ex;
@@ -72,17 +91,17 @@ hr {
72
91
  }
73
92
 
74
93
  a {
75
- color: #00C; /* less aggressive than pure blue */
94
+ color: var(--link-color);
76
95
  text-decoration: none;
77
96
  }
78
97
 
79
98
  a:hover {
80
- background-color: #ffa; /* pale yellow */
99
+ background-color: var(--link-hover-background);
81
100
  padding-bottom: 2px;
82
101
  }
83
102
 
84
103
  .nodoc a {
85
- color: #555;
104
+ color: var(--link-to-non-documented-color);
86
105
  }
87
106
 
88
107
  /* banner colors */
@@ -93,6 +112,42 @@ a:hover {
93
112
  background: linear-gradient(to right, #164270, #77a1d1);
94
113
  }
95
114
 
115
+ /*
116
+ * ===============
117
+ * General Layout
118
+ * ===============
119
+ */
120
+
121
+ body {
122
+ display: grid;
123
+ grid-template-columns: auto 1fr;
124
+ }
125
+
126
+ #left-container {
127
+ position: sticky;
128
+ top: 0;
129
+ width: 20vw;
130
+ height: 100vh;
131
+ overflow: hidden;
132
+ border-right: 2px solid silver;
133
+ }
134
+
135
+ #left-frame {
136
+ width: 100%;
137
+ height: 100vh;
138
+ border: none;
139
+ }
140
+
141
+ #resizer {
142
+ position: absolute;
143
+ right: -5px;
144
+ top: 0;
145
+ width: 10px;
146
+ height: 100%;
147
+ cursor: ew-resize;
148
+ z-index: 9999;
149
+ }
150
+
96
151
  /*
97
152
  * =============
98
153
  * Index files
@@ -105,11 +160,14 @@ a:hover {
105
160
  }
106
161
 
107
162
  body.index {
108
- background-color: #f5f5f5; /* very pale grey */
163
+ background-color: var(--index-background);
164
+ display: unset;
165
+ height: unset;
166
+ overflow: auto;
109
167
  }
110
168
 
111
169
  .index .title {
112
- font-family: Georgia, Palatino, "Times New Roman", Times, serif;
170
+ font-family: var(--heading-font);
113
171
  padding: 3px 2px 5px 5px; /* TRBL */
114
172
  }
115
173
  .index .title .text {
@@ -117,7 +175,7 @@ body.index {
117
175
  padding-top: 2px; /* TRBL */
118
176
  }
119
177
  .search-field {
120
- font-family: Consolas, Monaco, "Lucida Console", monospace;
178
+ font-family: var(--fixed-font);
121
179
  position: absolute;
122
180
  right: 3px;
123
181
  padding: 0 1px 2px 2px; /* TRBL */
@@ -149,6 +207,12 @@ body.index {
149
207
  padding: 0 0.5ex;
150
208
  }
151
209
 
210
+ /* current file, class, method */
211
+ .current-main {
212
+ color: var(--current-index-link-color);
213
+ background-color: var(--current-index-link-background);
214
+ }
215
+
152
216
  /* the resizers, and a 9-pixel wide area around them */
153
217
  #file-class-resizer, #class-method-resizer {
154
218
  position: fixed;
@@ -178,12 +242,13 @@ body.index {
178
242
  *
179
243
  * The structure is:
180
244
  * #header
245
+ * nav (inserted by script)
181
246
  * #documentation
182
247
  *
183
248
  */
184
249
 
185
250
  h1, h2, h3, h4, h5, h6 {
186
- font-family: Georgia, Palatino, "Times New Roman", Times, serif;
251
+ font-family: var(--heading-font);
187
252
  color: #c61a1a; /* ruby red ;) */
188
253
  padding-bottom: 0.5ex;
189
254
  font-weight: normal;
@@ -218,14 +283,23 @@ h6 { font-size: 100%; }
218
283
  }
219
284
 
220
285
  code {
221
- font-family: Consolas, Monaco, "Lucida Console", monospace;
286
+ font-family: var(--fixed-font);
222
287
  font-size: 100%;
288
+ background-color: var(--code-background);
289
+ padding: 1px 5px;
290
+ border-radius: 4px;
291
+ }
292
+
293
+ a:hover code {
294
+ background-color: var(--link-hover-background);
223
295
  }
224
296
 
225
297
  pre {
226
- font-family: Consolas, Monaco, "Lucida Console", monospace;
298
+ font-family: var(--fixed-font);
227
299
  padding: 1ex;
228
- background-color: #f8f8f8; /* very pale grey */
300
+ background-color: var(--pre-background);
301
+ border-radius: 8px;
302
+ white-space: break-spaces; /* for too wide text: see Net::HTTP#patch */
229
303
  }
230
304
 
231
305
  #documentation {
@@ -233,6 +307,80 @@ pre {
233
307
  overflow: auto;
234
308
  }
235
309
 
310
+ /* --- toc button and menu */
311
+
312
+ nav {
313
+ position: fixed;
314
+ padding-top: 10px;
315
+ right: 10px;
316
+ z-index: 2;
317
+ }
318
+
319
+ nav p {
320
+ margin: 0;
321
+ padding: 0;
322
+ }
323
+
324
+ nav p.h2 { text-indent: 10px; }
325
+ nav p.h3 { text-indent: 20px; }
326
+ nav p.h4 { text-indent: 30px; }
327
+ nav p.h5 { text-indent: 40px; }
328
+ nav p.h6 { text-indent: 50px; }
329
+
330
+ #menu-button {
331
+ float: right;
332
+ margin-top: 4px;
333
+ margin-right: 4px;
334
+
335
+ cursor: pointer;
336
+ background-color: #ededed;
337
+ opacity: 0.5;
338
+ box-shadow: none;
339
+ border: 1px solid silver;
340
+ border-radius: 3px;
341
+ padding: 3px;
342
+ padding-bottom: 0; /* centers the 18px icon vertically */
343
+ }
344
+
345
+ #menu-button:hover {
346
+ opacity: 1;
347
+ }
348
+
349
+ #menu-content {
350
+ font-size: 9pt;
351
+ border: 1px solid silver;
352
+ background-color: white;
353
+ z-index: 1;
354
+ }
355
+
356
+ #menu-top {
357
+ margin: 0;
358
+ padding: 6pt;
359
+ border-bottom: 1px solid silver;
360
+ }
361
+
362
+ #toc-content {
363
+ margin: 0;
364
+ padding: 6pt;
365
+ max-height: 80vh;
366
+ overflow: auto;
367
+ }
368
+
369
+ .hidden {
370
+ display: none;
371
+ }
372
+
373
+ .icon-hamburger {
374
+ content: url("images/menu_black_18dp.svg");
375
+ display: inline-block !important; }
376
+ .icon-cross {
377
+ content: url("images/close_black_18dp.svg");
378
+ display: none !important;
379
+ }
380
+
381
+ .show-close .icon-hamburger { display: none !important; }
382
+ .show-close .icon-cross { display: inline-block !important; }
383
+
236
384
  /* --- top header of main files
237
385
 
238
386
  div#header
@@ -295,7 +443,7 @@ pre {
295
443
  }
296
444
 
297
445
  .header-title {
298
- font-family: Georgia, Palatino, "Times New Roman", Times, serif;
446
+ font-family: var(--heading-font);
299
447
  /* vertical-align: middle; */
300
448
  }
301
449
 
@@ -304,7 +452,7 @@ pre {
304
452
  #header .parent { font-size: 130%; }
305
453
 
306
454
  #file-info {
307
- font-family: Consolas, Monaco, "Lucida Console", monospace;
455
+ font-family: var(--fixed-font);
308
456
  font-size: 90%;
309
457
  vertical-align: top;
310
458
  }
@@ -312,10 +460,12 @@ pre {
312
460
  position: absolute;
313
461
  right: 1ex;
314
462
  }
463
+ /* conflict with menu
315
464
  .hidden {
316
465
  visibility: hidden;
317
466
  display: inline-block;
318
467
  }
468
+ */
319
469
  .in-files {
320
470
  vertical-align: top;
321
471
  }
@@ -325,7 +475,7 @@ pre {
325
475
  #all-files {
326
476
  border: 1px solid silver;
327
477
  margin-top: 0.5ex;
328
- background-color: white;
478
+ background-color: var(--index-background);
329
479
  padding: 1px 0;
330
480
  max-height: 30em;
331
481
  overflow-x: hidden;
@@ -335,13 +485,13 @@ pre {
335
485
  right: 1ex;
336
486
  }
337
487
  #all-files a {
338
- color: #00C;
488
+ color: var(--link-color);
339
489
  padding-top: 0;
340
490
  padding-bottom: 0;
341
491
  }
342
492
  #all-files a:hover {
343
- color: #00C;
344
- background-color: #ffa;
493
+ color: var(--link-color);
494
+ background-color: var(--link-hover-background);
345
495
  }
346
496
 
347
497
  /* --- class page
@@ -412,7 +562,7 @@ pre {
412
562
  }
413
563
  #method-list li {
414
564
  display: inline-block;
415
- font-family: Consolas, Monaco, "Lucida Console", monospace;
565
+ font-family: var(--fixed-font);
416
566
  font-size: 100%;
417
567
  padding: 2px 0;
418
568
  }
@@ -450,7 +600,7 @@ table.classes-modules {
450
600
  padding: 0.75ex 0 0 1ex;
451
601
  }
452
602
  .const-name p, .attr-name p {
453
- font-family: Consolas, Monaco, "Lucida Console", monospace;
603
+ font-family: var(--fixed-font);
454
604
  font-size: 100%;
455
605
  font-weight: bold;
456
606
  padding: 0.3ex 0.5ex 0 0.2ex; /* top padding to align baselines */
@@ -464,7 +614,7 @@ table.classes-modules {
464
614
  visibility: visible;
465
615
  }
466
616
  .const-value {
467
- font-family: Consolas, Monaco, "Lucida Console", monospace;
617
+ font-family: var(--fixed-font);
468
618
  display: none;
469
619
  }
470
620
 
@@ -479,6 +629,7 @@ table.classes-modules {
479
629
 
480
630
  .method-detail {
481
631
  border: 1px solid #ddd;
632
+ border-radius: 3px;
482
633
  margin-top: 1em;
483
634
  padding-bottom: 1ex;
484
635
  /* cursor: pointer; */
@@ -496,10 +647,12 @@ table.classes-modules {
496
647
 
497
648
  .method-heading {
498
649
  position: relative;
499
- font-family: Consolas, Monaco, "Lucida Console", monospace;
650
+ font-family: var(--fixed-font);
500
651
  font-size: 105%;
501
652
  padding: 0.5ex 1ex;
502
653
  border-bottom: 1px solid #ddd;
654
+ border-top-left-radius: 3px;
655
+ border-top-right-radius: 3px;
503
656
  background-color: #eee;
504
657
  cursor: pointer;
505
658
  }
@@ -580,7 +733,7 @@ pre.method-source-code {
580
733
 
581
734
  /* requires */
582
735
  #file-details li {
583
- font-family: Consolas, Monaco, "Lucida Console", monospace;
736
+ font-family: var(--fixed-font);
584
737
  }
585
738
 
586
739
  /* maybe JS stuff */