This PR adds two new pages with routes /browse/posts and /browse/users which stem from one page template, browse.html.
The header now has a button for each of these browse pages, which have replaced the search bar that was there before. Now, the search bars appear within each page, and search only for posts and users, respectively.
I've re-organized how searching is handled in the server.py file, abstracting most of its functionality out into a helper function that is shared between the routes for these two pages and a route for the search results page. This change is also reflected in the new search.html template, which is effectively taking over the role of the results.html template. The results.html template is now only for getting the results of a search as a list, while the search.html template actually shows the "search results" page (with the header "Search results:", etc.), and includes the results.html template.
The DB manager now passes the post author's UID and username to the post search results so these can be linked in the results.
Finally, I made a few small CSS changes, mainly relating to the header.
This PR adds two new pages with routes
/browse/posts
and/browse/users
which stem from one page template,browse.html
.The header now has a button for each of these browse pages, which have replaced the search bar that was there before. Now, the search bars appear within each page, and search only for posts and users, respectively.
I've re-organized how searching is handled in the
server.py
file, abstracting most of its functionality out into a helper function that is shared between the routes for these two pages and a route for the search results page. This change is also reflected in the newsearch.html
template, which is effectively taking over the role of theresults.html
template. Theresults.html
template is now only for getting the results of a search as a list, while thesearch.html
template actually shows the "search results" page (with the header "Search results:", etc.), and includes theresults.html
template.The DB manager now passes the post author's UID and username to the post search results so these can be linked in the results.
Finally, I made a few small CSS changes, mainly relating to the header.