Browse Source

add scroll-up button and anchor links with js and css

Thomas B 18 hours ago
parent
commit
ff019b47a9

+ 1
- 1
input/blog/2022/2022_07_29_MCH2022.md View File

133
 ])
133
 ])
134
 %-->
134
 %-->
135
 
135
 
136
+<a class="anchor al2" name="app" href="#app"></a>
136
 ## Badge App Development
137
 ## Badge App Development
137
-<a class="anchor" name="app"></a>
138
 
138
 
139
 As is custromary for these events, every ticket-holder received an [MCH2022 Badge](https://badge.team/docs/badges/mch2022/) at the entrance.
139
 As is custromary for these events, every ticket-holder received an [MCH2022 Badge](https://badge.team/docs/badges/mch2022/) at the entrance.
140
 It contains a bunch of real nice gimmicks, like an FPGA and an RP2040 as well as an ESP32.
140
 It contains a bunch of real nice gimmicks, like an FPGA and an RP2040 as well as an ESP32.

+ 1
- 1
input/blog/2023/2023_07_29_dampfmaschine.md View File

58
 
58
 
59
 Another trip to the house will have to follow soon, to get all the smaller parts, tools, documents, etc.
59
 Another trip to the house will have to follow soon, to get all the smaller parts, tools, documents, etc.
60
 
60
 
61
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
61
 ## More Pictures
62
 ## More Pictures
62
-<a class="anchor" name="more_pictures"></a>
63
 
63
 
64
 <div class="collapse">Some more photographs I didn't use above.</div>
64
 <div class="collapse">Some more photographs I didn't use above.</div>
65
 <div class="collapsecontent">
65
 <div class="collapsecontent">

+ 1
- 1
input/blog/2023/2023_09_07_cccamp23.md View File

822
 ])
822
 ])
823
 %-->
823
 %-->
824
 
824
 
825
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
825
 ## More Pictures
826
 ## More Pictures
826
-<a class="anchor" name="more_pictures"></a>
827
 
827
 
828
 <div class="collapse">Some more photographs I didn't use above.</div>
828
 <div class="collapse">Some more photographs I didn't use above.</div>
829
 <div class="collapsecontent">
829
 <div class="collapsecontent">

+ 1
- 1
input/blog/2024/2024_03_09_toolbox_anniversary.md View File

37
 We had a surprisingly large number of visitors.
37
 We had a surprisingly large number of visitors.
38
 Hopefully this will help get things going again after the Covid dull.
38
 Hopefully this will help get things going again after the Covid dull.
39
 
39
 
40
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
40
 ## More Pictures
41
 ## More Pictures
41
-<a class="anchor" name="more_pictures"></a>
42
 
42
 
43
 <div class="collapse">Some more photographs I didn't use above.</div>
43
 <div class="collapse">Some more photographs I didn't use above.</div>
44
 <div class="collapsecontent">
44
 <div class="collapsecontent">

+ 1
- 1
input/projects/3d-printing/octoprint.md View File

134
 journalctl -u octoprint_connect@ttyUSB0.service
134
 journalctl -u octoprint_connect@ttyUSB0.service
135
 </pre>
135
 </pre>
136
 
136
 
137
+<a class="anchor al2" name="power_button" href="#power_button"></a>
137
 ## Physical Power Button
138
 ## Physical Power Button
138
-<a class="anchor" name="power_button"></a>
139
 
139
 
140
 Besides controlling eg. an ATX power supply or a relay connecting the printer to the power supply, I also wanted a push-button connected to the Raspberry Pi that can toggle the power supply using the aforementioned connection on the Pi.
140
 Besides controlling eg. an ATX power supply or a relay connecting the printer to the power supply, I also wanted a push-button connected to the Raspberry Pi that can toggle the power supply using the aforementioned connection on the Pi.
141
 This can be solved using a simple Python script.
141
 This can be solved using a simple Python script.

+ 7
- 7
input/projects/3d-printing/sparkmaker_repair.md View File

32
 * [Shelf Space (February 2023)](sparkmaker_repair.html#shelf_space)
32
 * [Shelf Space (February 2023)](sparkmaker_repair.html#shelf_space)
33
 * [More Pictures](sparkmaker_repair.html#more_pictures)
33
 * [More Pictures](sparkmaker_repair.html#more_pictures)
34
 
34
 
35
+<a class="anchor al2" name="endstop" href="#endstop"></a>
35
 ## Endstop Fix
36
 ## Endstop Fix
36
-<a class="anchor" name="endstop"></a>
37
 
37
 
38
 The printer only has a single axis, Z, with an optical endstop switch at the bottom.
38
 The printer only has a single axis, Z, with an optical endstop switch at the bottom.
39
 This switch is triggered by a large plastic shim screwed to the Z carriage.
39
 This switch is triggered by a large plastic shim screwed to the Z carriage.
48
 ])
48
 ])
49
 %-->
49
 %-->
50
 
50
 
51
+<a class="anchor al2" name="encoder" href="#encoder"></a>
51
 ## Encoder Replacement
52
 ## Encoder Replacement
52
-<a class="anchor" name="encoder"></a>
53
 
53
 
54
 After only a couple of hours of use, the encoder at the front of the machine stopped working properly.
54
 After only a couple of hours of use, the encoder at the front of the machine stopped working properly.
55
 You can see this in the video below.
55
 You can see this in the video below.
98
 
98
 
99
 With the hardware back in working order I could now focus on the PC software side of things.
99
 With the hardware back in working order I could now focus on the PC software side of things.
100
 
100
 
101
+<a class="anchor al2" name="experiments" href="#experiments"></a>
101
 ## First Slicing Experiments
102
 ## First Slicing Experiments
102
-<a class="anchor" name="experiments"></a>
103
 
103
 
104
 After getting the hardware back running the next step is generating some sliced files.
104
 After getting the hardware back running the next step is generating some sliced files.
105
 Unfortunately the official Sparkmaker website no longer exists and the downloads from there are hard to find.
105
 Unfortunately the official Sparkmaker website no longer exists and the downloads from there are hard to find.
130
 Even though one corner was warping strongly, the results of the first print attempt were promising.
130
 Even though one corner was warping strongly, the results of the first print attempt were promising.
131
 It is an SA-profile keycap, sliced with ChituBox with 0.1mm layer height.
131
 It is an SA-profile keycap, sliced with ChituBox with 0.1mm layer height.
132
 
132
 
133
+<a class="anchor al2" name="script" href="#script"></a>
133
 ## SL1 to WOW File Format Converter Script
134
 ## SL1 to WOW File Format Converter Script
134
-<a class="anchor" name="script"></a>
135
 
135
 
136
 But there is one open-source alternative, [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer), and it has support for SLA slicing for the [Prusa SL1 printer](https://www.prusa3d.com/product/original-prusa-sl1s-speed-3d-printer/).
136
 But there is one open-source alternative, [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer), and it has support for SLA slicing for the [Prusa SL1 printer](https://www.prusa3d.com/product/original-prusa-sl1s-speed-3d-printer/).
137
 But it only produces `.sl1` files, their custom file format.
137
 But it only produces `.sl1` files, their custom file format.
198
 For some reason we once managed to have the LEDs turned on with an error message showing.
198
 For some reason we once managed to have the LEDs turned on with an error message showing.
199
 This requires draining the resin and scraping off any remaining bits.
199
 This requires draining the resin and scraping off any remaining bits.
200
 
200
 
201
+<a class="anchor al2" name="prusaslicer" href="#prusaslicer"></a>
201
 ## Configuring PrusaSlicer for the Sparkmaker
202
 ## Configuring PrusaSlicer for the Sparkmaker
202
-<a class="anchor" name="prusaslicer"></a>
203
 
203
 
204
 To configure PrusaSlicer I recommend starting out with their built-in profile for the SL1.
204
 To configure PrusaSlicer I recommend starting out with their built-in profile for the SL1.
205
 Selecting it as the machine automatically switches the program over into "SLA mode", where the support and pad generation work differently compared to the normal FDM mode.
205
 Selecting it as the machine automatically switches the program over into "SLA mode", where the support and pad generation work differently compared to the normal FDM mode.
263
 ])
263
 ])
264
 %-->
264
 %-->
265
 
265
 
266
+<a class="anchor al2" name="shelf_space" href="#shelf_space"></a>
266
 ## Shelf Space (February 2023)
267
 ## Shelf Space (February 2023)
267
-<a class="anchor" name="shelf_space"></a>
268
 
268
 
269
 I still had some drawer rails and a wooden plate left over from replacing my [Fabrikator Mini](fabrikator-mini.html) with my new [Laser Engraver](laser-engraver.html) in my [Ikea Lack tower](ikea-lack.html).
269
 I still had some drawer rails and a wooden plate left over from replacing my [Fabrikator Mini](fabrikator-mini.html) with my new [Laser Engraver](laser-engraver.html) in my [Ikea Lack tower](ikea-lack.html).
270
 So I decided to re-use these to properly store the Sparkmaker.
270
 So I decided to re-use these to properly store the Sparkmaker.
319
 I'm thinking of some kind of small turntable and UV lamp or LED strip.
319
 I'm thinking of some kind of small turntable and UV lamp or LED strip.
320
 That's still to come, so stay tuned! 🧐
320
 That's still to come, so stay tuned! 🧐
321
 
321
 
322
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
322
 ## More Pictures
323
 ## More Pictures
323
-<a class="anchor" name="more_pictures"></a>
324
 
324
 
325
 <div class="collapse">Some more photographs I didn't use above.</div>
325
 <div class="collapse">Some more photographs I didn't use above.</div>
326
 <div class="collapsecontent">
326
 <div class="collapsecontent">

+ 1
- 1
input/projects/auto_brightness.md View File

193
 ])
193
 ])
194
 %-->
194
 %-->
195
 
195
 
196
+<a class="anchor al2" name="license" href="#license"></a>
196
 ## License
197
 ## License
197
-<a class="anchor" name="license"></a>
198
 
198
 
199
 The [AutoBrightness project](https://git.xythobuz.de/thomas/AutoBrightness) is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
199
 The [AutoBrightness project](https://git.xythobuz.de/thomas/AutoBrightness) is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
200
 
200
 

+ 10
- 10
input/projects/input_devices/trackball_v1.md View File

48
  * [License](trackball_v1.html#license)
48
  * [License](trackball_v1.html#license)
49
  * [More Pictures](trackball_v1.html#more_pictures)
49
  * [More Pictures](trackball_v1.html#more_pictures)
50
 
50
 
51
+<a class="anchor al2" name="part_selection" href="#part_selection"></a>
51
 ## Part Selection
52
 ## Part Selection
52
-<a class="anchor" name="part_selection"></a>
53
 
53
 
54
 Before embarking on this project some decisions and orders had to be made.
54
 Before embarking on this project some decisions and orders had to be made.
55
 
55
 
128
 What you see on top is the actual price I paid for the parts, reduced to the amount required for a single device.
128
 What you see on top is the actual price I paid for the parts, reduced to the amount required for a single device.
129
 Also some parts, like screws or 3D printing materials, I consider as normal parts of a workshop, so they are not added to the cost either.
129
 Also some parts, like screws or 3D printing materials, I consider as normal parts of a workshop, so they are not added to the cost either.
130
 
130
 
131
+<a class="anchor al2" name="3d_design" href="#3d_design"></a>
131
 ## 3D Design
132
 ## 3D Design
132
-<a class="anchor" name="3d_design"></a>
133
 
133
 
134
 The most important part of the 3D design is the mounting of the sensor and lens assembly in relation to the tracking surface, in our case the ball.
134
 The most important part of the 3D design is the mounting of the sensor and lens assembly in relation to the tracking surface, in our case the ball.
135
 The datasheet has lots of dimensional drawings which kind of hide all the important measurements somewhere in there.
135
 The datasheet has lots of dimensional drawings which kind of hide all the important measurements somewhere in there.
179
 For development the `$fn` parameter can be set to a lower value.
179
 For development the `$fn` parameter can be set to a lower value.
180
 That helps somewhat.
180
 That helps somewhat.
181
 
181
 
182
+<a class="anchor al2" name="firmware_devel" href="#firmware_devel"></a>
182
 ## Firmware Development
183
 ## Firmware Development
183
-<a class="anchor" name="firmware_devel"></a>
184
 
184
 
185
 Before designing and printing the complete device I made a small test bed to hold the sensor and ball.
185
 Before designing and printing the complete device I made a small test bed to hold the sensor and ball.
186
 
186
 
244
 Before it is mounted by the user, the disk is formatted and filled with the required data.
244
 Before it is mounted by the user, the disk is formatted and filled with the required data.
245
 Then the host can mount it and read the files.
245
 Then the host can mount it and read the files.
246
 
246
 
247
+<a class="anchor al2" name="wiring" href="#wiring"></a>
247
 ## Wiring
248
 ## Wiring
248
-<a class="anchor" name="wiring"></a>
249
 
249
 
250
 Wiring up the device is very easy, especially because the RP2040 provides great flexibility in its use of the GPIOs and the hardware periphery, in our case SPI.
250
 Wiring up the device is very easy, especially because the RP2040 provides great flexibility in its use of the GPIOs and the hardware periphery, in our case SPI.
251
 
251
 
276
 The switches use the internal pull-up resistors in the RP2040 GPIOs.
276
 The switches use the internal pull-up resistors in the RP2040 GPIOs.
277
 So they should be wired active-low, with their common connection to GND.
277
 So they should be wired active-low, with their common connection to GND.
278
 
278
 
279
+<a class="anchor al2" name="sensor_problems" href="#sensor_problems"></a>
279
 ## Sensor Problems
280
 ## Sensor Problems
280
-<a class="anchor" name="sensor_problems"></a>
281
 
281
 
282
 With the firmware mostly done I hoped to be able to use the device immediately.
282
 With the firmware mostly done I hoped to be able to use the device immediately.
283
 But it didn't quite work.
283
 But it didn't quite work.
331
 Even the white ball works without any problems.
331
 Even the white ball works without any problems.
332
 With the electronics and the firmware ready, we could now move on to refining the mechanics.
332
 With the electronics and the firmware ready, we could now move on to refining the mechanics.
333
 
333
 
334
+<a class="anchor al2" name="first_prototype" href="#first_prototype"></a>
334
 ## First Prototype
335
 ## First Prototype
335
-<a class="anchor" name="first_prototype"></a>
336
 
336
 
337
 The first top case was printed on Philipps [Anycubic Photon Mono 4K](https://www.anycubic.com/products/photon-mono-4k) SLA printer with [Anycubic Standard Resin + Grey](https://amzn.to/3RSLslf).
337
 The first top case was printed on Philipps [Anycubic Photon Mono 4K](https://www.anycubic.com/products/photon-mono-4k) SLA printer with [Anycubic Standard Resin + Grey](https://amzn.to/3RSLslf).
338
 This turned out to not be the best choice.
338
 This turned out to not be the best choice.
379
 ])
379
 ])
380
 %-->
380
 %-->
381
 
381
 
382
+<a class="anchor al2" name="improvements" href="#improvements"></a>
382
 ## Improvements
383
 ## Improvements
383
-<a class="anchor" name="improvements"></a>
384
 
384
 
385
 For the second iteration we didn't do that many changes in the 3D design.
385
 For the second iteration we didn't do that many changes in the 3D design.
386
 The button orientation has been overhauled.
386
 The button orientation has been overhauled.
434
 ])
434
 ])
435
 %-->
435
 %-->
436
 
436
 
437
+<a class="anchor al2" name="user_experience" href="#user_experience"></a>
437
 ## User Experience
438
 ## User Experience
438
-<a class="anchor" name="user_experience"></a>
439
 
439
 
440
 I have been using these Trackballs for about six weeks at the time of this writing.
440
 I have been using these Trackballs for about six weeks at the time of this writing.
441
 From a software and electronics perspective they work absolutely fine.
441
 From a software and electronics perspective they work absolutely fine.
449
 But using a device each day that I've built completely myself, from the grounds up in pretty much all aspects, brings me a lot of joy.
449
 But using a device each day that I've built completely myself, from the grounds up in pretty much all aspects, brings me a lot of joy.
450
 I highly recommend it.
450
 I highly recommend it.
451
 
451
 
452
+<a class="anchor al2" name="license" href="#license"></a>
452
 ## License
453
 ## License
453
-<a class="anchor" name="license"></a>
454
 
454
 
455
 The Trackball is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
455
 The Trackball is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
456
 
456
 
466
 
466
 
467
     See <http://www.gnu.org/licenses/>.
467
     See <http://www.gnu.org/licenses/>.
468
 
468
 
469
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
469
 ## More Pictures
470
 ## More Pictures
470
-<a class="anchor" name="more_pictures"></a>
471
 
471
 
472
 <div class="collapse">Some more photographs I didn't use above.</div>
472
 <div class="collapse">Some more photographs I didn't use above.</div>
473
 <div class="collapsecontent">
473
 <div class="collapsecontent">

+ 1
- 1
input/projects/lars.md View File

73
 
73
 
74
 [For now](lars_v2.html)...
74
 [For now](lars_v2.html)...
75
 
75
 
76
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
76
 ## More Pictures
77
 ## More Pictures
77
-<a class="anchor" name="more_pictures"></a>
78
 
78
 
79
 <div class="collapse">Some more photographs I didn't use above.</div>
79
 <div class="collapse">Some more photographs I didn't use above.</div>
80
 <div class="collapsecontent">
80
 <div class="collapsecontent">

+ 14
- 14
input/projects/laser-engraver.md View File

40
 * [Cutting Parameters](laser-engraver.html#cutting_parameters)
40
 * [Cutting Parameters](laser-engraver.html#cutting_parameters)
41
 * [More Pictures](laser-engraver.html#more_pictures)
41
 * [More Pictures](laser-engraver.html#more_pictures)
42
 
42
 
43
+<a class="anchor al2" name="hardware" href="#hardware"></a>
43
 ## Hardware
44
 ## Hardware
44
-<a class="anchor" name="hardware"></a>
45
 
45
 
46
 I know I say this in a lot of articles here, probably in an attempt to justify my hoarding of electronic parts. 😳
46
 I know I say this in a lot of articles here, probably in an attempt to justify my hoarding of electronic parts. 😳
47
 But this was even better than most of my previous projects, in the sense that I didn't have to buy any parts at all, except for the 2500mW 450nm laser diode, which I got used from my colleague [Philipp](https://www.phschoen.de/) for just 13€.
47
 But this was even better than most of my previous projects, in the sense that I didn't have to buy any parts at all, except for the 2500mW 450nm laser diode, which I got used from my colleague [Philipp](https://www.phschoen.de/) for just 13€.
49
 The steppers, mainboard, display, fans and cables came from my now disassembled [CTC i3](ctc-i3.html).
49
 The steppers, mainboard, display, fans and cables came from my now disassembled [CTC i3](ctc-i3.html).
50
 Everything else came out of my parts bin.
50
 Everything else came out of my parts bin.
51
 
51
 
52
+<a class="anchor al3" name="mechanics" href="#mechanics"></a>
52
 ### Mechanics
53
 ### Mechanics
53
-<a class="anchor" name="mechanics"></a>
54
 
54
 
55
 The mechanism is based on the ["Cantilever Laser Engraver" by Meatball](https://www.printables.com/model/213526-cantilever-laser-engraver).
55
 The mechanism is based on the ["Cantilever Laser Engraver" by Meatball](https://www.printables.com/model/213526-cantilever-laser-engraver).
56
 This in turn is based on the ["Cantilever Laser Engraver" by GeoDave](https://www.thingiverse.com/thing:4605853).
56
 This in turn is based on the ["Cantilever Laser Engraver" by GeoDave](https://www.thingiverse.com/thing:4605853).
91
 ])
91
 ])
92
 %-->
92
 %-->
93
 
93
 
94
+<a class="anchor al3" name="electronics" href="#electronics"></a>
94
 ### Electronics
95
 ### Electronics
95
-<a class="anchor" name="electronics"></a>
96
 
96
 
97
 As mentioned above I used the electronics, namely mainboard, LCD and fans, from my old 3D printer.
97
 As mentioned above I used the electronics, namely mainboard, LCD and fans, from my old 3D printer.
98
 
98
 
141
 ])
141
 ])
142
 %-->
142
 %-->
143
 
143
 
144
+<a class="anchor al2" name="software" href="#software"></a>
144
 ## Software
145
 ## Software
145
-<a class="anchor" name="software"></a>
146
 
146
 
147
 There's a surprisingly large amount of software involved in this project.
147
 There's a surprisingly large amount of software involved in this project.
148
 All just to move a lamp around a bit 💡🤔
148
 All just to move a lamp around a bit 💡🤔
149
 
149
 
150
+<a class="anchor al3" name="mcu_firmware" href="#mcu_firmware"></a>
150
 ### MCU Firmware
151
 ### MCU Firmware
151
-<a class="anchor" name="mcu_firmware"></a>
152
 
152
 
153
 Most DIY laser engravers or CNC machines seem to use the [GRBL firmware](https://github.com/gnea/grbl).
153
 Most DIY laser engravers or CNC machines seem to use the [GRBL firmware](https://github.com/gnea/grbl).
154
 Unfortunately this firmware only runs on Atmega328p MCUs, so I can not use it with the Atmega2560 on the GT2560 mainboard.
154
 Unfortunately this firmware only runs on Atmega328p MCUs, so I can not use it with the Atmega2560 on the GT2560 mainboard.
173
 
173
 
174
 My current Marlin configuration for the laser engraver can be found [on my Gitea instance](https://git.xythobuz.de/thomas/marlin/src/branch/laser-engraver).
174
 My current Marlin configuration for the laser engraver can be found [on my Gitea instance](https://git.xythobuz.de/thomas/marlin/src/branch/laser-engraver).
175
 
175
 
176
+<a class="anchor al3" name="host_software" href="#host_software"></a>
176
 ### Host Software
177
 ### Host Software
177
-<a class="anchor" name="host_software"></a>
178
 
178
 
179
 Besides the microcontroller firmware, we also need some host software to prepare the G-Code from whatever kind of input file we start out with.
179
 Besides the microcontroller firmware, we also need some host software to prepare the G-Code from whatever kind of input file we start out with.
180
 There are two basic approaches for generating paths for the laser engraver.
180
 There are two basic approaches for generating paths for the laser engraver.
192
 
192
 
193
 Below I will try to document all different free software packages I tried for laser engraving.
193
 Below I will try to document all different free software packages I tried for laser engraving.
194
 
194
 
195
+<a class="anchor al4" name="lasergrbl" href="#lasergrbl"></a>
195
 #### LaserGRBL
196
 #### LaserGRBL
196
-<a class="anchor" name="lasergrbl"></a>
197
 
197
 
198
 The first solution I found out about is [LaserGRBL](https://lasergrbl.com/).
198
 The first solution I found out about is [LaserGRBL](https://lasergrbl.com/).
199
 It is a Windows-only program, but at least it is open-source / free software.
199
 It is a Windows-only program, but at least it is open-source / free software.
312
 With them, the output will always start at coordinates `(0, 0)`.
312
 With them, the output will always start at coordinates `(0, 0)`.
313
 You will then have to set the proper offset on the machine itself, as described in the Marlin section above.
313
 You will then have to set the proper offset on the machine itself, as described in the Marlin section above.
314
 
314
 
315
+<a class="anchor al4" name="inkscape" href="#inkscape"></a>
315
 #### Inkscape
316
 #### Inkscape
316
-<a class="anchor" name="inkscape"></a>
317
 
317
 
318
 Inkscape includes the [G-Code Tools Plugin from the russian-language CNC-Club forums](https://www.cnc-club.ru/forum/viewtopic.php?t=35).
318
 Inkscape includes the [G-Code Tools Plugin from the russian-language CNC-Club forums](https://www.cnc-club.ru/forum/viewtopic.php?t=35).
319
 Unfortunately I was not able to find much up-to-date english-language documentation for this.
319
 Unfortunately I was not able to find much up-to-date english-language documentation for this.
323
 This section will be updated if I have more success in the future.
323
 This section will be updated if I have more success in the future.
324
 Until then I'm just using Inkscape to export svg files for LaserGRBL.
324
 Until then I'm just using Inkscape to export svg files for LaserGRBL.
325
 
325
 
326
+<a class="anchor al4" name="freecad" href="#freecad"></a>
326
 #### FreeCAD
327
 #### FreeCAD
327
-<a class="anchor" name="freecad"></a>
328
 
328
 
329
 FreeCAD has the [Path Workbench](https://wiki.freecadweb.org/Path_Workbench), which can be used to create G-Code instructions for all kinds of CNC machines.
329
 FreeCAD has the [Path Workbench](https://wiki.freecadweb.org/Path_Workbench), which can be used to create G-Code instructions for all kinds of CNC machines.
330
 It is not really complete and fool-proof yet, unfortunately.
330
 It is not really complete and fool-proof yet, unfortunately.
332
 
332
 
333
 I have not yet tested that.
333
 I have not yet tested that.
334
 
334
 
335
+<a class="anchor al4" name="g_code" href="#g_code"></a>
335
 #### Working with G-Code
336
 #### Working with G-Code
336
-<a class="anchor" name="g_code"></a>
337
 
337
 
338
 One nice feature I saw in LaserGRBL, but was not able to use with Marlin, is the ability to draw the outline of the object to be cut, for positioning of the stock material.
338
 One nice feature I saw in LaserGRBL, but was not able to use with Marlin, is the ability to draw the outline of the object to be cut, for positioning of the stock material.
339
 So I quickly made up a small Python script that analyzes a G-Code file, taking the coordinates from all G1 cutting moves and generating their bounding box, which is then drawn on the lowest possible power setting multiple times.
339
 So I quickly made up a small Python script that analyzes a G-Code file, taking the coordinates from all G1 cutting moves and generating their bounding box, which is then drawn on the lowest possible power setting multiple times.
428
 The 3x1 and 3x3 runs on the left side were made after properly focussing the laser and fixing the text alignment.
428
 The 3x1 and 3x3 runs on the left side were made after properly focussing the laser and fixing the text alignment.
429
 Here 200mm/min with 10 iterations was already enough to cut through the 3mm plywood.
429
 Here 200mm/min with 10 iterations was already enough to cut through the 3mm plywood.
430
 
430
 
431
+<a class="anchor al2" name="cutting_tests" href="#cutting_tests"></a>
431
 ## Cutting Tests
432
 ## Cutting Tests
432
-<a class="anchor" name="cutting_tests"></a>
433
 
433
 
434
 For the first 'real' test I decided to cut the assembly jig for the [Pagoda antenna](https://www.maartenbaert.be/quadcopters/antennas/pagoda-antenna/#design-files) by Maarten Baert.
434
 For the first 'real' test I decided to cut the assembly jig for the [Pagoda antenna](https://www.maartenbaert.be/quadcopters/antennas/pagoda-antenna/#design-files) by Maarten Baert.
435
 The files are available in dxf and svg format.
435
 The files are available in dxf and svg format.
474
 The end-result does not seem to be really affected by this however, although with 200mm/min and 15 iterations the parts were not removable as easily as I hoped.
474
 The end-result does not seem to be really affected by this however, although with 200mm/min and 15 iterations the parts were not removable as easily as I hoped.
475
 So I think I either have to adjust the focus better or go up to 20 iterations for the 3mm birch plywood.
475
 So I think I either have to adjust the focus better or go up to 20 iterations for the 3mm birch plywood.
476
 
476
 
477
+<a class="anchor al2" name="future_improvements" href="#future_improvements"></a>
477
 ## Future Improvements
478
 ## Future Improvements
478
-<a class="anchor" name="future_improvements"></a>
479
 
479
 
480
 I didn't expect it to be this bad, but cutting wood really produces a noticeable amount of smoke and the smell of burnt wood.
480
 I didn't expect it to be this bad, but cutting wood really produces a noticeable amount of smoke and the smell of burnt wood.
481
 So in the long run I will have to add some kind of air filtration system to my Ikea Lack tower.
481
 So in the long run I will have to add some kind of air filtration system to my Ikea Lack tower.
488
 This would be a very useful addition and solve a lot of the software workflow problems illustrated above.
488
 This would be a very useful addition and solve a lot of the software workflow problems illustrated above.
489
 Also theres more than enough room left on my base plate for a SBC.
489
 Also theres more than enough room left on my base plate for a SBC.
490
 
490
 
491
+<a class="anchor al2" name="cutting_parameters" href="#cutting_parameters"></a>
491
 ## Cutting Parameters
492
 ## Cutting Parameters
492
-<a class="anchor" name="cutting_parameters"></a>
493
 
493
 
494
 Here are the results of all cutting tests I've made up to now.
494
 Here are the results of all cutting tests I've made up to now.
495
 I will update this table as soon as I gather new data 🧑‍🔬
495
 I will update this table as soon as I gather new data 🧑‍🔬
508
 )
508
 )
509
 %-->
509
 %-->
510
 
510
 
511
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
511
 ## More Pictures
512
 ## More Pictures
512
-<a class="anchor" name="more_pictures"></a>
513
 
513
 
514
 <div class="collapse">Some more photographs I didn't use above.</div>
514
 <div class="collapse">Some more photographs I didn't use above.</div>
515
 <div class="collapsecontent">
515
 <div class="collapsecontent">

+ 1
- 1
input/projects/ledmatrix_v2.md View File

196
 I haven't yet given up that plan completely, but I have to think of a solution for diffusing the light first.
196
 I haven't yet given up that plan completely, but I have to think of a solution for diffusing the light first.
197
 The LEDs are too small and spaced too far apart to look good in this configuration.
197
 The LEDs are too small and spaced too far apart to look good in this configuration.
198
 
198
 
199
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
199
 ## More Pictures
200
 ## More Pictures
200
-<a class="anchor" name="more_pictures"></a>
201
 
201
 
202
 <div class="collapse">Some more photographs I didn't use above.</div>
202
 <div class="collapse">Some more photographs I didn't use above.</div>
203
 <div class="collapsecontent">
203
 <div class="collapsecontent">

+ 2
- 2
input/projects/nas_2018.md View File

158
 To be honest, I don't really need the faster speeds.
158
 To be honest, I don't really need the faster speeds.
159
 But if anyone has suggestions, I'm open to try it again!
159
 But if anyone has suggestions, I'm open to try it again!
160
 
160
 
161
+<a class="anchor al2" name="06_2022" href="#06_2022"></a>
161
 ## Four-Year Update (June 2022)
162
 ## Four-Year Update (June 2022)
162
-<a class="anchor" name="06_2022"></a>
163
 
163
 
164
 Recently I was greeted by this log message in the TrueNAS web UI.
164
 Recently I was greeted by this log message in the TrueNAS web UI.
165
 
165
 
178
 Unfortunately hard disk prices are still high and I'm currently not able to afford two new drives.
178
 Unfortunately hard disk prices are still high and I'm currently not able to afford two new drives.
179
 So for now I'm making sure I have a [working backup](2022_06_06_hetzner_storage_box.html) and hope for the best 😅
179
 So for now I'm making sure I have a [working backup](2022_06_06_hetzner_storage_box.html) and hope for the best 😅
180
 
180
 
181
+<a class="anchor al2" name="ups_dead" href="#ups_dead"></a>
181
 ## UPS Battery Dead (May 2023)
182
 ## UPS Battery Dead (May 2023)
182
-<a class="anchor" name="ups_dead"></a>
183
 
183
 
184
 To operate the server more safely I bought an [APC Back-UPS 700](https://www.apc.com/de/de/product/BX700U-GR/apc-backups-700-va-230-v-avr-schukoausg%C3%A4nge-batterie-12v-7-0ah-wird-ersetzt-durch-bx750migr/) back when I built it.
184
 To operate the server more safely I bought an [APC Back-UPS 700](https://www.apc.com/de/de/product/BX700U-GR/apc-backups-700-va-230-v-avr-schukoausg%C3%A4nge-batterie-12v-7-0ah-wird-ersetzt-durch-bx750migr/) back when I built it.
185
 Sometime in 2022 I started getting alerts from the APC daemon that the battery needs to be replaced.
185
 Sometime in 2022 I started getting alerts from the APC daemon that the battery needs to be replaced.

+ 10
- 10
input/projects/openchrono.md View File

55
  * [License](openchrono.html#license)
55
  * [License](openchrono.html#license)
56
  * [More Pictures](openchrono.html#more_pictures)
56
  * [More Pictures](openchrono.html#more_pictures)
57
 
57
 
58
+<a class="anchor al2" name="prototype" href="#prototype"></a>
58
 ## Prototype
59
 ## Prototype
59
-<a class="anchor" name="prototype"></a>
60
 
60
 
61
 Because the optical sensing is dependent on environment conditions I decided to not do any breadboard prototyping and immediately went ahead and designed a case to test with.
61
 Because the optical sensing is dependent on environment conditions I decided to not do any breadboard prototyping and immediately went ahead and designed a case to test with.
62
 In this initial attempt I used an Arduino Nano, an SSD1306 128x64 OLED LCD and an AA-battery holder, all of which I still had left from other projects.
62
 In this initial attempt I used an Arduino Nano, an SSD1306 128x64 OLED LCD and an AA-battery holder, all of which I still had left from other projects.
99
 Also the pull-up resistors for the transistors need their value to be low enough to quickly drive the signal to near supply voltage when the BB interrupts the light beam.
99
 Also the pull-up resistors for the transistors need their value to be low enough to quickly drive the signal to near supply voltage when the BB interrupts the light beam.
100
 A value of 1kΩ seems to work well there.
100
 A value of 1kΩ seems to work well there.
101
 
101
 
102
+<a class="anchor al2" name="mounting_options" href="#mounting_options"></a>
102
 ## Mounting Options
103
 ## Mounting Options
103
-<a class="anchor" name="mounting_options"></a>
104
 
104
 
105
 Unfortunately the OpenChrono IR photo-sensing is a bit constrained in regards to the path of the BB.
105
 Unfortunately the OpenChrono IR photo-sensing is a bit constrained in regards to the path of the BB.
106
 The sensors are only 3mm wide, and the BBs are 6mm wide commonly.
106
 The sensors are only 3mm wide, and the BBs are 6mm wide commonly.
141
 ])
141
 ])
142
 %-->
142
 %-->
143
 
143
 
144
+<a class="anchor al2" name="test_results" href="#test_results"></a>
144
 ## Test Results
145
 ## Test Results
145
-<a class="anchor" name="test_results"></a>
146
 
146
 
147
 Attaching the whole unit to a airsoft gun barrel turned out to be a bit tricky.
147
 Attaching the whole unit to a airsoft gun barrel turned out to be a bit tricky.
148
 
148
 
227
 
227
 
228
 So for now I do **not** recommend to build OpenChrono with the tracer option as it currently can be found in the repository.
228
 So for now I do **not** recommend to build OpenChrono with the tracer option as it currently can be found in the repository.
229
 
229
 
230
+<a class="anchor al2" name="build_guide" href="#build_guide"></a>
230
 ## Build Guide
231
 ## Build Guide
231
-<a class="anchor" name="build_guide"></a>
232
 
232
 
233
 Also take a look at [the "Hardware" section of the README.md](https://git.xythobuz.de/thomas/OpenChrono/src/branch/master/README.md#hardware).
233
 Also take a look at [the "Hardware" section of the README.md](https://git.xythobuz.de/thomas/OpenChrono/src/branch/master/README.md#hardware).
234
 You can find detailed parts lists, schematic and wiring plan there as well.
234
 You can find detailed parts lists, schematic and wiring plan there as well.
429
 In that case, you will not hit what you are aiming at!
429
 In that case, you will not hit what you are aiming at!
430
 So beware of your environment, wear proper safety gear and start out with a short distance to your bullet stop, increasing only slowly as you are sure everything works as expected.
430
 So beware of your environment, wear proper safety gear and start out with a short distance to your bullet stop, increasing only slowly as you are sure everything works as expected.
431
 
431
 
432
+<a class="anchor al2" name="firmware" href="#firmware"></a>
432
 ## Firmware
433
 ## Firmware
433
-<a class="anchor" name="firmware"></a>
434
 
434
 
435
 To achieve high measurement accuracy I used some of the hardware features of the AtMega328p MCU included in standard Arduinos.
435
 To achieve high measurement accuracy I used some of the hardware features of the AtMega328p MCU included in standard Arduinos.
436
 
436
 
614
 If you're interested I recommend taking a look at [the code](https://git.xythobuz.de/thomas/OpenChrono/src/branch/master/firmware/OpenChrono).
614
 If you're interested I recommend taking a look at [the code](https://git.xythobuz.de/thomas/OpenChrono/src/branch/master/firmware/OpenChrono).
615
 I think it should be relatively easy to understand and well commented 😅
615
 I think it should be relatively easy to understand and well commented 😅
616
 
616
 
617
+<a class="anchor al2" name="possible_future_improvements" href="#possible_future_improvements"></a>
617
 ## Possible Future Improvements
618
 ## Possible Future Improvements
618
-<a class="anchor" name="possible_future_improvements"></a>
619
 
619
 
620
 As usual I was mostly using parts that I already had.
620
 As usual I was mostly using parts that I already had.
621
 That explains some strange design decisions, like using cylindrical screws for the battery compartment lid, which honestly look and feel ugly and stand out from the device.
621
 That explains some strange design decisions, like using cylindrical screws for the battery compartment lid, which honestly look and feel ugly and stand out from the device.
629
 To be quite honest, I'm happy with the device as it is now.
629
 To be quite honest, I'm happy with the device as it is now.
630
 But I'm always open to feedback and pull requests of course, especially ones improving the tracer option 😉
630
 But I'm always open to feedback and pull requests of course, especially ones improving the tracer option 😉
631
 
631
 
632
+<a class="anchor al2" name="potential_other_uses" href="#potential_other_uses"></a>
632
 ## Potential Other Uses
633
 ## Potential Other Uses
633
-<a class="anchor" name="potential_other_uses"></a>
634
 
634
 
635
 One thing I'd like to talk about is using this device for measuring other things besides Airsoft BBs.
635
 One thing I'd like to talk about is using this device for measuring other things besides Airsoft BBs.
636
 It is definitely feasible to use OpenChrono to measure the speed of air rifle pellets, and this is something I would be interested in as well.
636
 It is definitely feasible to use OpenChrono to measure the speed of air rifle pellets, and this is something I would be interested in as well.
646
 
646
 
647
 But all this is not something I can or want to test, and I also do not recommend you do it, either! 👮
647
 But all this is not something I can or want to test, and I also do not recommend you do it, either! 👮
648
 
648
 
649
+<a class="anchor al2" name="links" href="#links"></a>
649
 ## Links
650
 ## Links
650
-<a class="anchor" name="links"></a>
651
 
651
 
652
 You can find [all the source code and design files for OpenChrono](https://git.xythobuz.de/thomas/OpenChrono) on my [Gitea instance](https://git.xythobuz.de).
652
 You can find [all the source code and design files for OpenChrono](https://git.xythobuz.de/thomas/OpenChrono) on my [Gitea instance](https://git.xythobuz.de).
653
 The project is also [mirrored on GitHub](https://github.com/xythobuz/OpenChrono).
653
 The project is also [mirrored on GitHub](https://github.com/xythobuz/OpenChrono).
654
 
654
 
655
 If you decide to build it yourself I would be interested in any kind of feedback!
655
 If you decide to build it yourself I would be interested in any kind of feedback!
656
 
656
 
657
+<a class="anchor al2" name="license" href="#license"></a>
657
 ## License
658
 ## License
658
-<a class="anchor" name="license"></a>
659
 
659
 
660
 OpenChrono is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
660
 OpenChrono is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html).
661
 
661
 
674
     You should have received a copy of the GNU General Public License
674
     You should have received a copy of the GNU General Public License
675
     along with OpenChrono.  If not, see <https://www.gnu.org/licenses/>.
675
     along with OpenChrono.  If not, see <https://www.gnu.org/licenses/>.
676
 
676
 
677
+<a class="anchor al2" name="more_pictures" href="#more_pictures"></a>
677
 ## More Pictures
678
 ## More Pictures
678
-<a class="anchor" name="more_pictures"></a>
679
 
679
 
680
 <div class="collapse">Some more photographs I didn't use above.</div>
680
 <div class="collapse">Some more photographs I didn't use above.</div>
681
 <div class="collapsecontent">
681
 <div class="collapsecontent">

+ 6
- 6
input/projects/osci_music_player.md View File

40
 * [Hardware](osci_music_player.html#hardware)
40
 * [Hardware](osci_music_player.html#hardware)
41
 * [Software](osci_music_player.html#software)
41
 * [Software](osci_music_player.html#software)
42
 
42
 
43
+<a class="anchor al2" name="introduction" href="#introduction"></a>
43
 ## Introduction
44
 ## Introduction
44
-<a class="anchor" name="introduction"></a>
45
 
45
 
46
 An oscilloscope usually displays one or more waveforms of an electrical signal.
46
 An oscilloscope usually displays one or more waveforms of an electrical signal.
47
 To achieve this a single dot is moved across the screen, with the voltage or amplitude of the signal controlling the vertical deflection (Y axis), and time controlling the horizontal deflection (X axis), meaning the dot automatically moves from left to right with a pre-configured speed.
47
 To achieve this a single dot is moved across the screen, with the voltage or amplitude of the signal controlling the vertical deflection (Y axis), and time controlling the horizontal deflection (X axis), meaning the dot automatically moves from left to right with a pre-configured speed.
70
 ])
70
 ])
71
 %-->
71
 %-->
72
 
72
 
73
+<a class="anchor al2" name="artists" href="#artists"></a>
73
 ## Artists
74
 ## Artists
74
-<a class="anchor" name="artists"></a>
75
 
75
 
76
 To generate the proper sounds you usually need some kind of software or self-written code.
76
 To generate the proper sounds you usually need some kind of software or self-written code.
77
 Many people have already experimented with this, with small scripts running on a PC, or directly on a microcontroller.
77
 Many people have already experimented with this, with small scripts running on a PC, or directly on a microcontroller.
98
 ])
98
 ])
99
 %-->
99
 %-->
100
 
100
 
101
+<a class="anchor al2" name="playback" href="#playback"></a>
101
 ## Playback
102
 ## Playback
102
-<a class="anchor" name="playback"></a>
103
 
103
 
104
 So there are some technical challenges involved in playing these properly on an oscilloscope.
104
 So there are some technical challenges involved in playing these properly on an oscilloscope.
105
 
105
 
134
 Now the image finally looks like in the YouTube videos.
134
 Now the image finally looks like in the YouTube videos.
135
 The only problem is, this is supposed to be used and operated at Toolbox events, so it needs to be easy to use and kind of sturdy.
135
 The only problem is, this is supposed to be used and operated at Toolbox events, so it needs to be easy to use and kind of sturdy.
136
 
136
 
137
+<a class="anchor al2" name="oscisettings" href="#oscisettings"></a>
137
 ## Oscilloscope Settings
138
 ## Oscilloscope Settings
138
-<a class="anchor" name="oscisettings"></a>
139
 
139
 
140
 To get the proper picture out of your oscilloscope you need to set it up correctly.
140
 To get the proper picture out of your oscilloscope you need to set it up correctly.
141
 Every oscilloscope has its own kind of front panel buttons, but in general they all have more or less the same kind of settings.
141
 Every oscilloscope has its own kind of front panel buttons, but in general they all have more or less the same kind of settings.
166
 ])
166
 ])
167
 %-->
167
 %-->
168
 
168
 
169
+<a class="anchor al2" name="hardware" href="#hardware"></a>
169
 ## Hardware
170
 ## Hardware
170
-<a class="anchor" name="hardware"></a>
171
 
171
 
172
 We need to consider the environments this device will be used in.
172
 We need to consider the environments this device will be used in.
173
 Both at the Toolbox anniversary, as well as the IBO fair, it will be displayed as part of a public show, with many people walking by and maybe stopping for a short time.
173
 Both at the Toolbox anniversary, as well as the IBO fair, it will be displayed as part of a public show, with many people walking by and maybe stopping for a short time.
222
 Just take care with the lid, it was quite hard in my case, causing it to crack when I tried to drill a hole that was too big.
222
 Just take care with the lid, it was quite hard in my case, causing it to crack when I tried to drill a hole that was too big.
223
 But some superglue saved the day.
223
 But some superglue saved the day.
224
 
224
 
225
+<a class="anchor al2" name="software" href="#software"></a>
225
 ## Software
226
 ## Software
226
-<a class="anchor" name="software"></a>
227
 
227
 
228
 I've been using the [Raspberry Pi OS (Legacy, 32bit) Lite](https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf-lite.img.xz) image.
228
 I've been using the [Raspberry Pi OS (Legacy, 32bit) Lite](https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf-lite.img.xz) image.
229
 Install it [as usual](https://www.raspberrypi.com/software/), set up a user account, wireless network connection and SSH login.
229
 Install it [as usual](https://www.raspberrypi.com/software/), set up a user account, wireless network connection and SSH login.

+ 1
- 1
input/projects/quadcopters/rc_equipment.md View File

95
 ])
95
 ])
96
 %-->
96
 %-->
97
 
97
 
98
+<a class="anchor al2" name="can_storage" href="#can_storage"></a>
98
 ## Ammo Can Battery Storage
99
 ## Ammo Can Battery Storage
99
-<a class="anchor" name="can_storage"></a>
100
 
100
 
101
 For far too long I stored all my LiPos in a cardboard box on a wooden shelf in my livingroom.
101
 For far too long I stored all my LiPos in a cardboard box on a wooden shelf in my livingroom.
102
 After seeing one too many videos of LiPo fires, I decided to work on a solution for safe storage of the batteries outside, on my balcony. Like with the charger described right above this section, I decided to get some used ammo cans for this project.
102
 After seeing one too many videos of LiPo fires, I decided to work on a solution for safe storage of the batteries outside, on my balcony. Like with the charger described right above this section, I decided to get some used ammo cans for this project.

+ 1
- 1
input/projects/smarthome/espenv.md View File

84
 
84
 
85
 The source code can be found [on my Gitea server](https://git.xythobuz.de/thomas/esp-env).
85
 The source code can be found [on my Gitea server](https://git.xythobuz.de/thomas/esp-env).
86
 
86
 
87
+<a class="anchor al2" name="relais_update" href="#relais_update"></a>
87
 ## Relais Update (August 2022)
88
 ## Relais Update (August 2022)
88
-<a class="anchor" name="relais_update"></a>
89
 
89
 
90
 After successfully using the first [4x relais board](https://amzn.to/3FQdOXB) I ordered to control my bathroom lights and fan for a couple of months, I decided to use two more of the same boards for my livingroom lights.
90
 After successfully using the first [4x relais board](https://amzn.to/3FQdOXB) I ordered to control my bathroom lights and fan for a couple of months, I decided to use two more of the same boards for my livingroom lights.
91
 This turned out to be quite the feat however.
91
 This turned out to be quite the feat however.

+ 42
- 3
page.html View File

124
             link = githubCommitBadge(page, True)
124
             link = githubCommitBadge(page, True)
125
             if len(link) > 0:
125
             if len(link) > 0:
126
                 print("<p>Recent activity on GitHub: " + link + "</p>")
126
                 print("<p>Recent activity on GitHub: " + link + "</p>")
127
+
128
+            if page.get("auto_toc", "false") == "true":
129
+                print('<p class="access_link" id="toc_toggle_wrap"></p>')
127
         %-->
130
         %-->
128
         {{ __content__ }}
131
         {{ __content__ }}
129
         <hr id="footbar">
132
         <hr id="footbar">
137
                 print('<hr>')
140
                 print('<hr>')
138
         %-->
141
         %-->
139
     </div>
142
     </div>
143
+    <div id="scroll_up"></div>
140
     <div id="footer">
144
     <div id="footer">
141
         <a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
145
         <a href="https://hg.sr.ht/~obensonne/poole">Poole</a>
142
         &middot;
146
         &middot;
159
         </span>
163
         </span>
160
     </div>
164
     </div>
161
     <script type="text/javascript">
165
     <script type="text/javascript">
162
-        function loadPage() {
166
+        // helper to show or hide scroll-up-button depending on scroll position
167
+        function scroll_visibility() {
168
+            if ($(document).scrollTop() > 0) {
169
+                $("#scroll_up").show("fast");
170
+            } else {
171
+                $("#scroll_up").hide("fast");
172
+            }
173
+        }
174
+
175
+        function add_scroll_up() {
176
+            // don't show on short pages
177
+            if ($("html").outerHeight() <= $(window).height()) {
178
+                return;
179
+            }
180
+
181
+            // add button, initially hidden
182
+            $("<a>", {
183
+                text: "⌃",
184
+                id: "scroll_up_btn",
185
+                click: function() {
186
+                    window.scrollTo({ top: 0, behavior: 'smooth' });
187
+                    return false;
188
+                },
189
+            }).appendTo('#scroll_up');
190
+            $("#scroll_up").hide();
191
+
192
+            // register handler and set initial state
193
+            scroll_visibility();
194
+            $(window).scroll(scroll_visibility);
195
+        }
196
+
197
+        function prepare_syntax_highlighting() {
163
             // adapted from https://sourceforge.net/p/shjs/feature-requests/5/#0940
198
             // adapted from https://sourceforge.net/p/shjs/feature-requests/5/#0940
164
             $("pre[class^='sh_']").each(function() {
199
             $("pre[class^='sh_']").each(function() {
165
                 // wrap pre with div._sh
200
                 // wrap pre with div._sh
196
 
231
 
197
             sh_highlightDocument('/js/sh/', '.min.js');
232
             sh_highlightDocument('/js/sh/', '.min.js');
198
         }
233
         }
234
+
235
+        function loadPage() {
236
+            add_scroll_up();
237
+            prepare_syntax_highlighting();
238
+        }
199
     </script>
239
     </script>
200
     <script type="text/javascript" src="js/sh_main.js"></script>
240
     <script type="text/javascript" src="js/sh_main.js"></script>
201
     <script type="text/javascript" src="js/jquery.min.js"></script>
241
     <script type="text/javascript" src="js/jquery.min.js"></script>
202
     <!--%
242
     <!--%
203
         if page.get("comments", "false") == "true":
243
         if page.get("comments", "false") == "true":
204
             print('<script defer src="https://comments.xythobuz.de/js/commento.js"></script>')
244
             print('<script defer src="https://comments.xythobuz.de/js/commento.js"></script>')
205
-    %-->
206
-    <!--%
245
+
207
         if page.get("auto_toc", "false") == "true":
246
         if page.get("auto_toc", "false") == "true":
208
             print('<script defer src="js/auto_toc.js"></script>')
247
             print('<script defer src="js/auto_toc.js"></script>')
209
     %-->
248
     %-->

+ 72
- 2
static/css/style.css View File

1
 @import "/css/sh_bright.min.css";
1
 @import "/css/sh_bright.min.css";
2
 @import "/css/sh_darkness.min.css" (prefers-color-scheme: dark);
2
 @import "/css/sh_darkness.min.css" (prefers-color-scheme: dark);
3
 
3
 
4
+html {
5
+    scroll-behavior: smooth;
6
+}
7
+
4
 body {
8
 body {
5
     font-size: 1.2em;
9
     font-size: 1.2em;
6
     font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
10
     font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
53
     display: block;
57
     display: block;
54
     position: relative;
58
     position: relative;
55
     visibility: hidden;
59
     visibility: hidden;
56
-    top: -60px;
60
+    height: 0px;
61
+    top: -0.5rem;
62
+}
63
+
64
+a.anchor:link:after {
65
+    content: "🔗";
66
+    position: relative;
67
+    visibility: visible;
68
+    left: -1rem;
69
+    font-size: 0.8rem;
70
+}
71
+
72
+a.anchor.al2:link:after {
73
+    top: 2.2rem;
74
+}
75
+
76
+a.anchor.al3:link:after {
77
+    top: 1.8rem;
78
+}
79
+
80
+a.anchor.al4:link:after {
81
+    top: 1.9rem;
82
+}
83
+
84
+#scroll_up {
85
+    display: none;
86
+}
87
+
88
+#scroll_up_btn:hover {
89
+    text-decoration: underline;
90
+    cursor: pointer;
91
+}
92
+
93
+.access_link {
94
+    font-size: small;
95
+    display: none;
57
 }
96
 }
58
 
97
 
59
 @media (min-height: 750px) {
98
 @media (min-height: 750px) {
68
     }
107
     }
69
 
108
 
70
     a.anchor {
109
     a.anchor {
71
-        top: -175px;
110
+        top: -5.5rem;
111
+    }
112
+
113
+    a.anchor.al2:link:after {
114
+        top: 7.2rem;
115
+    }
116
+
117
+    a.anchor.al3:link:after {
118
+        top: 6.8rem;
119
+    }
120
+
121
+    a.anchor.al4:link:after {
122
+        top: 6.9rem;
72
     }
123
     }
73
 }
124
 }
74
 
125
 
76
     #content {
127
     #content {
77
         width: 75%;
128
         width: 75%;
78
     }
129
     }
130
+
131
+    #scroll_up {
132
+        display: block;
133
+        position: fixed;
134
+        left: 5%;
135
+        bottom: 0;
136
+    }
137
+
138
+    .access_link {
139
+        display: block;
140
+    }
79
 }
141
 }
80
 
142
 
81
 @media (min-width: 1500px) {
143
 @media (min-width: 1500px) {
83
         width: 50%;
145
         width: 50%;
84
     }
146
     }
85
 
147
 
148
+    #scroll_up {
149
+        left: 12.5%;
150
+    }
151
+
86
     #navbar {
152
     #navbar {
87
         position: relative;
153
         position: relative;
88
         left: 12.5%;
154
         left: 12.5%;
374
     border-radius: 0.125em;
440
     border-radius: 0.125em;
375
 }
441
 }
376
 
442
 
443
+a.anchor:link:after {
444
+    opacity: 0.666;
445
+}
446
+
377
 /* colors */
447
 /* colors */
378
 
448
 
379
 :not(pre) > code {
449
 :not(pre) > code {

+ 14
- 1
static/js/auto_toc.js View File

37
         output += '<a href="#' + link + '">' + title + '</a>';
37
         output += '<a href="#' + link + '">' + title + '</a>';
38
         output += '</li>';
38
         output += '</li>';
39
 
39
 
40
-        $(this).after('<a class="anchor" name="' + link + '"></a>')
40
+        $(this).before('<a class="anchor al' + this_level + '" name="' + link + '" href="#' + link + '"></a>')
41
 
41
 
42
         counters[this_level - 2]++;
42
         counters[this_level - 2]++;
43
     });
43
     });
47
     $("#toc_wrap").html(output);
47
     $("#toc_wrap").html(output);
48
 }
48
 }
49
 
49
 
50
+function register_toc_toggle() {
51
+    $("<a>", {
52
+        text: "toggle ToC visibility",
53
+        href: "",
54
+        id: "toc_toggle",
55
+        click: function() {
56
+            $("#toc_wrap").toggle("fast");
57
+            return false;
58
+        },
59
+    }).appendTo('#toc_toggle_wrap');
60
+}
61
+
50
 generate_toc();
62
 generate_toc();
63
+register_toc_toggle();

Loading…
Cancel
Save