change article

This commit is contained in:
SBD
2024-07-13 02:04:05 +03:00
parent 9d20b1c8fe
commit 6339858f42
2 changed files with 9 additions and 4 deletions

View File

@@ -131,7 +131,7 @@ function getInfoAboutUser (){
if (screen.width <= 800){ if (screen.width <= 800){
user_type = 'mobile' user_type = 'mobile'
} else if (screen.width > 1024) { } else if (screen.width > 1024) {
user_type = 'desktop' user_type = 'desktop'
} else if (screen.width >= 800 && screen.width <= 1024) { } else if (screen.width >= 800 && screen.width <= 1024) {
user_type = 'laptop' user_type = 'laptop'
} }
@@ -560,7 +560,7 @@ function choseItemTreeDocumentation (el){
this.classList.remove("chose") this.classList.remove("chose")
} }
}) })
el.classList.add("chose") el.classList.add("chose")
let url = window.location.origin + el.dataset['url'] let url = window.location.origin + el.dataset['url']
@@ -641,4 +641,9 @@ function breadCrumbGo (el){
window.location.href = window.location.origin + url window.location.href = window.location.origin + url
} }
}
function changeCurArticle (el){
let url = el.dataset['url']
window.location.href = window.location.origin + url
} }

View File

@@ -140,12 +140,12 @@
<source srcset="{% static "images/arrow_control_part_tree_el.svg" %}"> <source srcset="{% static "images/arrow_control_part_tree_el.svg" %}">
<img class="arrow_control_content_part_tree_el_img" src="{% static "images/arrow_control_part_tree_el.svg" %}" alt=""> <img class="arrow_control_content_part_tree_el_img" src="{% static "images/arrow_control_part_tree_el.svg" %}" alt="">
</picture> </picture>
<div class="txt_control_content_part_tree_el"> <div class="txt_control_content_part_tree_el" data-url="{% url 'docs_art_page' cur_version.url prev_article.url %}" onclick="changeCurArticle(this)">
{% trans "Предыдущий" %} {% trans "Предыдущий" %}
</div> </div>
</div> </div>
<div class="control_content_part_tree_el right"> <div class="control_content_part_tree_el right">
<div class="txt_control_content_part_tree_el"> <div class="txt_control_content_part_tree_el" data-url="{% url 'docs_art_page' cur_version.url next_article.url %}" onclick="changeCurArticle(this)">
{% trans "Следующий" %} {% trans "Следующий" %}
</div> </div>
<picture class="arrow_control_content_part_tree_el_picture"> <picture class="arrow_control_content_part_tree_el_picture">