later42/later42/templates/index.html

39 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html' %}
{% block content %}
{% if user.is_authenticated and urls|length > 0 %}
{% for url in urls %}
<!-- Post preview-->
<div class="post-preview">
<div class="d-flex justify-content-between">
<div class="p-2">
<a href="{% url 'reader' url.id %}">
<h2 class="post-title">{{ url.title }}</h2>
</a>
</div>
<div class="p-2">
<a href="{% url 'archive_url' url.id %}"><span class="fa-regular fa-square-check"></span></a>
</div>
</div>
{% if url.content %}
<p class="post-meta">
{{ url.content }}
</p>
{% endif %}
<p class="post-meta">
{{ url.url|urlizetrunc:70 }}
</p>
</div>
<!-- Divider-->
<hr class="my-4" />
{% endfor %}
{% elif user.is_authenticated %}
<div class="post-preview">
<h2 class="post-title">У вас нет сохраненных ссылок</h2>
</div>
{% elif not user.is_authenticated %}
{% include 'about_include.html' %}
{% include 'faq_include.html' %}
{% endif %}
{% endblock %}