harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
36 stars 30 forks source link

Reading mode: reflow on small devices; move nav to right #1932

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

The people have spoken so the nav moves to the right. This also changes the behavior of the "hide toc" button to match.

Following stuff I learned from "Every Layout" this relies on flex to bounce the nav to the bottom if there isn't enough room in the viewport for both columns.

I am still using media breakpoints for internal sizing changes to the content window in small viewports. (This would be an ideal place to use container queries but they may be just a bit too new to rely on for production software.)

Other changes:

Desktop

image

Mobile

Top and bottom of viewport

image image

codecov-commenter commented 1 year ago

Codecov Report

Merging #1932 (122d35f) into develop (01d8af5) will decrease coverage by 0.02%. The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1932      +/-   ##
===========================================
- Coverage    76.96%   76.95%   -0.02%     
===========================================
  Files           60       60              
  Lines         6816     6816              
===========================================
- Hits          5246     5245       -1     
- Misses        1570     1571       +1     

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

lizadaly commented 1 year ago

Made a tiny additional change to fix some padding.