fix(faq): links inside answers clickable and styled

- add.js: clicks on a/button/inputs inside accordion content no longer toggle/preventDefault
- faq answers pass through wpautop so paragraphs render
- scoped .faq-section rules: no 70% paragraph width, padding on text block, underlined links, overflow-wrap
This commit is contained in:
Dekart Deploy Bot 2026-10-24 00:01:38 +00:00
parent 992e213f8c
commit 7f2dfaf7de
5 changed files with 56 additions and 2 deletions

View File

@ -2599,6 +2599,32 @@ main {
width: 100%;
}
/* FAQ лендингов: свой текст без глобальных отступов абзацев */
.faq-section .box__accordion_content-text {
padding: 0 20px 20px;
}
.faq-section .box__accordion_content-text p {
width: 100%;
padding: 0;
margin: 0 0 12px;
}
.faq-section .box__accordion_content-text p:last-child {
margin-bottom: 0;
}
.faq-section .box__accordion_content-text a {
text-decoration: underline;
text-underline-offset: 3px;
overflow-wrap: anywhere;
}
.obrazovanie .box__accordion_content {
font-family: 'Roboto';
font-style: normal;

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,12 @@ boxes.forEach((box) => {
});
function boxHandler(e) {
// ссылки и поля внутри ответа не должны переключать аккордеон
if (e.target.closest && e.target.closest("a, button, input, textarea, select, label")) {
if (e.target.closest(".box__accordion_content")) {
return;
}
}
e.preventDefault();
let currentBox = e.target.closest(".box__accordion");
let currentContent = currentBox.querySelector(".box__accordion_content");;

View File

@ -33,7 +33,7 @@ foreach ($questions as $item) {
. '<g transform="translate(1.000000, 1.000000)" stroke="currentColor">'
. '<path d="M0,11 L22,11"></path><path d="M11,0 L11,22"></path>'
. '</g></g></svg></div>'
. '<div class="box__accordion_content"><div class="box__accordion_content-text">' . wp_kses_post($a) . '</div></div>'
. '<div class="box__accordion_content"><div class="box__accordion_content-text">' . wp_kses_post(wpautop($a)) . '</div></div>'
. '</div>';
if (0 === $count % 2) {
$col1 .= $accordion;

View File

@ -2612,6 +2612,28 @@ main {
.questions .box__accordion_content p {
width: 100%;
}
/* FAQ лендингов: свой текст без глобальных отступов абзацев */
.faq-section .box__accordion_content-text {
padding: 0 20px 20px;
}
.faq-section .box__accordion_content-text p {
width: 100%;
padding: 0;
margin: 0 0 12px;
}
.faq-section .box__accordion_content-text p:last-child {
margin-bottom: 0;
}
.faq-section .box__accordion_content-text a {
text-decoration: underline;
text-underline-offset: 3px;
overflow-wrap: anywhere;
}
.obrazovanie .box__accordion_content {
font-family: 'Roboto';
font-style: normal;