DDMAL / CantusDB

A new site for Cantus Database running under Django.
https://cantusdatabase.org
MIT License
5 stars 6 forks source link

Send portions of sidebar to top on narrow screens; fix global search bar on dynamic pages #1537

Closed dchiller closed 3 months ago

dchiller commented 3 months ago

Closes #1419. Closes #849. Closes #909. This PR introduces some new styling for pages where we have a two-column layout with a wider left column that contains the main content of the page and then a smaller right "sidebar" with one or many cards. The current homepage, articles page, and chant detail page are good examples of this:

image image image

This PR allows some upper portions of the sidebar to jump above the main content on a narrow window and the remainder to jump below the main content. The PR introduces this styling in a new template, base_page_with_side_cards.html, that other templates with this format can extend. This PR completes that refactoring for flat pages, pages in the articles app, and pages in main_app. Screenshots of the same three pages above with these styling changes are included here (in narrow format):

image image image

Closes #1532. I found a bug whereby search results from the global search bar on dynamic pages (ie. pages that weren't flatpages) did not show beneath the search box. This PR changes some of the styling of used when populating those asynchronous search results.

Before image

After image