SonicHackingContest Navbar Scroll

Avoids navbar dropdown menus from being cut-off and inaccessible by adding scrolling.

Fra 25.12.2020. Se den seneste versjonen.

Forfatter
Obsidian
Vurderinger
0 0 0
Versjon
2020.12.24
Lagd
17.11.2020
Oppdatert
25.12.2020
Size
11 kB
Lisens
I/T
Gjelder

Avoids items in navbar dropdown menus (at SonicHackingContest) from being cut-off and inaccessible in desktop and mobile views by adding scrolling when needed.

SHC-navbar-scroll (animated)

SonicHackingContest Navbar Scroll

Noticed anything about the navbar menus at the SHC site? As a result of the amount of content this year, some menus might extend past the bottom of the screen. That's no problem, just scroll down, right? But wait, the menu remains in place, the obscured items still inaccessible. This is also true for the mobile site view, where the problem is even more pronounced.

This simple script is a temporary solution to help alleviate this navbar problem until they fix it for next year.

  • Adds scrolling and thin vertical scrollbars to the navbar menus
  • For both desktop and mobile views
  • Thin scrollbar should conform to the other color themes
  • Modifies width of mobile-view menus (can be less than full viewport width)

  • Adds site theme button in footer (sessionStorage used for temporary persistence of theme)
  • Limits size of video IFRAME, news images and entry banner images to fit within screen width
  • Shrinks size of news post avatars on narrow screens for better title readability

SHC-themes  SHC-news-avatar-Mobile