okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
250 stars 134 forks source link

Fix nav fragment to allow multiple navs per page #782

Closed mpourismaiel closed 4 years ago

mpourismaiel commented 4 years ago

What this PR does / why we need it: Fixed the search script in the nav fragment, allowing multiple nav fragments to use search in the same page.

Which issue this PR fixes: fixes #388

Special notes for your reviewer: The sticky option can be used but we may need to rethink how it might function differently for multiple nav fragments. Right now if you have two sticky navs, they are followed by each other on top of the page. If we need a different behavior, I suggest doing so in a separate issue.

Release note:

- nav: Fix the bug that prevented search from working if there were multiple nav fragments in one page
stp-ip commented 4 years ago

We should have a dev page testing this as well as a test that it works. Overall code looks good.

mpourismaiel commented 4 years ago

Created dev page and test accordingly.