feat(mobile): admin bar widoczny na mobilce/PWA z tap-to-open dropdownami
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Admin bar był ukryty na mobile (display:none). Teraz jest widoczny ze scroll horyzontalnym i dropdowny otwierają się na tap zamiast hover. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d36781a8d7
commit
175da94ef6
@ -505,7 +505,8 @@
|
||||
z-index: 300;
|
||||
}
|
||||
|
||||
.admin-dropdown:hover .admin-dropdown-menu {
|
||||
.admin-dropdown:hover .admin-dropdown-menu,
|
||||
.admin-dropdown.open .admin-dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@ -538,7 +539,20 @@
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.admin-bar {
|
||||
display: none;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.admin-bar-inner {
|
||||
min-width: max-content;
|
||||
}
|
||||
.admin-bar-label {
|
||||
font-size: 10px;
|
||||
padding: 8px 8px 8px 0;
|
||||
}
|
||||
.admin-dropdown-trigger {
|
||||
font-size: 12px;
|
||||
padding: 8px 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2418,6 +2432,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Admin bar mobile touch support
|
||||
document.querySelectorAll('.admin-dropdown-trigger').forEach(function(trigger) {
|
||||
trigger.addEventListener('click', function(e) {
|
||||
if (window.innerWidth <= 768) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var dropdown = this.closest('.admin-dropdown');
|
||||
var wasOpen = dropdown.classList.contains('open');
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
if (!wasOpen) dropdown.classList.add('open');
|
||||
}
|
||||
});
|
||||
});
|
||||
document.addEventListener('click', function(e) {
|
||||
if (!e.target.closest('.admin-dropdown')) {
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
}
|
||||
});
|
||||
|
||||
{% block extra_js %}{% endblock %}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user