I’m creating a music site where I use the Zen theme.
I managed to include jplayer in the sidebar, however when changing the page, the whole page reloads with the sidebar including jplayer, which stops the music.
So I’m looking for a way to reload only the index.html list.html and single.html pages without reloading the header sidebar and footer .
Can we put Ajax code in Hugo, to solve this problem?? Another solution may be to use the github turbo-main but with my low level of webmaster I find it difficult to use this last tool.
Thank you in advance for any advanced leads!!
jerome
##Original Text
Bonjour !!
Je suis sur la création d’un site musical où j’utilise le theme zen.
J ai réussi à inclure jplayer dans le sidebar, cependant au changement de page, toute la page se recharge avec le sidebar incluant jplayer, ce qui arrete la musique.
Je cherche donc un moyen de recharger seulement les pages index.html list.html et single.html sans recharger le header sidebar et footer .
Peut on mettre du code Ajax dans Hugo, pour regler ce problème ?? Une autre solution serai peut être d’utiliser le github turbo-main mais avec mon faible niveau de webmaster j’ai du mal à utilisé ce dernier outils.
Je vous remercie d’avance pour toute pistes avancées !!
If the site is small I would test building it as a single page site. Then when you “navigate” you are only moving up and down a single page, no page reloads.
Another simple option is to open the audio player in a new tab. Then it can play while you navigate the site it its tab.
P.S. If you are not a web developer I think the Zen theme might not be right for you. I developed it as a base theme, it looks very plain and boring as is.
I just made the site available on gitbub . This will allow me to better define my needs. For the realization I learned the notions of html and css in order to personalize the zen theme.
For your single page solution: can we easily implement it with the Zen theme??
Do you have any resource documents that I can use to do this??
Maybe I have to use another theme that allows the inclusion of jplayer??
I would wrap my website in an iframe upon load. I would load the player as a sibbling (same level in hierarchy, both children of the parent frame). If you click on a website link you only reload the website iframe. Finding the child iframe in the search engine is no issue, as you immediately wrap it in a parent with the player as its sibbling.
I think it should use somthing similar to this code: