dynamic navbar colors

main
alexanderroese 2024-06-20 23:48:49 +02:00
parent 987b5be048
commit 4f5a2cb007
1 changed files with 5 additions and 6 deletions

View File

@ -53,7 +53,7 @@
%} %}
<script> <script>
console.log("schemes3", "{{ settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] }}") console.log("schemes4", "{{ settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] }}")
</script> </script>
@ -74,16 +74,15 @@
{% if scheme.settings.background_gradient != empty %} {% if scheme.settings.background_gradient != empty %}
--gradient-background: {{ scheme.settings.background_gradient }}; --gradient-background: {{ scheme.settings.background_gradient }};
{% else %} {% else %}
{% if 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 }}; --gradient-background: {{ scheme.settings.background }};
{% endif %}
{% endif %} {% endif %}
{% liquid {% liquid
assign background_color = scheme.settings.background assign background_color = scheme.settings.background
if page.url == "/pages/texte" or product.tags contains "shx-texte"
assign background_color = settings.color_schemes.scheme-shx-texte-navbar.settings.background
endif
assign background_color_brightness = background_color | color_brightness assign background_color_brightness = background_color | color_brightness
if background_color_brightness <= 26 if background_color_brightness <= 26
assign background_color_contrast = background_color | color_lighten: 50 assign background_color_contrast = background_color | color_lighten: 50