The container div for the content now has id main to simplify the JavaScript.
The search page now appends GET parameter q to each result link to allow for highlighting.
The search form no longer submits upon hitting enter to prevent the user from accidentally losing their query and results.
A small JavaScript script gets the parameter q, processes the result, and adds the tag <mark> around any matches.
color property on mark was set to inherit to match the rest of Ed's theme (defaults to black).
As of right now the script will not highlight a term that is split by a footnote (e.g. searching "bugle trills" will return "O Captain! My Captain!" but will not be highlighted), but will work within footnotes.
main
to simplify the JavaScript.q
to each result link to allow for highlighting.q
, processes the result, and adds the tag<mark>
around any matches.color
property onmark
was set toinherit
to match the rest of Ed's theme (defaults to black).As of right now the script will not highlight a term that is split by a footnote (e.g. searching "bugle trills" will return "O Captain! My Captain!" but will not be highlighted), but will work within footnotes.