2 次程式碼提交

作者 SHA1 備註 提交日期
  Thomas B 3a76416a97 dont make all nested lists font size smaller, only for menu 2 月之前
  Thomas B ec1d39660a fix some absolute links 2 月之前

+ 1
- 1
input/blog/2013/2013_05_09_itunes.md 查看文件

@@ -26,5 +26,5 @@ fi
26 26
 
27 27
 Es kriegt also den Songnamen, Interpreten und Albumtitel als Parameter und schreibt per SSH die Seite auf meinem Server neu. Nicht hübsch, funktioniert aber... :D
28 28
 
29
- [musik]: http://xythobuz.de/lastmusic
29
+ [musik]: lastmusic
30 30
  [geektool]: http://projects.tynsoe.org/en/geektool/

+ 2
- 2
input/blog/2013/2013_05_17_itunes.md 查看文件

@@ -40,5 +40,5 @@ if [ "$1" != "$lasttrack" ]; then
40 40
 fi
41 41
 </pre>
42 42
 
43
- [musik]: http://xythobuz.de/lastmusic
44
- [s]: http://xythobuz.de/2013_05_09_itunes.html
43
+ [musik]: lastmusic
44
+ [s]: 2013_05_09_itunes.html

+ 1
- 1
input/blog/2013/2013_07_30_itunes.md 查看文件

@@ -16,7 +16,7 @@ Now, open the System Preferences, go to Keyboard, Keyboard Shortcuts, Services.
16 16
 
17 17
 [![Screenshot System Preferences][small2]][big2]
18 18
 
19
- [tex]: http://xythobuz.de/tex_beetle.html
19
+ [tex]: tex_beetle.html
20 20
  [small]: img/automator_small.png
21 21
  [big]: img/automator.png
22 22
  [small2]: img/preferences_small.png

+ 1
- 1
input/blog/2013/2013_10_18_server.md 查看文件

@@ -7,7 +7,7 @@ comments: true
7 7
 Viel passiert bei mir neben dem frisch begonnenen Studium ja nicht... Ein bisschen was neues gibts aber trotzdem:
8 8
 
9 9
  * Statistiken wieder über [Piwik](http://xythobuz.de/piwik/index.php)
10
- * [Weboberfläche](http://xythobuz.de/git/) für meine Git Repos
10
+ * [Weboberfläche](http://git.xythobuz.de/) für meine Git Repos
11 11
  * [OpenVPN Access Server](http://openvpn.net/index.php/access-server/overview.html) funktioniert [auch](https://xythobuz.de:943)
12 12
 
13 13
  Ausserdem hab [ich](http://mail.xythobuz.de) die selbe Webmail Software wie die [Hochschule](https://webmail.hs-weingarten.de) :)

+ 1
- 1
input/blog/2015/2015_02_18_pwm_fan_mod.md 查看文件

@@ -5,7 +5,7 @@ comments: true
5 5
 flattr: true
6 6
 ---
7 7
 
8
-One of the last remaining problems with my [Hackintosh build](http://xythobuz.de/2015_01_31_hackintosh.html) were the case fans. After a quick glance in the Mainboard manual I decided that I could control three PWM fans and one non-PWM fan using the on-board hardware.
8
+One of the last remaining problems with my [Hackintosh build](2015_01_31_hackintosh.html) were the case fans. After a quick glance in the Mainboard manual I decided that I could control three PWM fans and one non-PWM fan using the on-board hardware.
9 9
 
10 10
 So I bought three Silent Wings 2 140mm PWM fans and one Thermaltake Pure 200mm fan. The 200mm fan additionally got a small temperature-sensing PCB mounted directly on it.
11 11
 

+ 1
- 1
input/blog/2015/2015_08_31_otaclock.md 查看文件

@@ -45,7 +45,7 @@ I haven’t implemented the sound output for the alarm feature yet, but you can
45 45
 
46 46
 I used [these](http://www.spriters-resource.com/playstation_2/mgs2/sheet/6789/) [two](http://spritedatabase.net/file/455) sprite sheets to extract most sprites, except for the AM/PM marker that was missing from both. I got them from a screenshot made using Wine.
47 47
 
48
-You can find the code on [GitHub](https://github.com/xythobuz/OtaClock) and [my server](http://xythobuz.de/git/otaclock). There is also [a pre-built binary](https://github.com/xythobuz/OtaClock/releases) on GitHub.
48
+You can find the code on [GitHub](https://github.com/xythobuz/OtaClock) and [my server](https://git.xythobuz.de/thomas/OtaClock). There is also [a pre-built binary](https://github.com/xythobuz/OtaClock/releases) on GitHub.
49 49
 
50 50
 [OtaClock has been reviewed on Softpedia!](http://mac.softpedia.com/get/Wallpapers/OtaClock.shtml)
51 51
 

+ 2
- 2
input/blog/2015/2015_12_30_caselights.md 查看文件

@@ -14,13 +14,13 @@ update: 2020-06-07
14 14
 
15 15
 I’ve recently (accidentally) bought a dead-simple [12V RGB LED strip](http://www.hobbyking.com/hobbyking/store/__28515__LED_Red_Green_Blue_RGB_Strip_50cm_w_Flying_Lead.html), aiming to mount it on my Quadcopter, thinking it would be made of individually addressable LEDs. Of course, I didn’t read the description and was wrong. So, what to do?
16 16
 
17
-As you [may remember](http://xythobuz.de/2015_01_31_hackintosh.html), I’ve built a new computer in January with a very spacious case. It already had [two UV lights](http://www.aquatuning.de/modding/kathoden/13168/revoltec-kaltlicht-kathode-30cm-twin-set-uv-rev.-2) that were controlled manually using a switch in a PCI slot. Both the RGB LED strip and my computer seem to be a match made in heaven :P
17
+As you [may remember](2015_01_31_hackintosh.html), I’ve built a new computer in January with a very spacious case. It already had [two UV lights](http://www.aquatuning.de/modding/kathoden/13168/revoltec-kaltlicht-kathode-30cm-twin-set-uv-rev.-2) that were controlled manually using a switch in a PCI slot. Both the RGB LED strip and my computer seem to be a match made in heaven :P
18 18
 
19 19
 Incidentally, there’s still a unused RS232 port directly on my Motherboard that I never wired to the outside. That could be used to talk to an Arduino controlling the RGB LEDs and the UV lights. And there are plenty of free 12V rails of course.
20 20
 
21 21
 ### Hardware
22 22
 
23
-So I bought a five-pack of cheap [Arduino Pro Mini](https://www.arduino.cc/en/Main/ArduinoBoardProMini) clones from china. I still had some [IRF530 N-Channel MOSFETS](https://arduinodiy.wordpress.com/2012/05/02/using-mosfets-with-ttl-levels/) left over from the [LED-Cube](http://xythobuz.de/ledcube.html) that can be used for this. And I needed to build a small [RS232-TTL converter](http://picprojects.org.uk/projects/simpleSIO/ssio.htm) (using 2N3904 and 2N3906 as Transistors).
23
+So I bought a five-pack of cheap [Arduino Pro Mini](https://www.arduino.cc/en/Main/ArduinoBoardProMini) clones from china. I still had some [IRF530 N-Channel MOSFETS](https://arduinodiy.wordpress.com/2012/05/02/using-mosfets-with-ttl-levels/) left over from the [LED-Cube](ledcube.html) that can be used for this. And I needed to build a small [RS232-TTL converter](http://picprojects.org.uk/projects/simpleSIO/ssio.htm) (using 2N3904 and 2N3906 as Transistors).
24 24
 
25 25
 <div class="lightgallery">
26 26
     <a href="img/CaseLights-schem.png">

+ 1
- 1
input/blog/2016/2016_02_13_buildroot.md 查看文件

@@ -22,7 +22,7 @@ Buildroot supports the OLinuXino out-of-the-box, but is using the Freescale-Prov
22 22
 
23 23
 ## Result
24 24
 
25
-You can get the results [from GitHub](https://github.com/xythobuz/camcorder-buildroot) or [my Server](http://xythobuz.de/git/camcorder-buildroot/). Follow the instructions in the README.md to create your own Image using the current 4.4.x mainline Linux Kernel and flash it.
25
+You can get the results [from GitHub](https://github.com/xythobuz/camcorder-buildroot) or [my Server](https://git.xythobuz.de/thomas/camcorder-buildroot). Follow the instructions in the README.md to create your own Image using the current 4.4.x mainline Linux Kernel and flash it.
26 26
 
27 27
 <div class="lightgallery">
28 28
     <a href="img/olinuxino.jpg">

+ 1
- 1
input/blog/2016/2016_05_25_spacenav_plus.md 查看文件

@@ -14,7 +14,7 @@ I've now switched to using Arch Linux full-time, so I'm no longer using my port
14 14
 Fortunately, a spacenav-plus package has recently [appeared in the AUR](https://aur.archlinux.org/packages/spacenav-plus/) and works just fine.
15 15
 Also, Blender, FreeCAD and OpenSCAD now all support spacenav out-of-the-box without any patches required!
16 16
 
17
-Since I've got my [Fabrikator Mini 3D printer](http://xythobuz.de/2016_03_24_marlin_fabrikator_mini.html), I've spent some timer [creating things](http://www.thingiverse.com/xythobuz/designs), mainly with [OpenSCAD](http://www.openscad.org).
17
+Since I've got my [Fabrikator Mini 3D printer](2016_03_24_marlin_fabrikator_mini.html), I've spent some timer [creating things](http://www.thingiverse.com/xythobuz/designs), mainly with [OpenSCAD](http://www.openscad.org).
18 18
 
19 19
 I've still got an old [Spacemouse Classic](http://spacemice.org/index.php?title=Spacemouse_Classic) laying around. It's 20 years old at this point and my model connects to a computer using a RS232 serial connection.
20 20
 

+ 1
- 1
input/blog/2022/2022_07_29_MCH2022.md 查看文件

@@ -113,7 +113,7 @@ lightgallery([
113 113
 
114 114
 ## UbaBot Cocktail Machine
115 115
 
116
-Of course [we](http://drinkrobotics.de) also brought our [UbaBot Cocktail Machine](https://www.xythobuz.de/drinkrobotics.html) and ran it at Frubar over the whole event.
116
+Of course [we](http://drinkrobotics.de) also brought our [UbaBot Cocktail Machine](drinkrobotics.html) and ran it at Frubar over the whole event.
117 117
 Operations were slightly hindered by an unbelievable amount of wasps while the sun was out.
118 118
 They really loved the sugary sirups and for a considerable part of the day you could not get a drink without having to fish out at least one wasp that fell in while dispensing.
119 119
 

+ 57
- 9
macros.py 查看文件

@@ -160,7 +160,7 @@ def githubCommitBadge(p, showInline = False):
160 160
             ret += ".svg?logo=git&style=flat\" /></a>"
161 161
     return ret
162 162
 
163
-def printMenuItem(p, yearsAsHeading = False, showDateSpan = False, showOnlyStartDate = False, nicelyFormatFullDate = False, lastyear = "0", lang = "", showLastCommit = True, hide_description = False, indent_count = 0, updates_as_heading = False):
163
+def printMenuItem(p, yearsAsHeading = False, showDateSpan = False, showOnlyStartDate = False, nicelyFormatFullDate = False, lastyear = "0", lang = "", showLastCommit = True, hide_description = False, updates_as_heading = False):
164 164
     title = p.title
165 165
     if lang != "":
166 166
         if p.get("title_" + lang, "") != "":
@@ -175,7 +175,7 @@ def printMenuItem(p, yearsAsHeading = False, showDateSpan = False, showOnlyStart
175 175
     if year != lastyear:
176 176
         lastyear = year
177 177
         if yearsAsHeading:
178
-            print("\n\n#### %s\n" % (year))
178
+            print("<h4>" + str(year) + "</h4>")
179 179
 
180 180
     dateto = ""
181 181
     if p.get("date", "" != ""):
@@ -190,8 +190,8 @@ def printMenuItem(p, yearsAsHeading = False, showDateSpan = False, showOnlyStart
190 190
         if nicelyFormatFullDate:
191 191
             dateto = " - " + datetime.strptime(p.get("update", p.date), "%Y-%m-%d").strftime("%B %d, %Y")
192 192
 
193
-    indent = "  " * (indent_count + 1)
194
-    print(indent + "* **[%s](%s)**%s" % (title, p.url, dateto))
193
+    print("<li>")
194
+    print("<a href=\"" + p.url + "\"><b>" + title + "</b></a>" + dateto)
195 195
 
196 196
     if hide_description == False:
197 197
         if p.get("description", "") != "":
@@ -206,6 +206,8 @@ def printMenuItem(p, yearsAsHeading = False, showDateSpan = False, showOnlyStart
206 206
         if len(link) > 0:
207 207
             print("<br>" + link)
208 208
 
209
+    print("</li>")
210
+
209 211
     return lastyear
210 212
 
211 213
 def printRecentMenu(count = 5):
@@ -215,9 +217,13 @@ def printRecentMenu(count = 5):
215 217
     if count > 0:
216 218
         posts = posts[0:count]
217 219
 
220
+    print("<ul id='menulist'>")
221
+
218 222
     lastyear = "0"
219 223
     for p in posts:
220
-        lastyear = printMenuItem(p, count == 0, False, False, True, lastyear, "", False, False, 0, True)
224
+        lastyear = printMenuItem(p, count == 0, False, False, True, lastyear, "", False, False, True)
225
+
226
+    print("</ul>")
221 227
 
222 228
 def printBlogMenu(year_min=None, year_max=None):
223 229
     posts = [p for p in pages if "post" in p and p.lang == "en"]
@@ -228,10 +234,14 @@ def printBlogMenu(year_min=None, year_max=None):
228 234
     if year_max != None:
229 235
         posts = [p for p in posts if int(p.get("date", "9999-01-01")[0:4]) <= int(year_max)]
230 236
 
237
+    print("<ul id='menulist'>")
238
+
231 239
     lastyear = "0"
232 240
     for p in posts:
233 241
         lastyear = printMenuItem(p, True, False, False, True, lastyear)
234 242
 
243
+    print("</ul>")
244
+
235 245
 def printProjectsMenu():
236 246
     # prints all pages with parent 'projects' or 'stuff'.
237 247
     # first the ones without date, sorted by position.
@@ -246,14 +256,20 @@ def printProjectsMenu():
246 256
     mpages = [p for p in dpages if any(x in p.get("parent", "") for x in [ 'projects', 'stuff' ])]
247 257
     # sort by position
248 258
     mpages.sort(key=lambda p: [int(p.get("position", "999"))])
259
+
260
+    print("<ul id='menulist'>")
261
+
249 262
     # print all pages
250 263
     for p in mpages:
251 264
         printMenuItem(p)
252 265
 
253 266
         # print subpages for these top-level items
254 267
         subpages = [sub for sub in enpages if sub.get("parent", "none") == p.get("child-id", "unknown")]
255
-        for sp in subpages:
256
-            printMenuItem(sp, False, True, True, False, "0", "", False, True, 1)
268
+        if len(subpages) > 0:
269
+            print("<ul>")
270
+            for sp in subpages:
271
+                printMenuItem(sp, False, True, True, False, "0", "", False, True)
272
+            print("</ul>")
257 273
 
258 274
     # slect pages with a date
259 275
     dpages = [p for p in enpages if p.get("date", "") != ""]
@@ -270,62 +286,94 @@ def printProjectsMenu():
270 286
         # print subpages for these top-level items
271 287
         subpages = [sub for sub in enpages if sub.get("parent", "none") == p.get("child-id", "unknown")]
272 288
         subpages.sort(key=lambda p: [p.get("date", "9999-01-01")], reverse = True)
273
-        for sp in subpages:
274
-            printMenuItem(sp, False, True, True, False, "0", "", False, True, 1)
289
+        if len(subpages) > 0:
290
+            print("<ul>")
291
+            for sp in subpages:
292
+                printMenuItem(sp, False, True, True, False, "0", "", False, True)
293
+            print("</ul>")
294
+
295
+    print("</ul>")
275 296
 
276 297
 def print3DPrintingMenu():
277 298
     mpages = [p for p in pages if p.get("parent", "") == "3d-printing" and p.lang == "en"]
278 299
     mpages.sort(key=lambda p: int(p["position"]))
300
+
301
+    print("<ul id='menulist'>")
279 302
     for p in mpages:
280 303
         printMenuItem(p, False, True, True)
304
+    print("</ul>")
281 305
 
282 306
 def printInputDevicesMenu():
283 307
     mpages = [p for p in pages if p.get("parent", "") == "input_devices" and p.lang == "en"]
284 308
     mpages.sort(key=lambda p: [p.get("date", "9999-01-01")], reverse = True)
309
+
310
+    print("<ul id='menulist'>")
285 311
     for p in mpages:
286 312
         printMenuItem(p, False, True, True)
313
+    print("</ul>")
287 314
 
288 315
 def printInputDevicesRelatedMenu():
289 316
     mpages = [p for p in pages if p.get("show_in_input_devices", "false") == "true"]
290 317
     mpages.sort(key=lambda p: [p.get("date", "9999-01-01")], reverse = True)
318
+
319
+    print("<ul id='menulist'>")
291 320
     for p in mpages:
292 321
         printMenuItem(p, False, True, True)
322
+    print("</ul>")
293 323
 
294 324
 def printSmarthomeMenu():
295 325
     mpages = [p for p in pages if p.get("parent", "") == "smarthome" and p.lang == "en"]
296 326
     mpages.sort(key=lambda p: int(p["position"]))
327
+
328
+    print("<ul id='menulist'>")
297 329
     for p in mpages:
298 330
         printMenuItem(p, False, True, True)
331
+    print("</ul>")
299 332
 
300 333
 def printQuadcopterMenu():
301 334
     mpages = [p for p in pages if p.get("parent", "") == "quadcopters" and p.lang == "en"]
302 335
     mpages.sort(key=lambda p: int(p["position"]))
336
+
337
+    print("<ul id='menulist'>")
303 338
     for p in mpages:
304 339
         printMenuItem(p, False, True, True)
340
+    print("</ul>")
305 341
 
306 342
 def printQuadcopterRelatedMenu():
307 343
     mpages = [p for p in pages if p.get("show_in_quadcopters", "false") == "true"]
308 344
     mpages.sort(key=lambda p: [p.get("date", "9999-01-01")], reverse = True)
345
+
346
+    print("<ul id='menulist'>")
309 347
     for p in mpages:
310 348
         printMenuItem(p, False, True, True)
349
+    print("</ul>")
311 350
 
312 351
 def printRobotMenuEnglish():
313 352
     mpages = [p for p in pages if p.get("parent", "") == "xyrobot" and p.lang == "en"]
314 353
     mpages.sort(key=lambda p: int(p["position"]))
354
+
355
+    print("<ul id='menulist'>")
315 356
     for p in mpages:
316 357
         printMenuItem(p)
358
+    print("</ul>")
317 359
 
318 360
 def printRobotMenuDeutsch():
319 361
     mpages = [p for p in pages if p.get("parent", "") == "xyrobot" and p.lang == "de"]
320 362
     mpages.sort(key=lambda p: int(p["position"]))
363
+
364
+    print("<ul id='menulist'>")
321 365
     for p in mpages:
322 366
         printMenuItem(p, False, False, False, False, "0", "de")
367
+    print("</ul>")
323 368
 
324 369
 def printSteamMenuEnglish():
325 370
     mpages = [p for p in pages if p.get("parent", "") == "steam" and p.lang == "en"]
326 371
     mpages.sort(key=lambda p: [p.get("date", "9999-01-01")], reverse = True)
372
+
373
+    print("<ul id='menulist'>")
327 374
     for p in mpages:
328 375
         printMenuItem(p, False, False, False, True)
376
+    print("</ul>")
329 377
 
330 378
 def printSteamMenuDeutsch():
331 379
     # TODO show german pages, or english pages when german not available

+ 1
- 1
static/css/style.css 查看文件

@@ -183,7 +183,7 @@ a.anchor {
183 183
     margin-right: 0.5em;
184 184
 }
185 185
 
186
-ul ul {
186
+#menulist ul {
187 187
     font-size: 0.75em;
188 188
     margin-bottom: 1em;
189 189
 }

Loading…
取消
儲存