Skip to content

WIP: Experimenting with embedding in an iframe on the Jekyll site.

Peter Serwylo requested to merge pserwylo/fdroid-website-search:restyle into master

In the image below, note the following:

  • The page http://localhost:4000/search is the Jekyll website from fdroid-website.
  • The search box, search button, and results in the main part of the screen are all in an <iframe>.
  • The iframe points to http://localhost:8000 which is running the django fdroid-website-search project.
  • Entering/changing search terms and pressing search (or hitting Enter) will only update the iframe, the outer page stays the same.
  • Clicking a search result will redirect the outer page to the relevant package page (e.g. http://localhost:4000/packages/org.torproject.android). This is done by setting target="_top" in the package result lists <a> element.

search

Limitations:

  • Can't bookmark search results, because the outer page is always stays at the same URL. This could be fixed with JS I think, by letting the inner iframe update the parent URL to something like /search#q=internet which wont refresh the page, but will make the URL change. Then when rendering the iframe, if JS is enabled we could change the src of the <iframe> to be src="search.f-droid.org/q=internet".

The user experience feels pretty good now, except for the lack of being able to bookmark search results.

Edited by Peter Serwylo

Merge request reports