blog-markdown #31

Merged
PlexSheep merged 27 commits from blog-markdown into devel 2023-10-02 11:31:41 +02:00
1 changed files with 56 additions and 36 deletions
Showing only changes of commit c42653df80 - Show all commits

View File

@ -1,40 +1,60 @@
{% load i18n %} {% load i18n %} {% get_current_language as LANGUAGE_CODE %}
{% get_current_language as LANGUAGE_CODE %}
<div class="container-lg mt-5"> <div class="container-lg mt-5">
<h4 class="">{% trans "Featured" %}</h4> <h4 class="">{% trans "Featured" %}</h4>
<div class="row row-cols-1 row-cols-md-5 my-4"> <div class="row row-cols-1 row-cols-md-5 my-4">
{% for post in featured_posts %} {% for post in featured_posts %}
<div class="card col m-2 p-0"> <div class="card col m-2 p-0">
<a class="text-reset link-offset-2 link-underline link-underline-opacity-0" href=" {% url 'blog:post' post.category.slug post.slug %}"> <a
<img src="{{ post.thumbnail.url }}" class="card-img-top img-fluid" style="max-height: 150px;" alt="thumbnail"> class="text-reset link-offset-2 link-underline link-underline-opacity-0"
<div class="card-body" style="height: 100px;"> href=" {% url 'blog:post' post.category.slug post.slug %}"
{% if LANGUAGE_CODE == "de" %} >
<h5 class="card-title">{{ post.title_de }}<small class="text-body-secondary">{{ post.subtitle }}</small></h5> <img
<p class="card-text">{{ post.desc_de }}</p> src="{{ post.thumbnail.url }}"
{% elif LANGUAGE_CODE == "en" %} class="card-img-top img-fluid"
<h5 class="card-title">{{ post.title_en }}<small class="text-body-secondary">{{ post.subtitle }}</small></h5> style="max-height: 150px"
<p class="card-text">{{ post.desc_en }}</p> alt="thumbnail"
{% else %} />
<h5 class="card-title">{{ post.title_en }}<small class="text-body-secondary">{{ post.subtitle }}</small></h5> <div class="card-body" style="height: 100px">
<p class="card-text">{{ post.desc_en }}</p> {% if LANGUAGE_CODE == "de" %}
{% endif %} <h5 class="card-title">
</div> {{ post.title_de }}<small class="text-body-secondary"
<div class="container pt-5"> >{{ post.subtitle }}</small
<ul class="list-group list-group-flush"> >
<li class="list-group-item">{% translate "category" %}: <b>{{ post.category.name }}</b></li> </h5>
{% for keyword in post.keywords.all %} <p class="card-text">{{ post.desc_de }}</p>
{% if LANGUAGE_CODE == "de" %} {% elif LANGUAGE_CODE == "en" %}
<li class="list-group-item">{{ keyword.text_de }}</li> <h5 class="card-title">
{% elif LANGUAGE_CODE == "en" %} {{ post.title_en }}<small class="text-body-secondary"
<li class="list-group-item">{{ keyword.text_en }}</li> >{{ post.subtitle }}</small
{% else %} >
<li class="list-group-item">{{ keyword.text_en }}</li> </h5>
{% endif %} <p class="card-text">{{ post.desc_en }}</p>
{% endfor %} {% else %}
</ul> <h5 class="card-title">
</div> {{ post.title_en }}<small class="text-body-secondary"
</a> >{{ post.subtitle }}</small
>
</h5>
<p class="card-text">{{ post.desc_en }}</p>
{% endif %}
</div> </div>
{% endfor %} <div class="container pt-5">
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% translate "category" %}: <b>{{ post.category.name }}</b>
</li>
{% for keyword in post.keywords.all %} {% if LANGUAGE_CODE == "de"
%}
<li class="list-group-item">{{ keyword.text_de }}</li>
{% elif LANGUAGE_CODE == "en" %}
<li class="list-group-item">{{ keyword.text_en }}</li>
{% else %}
<li class="list-group-item">{{ keyword.text_en }}</li>
{% endif %} {% endfor %}
</ul>
</div>
</a>
</div> </div>
{% endfor %}
</div>
</div> </div>