From ada372543ce681d34fe4158b504f6018e8e5b9f7 Mon Sep 17 00:00:00 2001 From: Ludo Date: Tue, 2 May 2023 16:30:54 -0400 Subject: [PATCH] Fix password page variables (#2607) --- layout/password.liquid | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/layout/password.liquid b/layout/password.liquid index 9f0944c1301..59d1882c12d 100644 --- a/layout/password.liquid +++ b/layout/password.liquid @@ -37,10 +37,35 @@ {{ body_font_bold_italic | font_face: font_display: 'swap' }} {{ settings.type_header_font | font_face: font_display: 'swap' }} - /* __custom */ - @font-face { - font-family: "Harabara Mais Bold"; - src: url("{{ 'harabara-mais-bold.woff2' | file_url }}") format("woff2"); + {% for scheme in settings.color_schemes -%} + {% assign scheme_classes = scheme_classes | append: ', .color-' | append: scheme.id %} + {% if forloop.index == 1 -%} + :root, + {%- endif %} + .color-{{ scheme.id }} { + --color-background: {{ scheme.settings.background.red }},{{ scheme.settings.background.green }},{{ scheme.settings.background.blue }}; + {% if scheme.settings.background_gradient != empty %} + --gradient-background: {{ scheme.settings.background_gradient }}; + {% else %} + --gradient-background: {{ scheme.settings.background }}; + {% endif %} + --color-foreground: {{ scheme.settings.text.red }},{{ scheme.settings.text.green }},{{ scheme.settings.text.blue }}; + --color-shadow: {{ scheme.settings.shadow.red }},{{ scheme.settings.shadow.green }},{{ scheme.settings.shadow.blue }}; + --color-button: {{ scheme.settings.button.red }},{{ scheme.settings.button.green }},{{ scheme.settings.button.blue }}; + --color-button-text: {{ scheme.settings.button_label.red }},{{ scheme.settings.button_label.green }},{{ scheme.settings.button_label.blue }}; + --color-secondary-button: {{ scheme.settings.background.red }},{{ scheme.settings.background.green }},{{ scheme.settings.background.blue }}; + --color-secondary-button-text: {{ scheme.settings.secondary_button_label.red }},{{ scheme.settings.secondary_button_label.green }},{{ scheme.settings.secondary_button_label.blue }}; + --color-link: {{ scheme.settings.secondary_button_label.red }},{{ scheme.settings.secondary_button_label.green }},{{ scheme.settings.secondary_button_label.blue }}; + --color-badge-foreground: {{ scheme.settings.text.red }},{{ scheme.settings.text.green }},{{ scheme.settings.text.blue }}; + --color-badge-background: {{ scheme.settings.background.red }},{{ scheme.settings.background.green }},{{ scheme.settings.background.blue }}; + --color-badge-border: {{ scheme.settings.text.red }},{{ scheme.settings.text.green }},{{ scheme.settings.text.blue }}; + --payment-terms-background-color: rgb({{ scheme.settings.background.rgb }}); + } + {% endfor %} + + {{ scheme_classes | prepend: 'body' }} { + color: rgba(var(--color-foreground), 0.75); + background-color: rgb(var(--color-background)); } /* __/custom */