Skip to content

Commit faf7822

Browse files
zbiancaholzenspbioball
authored
Fix Hamburger button (#11)
* Fix Hamburger button (#9) * Update src/supplemental-ui/css/site-extra.css Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com> --------- Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com> Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
1 parent 065de4f commit faf7822

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/supplemental-ui/css/site-extra.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@ header .navbar.navbar-top {
2020
background-color: transparent;
2121
}
2222

23+
.navbar-burger {
24+
height: 3rem;
25+
border-radius: 50%;
26+
right: 12px;
27+
top: 3px;
28+
}
29+
30+
.navbar-burger:hover {
31+
background-color: rgba(255, 255, 255, 0.08);
32+
}
33+
34+
.navbar-burger:focus-visible {
35+
outline: 2px solid white;
36+
outline-offset: -8px;
37+
}
38+
2339
/* Make the background color slightly less intense */
2440
.navbar-end .navbar-item.has-dropdown:hover .navbar-link, .navbar-end .navbar-link:hover, .navbar-end>a.navbar-item:hover {
2541
background: rgba(0, 0, 0, 0.5);

src/supplemental-ui/js/landing-page-support.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141

4242
function toggleNavbarMenu (e) {
4343
e.stopPropagation() // trap event
44-
document.documentElement.classList.toggle('is-clipped--navbar')
45-
navbarBurger.setAttribute('aria-expanded', this.classList.toggle('is-active'))
46-
var menu = document.getElementById(this.getAttribute('aria-controls') || this.dataset.target)
44+
document.classList.toggle('is-clipped--navbar')
45+
navbarBurger.setAttribute('aria-expanded', document.classList.contains('is-clipped--navbar'))
46+
var menu = document.getElementById("topbar-nav")
4747
if (menu.classList.toggle('is-active')) {
4848
menu.style.maxHeight = ''
4949
var expectedMaxHeight = window.innerHeight - Math.round(menu.getBoundingClientRect().top)

0 commit comments

Comments
 (0)