Skip to content

Commit

Permalink
Merge pull request #119 from Voog/118_fix_popover_and_breadcrumbs
Browse files Browse the repository at this point in the history
Fix popover and breadcrumb menu (#119)
  • Loading branch information
tanelj authored Feb 17, 2022
2 parents ad660fd + 367341f commit d23f001
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 7 deletions.
16 changes: 15 additions & 1 deletion components/buy-button.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{%- if product.price_min_with_tax != product.price_max_with_tax -%}
{%- assign with_price = true -%}
{%- else -%}
{%- assign with_price = false -%}
{%- endif -%}

{%- capture _button_attributes %}
data-product-id="{{ product.id }}"
data-product="{{ product | json | escape }}"
data-settings="{"title":"{{ "add_to_cart" | lc | escape_once }}"}"
data-settings="{"title":"{{ "add_to_cart" | lc | escape_once }}"
{%- if with_price -%}
,"button_style":"with_price"
{%- endif -%}
}"
{% endcapture -%}

{% if editmode != true and product.available? == false %}
Expand Down Expand Up @@ -34,6 +44,10 @@
{% else %}
<span class="edy-buy-button-title">{{ 'add_to_cart' | lc | escape_once }}</span>
{% endif -%}

{%- if with_price and product.price_min_with_tax == product.price_max_with_tax -%}
<span class="edy-buy-button-price">{{ product.price_with_tax | money_with_currency: product.currency }}</span>
{%- endif -%}
</div>
</div>
</div>
Expand Down
11 changes: 7 additions & 4 deletions components/menu-breadcrumbs-sd.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{%- assign breadcrumbsString = breadcrumbsScript | replace: '<script type="application/ld+json">', '' | replace: "</script>", '' | replace: site.url, '' | replace: '@', '' -%}
{%- assign breadcrumbsObj = breadcrumbsString | json_parse -%}
{%- if breadcrumbsObj.itemListElement.size > 2 -%}
{%- assign breadcrumbsOffset = 1 -%}
{%- else -%}
{%- assign breadcrumbsOffset = 0 -%}
{%- endif -%}

<ul class="menu menu-horizontal menu-public menu-breadcrumbs" data-search-indexing-allowed="false">
{%- for listItem in breadcrumbsObj.itemListElement %}
{%- assign pageUrl = page.url | remove_first: "/" -%}

<li class="menu-item">
{%- for listItem in breadcrumbsObj.itemListElement offset: breadcrumbsOffset %}
<li class="menu-item{% if forloop.last %} current-page{% endif %}">
<a href="/{{ listItem.item.id }}">
{{ listItem.item.name }}
</a>
Expand Down
8 changes: 8 additions & 0 deletions components/template-cs-content.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@
"featured": "true"
*/
--content-links-hover-color: rgba(0, 102, 187, 0.8);
/* VoogStyle
"pathI18n": ["product", "title"],
"titleI18n": "alignment",
"editor": "listPicker",
"list": {{ base_alignment_set }},
"scope": "global"
*/
--content-area-product-title__alignment: left;
/* VoogStyle
"pathI18n": ["product", "title"],
"titleI18n": "size",
Expand Down
5 changes: 5 additions & 0 deletions components/template-cs-style-rules.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -452,4 +452,9 @@ h3,
font-style: var(--content-area-product-title__font-style);
-webkit-text-decoration: var(--content-area-product-title__text-decoration);
text-decoration: var(--content-area-product-title__text-decoration);
text-align: var(--content-area-product-title__alignment);
}

.menu-item.current-page a {
color: var(--color-main);
}
11 changes: 10 additions & 1 deletion sources/components/custom-styles/template-cs-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,16 @@
*/
#{--content-links-hover-color}: rgba($link-color, .8);

/* VoogStyle
/* VoogStyle
"pathI18n": ["product", "title"],
"titleI18n": "alignment",
"editor": "listPicker",
"list": {{ base_alignment_set }},
"scope": "global"
*/
#{--content-area-product-title__alignment}: left;

/* VoogStyle
"pathI18n": ["product", "title"],
"titleI18n": "size",
"editor": "rangePicker",
Expand Down
9 changes: 9 additions & 0 deletions sources/components/custom-styles/template-cs-style-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -491,5 +491,14 @@ h3,
font-weight: var(--content-area-product-title__font-weight);
font-style: var(--content-area-product-title__font-style);
text-decoration: var(--content-area-product-title__text-decoration);
text-align: var(--content-area-product-title__alignment);
}
}

.menu-item {
&.current-page {
a {
color: var(--color-main);
}
}
}
1 change: 1 addition & 0 deletions sources/stylesheets/modules/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ $popover-shadow: 0px 2px 10px rgba($black, .2);
$image-settings-shadow: 0px 0px 5px rgba($black, .05), 0px 25px 35px rgba($black, .03);

$zindex-settings-popover: 56501;
$zindex-ca-interaction-button: 10600;

// Variables for blog settings CSS
$zindex-settings-btn: 104;
Expand Down
1 change: 1 addition & 0 deletions sources/stylesheets/utils/_utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
.t-sticky {
position: sticky;
top: 32px;
z-index: $zindex-ca-interaction-button + 1;
}
}
1 change: 1 addition & 0 deletions stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3531,6 +3531,7 @@ body .edy-settings-editor:not(.editor_default) .edy-popover-content .edy-setting
position: -webkit-sticky;
position: sticky;
top: 32px;
z-index: 10601;
}
}

Expand Down
2 changes: 1 addition & 1 deletion stylesheets/main.min.css

Large diffs are not rendered by default.

0 comments on commit d23f001

Please sign in to comment.