]> juplo.de Git - website/commitdiff
Shortcode zum einfügen von Marginal-Content aus einer Content-Seite heraus
authorKai Moritz <kai@juplo.de>
Thu, 18 Dec 2025 17:44:17 +0000 (18:44 +0100)
committerKai Moritz <kai@juplo.de>
Mon, 22 Dec 2025 21:58:21 +0000 (22:58 +0100)
content/about/_index.html
layouts/_shortcodes/marginalcontent-html.html [new file with mode: 0644]
layouts/_shortcodes/marginalcontent-md.html [new file with mode: 0644]
layouts/baseof.html

index f6226b890c94e12a3667bd76d483dbd468b55392..431e05f925e08ab3469363b2073f4e9e1995838b 100644 (file)
@@ -47,7 +47,7 @@ weight: 30
         <a href="expertise.html" th:href="@{/expertise.html}">what I can do for you</a>, or 
         <a href="references.html" th:href="@{/references.html}">what I have already done for others</a>.
       </p>
-<aside class="marginalcontent">
+{{< marginalcontent-html >}}
       <h2>Funded by the Europian Union</h2>
       <p>
         As partner of the company
@@ -62,4 +62,4 @@ weight: 30
           <img alt="EFRE.NRW 2014-2020: Invesitionen in Wachstum und Beschäftigung" src="img/Ziel2NRW_4c_1809_eps.svg" th:src="@{/img/Ziel2NRW_4c_1809_eps.svg}" width="100%">
         </a>
       </p>
-    </aside>
+{{< /marginalcontent-html >}}
diff --git a/layouts/_shortcodes/marginalcontent-html.html b/layouts/_shortcodes/marginalcontent-html.html
new file mode 100644 (file)
index 0000000..c15cddb
--- /dev/null
@@ -0,0 +1 @@
+{{ .Page.Scratch.Add "marginalcontent" .Inner }}
diff --git a/layouts/_shortcodes/marginalcontent-md.html b/layouts/_shortcodes/marginalcontent-md.html
new file mode 100644 (file)
index 0000000..22e2f08
--- /dev/null
@@ -0,0 +1 @@
+{{ .Page.Scratch.Add "marginalcontent" ( .Inner | markdownify ) }}
index 8145bc1260b60aae70b45fdb609187c7e84df2e7..f7fd109865faed12beb9a9ea39ac4184431c8a5a 100644 (file)
@@ -18,7 +18,7 @@
         </article>
         <div class="marginal">
           {{- partial "menu.html" (dict "menuID" "main" "page" .) }}
-          {{- partial "marginalcontent.html" . }}
+          {{- block "marginalcontent" . }}{{ end }}
         </div>
     </main>
     <footer id="footer">
@@ -32,3 +32,9 @@
   </div>
 </body>
 </html>
+
+{{ define "marginalcontent" }}
+  {{ with .Scratch.Get "marginalcontent" }}
+    <aside class="m">{{ . }}</aside>
+  {{ end }}
+{{ end }}