From 4b6930acf38bd2d05afd665eae960f6bb4948b43 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 4 Jun 2023 20:48:45 +0200 Subject: [PATCH] featured section has functionality --- gawa/blog/templates/blog/featured.html | 35 +++++++++++++----- gawa/blog/templates/blog/nav.html | 2 +- .../img/thumbnails/thuglifemathemann.png | Bin 0 -> 33594 bytes gawa/media/img/thumbnails/wayland.png | Bin 0 -> 5649 bytes gawa/media/img/thumbnails/wayland_logo.jpg | Bin 0 -> 36381 bytes gawa/media/img/thumbnails/wayland_logo.png | Bin 0 -> 26765 bytes 6 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 gawa/media/img/thumbnails/thuglifemathemann.png create mode 100644 gawa/media/img/thumbnails/wayland.png create mode 100644 gawa/media/img/thumbnails/wayland_logo.jpg create mode 100644 gawa/media/img/thumbnails/wayland_logo.png diff --git a/gawa/blog/templates/blog/featured.html b/gawa/blog/templates/blog/featured.html index 0fd2484..8177fef 100644 --- a/gawa/blog/templates/blog/featured.html +++ b/gawa/blog/templates/blog/featured.html @@ -1,23 +1,38 @@ {% load i18n %} +{% get_current_language as LANGUAGE_CODE %}

{% trans "Featured" %}

{% for post in featured_posts %} -
- ... +
+ thumbnail
-
Card titlesus
+ {% if LANGUAGE_CODE == "de" %} +
{{ post.title_de }}{{ post.subtitle }}
+

{{ post.desc_de }}

+ {% elif LANGUAGE_CODE == "en" %} +
{{ post.title_en }}{{ post.subtitle }}
+

{{ post.desc_en }}

+ {% else %} +
{{ post.title_en }}{{ post.subtitle }}

Some quick example text to build on the card title and make up the bulk of the card's content.

+ {% endif %}
    -
  • An item
  • -
  • A second item
  • -
  • A third item
  • +
  • {% translate "category" %}: {{ post.category.name }}
  • + {% for keyword in post.keywords.all %} + {% if LANGUAGE_CODE == "de" %} +
  • {{ keyword.text_de }}
  • + {% elif LANGUAGE_CODE == "en" %} +
  • {{ keyword.text_en }}
  • + {% else %} +
  • {{ keyword.text_en }}
  • + {% endif %} + {% endfor %} +
  • + {% translate "go to blogpost" %} +
-
{% endfor %}
diff --git a/gawa/blog/templates/blog/nav.html b/gawa/blog/templates/blog/nav.html index e1aa14d..1947df0 100644 --- a/gawa/blog/templates/blog/nav.html +++ b/gawa/blog/templates/blog/nav.html @@ -15,7 +15,7 @@ {% translate "Start" %}