Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -35,14 +35,18 @@ body,html{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text_header{
|
.text_header{
|
||||||
|
padding-right: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standart_txt{
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
/*font-family: Spline Sans;*/
|
/*font-family: Spline Sans;*/
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
padding-right: 90px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_header.last_right{
|
.text_header.last_right{
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
46
static/aerbimJS.js
Normal file
46
static/aerbimJS.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
$(document).ready(function (){
|
||||||
|
renderContent()
|
||||||
|
})
|
||||||
|
|
||||||
|
function getInfoAboutUser (){
|
||||||
|
let user_type = ''
|
||||||
|
if (screen.width <= 800){
|
||||||
|
user_type = 'mobile'
|
||||||
|
} else if (screen.width > 1024) {
|
||||||
|
user_type = 'desktop'
|
||||||
|
} else if (screen.width >= 800 && screen.width <= 1024) {
|
||||||
|
user_type = 'laptop'
|
||||||
|
}
|
||||||
|
return [user_type,screen.width]
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendWidthAjax () {
|
||||||
|
let width = getInfoAboutUser()[1]
|
||||||
|
let data = {
|
||||||
|
'screen_width': width
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderContent () {
|
||||||
|
let data = sendWidthAjax()
|
||||||
|
let section_button = document.querySelector(".section_button")
|
||||||
|
data['section_url'] = section_button.dataset['url']
|
||||||
|
$.ajax({
|
||||||
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||||
|
url: '/get_content_for_section/',
|
||||||
|
type: "POST",
|
||||||
|
// async: true,
|
||||||
|
cache: false,
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
// enctype: 'json',
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
success: function(data){
|
||||||
|
document.querySelector(".content").innerHTML = data.html
|
||||||
|
},
|
||||||
|
error: function (data){
|
||||||
|
alert(data)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
2
static/jquery_v3_6_4.js
vendored
Normal file
2
static/jquery_v3_6_4.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
templates/blocks/static/header.html
Normal file
18
templates/blocks/static/header.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{% load static %}
|
||||||
|
<div class="header">
|
||||||
|
<div class="cut-width">
|
||||||
|
<div class="left_part_header">
|
||||||
|
<img src="{% static "images/logo.svg" %}" class="logo_header">
|
||||||
|
</div>
|
||||||
|
<div class="right_part_header">
|
||||||
|
<span class="standart_txt text_header">Поддержка</span>
|
||||||
|
<span class="standart_txt text_header last_left">Контакты</span>
|
||||||
|
<div class="splitter_text_header"></div>
|
||||||
|
<select class="language_select">
|
||||||
|
<option>RU</option>
|
||||||
|
<option>EN</option>
|
||||||
|
</select>
|
||||||
|
<span class="standart_txt text_header last_right orange">Личный кабинет</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,28 +1,20 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>AerBim</title>
|
<title>AerBim</title>
|
||||||
<link rel="stylesheet" href="{% static "aerbimCSS.css" %}">
|
<link rel="stylesheet" href="{% static "aerbimCSS.css" %}">
|
||||||
|
<script src="{% static "jquery_v3_6_4.js" %}"></script>
|
||||||
|
<script src="{% static "aerbimJS.js" %}"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="header">
|
{% include "blocks/static/header.html" %}
|
||||||
<div class="cut-width">
|
<div class="cut-width content">
|
||||||
<div class="left_part_header">
|
{% block CONTENT %}
|
||||||
<img src="{% static "images/logo.svg" %}" class="logo_header">
|
|
||||||
</div>
|
{% endblock %}
|
||||||
<div class="right_part_header">
|
|
||||||
<span class="text_header">Поддержка</span>
|
|
||||||
<span class="text_header last_left">Контакты</span>
|
|
||||||
<div class="splitter_text_header"></div>
|
|
||||||
<select class="language_select">
|
|
||||||
<option>RU</option>
|
|
||||||
<option>EN</option>
|
|
||||||
</select>
|
|
||||||
<span class="text_header last_right orange">Личный кабинет</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user