acdh-oeaw / dse-static-cookiecutter

Cookiecutter template for a Static-Site Digital Scholarly Edition
7 stars 4 forks source link

Fix listbibl.xsl not respecting dark mode and not allowing navigation back in created html #59

Closed dominikfill closed 7 months ago

dominikfill commented 7 months ago

When creating a project with cookiecutter, and using the navbar to navigate to Register > Werke , Darkmode setting is not respected and navigating back using Register is not possible. This is caused by listbibl.xsl calling the html_footer template twice.

https://github.com/acdh-oeaw/dse-static-cookiecutter/blob/76853bd1bf82ba731dd5807123221ca1f9c5c01b/%7B%7Bcookiecutter.directory_name%7D%7D/xslt/listbibl.xsl#L82-L88

These two identical lines get translated into two identical blocks of code in listbibl.html. The consecutive execution of new Darkmode().showWidget() acts as a toggle - darkmode gets toggled on and then off again.

BEFORE AFTER