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

Add links to subsections in the nav in reader mode, fixes #1860 #1868

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

A bit of a rewrite in how the TOC is laid out:

image

I changed the markup in the TOC to be less fragile, then added indentation to the sub-section items. As before, the TOC doesn't descend further than 2 levels, though it could.

Each item in the toc is now hyperlinked, not just the top items. If you follow them, you go to the section via an anchor link.

As before, the underlining is not visible when printing:

image

Also modifies the display of Link items, which I think wasn't working well. Now it's less exuberant:

image
codecov-commenter commented 1 year ago

Codecov Report

Merging #1868 (990e39e) into develop (77c0378) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1868   +/-   ##
========================================
  Coverage    76.75%   76.75%           
========================================
  Files           52       52           
  Lines         6596     6596           
========================================
  Hits          5063     5063           
  Misses        1533     1533           
Impacted Files Coverage Δ
web/main/serializers.py 76.57% <ø> (ø)

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