MarkBind / markbind

MarkBind is a tool for generating content-heavy websites from source files in Markdown format
https://markbind.org/
MIT License
135 stars 124 forks source link

siteNav: Move the content to the navbar when the siteNav is hidden #591

Closed yamgent closed 3 years ago

yamgent commented 5 years ago

Tell us about your environment

What did you do? Please include the actual source code causing the issue.

  1. Create a website with a navbar and a siteNav.
  2. Serve the website on a very small screen (mobile screen size), so that the siteNav gets hidden as part of the responsive design.

What did you expect to happen?

The content of the siteNav should be relocated to the navbar, so that the reader can still access the content of the siteNav.

What actually happened? Please include the actual, raw output.

Readers of the website cannot use the siteNav at all.

This problem is inspired by https://github.com/MarkBind/markbind/pull/518#pullrequestreview-192981860.

Chng-Zhi-Xuan commented 5 years ago

Alternative solutions

damithc commented 5 years ago

I prefer the 2nd alternative. If we can't implement it by V2, we can go for alternative 1.


  • ➖ Blocks content underneath it

Not a big problem if the button is small and slightly transparent.

  • Render a floating action button to expand the site navigation once the screen is smaller than (max-width: 575.98px).

In fact, we can make this an option even when the screen is big enough to show siteNav. That is, the reader can collapse the siteNav if they want. When the screen is too small, it will collapse to a button automatically.

acjh commented 5 years ago

The floating action button is bad UX design: https://usabilla.com/blog/floating-action-button-bad-ux-design/

damithc commented 5 years ago

What we are aiming for is something like the following, which is slighly different from what the article is talking about: image Of course collapsing the button to the topNav is also an option but we cannot be sure that the page has a topNav.