diff --git a/CHANGELOG.md b/CHANGELOG.md index c914be6..12d2e50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `config.extra.show_share_button` confog variable for enabling share button in articles (#73). - Add `external` class to comment timestamp. - Add `h1` with page/section title by default. +- Add ability to set accent color per page/section. +- Add ability to set default theme per page/section. - Add active state to footer's "Powered by" links. - Add active state to footnotes' go back button. - Add active state to slider thumb. diff --git a/templates/base.html b/templates/base.html index cd4ebd7..4a605da 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,7 +8,7 @@ {%- set rtl_languages = ["ar", "arc", "az", "dv", "ff", "he", "ku", "nqo", "fa", "rhg", "syc", "ur"] -%} - + {% include "partials/head.html" %}
{% block body %} diff --git a/templates/partials/default_theme.html b/templates/partials/default_theme.html new file mode 100644 index 0000000..2362727 --- /dev/null +++ b/templates/partials/default_theme.html @@ -0,0 +1,7 @@ +{%- if page.extra.default_theme -%} + data-theme="{{ page.extra.default_theme }}" +{%- elif section.extra.default_theme -%} + data-theme="{{ section.extra.default_theme }}" +{%- elif config.extra.default_theme -%} + data-theme="{{ config.extra.default_theme }}" +{%- endif -%} diff --git a/templates/partials/head.html b/templates/partials/head.html index 2fbcfb9..c67cbc1 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -38,44 +38,7 @@ {%- endif %} - + {%- include "partials/variables.html" %} {%- set styles = [ "style.css" ] %} diff --git a/templates/partials/variables.html b/templates/partials/variables.html new file mode 100644 index 0000000..7380d2e --- /dev/null +++ b/templates/partials/variables.html @@ -0,0 +1,73 @@ +