django-simple-bulma icon indicating copy to clipboard operation
django-simple-bulma copied to clipboard

Using multiple themes

Open GDWR opened this issue 2 years ago • 0 comments

Currently, I attempting to use this project's multiple themes functionality to create a dark and light mode.

While trying to do this am I facing issues with sending duplicate .js files, as the tag has been used twice. With this .js being served twice, it is creating two event handlers for the navbar burger menu on the page and is causing it to stop working.

Django template:

{% bulma %}
{% bulma 'dark' %}

Firefox network tab when loading the page: image

I am unsure how Django extensions work, but having a way to ensure that only one .js file is served would allow me to implement the functionality I want.


This functionality for switching themes could be implemented into this package also, as it would be a nice to have for other users of django-simple-bulma

GDWR avatar Feb 11 '22 19:02 GDWR