0.0.19 use new file structure

This commit is contained in:
2023-07-17 18:48:33 +03:00
parent a7b014da20
commit 113e576d4c
9 changed files with 110 additions and 49 deletions

View File

@@ -768,6 +768,10 @@ section.profile {
flex-basis: 35px;
}
.info_profile{
width: clamp(400px, 827px, 900px)
}
.info_profile>h1 {
color: #272424;
font-family: Inter;
@@ -910,11 +914,32 @@ form.new_route>div{
margin-bottom: 30px;
margin-top: 30px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
form.new_route{
width:100%;
}
.departure_arrival>div,
.from_to_place>div,
.from_to_country>div
{
display: flex;
flex-direction: column;
flex: 1;
margin-right: 20px;
}
/*end create new route*/
/*end create new route*/
/*Range slider*/
/*Range slider end*/

View File

@@ -23,3 +23,4 @@ function SendRegistrationForm(el){
});
}

View File

@@ -1,7 +1,11 @@
{% load static %}
<form class = "new_route" name="new_route" method="post">
{% csrf_token %}
<div>
<label for="id_type_transport">{{ form.fields.type_transport.label }}</label>
</div>
<div>
<select name="type_transport" id="id_type_transport"{% if form.fields.type_transport.required %} required{% endif %}>
{% for item in form.fields.type_transport.choices %}
<option value="{{ item.0 }}"{% if form.fields.type_transport.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
@@ -10,22 +14,27 @@
</div>
<hr>
<div class="departure_arrival">
<div>
<label for="id_departure_DT">{{ form.fields.departure_DT.label }}</label>
<input type="datetime-local" name="departure_DT"{% if form.fields.departure_DT.required %} required{% endif %} id="id_departure_DT">
<input type="datetime-local" name="departure_DT"{% if form.fields.departure_DT.required %} required{% endif %} id="id_departure_DT">
</div>
<div>
<label for="id_arrival_DT">{{ form.fields.arrival_DT.label }}</label>
<input type="datetime-local" name="arrival_DT"{% if form.fields.arrival_DT.required %} required{% endif %} id="id_arrival_DT">
</div>
</div>
</div>
<hr>
<div>
<div class="from_to_country">
<div>
<label for="id_from_country">{{ form.fields.from_country.label }}</label>
<input type="text" name="from_country"{% if form.fields.from_country.required %} required{% endif %} id="id_from_country">
</div>
<div>
<label for="id_to_country">{{ form.fields.to_country.label }}</label>
<input type="text" name="to_country"{% if form.fields.to_country.required %} required{% endif %} id="id_to_country">
</div>
</div>
{# <div>#}
{# <label for="id_from_city">{{ form.fields.from_city.label }}</label>#}
{# <input type="text" name="from_city"{% if form.fields.from_city.required %} required{% endif %} id="id_from_city">#}
@@ -34,26 +43,31 @@
{# <label for="id_to_city">{{ form.fields.to_city.label }}</label>#}
{# <input type="text" name="to_city"{% if form.fields.to_city.required %} required{% endif %} id="id_to_city">#}
{# </div>#}
<div>
<div class="from_to_place">
<div>
<label for="id_from_place">{{ form.fields.from_place.label }}</label>
<select name="from_place" id="id_from_place" {% if form.fields.from_place.required %} required{% endif %}>
{% for item in form.fields.from_place.choices %}
<option value="{{ item.0 }}"{% if form.fields.type_transport.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="id_to_place">{{ form.fields.to_place.label }}</label>
<select name="to_place" id="id_to_place" {% if form.fields.to_place.required %} required{% endif %}>
{% for item in form.fields.to_place.choices %}
<option value="{{ item.0 }}"{% if form.fields.to_place.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
{% endfor %}
</select>
</div>
</div>
<hr>
<div>
<label for="id_cargo_type">{{ form.fields.cargo_type.label }}</label>
</div>
<div>
<select name="cargo_type" id="id_cargo_type" {% if form.fields.cargo_type.required %} required{% endif %}>
{% for item in form.fields.cargo_type.choices %}
<option value="{{ item.0 }}"{% if form.fields.cargo_type.initial == item.0 %} selected="selected"{% endif %}>{{ item.1 }}</option>
@@ -65,7 +79,7 @@
<div>
<label for="id_weight">{{ form.fields.weight.label }}</label>
<input type="number" name="weight"{% if form.fields.weight.required %} required{% endif %} id="id_weight">
<input type="range" name="weight"{% if form.fields.weight.required %} required{% endif %} value="" id="id_weight">
</div>
<hr>
@@ -88,5 +102,5 @@
<div class="button_register">
<button id="registration" onclick="sendRoute(this)"> Разместить объявления </button>
</div>
<script src='{% static "js/sendNewRoute.js" %}'></script>
</form>

View File

@@ -4,4 +4,6 @@
<script src='{% static "js/authorization.js" %}'></script>
<script src='{% static "js/newRoute.js" %}'></script>
<script src='{% static "js/sendNewRoute.js" %}'></script>
<script src=" https://cdn.jsdelivr.net/npm/ion-rangeslider@2.3.1/js/ion.rangeSlider.min.js "></script>
<link href=" https://cdn.jsdelivr.net/npm/ion-rangeslider@2.3.1/css/ion.rangeSlider.min.css " rel="stylesheet">
<link rel="stylesheet" href="{% static 'css/styles.css' %}">

View File

@@ -1,15 +1 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
{% include 'inter/meta.html' %}
</head>
<body>
<div class="wrapper">
{% include 'blocks/b_header.html' %}
{% include 'blocks/b_footer.html' %}
</div>
</body>
</html>
{% extends 'tb_base.html' %}

View File

@@ -1,16 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
{% include 'inter/meta.html' %}
</head>
<body>
<div class="wrapper">
{% include 'blocks/b_header.html' %}
{% include 'forms/f_login.html' %}
{% include 'blocks/b_footer.html' %}
{% extends 'tb_base.html' %}
{% load static %}
</div>
</body>
</html>
{% block meta %}
<script src='{% static "js/authorization.js" %}'></script>
{% endblock %}
{% block content %}
{% include 'forms/f_login.html' %}
{% endblock %}

View File

@@ -1,5 +1,9 @@
{% extends 'tb_base.html' %}
{% include 'inter/meta.html' %}
{% include 'blocks/b_header.html' %}
{% include 'forms/f_registration.html' %}
{% include 'blocks/b_footer.html' %}
{% block meta %}
<script src='{% static "js/registration.js" %}'></script>
{% endblock %}
{% block content %}
{% include 'forms/f_registration.html' %}
{% endblock %}

View File

@@ -1,4 +1,11 @@
{% include 'inter/meta.html' %}
{% include 'blocks/b_header.html' %}
{% include 'blocks/b_user_profile.html' %}
{% include 'blocks/b_footer.html' %}
{% extends 'tb_base.html' %}
{% load static %}
{% block meta %}
<script src='{% static "js/newRoute.js" %}'></script>
{% endblock %}
{% block content %}
{% include 'blocks/b_user_profile.html' %}
{% endblock %}

27
templates/tb_base.html Normal file
View File

@@ -0,0 +1,27 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src='{% static "js/jquery_v3_6_4.js" %}'> </script>
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
{% block meta %}
{# {% include 'inter/meta.html' %}#}
{% endblock %}
</head>
<body>
<div class="wrapper">
{% include 'blocks/b_header.html' %}
{% block content %}
{% endblock %}
{% include 'blocks/b_footer.html' %}
</div>
</body>
</html>