dynamic navbar colors

main
alexanderroese 2024-06-21 08:02:51 +02:00
parent c7f9495829
commit 732d38a276
1 changed files with 7 additions and 6 deletions

View File

@ -53,7 +53,7 @@
%}
<script>
console.log("schemes13", "{{ settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] }}")
console.log("schemes14", "{{ settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] }}")
</script>
@ -71,14 +71,15 @@
{%- endif %}
.color-{{ scheme.id }} {
--color-background: {{ scheme.settings.background.red }},{{ scheme.settings.background.green }},{{ scheme.settings.background.blue }};
{% if scheme.id == "scheme-main-navbar" and (page.url == "/pages/texte" or product.tags contains "shx-texte") %}
{% assign scheme.settings.background = settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] %}
{% endif %}
{% if scheme.settings.background_gradient != empty %}
--gradient-background: {{ scheme.settings.background_gradient }};
{% else %}
{% if scheme.id == "scheme-main-navbar" and (page.url == "/pages/texte" or product.tags contains "shx-texte") %}
--gradient-background: {{ settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] }};
{% else %}
--gradient-background: {{ scheme.settings.background }};
{% endif %}
--gradient-background: {{ scheme.settings.background }};
{% endif %}
{% liquid