articles page
This commit is contained in:
SDE
2023-10-05 19:27:57 +03:00
parent 5f71eb5e0b
commit c781453055
3 changed files with 17 additions and 14 deletions

View File

@@ -21,7 +21,7 @@ def get_articles(art_kwargs, request_Data=None, from_el=None, to_el=None):
arts = arts[:to_el] arts = arts[:to_el]
else: else:
to_el = 3 to_el = 3
arts = arts[:3] arts = arts[:to_el]
last_block = False last_block = False
if not to_el or to_el >= el_count: if not to_el or to_el >= el_count:

View File

@@ -2,18 +2,20 @@
<div class="news_block_pagination"> <div class="news_block_pagination">
{% for art in articles %} {% for art in articles %}
<div class="news_item_pagination"> {% if from_el and forloop.counter > from_el %}
<div class="pag_news_img"><img src="{{ MEDIA_URL }}{{ art.picture }}" /></div> <div class="news_item_pagination">
<div class="pag_news_item_text"> <div class="pag_news_img"><img src="{{ MEDIA_URL }}{{ art.picture }}" /></div>
<div class="news_header">{{ art.name }}</div> <div class="pag_news_item_text">
<div class="news_description"> <div class="news_header">{{ art.name }}</div>
{{ art.description|truncatechars:400 }} <div class="news_description">
{# <div class="news_gradient"></div>#} {{ art.description|truncatechars:400 }}
</div> {# <div class="news_gradient"></div>#}
</div> </div>
<div class="clear_both"></div> </div>
<div class="clear_both"></div>
</div> </div>
{% endif %}
{#<div>{{ art.text|safe }}</div>#} {#<div>{{ art.text|safe }}</div>#}
{% endfor %} {% endfor %}
</div> </div>

View File

@@ -29,8 +29,9 @@
{% endfor %} {% endfor %}
</div> </div>
{% with from_el=3 %}
{% include 'blocks/static_pages_blocks/b_news_elements.html' %} {% include 'blocks/static_pages_blocks/b_news_elements.html' %}
{% endwith %}
{% if last_block == False %} {% if last_block == False %}
<div class="text-align-center w-68 f-r"> <div class="text-align-center w-68 f-r">