0.1.333 upd 404_page and create conditions for unfound routes

This commit is contained in:
2024-01-09 13:03:30 +03:00
parent 46e73db10a
commit c7bc22813f
5 changed files with 93 additions and 5 deletions

View File

@@ -1,8 +1,27 @@
{% extends "tb_base.html" %}
{% load i18n %}
{% block content %}
404
<div class="not_found_wrap">
<div class="not_found_text">
<div
class="not_found_title">
404
</div>
<div class="not_found_sub_title">
{% translate "Страница не найдена" %}
</div>
</div>
<div class="button_container">
<a
class="a_btn_standart"
href="{% url 'main' %}">
{% translate "Вернуться на главную" %}
</a>
</div>
</div>
{% endblock %}

View File

@@ -11,8 +11,43 @@
<div class="text-align-center fw-700 font-large c-txt-b2 m-a w-80 m-t-8p">
{% blocktranslate %}
Упс... <span class="orange-text">Ничего не найдено</span>, попробуйте
изменить параметры поиска
изменить параметры поиска <span class="orange-text"> или создайте своё собственное объявление, чтобы все могли найти
{% endblocktranslate %}
{% if owner_type == "mover" %}
{% translate "Отправителя" %}
{% elif owner_type == "customer" %}
{% translate "Перевозчика" %}
{% endif %}
</span>
{% if user.is_authenticated %}
<a
id="create_route"
{% if owner_type == "mover" %}
href="{% url 'profile_page' 'create_route_for_customer' %}"
{% elif owner_type == "customer" %}
href="{% url 'profile_page' 'create_route_for_mover' %}"
{% endif %}
>
{% translate "Создать объявление" %}
</a>
{% endif %}
{% if not user.is_authenticated %}
<a
id="create_route"
href="{% url "login_profile" %}"
>
{% translate " Войти и Создать объявление" %}
</a>
{% endif %}
</div>
<img class="boxes_not_fond_routes left" src="{% static "/img/boxes_for_not_found_routes/b_1.svg" %}">
<img class="boxes_not_fond_routes right" src="{% static "/img/boxes_for_not_found_routes/b_2.svg" %}">

View File

@@ -107,7 +107,7 @@
</div>
</div>
{% endif %}
<div class="wrapper_content {% if page.url == 'customer_service'%} m_h_0 {% elif page.url == 'contacts' %}m_h_0{% endif %}">
<div class="wrapper_content {% if page.url == 'customer_service'%} m_h_0 {% elif page.url == 'contacts' %}m_h_0{% elif request.path == '/test_404' %}m_h_0{% endif %}">
{% block content %}
{% endblock %}