Enhance OTS Signage Theme with Icon Dashboard and UI Improvements
- Updated theme.js to refine dropdown initialization, excluding user menu handling. - Modified authed.twig to allow CSS variable theming for background and text colors, and adjusted content wrapper classes based on navigation state. - Adjusted override-styles.twig to improve layout responsiveness and ensure proper styling for horizontal navigation mode. - Enhanced theme-scripts.twig to improve user menu functionality, including repositioning and click handling. - Introduced a new dashboard-icon-page.twig for a stylized icon dashboard, featuring card-based buttons for quick access to various functionalities, along with custom styles for better user experience.
This commit is contained in:
@@ -349,10 +349,17 @@
|
||||
* Initialize dropdown menus
|
||||
*/
|
||||
function initDropdowns() {
|
||||
// Only handle OTS-specific dropdowns (user menu, notifications).
|
||||
// Only handle OTS-specific dropdowns (notifications, etc.).
|
||||
// The user menu (#navbarUserMenu) is handled by theme-scripts.twig's
|
||||
// initDropdowns() which uses floatMenu() for proper positioning.
|
||||
// Let Bootstrap handle topbar nav dropdowns (Schedule, Design, etc.) natively
|
||||
// so that links like Dayparting can navigate normally.
|
||||
const otsDropdowns = document.querySelectorAll('.ots-topbar-action .dropdown, .ots-page-actions .dropdown');
|
||||
const otsDropdowns = Array.from(
|
||||
document.querySelectorAll('.ots-topbar-action .dropdown, .ots-page-actions .dropdown')
|
||||
).filter(function(el) {
|
||||
// Exclude the user menu — it has its own dedicated handler in theme-scripts.twig
|
||||
return !el.querySelector('#navbarUserMenu');
|
||||
});
|
||||
|
||||
otsDropdowns.forEach(dropdown => {
|
||||
const toggle = dropdown.querySelector('.dropdown-toggle, [data-toggle="dropdown"]');
|
||||
|
||||
Reference in New Issue
Block a user