Files
blog/templates/partials/variables.html
daudix 4b1fac1f17 Backport some changes and fixes
Return the separator customization that got lost in some commit
Don't blur the nav when it's not visible
Don't scale down the article card when clicking on a tag
2024-11-14 19:40:54 +03:00

74 lines
1.9 KiB
HTML

<style type="text/css">
:root {
{%- if page.extra.accent_color -%}
--accent-color: {{ page.extra.accent_color | safe }};
{%- elif section.extra.accent_color -%}
--accent-color: {{ section.extra.accent_color | safe }};
{%- else -%}
--accent-color: {{ config.extra.accent_color | default(value="#6f8396") | safe }};
{%- endif -%}
{%- if page.extra.fix_contrast -%}
--contrast-color: rgb(0 0 0 / 0.8);
{%- elif section.extra.fix_contrast -%}
--contrast-color: rgb(0 0 0 / 0.8);
{%- elif config.extra.fix_contrast -%}
--contrast-color: rgb(0 0 0 / 0.8);
{%- else -%}
--contrast-color: #fff;
{%- endif -%}
}
{%- if page.extra.accent_color_dark -%}
[data-theme="dark"] {
--accent-color: {{ page.extra.accent_color_dark | safe }};
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--accent-color: {{ page.extra.accent_color_dark | safe }};
}
}
{%- elif section.extra.accent_color_dark -%}
[data-theme="dark"] {
--accent-color: {{ section.extra.accent_color_dark | safe }};
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--accent-color: {{ section.extra.accent_color_dark | safe }};
}
}
{%- elif config.extra.accent_color_dark -%}
[data-theme="dark"] {
--accent-color: {{ config.extra.accent_color_dark | safe }};
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--accent-color: {{ config.extra.accent_color_dark | safe }};
}
}
{%- endif -%}
{%- if page.extra.fix_contrast_dark or section.extra.fix_contrast_dark or config.extra.fix_contrast_dark -%}
[data-theme="dark"] {
--contrast-color: rgb(0 0 0 / 0.8);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--contrast-color: rgb(0 0 0 / 0.8);
}
}
{%- endif -%}
{%- if config.extra.debug.layout -%}
*,
*::before,
*::after {
outline: solid 1px var(--accent-color);
}
{%- endif -%}
</style>