Skip to content

Commit

Permalink
fix: blog index page
Browse files Browse the repository at this point in the history
  • Loading branch information
adinhodovic committed Jan 11, 2024
1 parent 85a1e8c commit 7a936f4
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions django_wtf/templates/wagtail_code_blog/blog_index_page.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{% extends "core/base.html" %}
{% load wagtailcore_tags wagtailimages_tags %}
{% load static %}
{% block head %}
{% include "wagtail_code_blog/blog_index_page_head.html" %}
{{ block.super }}
{{ tailwind_css }}
{% endblock head %}
{% block content %}
<div class="text-center my-5">
{% for post in posts %}
<a href="{% pageurl post %}"
class="block w-full p-6 bg-white border border-gray-200 rounded-lg shadow-md hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{{ post.title }}</h5>
{% if post.intro %}
<p class="font-normal text-gray-700 dark:text-gray-400">{{ post.intro|truncatewords:30 }}</p>
{% endif %}
</a>
{% endfor %}
</div>
{{ block.super }}
<div class="mb-20">{% include "wagtail_code_blog/blog_index_page_body.html" %}</div>
{% endblock content %}

0 comments on commit 7a936f4

Please sign in to comment.