zooey vor 3 Monaten
Ursprung
Commit
83d7431e5a

BIN
themes/hugo-bootstrap-5/images/banner.jpg


+ 31 - 0
themes/hugo-bootstrap-5/layouts/partials/new-post.html

@@ -0,0 +1,31 @@
+<div class="new-post">
+    <div class="new-post-content">
+        {{ range first 3 (where .Site.Pages "Params.type" "headlines") }}
+        <div class="new-post-content border-top mb-3">
+            <div class="row pt-3">
+                <div class="col-lg-4">
+                    <a href="{{ .Permalink }}">
+                        <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
+                    </a>
+                </div>
+                <div class="col-lg-8">
+                    <h2 class="post-title mb-3">
+                        <a href="{{ .Params.url }}">{{ .Params.title }}</a>
+                    </h2>
+                    <p class="post-depiction mb-0">
+                        <a href="{{ .Params.url }}" style="color:#000;">{{ .Summary }}</a>
+                    </p>
+                    <section class="news-post mt-3">
+                        {{ range (.GetTerms "categories") }}
+                        <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
+                        {{ end }}
+                        <small>{{ .Date | time.Format ":date_long" }}</small>
+                    </section>
+                </div>
+            </div>
+
+        </div>
+        {{end}}
+
+    </div>
+</div>

+ 23 - 0
themes/hugo-bootstrap-5/layouts/partials/post.html

@@ -0,0 +1,23 @@
+<div class="row">
+    {{ range first 1 (where .Site.Pages "Params.type" "post") }}
+    <div class="col-lg-4">
+        <a href="{{ .Permalink }}">
+            <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
+        </a>
+        <div>
+            <h2 class="post-title my-lg-3">
+                <a href="{{ .Params.url }}">{{ .Params.title }}</a>
+            </h2>
+            <section class="news-info">
+                {{ range (.GetTerms "categories") }}
+                <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
+                {{ end }}
+                <small>{{ .Date | time.Format ":date_long" }}</small>
+            </section>
+        </div>
+        <p class="post-depiction">
+            <a href="{{ .Params.url }}" style="color:#000;">{{ .Summary }}</a>
+        </p>
+    </div>
+    {{ end }}
+</div>