Bootstrap 5.3 as CSS base + B3 theme layer; dialogs isolated as .dlg; offcanvas sidebar; icons via SVG assets + masks
This commit is contained in:
@@ -166,7 +166,7 @@ function attachCommentAutocomplete(input) {
|
||||
/* Если снизу внутри модалки мало места — раскрываем список вверх, чтобы он не обрезался. */
|
||||
function positionList() {
|
||||
var wrap = input.parentNode;
|
||||
var scrollParent = input.closest('.modal-body') || document.documentElement;
|
||||
var scrollParent = input.closest('.dlg-body') || document.documentElement;
|
||||
var wr = wrap.getBoundingClientRect();
|
||||
var sr = scrollParent.getBoundingClientRect();
|
||||
var below = sr.bottom - wr.bottom;
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
document.addEventListener('click', function (e) {
|
||||
var el = e.target;
|
||||
|
||||
var close = el.closest('.modal-close');
|
||||
var close = el.closest('.dlg-close');
|
||||
if (close) {
|
||||
var dlg = close.closest('dialog');
|
||||
if (dlg) dlg.close();
|
||||
@@ -246,7 +246,7 @@
|
||||
var n = document.getElementById('mobile-nav');
|
||||
var o = document.getElementById('mobile-nav-overlay');
|
||||
var b = document.getElementById('nav-burger');
|
||||
if (n) n.classList.add('open');
|
||||
if (n) n.classList.add('show');
|
||||
if (o) o.hidden = false;
|
||||
if (b) b.setAttribute('aria-expanded', 'true');
|
||||
document.documentElement.classList.add('nav-open');
|
||||
@@ -255,7 +255,7 @@
|
||||
var n = document.getElementById('mobile-nav');
|
||||
var o = document.getElementById('mobile-nav-overlay');
|
||||
var b = document.getElementById('nav-burger');
|
||||
if (n) n.classList.remove('open');
|
||||
if (n) n.classList.remove('show');
|
||||
if (o) o.hidden = true;
|
||||
if (b) b.setAttribute('aria-expanded', 'false');
|
||||
document.documentElement.classList.remove('nav-open');
|
||||
|
||||
Reference in New Issue
Block a user