Skip to content

Commit fadbd6b

Browse files
committed
Fix issue with activate theme but no primary color is set
1 parent 7d74550 commit fadbd6b

1 file changed

Lines changed: 25 additions & 23 deletions

File tree

bakeup/templates/shop/includes/theme.html

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
--bs-dark-rgb: {{ settings.pages.BrandSettings.dark_color|hex_to_rgb }};
2222
{% endif %}
2323
}
24+
{% if settings.pages.BrandSettings.primary_color %}
2425
.accordion {
2526
--bs-accordion-active-color: {{ settings.pages.BrandSettings.primary_color }};
2627
--bs-accordion-active-bg: rgba(var(--bs-primary-rgb), 0.2);
@@ -49,12 +50,24 @@
4950
background-color: var(--bs-primary)!important;
5051
color: var(--bs-light)!important;
5152
}
52-
{% if settings.pages.BrandSettings.secondary_color %}
53-
.text-bg-secondary {
54-
background-color: var(--bs-secondary)!important;
55-
color: var(--bs-light)!important;
53+
.btn-white {
54+
--bs-btn-border-color: {{ settings.pages.BrandSettings.primary_color }};
55+
}
56+
.datepicker-cell.date-enabled {
57+
color: {{ settings.pages.BrandSettings.primary_color }}!important;
58+
font-weight: bold;
59+
}
60+
.datepicker-cell.selected {
61+
background-color: {{ settings.pages.BrandSettings.primary_color }}!important;
62+
color: #fff!important;
63+
}
64+
65+
.form-control:focus {
66+
box-shadow: 0 0 0 0.25rem rgba({{ settings.pages.BrandSettings.primary_color|hex_to_rgb }},.25);
67+
}
68+
.dropdown-menu {
69+
--bs-dropdown-link-active-bg: {{ settings.pages.BrandSettings.primary_color }};
5670
}
57-
{% endif %}
5871
.table-primary {
5972
--bs-table-color: #000;
6073
--bs-table-bg: rgba(var(--bs-primary-rgb), 0.2);
@@ -84,6 +97,12 @@
8497
.btn-close:focus {
8598
box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb),.25);
8699
}
100+
{% endif %}
101+
{% if settings.pages.BrandSettings.secondary_color %}
102+
.text-bg-secondary {
103+
background-color: var(--bs-secondary)!important;
104+
color: var(--bs-light)!important;
105+
}
87106
.btn-secondary {
88107
--bs-btn-bg: {{ settings.pages.BrandSettings.secondary_color }};
89108
--bs-btn-border-color: {{ settings.pages.BrandSettings.secondary_color }};
@@ -95,24 +114,7 @@
95114
--bs-btn-hover-color: var(--bs-white);
96115

97116
}
98-
.btn-white {
99-
--bs-btn-border-color: {{ settings.pages.BrandSettings.primary_color }};
100-
}
101-
.datepicker-cell.date-enabled {
102-
color: {{ settings.pages.BrandSettings.primary_color }}!important;
103-
font-weight: bold;
104-
}
105-
.datepicker-cell.selected {
106-
background-color: {{ settings.pages.BrandSettings.primary_color }}!important;
107-
color: #fff!important;
108-
}
109-
110-
.form-control:focus {
111-
box-shadow: 0 0 0 0.25rem rgba({{ settings.pages.BrandSettings.primary_color|hex_to_rgb }},.25);
112-
}
113-
.dropdown-menu {
114-
--bs-dropdown-link-active-bg: {{ settings.pages.BrandSettings.primary_color }};
115-
}
117+
{% endif %}
116118
{% if settings.pages.BrandSettings.custom_css %}
117119
{{ settings.pages.BrandSettings.custom_css|safe }}
118120
{% endif %}

0 commit comments

Comments
 (0)