fix: improve active link highlighting for edge cases
fix: improve active link highlighting for edge cases

Attempt improvement by moving the scroll to anchor logic to the end of window load and adding 1 to elementOffset in case of navbar border.

Appears to solve any issues that could arise (such as when clicking Courses and then Publications, but Projects being highlighted instead) in local testing.

See https://github.com/gcushen/hugo-academic/issues/1199#issuecomment-577293818
See #1199

gcushen/hugo-academic,gcushen/hugo-academic,gcushen/hugo-academic,gcushen/hugo-academic