rdoc-babel 1.2.1 → 1.4.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.
@@ -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
@@ -242,45 +390,25 @@ pre {
242
390
  p.header-title
243
391
  span.parent
244
392
  p#file-info
245
- span.displayed
246
- span.in-files
247
- 'In:'
248
- span.first-files
249
- a (link to 1st files)
250
- a#show-all-files # if more than 2 files
251
- span.hidden
252
- (same as .displayed, but no #show-all-files id on last a)
253
- span#all-files
254
- a (link to each file)
255
-
256
- The reason for repeating the spans .displayed & .hidden is to have
257
- .displayed to the right, on the same line as the class title if it fits,
258
- on the next line otherwise:
259
-
260
- class Object In: object.c
261
-
262
- class VeryLongNameInVeryLongFileName
263
- In: very_long_name_in_very_long_filename.rb
264
-
265
- class VeryLongNameInVeryLongFileName < Object
266
- In: very_long_name_in_very_long_filename.rb
267
-
268
- class VeryLongNameInVeryLongFileNameAndAlsoASuperclass
269
- < Object In: very_long_name_in_very_long_filename.rb
270
-
271
- Because p#file-info has 'white-space: nowrap', .displayed & .hidden
272
- are always on the same line.
273
-
393
+ span.in-files
394
+ 'In:'
395
+ span.file-list
396
+ a (link to 1st files)
397
+ a#show-all-files # if more than 2 files
398
+ span#all-files
399
+ a (link to each file)
274
400
  */
275
401
 
276
402
  #header {
277
403
  padding: 1ex;
404
+ display: flex;
405
+ flex-wrap: wrap;
406
+ align-items: end;
278
407
  }
279
408
 
280
409
  #header p {
281
410
  margin: 0;
282
411
  padding: 0;
283
- display: inline-block;
284
412
  white-space: nowrap;
285
413
  }
286
414
 
@@ -295,7 +423,7 @@ pre {
295
423
  }
296
424
 
297
425
  .header-title {
298
- font-family: Georgia, Palatino, "Times New Roman", Times, serif;
426
+ font-family: var(--heading-font);
299
427
  /* vertical-align: middle; */
300
428
  }
301
429
 
@@ -303,45 +431,37 @@ pre {
303
431
  #header .name { font-size: 170%; }
304
432
  #header .parent { font-size: 130%; }
305
433
 
306
- #file-info {
307
- font-family: Consolas, Monaco, "Lucida Console", monospace;
434
+ p#file-info {
435
+ font-family: var(--fixed-font);
308
436
  font-size: 90%;
309
437
  vertical-align: top;
310
- }
311
- .displayed {
312
- position: absolute;
313
- right: 1ex;
314
- }
315
- .hidden {
316
- visibility: hidden;
317
- display: inline-block;
438
+ margin-left: auto;
318
439
  }
319
440
  .in-files {
320
441
  vertical-align: top;
321
442
  }
322
- .first-files {
443
+ .file-list {
323
444
  display: inline-block;
324
445
  }
325
446
  #all-files {
326
447
  border: 1px solid silver;
327
448
  margin-top: 0.5ex;
328
- background-color: white;
449
+ background-color: var(--index-background);
329
450
  padding: 1px 0;
330
451
  max-height: 30em;
331
452
  overflow-x: hidden;
332
453
  overflow-y: auto;
333
454
  display: none;
334
455
  position: absolute;
335
- right: 1ex;
336
456
  }
337
457
  #all-files a {
338
- color: #00C;
458
+ color: var(--link-color);
339
459
  padding-top: 0;
340
460
  padding-bottom: 0;
341
461
  }
342
462
  #all-files a:hover {
343
- color: #00C;
344
- background-color: #ffa;
463
+ color: var(--link-color);
464
+ background-color: var(--link-hover-background);
345
465
  }
346
466
 
347
467
  /* --- class page
@@ -412,7 +532,7 @@ pre {
412
532
  }
413
533
  #method-list li {
414
534
  display: inline-block;
415
- font-family: Consolas, Monaco, "Lucida Console", monospace;
535
+ font-family: var(--fixed-font);
416
536
  font-size: 100%;
417
537
  padding: 2px 0;
418
538
  }
@@ -450,7 +570,7 @@ table.classes-modules {
450
570
  padding: 0.75ex 0 0 1ex;
451
571
  }
452
572
  .const-name p, .attr-name p {
453
- font-family: Consolas, Monaco, "Lucida Console", monospace;
573
+ font-family: var(--fixed-font);
454
574
  font-size: 100%;
455
575
  font-weight: bold;
456
576
  padding: 0.3ex 0.5ex 0 0.2ex; /* top padding to align baselines */
@@ -464,7 +584,7 @@ table.classes-modules {
464
584
  visibility: visible;
465
585
  }
466
586
  .const-value {
467
- font-family: Consolas, Monaco, "Lucida Console", monospace;
587
+ font-family: var(--fixed-font);
468
588
  display: none;
469
589
  }
470
590
 
@@ -479,6 +599,7 @@ table.classes-modules {
479
599
 
480
600
  .method-detail {
481
601
  border: 1px solid #ddd;
602
+ border-radius: 3px;
482
603
  margin-top: 1em;
483
604
  padding-bottom: 1ex;
484
605
  /* cursor: pointer; */
@@ -496,10 +617,12 @@ table.classes-modules {
496
617
 
497
618
  .method-heading {
498
619
  position: relative;
499
- font-family: Consolas, Monaco, "Lucida Console", monospace;
620
+ font-family: var(--fixed-font);
500
621
  font-size: 105%;
501
622
  padding: 0.5ex 1ex;
502
623
  border-bottom: 1px solid #ddd;
624
+ border-top-left-radius: 3px;
625
+ border-top-right-radius: 3px;
503
626
  background-color: #eee;
504
627
  cursor: pointer;
505
628
  }
@@ -580,7 +703,7 @@ pre.method-source-code {
580
703
 
581
704
  /* requires */
582
705
  #file-details li {
583
- font-family: Consolas, Monaco, "Lucida Console", monospace;
706
+ font-family: var(--fixed-font);
584
707
  }
585
708
 
586
709
  /* maybe JS stuff */
@@ -594,7 +717,6 @@ pre.method-source-code {
594
717
  -moz-border-radius: 5px;
595
718
  }
596
719
 
597
-
598
720
  /* debugging section */
599
721
 
600
722
  #debugging-toggle {