Fossil SCM

Remove an extraneous level of DOM element wrapper. Minor link-tester.json tweaks.

stephan 2025-06-20 14:10 trunk
Commit 9713297f03963f2a67b59500c1f8d6867294d185ec13c4a677c81cd6fd14616c
--- test/link-tester.html
+++ test/link-tester.html
@@ -22,22 +22,17 @@
2222
margin: 0.5em 0.25em 0 0.25em;
2323
padding: 0;
2424
}
2525
#controlWrapper {
2626
display: flex;
27
- flex-direction: column;
27
+ flex-direction: row;
2828
z-index: 1;
2929
background: white /*do not bleed iframe through */;
3030
border-bottom: 2px dotted;
3131
padding-bottom: 0.5em;
3232
}
33
- #controls {
34
- display: flex;
35
- flex-direction: row;
36
- flex-grow: 0;
37
- }
38
- #controls > button {
33
+ #controlWrapper > button {
3934
flex-grow: 1;
4035
margin: 0.5em;
4136
}
4237
#selectWrapper {
4338
display: flex;
@@ -71,20 +66,18 @@
7166
them. Use the arrow keys to cycle through the list. The links are
7267
loaded within an iframe, so navigation within it will stay within
7368
that frame.
7469
</header>
7570
<header id='controlWrapper'>
76
- <div id='controls'>
77
- <button id='btn-prev'>&larr;</button>
78
- <div id='selectWrapper'>
79
- <select id='selectPage'>
80
- <option>/timeline</option>
81
- <option>/dir</option>
82
- </select>
83
- <a target='_blank' id='currentUrl'></a>
84
- </div>
85
- <button id='btn-next'>&rarr;</button>
86
- </div>
71
+ <button id='btn-prev'>&larr;</button>
72
+ <div id='selectWrapper'>
73
+ <select id='selectPage'>
74
+ <option>/timeline</option>
75
+ <option>/dir</option>
76
+ </select>
77
+ <a target='_blank' id='currentUrl'></a>
78
+ </div>
79
+ <button id='btn-next'>&rarr;</button>
8780
</header>
8881
<iframe id='iframe'><!--populated via the UI--></iframe>
8982
<script src='link-tester.js'></script>
9083
<body>
9184
--- test/link-tester.html
+++ test/link-tester.html
@@ -22,22 +22,17 @@
22 margin: 0.5em 0.25em 0 0.25em;
23 padding: 0;
24 }
25 #controlWrapper {
26 display: flex;
27 flex-direction: column;
28 z-index: 1;
29 background: white /*do not bleed iframe through */;
30 border-bottom: 2px dotted;
31 padding-bottom: 0.5em;
32 }
33 #controls {
34 display: flex;
35 flex-direction: row;
36 flex-grow: 0;
37 }
38 #controls > button {
39 flex-grow: 1;
40 margin: 0.5em;
41 }
42 #selectWrapper {
43 display: flex;
@@ -71,20 +66,18 @@
71 them. Use the arrow keys to cycle through the list. The links are
72 loaded within an iframe, so navigation within it will stay within
73 that frame.
74 </header>
75 <header id='controlWrapper'>
76 <div id='controls'>
77 <button id='btn-prev'>&larr;</button>
78 <div id='selectWrapper'>
79 <select id='selectPage'>
80 <option>/timeline</option>
81 <option>/dir</option>
82 </select>
83 <a target='_blank' id='currentUrl'></a>
84 </div>
85 <button id='btn-next'>&rarr;</button>
86 </div>
87 </header>
88 <iframe id='iframe'><!--populated via the UI--></iframe>
89 <script src='link-tester.js'></script>
90 <body>
91
--- test/link-tester.html
+++ test/link-tester.html
@@ -22,22 +22,17 @@
22 margin: 0.5em 0.25em 0 0.25em;
23 padding: 0;
24 }
25 #controlWrapper {
26 display: flex;
27 flex-direction: row;
28 z-index: 1;
29 background: white /*do not bleed iframe through */;
30 border-bottom: 2px dotted;
31 padding-bottom: 0.5em;
32 }
33 #controlWrapper > button {
 
 
 
 
 
34 flex-grow: 1;
35 margin: 0.5em;
36 }
37 #selectWrapper {
38 display: flex;
@@ -71,20 +66,18 @@
66 them. Use the arrow keys to cycle through the list. The links are
67 loaded within an iframe, so navigation within it will stay within
68 that frame.
69 </header>
70 <header id='controlWrapper'>
71 <button id='btn-prev'>&larr;</button>
72 <div id='selectWrapper'>
73 <select id='selectPage'>
74 <option>/timeline</option>
75 <option>/dir</option>
76 </select>
77 <a target='_blank' id='currentUrl'></a>
78 </div>
79 <button id='btn-next'>&rarr;</button>
 
 
80 </header>
81 <iframe id='iframe'><!--populated via the UI--></iframe>
82 <script src='link-tester.js'></script>
83 <body>
84
--- test/link-tester.js
+++ test/link-tester.js
@@ -93,15 +93,15 @@
9393
eBtnNext.addEventListener('click', ()=>cycleLink(1), false);
9494
9595
/**
9696
We have to adjust the iframe's size dynamically to account for
9797
other widgets around it. iframes don't simply like to fill up all
98
- available space without some help. If #controls only contained
99
- the one SELECT element, CSS would be sufficient, but once we add
100
- text around it, #controls's size becomes unpredictable and we
101
- need JS to calculate it. We do this every time the window size
102
- changes.
98
+ available space without some help. If #controlWrapper only
99
+ contained the one SELECT element, CSS would be sufficient, but
100
+ once we add text around it, #controlWrapper's size becomes
101
+ unpredictable and we need JS to calculate it. We do this every
102
+ time the window size changes.
103103
*/
104104
// Copied from fossil.dom.js
105105
const effectiveHeight = function f(e){
106106
if(!e) return 0;
107107
if(!f.measure){
108108
--- test/link-tester.js
+++ test/link-tester.js
@@ -93,15 +93,15 @@
93 eBtnNext.addEventListener('click', ()=>cycleLink(1), false);
94
95 /**
96 We have to adjust the iframe's size dynamically to account for
97 other widgets around it. iframes don't simply like to fill up all
98 available space without some help. If #controls only contained
99 the one SELECT element, CSS would be sufficient, but once we add
100 text around it, #controls's size becomes unpredictable and we
101 need JS to calculate it. We do this every time the window size
102 changes.
103 */
104 // Copied from fossil.dom.js
105 const effectiveHeight = function f(e){
106 if(!e) return 0;
107 if(!f.measure){
108
--- test/link-tester.js
+++ test/link-tester.js
@@ -93,15 +93,15 @@
93 eBtnNext.addEventListener('click', ()=>cycleLink(1), false);
94
95 /**
96 We have to adjust the iframe's size dynamically to account for
97 other widgets around it. iframes don't simply like to fill up all
98 available space without some help. If #controlWrapper only
99 contained the one SELECT element, CSS would be sufficient, but
100 once we add text around it, #controlWrapper's size becomes
101 unpredictable and we need JS to calculate it. We do this every
102 time the window size changes.
103 */
104 // Copied from fossil.dom.js
105 const effectiveHeight = function f(e){
106 if(!e) return 0;
107 if(!f.measure){
108
--- test/link-tester.json
+++ test/link-tester.json
@@ -1,12 +1,15 @@
11
[
22
"Timelines",
3
- ["Timeline", "/timeline"],
4
- ["Timeline anonymous", "/timeline?u=anonymous&y=a"],
3
+ ["Default", "/timeline"],
4
+ ["anonymous", "/timeline?u=anonymous&y=a"],
55
66
"Infos",
7
- ["Tip info", "/info/tip"],
7
+ ["Info about the tip", "/info/tip"],
88
["/info/tip"],
99
1010
"Admin",
11
- ["Users", "/setup_ulist"]
11
+ ["Users", "/setup_ulist"],
12
+
13
+ "Misc.",
14
+ ["/skins"]
1215
]
1316
--- test/link-tester.json
+++ test/link-tester.json
@@ -1,12 +1,15 @@
1 [
2 "Timelines",
3 ["Timeline", "/timeline"],
4 ["Timeline anonymous", "/timeline?u=anonymous&y=a"],
5
6 "Infos",
7 ["Tip info", "/info/tip"],
8 ["/info/tip"],
9
10 "Admin",
11 ["Users", "/setup_ulist"]
 
 
 
12 ]
13
--- test/link-tester.json
+++ test/link-tester.json
@@ -1,12 +1,15 @@
1 [
2 "Timelines",
3 ["Default", "/timeline"],
4 ["anonymous", "/timeline?u=anonymous&y=a"],
5
6 "Infos",
7 ["Info about the tip", "/info/tip"],
8 ["/info/tip"],
9
10 "Admin",
11 ["Users", "/setup_ulist"],
12
13 "Misc.",
14 ["/skins"]
15 ]
16

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button