phseiff / phseiff.github.io

The source code repo for my personal website
https://phseiff.com
Other
10 stars 2 forks source link

Allow linking to every possible place on my website #38

Open phseiff opened 3 years ago

phseiff commented 3 years ago

I want to add some additional JS that does the following:

The URL phseiff.com/#hashtag_without_columns is handled like it is already handled until now. The URL phseiff.com/#hashtag_without_columns:URL_encoded_search_term, however, is handled by (a) opening the required essay, and then (b) searching for the first occurrence of the wanted term (URL_encoded_search_term), smoothly scrolling to it, and highlighting it.

When the visitor has highlighted any text, a bar (stickied to the lower end of the screen, potentially overwriting the cookie bar) appears, that allows them to copy a link to their selection (if that selection is unique in the given essay), and tells that they can copy a link to their selection if they select a little more.

I don't know how to go about implementing this yet, and it is definitely more of a flex or long-term enhancement, but I think it should be possible.