From 9a7a79a3b930d9a08767aefad56794556edfea53 Mon Sep 17 00:00:00 2001 From: SBD Date: Sun, 10 Dec 2023 18:53:14 +0300 Subject: [PATCH] 0.0.118 --- static/aerbimCSS.css | 74 ++++++++++++++++++++++++- static/aerbimJS.js | 30 ++++++++++ static/images/arrow_slider_projects.svg | 6 ++ templates/blocks/b_projects.html | 35 +++++++++--- templates/widgets/w_project.html | 15 +++++ 5 files changed, 151 insertions(+), 9 deletions(-) create mode 100644 static/images/arrow_slider_projects.svg create mode 100644 templates/widgets/w_project.html diff --git a/static/aerbimCSS.css b/static/aerbimCSS.css index 4de714a..6cc5a16 100644 --- a/static/aerbimCSS.css +++ b/static/aerbimCSS.css @@ -434,7 +434,6 @@ body.n_scroll{ } .photo_container_descript_process{ - background: #ffffff; text-align: center; width: 150px; height: 150px; @@ -1392,3 +1391,76 @@ body.n_scroll{ /* examples project*/ +.b_projects_slider{ + display: flex; + flex-wrap: wrap; + flex-direction: row; + width: 100%; + justify-content: space-between; + align-items: center; +} + +.right_part_b_projects_slider{ + transform: rotate(180deg); +} + +.info_part_b_projects_slider{ + padding: 0 30px; + width: 87%; +} + +.el_container_projects_slider{ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + flex-direction: row; +} +.el_container_projects_slider.hide{ + display: none; +} + +.left_part_proj{ + width: 47.5%; + margin-right: 2.5%; +} + +.title_proj{ + font-size: 16px; + font-weight: 500; + color: #0C54A0; + border-radius: 5px; + background: rgba(0, 63, 129, 0.30); + padding: 5px; + width: 158px; + margin-bottom: 15px; +} + +.name_proj{ + font-size: 20px; + font-weight: 600; + margin-bottom: 30px; + text-transform: uppercase; +} + +.task_title{ + font-size: 14px; + font-weight: 600; + margin-bottom: 15px; +} + +.task_description{ + font-size: 14px; + font-weight: 400; +} + +.right_part_proj{ + width: 47.5%; + margin-left: 2.5%; +} + +.img_proj{ + width: 100%; + height: 100%; + object-fit: scale-down; + object-position: center; +} \ No newline at end of file diff --git a/static/aerbimJS.js b/static/aerbimJS.js index 3d9963d..be9853a 100644 --- a/static/aerbimJS.js +++ b/static/aerbimJS.js @@ -313,4 +313,34 @@ function resetForm () { if (btn_form.classList.contains("hide")){ btn_form.classList.remove('hide') } +} + +function changeSlideProject (el,type) { + let cur_slide = document.querySelector(".el_container_projects_slider.show") + + let dataset = cur_slide.dataset + if (dataset){ + let index_cur_slide = parseInt(dataset['indexSlideProj']) + let count_slides = parseInt(dataset['countSlidesProj']) + let slide_f_processing = null + if (type === 'next'){ + if (!index_cur_slide + 1 > count_slides){ + slide_f_processing = document.querySelector(`[data-index-slide-proj="${index_cur_slide++}"]`) + } else { + slide_f_processing = document.querySelector(`[data-index-slide-proj="1"]`) + } + } else if (type === 'back'){ + if (index_cur_slide - 1 !== 0){ + slide_f_processing = document.querySelector(`[data-index-slide-proj="${index_cur_slide--}"]`) + } else { + slide_f_processing = document.querySelector(`[data-index-slide-proj="${count_slides}"]`) + } + } + if (slide_f_processing){ + slide_f_processing.classList.toggle("show") + slide_f_processing.classList.toggle("hide") + cur_slide.classList.toggle("show") + cur_slide.classList.toggle("hide") + } + } } \ No newline at end of file diff --git a/static/images/arrow_slider_projects.svg b/static/images/arrow_slider_projects.svg new file mode 100644 index 0000000..24d46da --- /dev/null +++ b/static/images/arrow_slider_projects.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/templates/blocks/b_projects.html b/templates/blocks/b_projects.html index bdf9505..6919ca4 100644 --- a/templates/blocks/b_projects.html +++ b/templates/blocks/b_projects.html @@ -1,9 +1,28 @@ -
- {% for project in page.get_projects %} -
- {{ project.name }} - {{ project.description|safe|linebreaksbr }} - {{ project.name }} -
- {% endfor %} +{#
#} +{# {% for project in page.get_projects %}#} +{#
#} +{# {{ project.name }}#} +{# {{ project.description|safe|linebreaksbr }}#} +{# {{ project.name }}#} +{#
#} +{# {% endfor %}#} +{#
#} +{% load static %} +
+
+
+
+ +
+
+ {% for project in page.get_projects %} + {% include 'widgets/w_project.html' %} + {% endfor %} +
+
+ +
+ +
+
\ No newline at end of file diff --git a/templates/widgets/w_project.html b/templates/widgets/w_project.html new file mode 100644 index 0000000..9d3b822 --- /dev/null +++ b/templates/widgets/w_project.html @@ -0,0 +1,15 @@ +{% load static %} +{% load i18n %} + +
+
+
{% translate "Примеры проектов" %}
+
{{ project.name }}
+
{% translate "Задача" %}
+
{{ project.description|safe|linebreaksbr }}
+
+
+ +
+ +
\ No newline at end of file