add early browse
This commit is contained in:
parent
a613786c7b
commit
bf30427679
|
@ -12,6 +12,84 @@
|
|||
{% include 'nav.html' %}
|
||||
{% endblock nav %}
|
||||
{% block main %}
|
||||
<div class="container-xl">{{ category }}</div>
|
||||
{% include 'blog/featured.html' %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- <div class="position-absolute top-50 start-50 translate-middle"> -->
|
||||
<h1 class="">
|
||||
Browse
|
||||
<!-- TODO: tell the user what the filters are? -->
|
||||
</h1>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="col position-relative">
|
||||
<div class="position-absolute top-50 start-50 translate-middle">
|
||||
<form class="d-flex" role="search" action="" method="GET">
|
||||
<input type="search"
|
||||
name="search"
|
||||
class="form-control me-2"
|
||||
aria-label="Search"
|
||||
placeholder="{% trans "Search" %}"
|
||||
required=""
|
||||
id="id_search">
|
||||
<button class="btn bg-primary fw-bold" type="submit">{% trans "Filter" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-6 gap-1">
|
||||
{% for post in posts %}
|
||||
<div class="card col mx-auto my-2">
|
||||
<a class="text-reset link-offset-2 link-underline link-underline-opacity-0"
|
||||
href=" {% url 'blog:post' post.category.slug post.slug %}">
|
||||
<img src="{{ post.thumbnail.url }}"
|
||||
class="card-img-top img-fluid mx-auto d-block"
|
||||
style="max-height: 150px;
|
||||
width: auto;
|
||||
padding-top: 8px"
|
||||
alt="thumbnail" />
|
||||
<div class="card-body" style="height: 100px">
|
||||
{% if LANGUAGE_CODE == "de" %}
|
||||
<h5 class="card-title">
|
||||
{{ post.title_de }}<small class="text-body-secondary">{{ post.subtitle }}</small>
|
||||
</h5>
|
||||
<p class="card-text">{{ post.desc_de }}</p>
|
||||
{% elif LANGUAGE_CODE == "en" %}
|
||||
<h5 class="card-title">
|
||||
{{ post.title_en }}<small class="text-body-secondary">{{ post.subtitle }}</small>
|
||||
</h5>
|
||||
<p class="card-text">{{ post.desc_en }}</p>
|
||||
{% else %}
|
||||
<h5 class="card-title">
|
||||
{{ post.title_en }}<small class="text-body-secondary">{{ post.subtitle }}</small>
|
||||
</h5>
|
||||
<p class="card-text">{{ post.desc_en }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<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>
|
||||
<div class="container p-1 text-center" style="border-top: solid">
|
||||
<li class="list-group-item">
|
||||
{% format_time post.date "%F" as date %}
|
||||
{% trans "published" %}: {{ date }}
|
||||
</li>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock main %}
|
||||
|
|
Loading…
Reference in New Issue