From e342cb89a5a126a7c832d8ddab6d57473d46da8b Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Wed, 16 Oct 2024 22:23:25 +0200
Subject: [PATCH] Reduce number of blog posts on front page

---
 templates/blog/section.html   | 2 +-
 templates/frontpage/blog.html | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/templates/blog/section.html b/templates/blog/section.html
index 30501aa..0342704 100644
--- a/templates/blog/section.html
+++ b/templates/blog/section.html
@@ -7,7 +7,7 @@
   <div class="container">
     <h2 class="title is-2">{{ title | default(value="Aus dem Teckids-Blog") }}</h2>
     <div class="columns is-multiline is-same-height mt-4">
-      {% for post in posts | slice(end=count|default(value=9)) %}
+      {% for post in posts | slice(end=count|default(value=6)) %}
         <div class="column is-one-third">
           {% include "blog/card.html" %}
         </div>
diff --git a/templates/frontpage/blog.html b/templates/frontpage/blog.html
index af159e9..5eec390 100644
--- a/templates/frontpage/blog.html
+++ b/templates/frontpage/blog.html
@@ -1,2 +1,10 @@
 {% set blog_section = get_section(path="blog/_index.md") %}
+{% set count = 3 %}
 {% include "blog/section.html" %}
+<nav class="section pt-0">
+  <div class="container">
+    <a href="{{ get_url(path="@/blog/_index.md") }}" class="button is-large is-fullwidth is-link is-rounded">
+      Mehr aus dem Teckids-Blog
+    </a>
+  </div>
+</nav>
-- 
GitLab