Skip to content

Commit b79ff52

Browse files
authored
fix: wp-894 portal nav dropdown menu alignment (#918)
* fix: WP-894 portal nav dropdown menu alignment PR TACC/Core-Portal#1073/1066 fixes portal nav dropdown menu alignment. But that breask alignment for CMS, because CMS uses old Bootstrap. * refactor: make fix independent of similar fix * fix: missing punctuation
1 parent b7766b9 commit b79ff52

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

taccsite_cms/templates/nav_portal.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,14 @@
3131
)
3232
}
3333
});
34+
35+
/* Make (Portal) Bootstrap 5 menu compatible with (CMS) Bootstrap 4 */
36+
[ ...container.querySelectorAll('.dropdown-menu-end') ].forEach(menu => {
37+
menu.classList.remove('dropdown-menu-end');
38+
menu.classList.add('dropdown-menu-right');
39+
console.log(
40+
'Replaced `dropdown-menu-end` with `dropdown-menu-right` in `#s-portal-nav`.',
41+
'To not need this, update CMS Bootstrap from 4 to 5.'
42+
)
43+
});
3444
</script>

0 commit comments

Comments
 (0)