carpentries / varnish

Template for pkgdown site
https://carpentries.github.io/varnish/
Other
7 stars 25 forks source link

Direct to all in one page for search #131

Closed ErinBecker closed 5 months ago

ErinBecker commented 5 months ago

The goal of this PR (in combination with SANDPAPER PR LINK) is to:

The screenshot below shows the replacement of the search box icon with a button pointing towards the lesson's all in one page:

Screenshot 2024-03-22 at 3 13 34 PM

Note to self and @froggleston - if we end up merging this, please squash and merge, there's a lot of commits where I was experimenting.

Fixes https://github.com/carpentries/workbench/issues/8

ErinBecker commented 5 months ago

With https://github.com/ErinBecker/sandpaper/tree/translate-aio, allows for translation of the new "Search the All In One page" button, however, have discovered a problem - need to not render this button on workshop overview pages, as they don't have an All In One page.

Note to self, look at the code linked below to figure out how to make addition of page elements dependent on whether a lesson is an overview page:

ErinBecker commented 5 months ago

This now adds the search all in one button to the top of any lesson that is not a workshop overview (Thanks @froggleston!), and the search button is translatable through the .po files.

froggleston commented 5 months ago

LGTM! Awesome work! 🚀