rramiachraf / dumb

Private alternative front-end for Genius.
MIT License
201 stars 18 forks source link

Add HTMX at search #45

Open newtoallofthis123 opened 1 year ago

newtoallofthis123 commented 1 year ago

Regarding #44

This commit adds htmx to the main search bar at the home page, just for a test.... this is how it looks:

https://github.com/rramiachraf/dumb/assets/78465651/3cf2bf81-29fc-4c24-b1d6-fae21fd948bc

However, here are some things I had to do to get this and some optimizations:

  1. I added a main search route and two subsidiaries to it called /search, for normal search and /form_search that only works with post requests
  2. Had to add a search_partial.tmpl that only had the styled div of the search results
  3. {MAIN} I had to remove the default-src 'self'; script-src 'self'; from the CSP... I am not sure where the CSP is being used, so I am sorry if it was neccessay, please let me know

Other than that, hopefully, this is a nice demo :)