Add site theme check before downloading css

This commit is contained in:
TheThomaas 2023-06-18 22:04:42 +02:00
parent e7adf3c0bb
commit 34602a1ba7

View file

@ -61,7 +61,9 @@
{% endif %}
<style>
{% fetch "https://cdn.jsdelivr.net/npm/theme-toggles@4.10.1/css/around.min.css", "css" %}
{% if site.theme == "auto" %}
{% fetch "https://cdn.jsdelivr.net/npm/theme-toggles@4.10.1/css/around.min.css", "css" %}
{% endif %}
{% include "css/critical.css" %}
</style>
{# Add facility for pages to delare an array of critical styles #}