Explorar el Código

add backToParent macro

Thomas Buck hace 3 años
padre
commit
6cf7e77c02

+ 1
- 1
input/projects/3d-printing/bed-leveling-util.md Ver fichero

@@ -8,7 +8,7 @@ date: 2016-06-07
8 8
 update: 2016-06-12
9 9
 ---
10 10
 
11
-<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
11
+<!--% backToParent() %-->
12 12
 
13 13
 This is a manual Mesh Bed Leveling GUI utility for 3D printers with Marlin Firmware.
14 14
 

+ 1
- 1
input/projects/3d-printing/ctc-i3.md Ver fichero

@@ -5,7 +5,7 @@ position: 20
5 5
 comments: true
6 6
 ---
7 7
 
8
-<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
8
+<!--% backToParent() %-->
9 9
 
10 10
 The CTC i3 Pro B is a very cheap chinese Prusa i3 clone.
11 11
 I bought it a couple of years ago for about 110 Euros.

+ 1
- 3
input/projects/3d-printing/fabrikator-mini.md Ver fichero

@@ -5,9 +5,7 @@ position: 10
5 5
 comments: true
6 6
 ---
7 7
 
8
-<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
9
-
10
-**More content coming soon!**
8
+<!--% backToParent() %-->
11 9
 
12 10
 I bought the [Fabrikator Mini V1.5 from HobbyKing](https://hobbyking.com/en_us/fabrikator-mini-3d-printer-transparent-eu-230v-v1-5.html) in about March 2016.
13 11
 So that's pretty much exactly three and a half years ago, at the time of this writing.

+ 1
- 1
input/projects/3d-printing/ikea-lack.md Ver fichero

@@ -5,7 +5,7 @@ position: 30
5 5
 comments: true
6 6
 ---
7 7
 
8
-<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
8
+<!--% backToParent() %-->
9 9
 
10 10
 As is common in the 3D printing community, I have built myself a tower of Ikea Lack tables to store my printers in.
11 11
 It has three levels.

+ 1
- 1
input/projects/3d-printing/octoprint.md Ver fichero

@@ -5,7 +5,7 @@ position: 40
5 5
 comments: true
6 6
 ---
7 7
 
8
-<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
8
+<!--% backToParent() %-->
9 9
 
10 10
 All my 3D printers are connected to a Raspberry Pi running [OctoPrint](https://octoprint.org/).
11 11
 For ease of use, I suggest downloading and installing a pre-made [OctoPi image](https://octoprint.org/download/).

+ 1
- 1
input/projects/3d-printing/octotray.md Ver fichero

@@ -8,7 +8,7 @@ date: 2021-05-08
8 8
 update: 2021-05-13
9 9
 ---
10 10
 
11
-<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
11
+<!--% backToParent() %-->
12 12
 
13 13
 To quickly print new stuff on one of my printers, I am using the [OctoPrint](https://octoprint.org) integration of [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer).
14 14
 Unfortunately, it does not allow me to turn on the printers power supply using the Raspberry Pi.

+ 1
- 2
input/projects/quadcopters/aurora100.md Ver fichero

@@ -3,10 +3,9 @@ description: 3S LiPo, 100mm frame, 1104 6500KV motors
3 3
 parent: quadcopters
4 4
 position: 20
5 5
 date: 2017-07-17
6
-update: 2021-05-21
7 6
 ---
8 7
 
9
-<span class="listdesc">[...back to RC-Vehicles overview](quadcopters.html)</span>
8
+<!--% backToParent() %-->
10 9
 
11 10
 Not being totally happy with the power available with [my 2S xyAurora90](aurora90.html) I decided to build a 3S Aurora100 in July 2017.
12 11
 

+ 1
- 2
input/projects/quadcopters/aurora90.md Ver fichero

@@ -3,10 +3,9 @@ description: 2S LiPo, 90mm frame, 1103 8000KV motors
3 3
 parent: quadcopters
4 4
 position: 30
5 5
 date: 2017-03-07
6
-update: 2021-05-21
7 6
 ---
8 7
 
9
-<span class="listdesc">[...back to RC-Vehicles overview](quadcopters.html)</span>
8
+<!--% backToParent() %-->
10 9
 
11 10
 The build started at the end of January 2017 and it was my main copter for flights indoors and outside in the garden for a long time.
12 11
 

+ 1
- 2
input/projects/quadcopters/lx5.md Ver fichero

@@ -3,10 +3,9 @@ description: 4S LiPo, 220mm frame, 2205 2300KV motors
3 3
 parent: quadcopters
4 4
 position: 10
5 5
 date: 2017-11-01
6
-update: 2021-05-21
7 6
 ---
8 7
 
9
-<span class="listdesc">[...back to RC-Vehicles overview](quadcopters.html)</span>
8
+<!--% backToParent() %-->
10 9
 
11 10
 At the end of 2017 I had to give in to the urge of building a bigger more powerful copter.
12 11
 After my first failed attempts with large copters, gaining some experience with smaller frames seemed useful.

+ 11
- 0
macros.py Ver fichero

@@ -12,6 +12,17 @@ DEFAULT_LANG = "en"
12 12
 BASE_URL = "https://www.xythobuz.de"
13 13
 
14 14
 # -----------------------------------------------------------------------------
15
+# sub page helper macro
16
+# -----------------------------------------------------------------------------
17
+
18
+def backToParent():
19
+    url = page.get("parent", "") + ".html"
20
+    posts = [p for p in pages if p.url == url]
21
+    if len(posts) > 0:
22
+        p = posts[0]
23
+        print '<span class="listdesc">[...back to ' + p.title + ' overview](' + p.url + ')</span>'
24
+
25
+# -----------------------------------------------------------------------------
15 26
 # table helper macro
16 27
 # -----------------------------------------------------------------------------
17 28
 

Loading…
Cancelar
Guardar