diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-10-09 00:30:48 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-10-10 19:45:31 +0200 |
commit | 588e24f9ca68de074c4d085ec99fd8c96ad0a3ed (patch) | |
tree | fb3186f3f442780124b53bb0d729e6f87d005a50 /themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js | |
parent | 28b9663660fcb6b5414105171bf4d6a954070b76 (diff) |
luci-theme-bootstrap: various tweaks and cleanups
- introduce new variable --text-color-highest which results in #000/#fff
for bright and dark modes respectively
- drop unused navigation style rules and selectors
- use sticky positioning for header bar and drop top margin hacks
- use flex box layout for header bar contents
- use uniform line-height for button elements instead of pixel paddings
- fix too bright .cbi-value bottom border in mobile dark mode
- avoid rendering duplicate .cbi-value bottom borders for nested sections
- simplify header markup, get rid of unused container elements
- use non-wrapping flex box layout for page actions, prioritize primary
action button in automatic width calculation
- fix border radius of ifacebox headers
- use brightest color for log output textareas
- fix dark mode colors for mode menu
- use flex layout for footer
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js')
-rw-r--r-- | themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js b/themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js index 5400276b08..32922f3842 100644 --- a/themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js +++ b/themes/luci-theme-bootstrap/htdocs/luci-static/resources/menu-bootstrap.js @@ -22,14 +22,6 @@ return baseclass.extend({ if (node) this.renderTabMenu(node, url); } - - document.addEventListener('poll-start', this.handleBodyMargin); - document.addEventListener('poll-stop', this.handleBodyMargin); - document.addEventListener('uci-new-changes', this.handleBodyMargin); - document.addEventListener('uci-clear-changes', this.handleBodyMargin); - window.addEventListener('resize', this.handleBodyMargin); - - this.handleBodyMargin(); }, renderTabMenu: function(tree, url, level) { @@ -96,9 +88,7 @@ return baseclass.extend({ var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0); ul.appendChild(E('li', { 'class': isActive ? 'active' : null }, [ - E('a', { 'href': L.url(children[i].name) }, [ _(children[i].title) ]), - ' ', - E('span', { 'class': 'divider' }, [ '|' ]) + E('a', { 'href': L.url(children[i].name) }, [ _(children[i].title) ]) ])); if (isActive) @@ -107,12 +97,5 @@ return baseclass.extend({ if (ul.children.length > 1) ul.style.display = ''; - }, - - handleBodyMargin: function(ev) { - var body = document.querySelector('body'), - head = document.querySelector('header'); - - body.style.marginTop = head.offsetHeight + 'px'; } }); |