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
37 stars 30 forks source link

Disambiguate headnotes from other text in reading mode #1863

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

In reading mode, put a light shadow around case content to set it apart from the headnote:

image

This is meant to evoke the notion that this is a whole document embedded inside the casebook.

The treatment needs to be different in the paginated, printable view, because the border ends up appearing on every page and isn't padded correctly. In this view instead I just set it off with a light line:

image

This also fixes an unintentional regression in the PagedJS layout where styles meant to target the print CSS weren't made available to PagedJS.

Fixes #1862 and #1861

cath9 commented 1 year ago

one thing I like about the website design is that the document is the thing apart, ie it is against a white background while the reset of the site is the tan you mentioned. So it looks like an embedded legal document, which is what it is. If what you propose above is the easiest format for now, perhaps the document is outlined, rather than the headnote.

lizadaly commented 1 year ago

@cath9 I can do whatever! That’s a helpful framing for the intent. I have some alternate ideas to try.

lizadaly commented 1 year ago

This is ready for review. @cath9 approved the layout of the reading view.

codecov-commenter commented 1 year ago

Codecov Report

Merging #1863 (1a7a9dc) into develop (e164fe0) will increase coverage by 0.09%. The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1863      +/-   ##
===========================================
+ Coverage    76.67%   76.76%   +0.09%     
===========================================
  Files           52       52              
  Lines         6554     6597      +43     
===========================================
+ Hits          5025     5064      +39     
- Misses        1529     1533       +4     
Impacted Files Coverage Δ
web/main/models.py 74.95% <0.00%> (+0.20%) :arrow_up:
web/main/admin.py 71.87% <0.00%> (+0.78%) :arrow_up:

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