feat: allow setting the default theme

Used as fallback when JS is disabled and `theme_switcher` is enabled.

If `default_theme` is unset, it defaults to "light".

Used as single theme when `theme_switcher` is disabled.
This commit is contained in:
welpo
2023-08-08 00:47:24 +02:00
parent ab879e3727
commit c78c7f5bd1
3 changed files with 22 additions and 5 deletions

View File

@@ -9,7 +9,10 @@
{% import "macros/add_comments.html" as macros_add_comments %}
<!DOCTYPE html>
<html lang="{{ lang }}">
<html lang="{{ lang }}" {% if config.extra.default_theme -%}
data-theme="{{config.extra.default_theme}}"
{%- endif -%}>
{% include "partials/header.html" %}
<body>