-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from Voog/118_add_ecommerce_layouts
Add ecommerce layouts
- Loading branch information
Showing
69 changed files
with
4,941 additions
and
2,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{% if _imageData == blank %} | ||
{% assign item_image_state = "without-image" %} | ||
{% else %} | ||
{% assign item_image_state = "with-image" %} | ||
{% endif %} | ||
|
||
{% if _entityData.data.image_crop_state %} | ||
{% assign image_crop_state = _entityData.data.image_crop_state %} | ||
{% else %} | ||
{% assign image_crop_state = "not-cropped" %} | ||
{% endif %} | ||
|
||
{% if editmode %} | ||
<div class="content-item-box p-rel {{ item_image_state }} js-content-item-box not-loaded" | ||
data-item-type="{{ _itemType }}" | ||
data-item-id="{{ _id }}" | ||
> | ||
<div class="image_settings js-prevent-sideclick"{% if _imageData == blank %} style="display: none;"{% endif %}> | ||
<div class="image_settings-buttons"> | ||
<div class="image_settings-button--title mar_r-8">{{ "image" | lce | escape_once }}</div> | ||
<button class="bg_img-contain image_settings-button mar_r-8 btn-no-style js-toggle-image-settings"> | ||
</button> | ||
<button class="bg_img-contain image_settings-expand mar_r-8 btn-no-style js-toggle-crop-state"> | ||
</button> | ||
<button class="bg_img-contain image_settings-remove btn-no-style js-remove-image" {%- if _isProductImage == true %} style="display: none;"{% endif %}> | ||
</button> | ||
</div> | ||
|
||
<div class="settings_popover js-image-settings-popover"> | ||
<div class="settings_popover-arrow--up"></div> | ||
<div class="product_alt-attr {{ item_image_state }}"> | ||
<div class="form_field-cms"> | ||
<input | ||
id="item-image-alt-{{ _id }}" | ||
class="form_field_textfield js-data-item image_settings-remove--input" | ||
value="{{ _entityData.data.image_alt_attr | escape_once }}" | ||
data-name="image_alt_attr" | ||
data-entity="{{ _itemType }}" | ||
data-id="{{ _id }}" | ||
> | ||
<label for="item-image-alt-{{ _id }}" class="form_field_label">{{ "alt_text" | lce | escape_once }}</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% include "image-src-variable", _data: _imageData, _targetWidth: _targetWidth %} | ||
|
||
<div class="item-top"> | ||
<div class="top-inner aspect-ratio-inner image-drop-area {{ image_crop_state }} js-content-item-img-drop-area js-lazyload" | ||
data-image="{{ _src }}" | ||
{% if _isProductImage == true and _src != blank -%} | ||
style="background-image: url({{_src}});" | ||
{%- endif -%} | ||
></div> | ||
</div> | ||
</div> | ||
{% else %} | ||
<a class="content-item-box {{ item_image_state }} js-content-item-box not-loaded" href="{{ _entityData.url }}"> | ||
<div class="item-top"> | ||
<div class="top-inner of-hidden"> | ||
{% if _imageData != blank %} | ||
<div class="loader js-loader"></div> | ||
{%- assign imageClass = "item-image " | append: image_crop_state -%} | ||
{% include "lazy-image", _altAttr: _entityData.data.image_alt_attr, _data: _imageData, _targetWidth: _targetWidth, _className: imageClass %} | ||
{% else %} | ||
<div class="item-image-placeholder"></div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</a> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{%- if _data.content_type != blank -%} | ||
{%- assign imageSizes = "sizes" -%} | ||
{%- assign urlKey = "schemeless_url" -%} | ||
{%- else -%} | ||
{%- assign imageSizes = "imageSizes" -%} | ||
{%- assign urlKey = "url" -%} | ||
{%- endif -%} | ||
|
||
{%- assign _src = _data[imageSizes].first[urlKey] -%} | ||
|
||
{%- assign _maxWidth = _targetWidth | to_num -%} | ||
|
||
{%- for image in _data[imageSizes] -%} | ||
{%- if image.width <= _maxWidth -%} | ||
{% break %} | ||
{%- endif -%} | ||
{%- assign _src = image[urlKey] -%} | ||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{%- comment -%} | ||
Product image & background picker image object have different keys | ||
{%- endcomment -%} | ||
|
||
{%- if _targetWidth != blank -%} | ||
{%- assign _maxWidth = _targetWidth | to_num -%} | ||
{%- assign sizes = "(min-width: " | append: _targetWidth | append: "px) " | append: _targetWidth | append: "px" -%} | ||
{%- else -%} | ||
{%- assign _maxWidth = _data.width -%} | ||
{%- assign sizes = "100vw" -%} | ||
{%- endif -%} | ||
|
||
{% include "image-src-variable", _data: _data, _targetWidth: _maxWidth %} | ||
|
||
<img class="js-lazyload {{ _className }}" | ||
data-src="{{ _src }}" data-sizes="{{ sizes }}" {% if _altAttr != blank %}title="{{ _altAttr | escape_once }}" alt="{{ _altAttr | escape_once }}"{% endif %} | ||
{% if _src == blank %}style="display: none;"{%- endif -%} | ||
{% if _data[imageSizes] != blank -%} | ||
{%- if _data[imageSizes].size >= 1 %} | ||
data-srcset=" | ||
{%- for image in _data[imageSizes] -%} | ||
{{ image[urlKey] }} {{ image.width }}w | ||
{%- unless forloop.last -%} | ||
, | ||
{%- endunless -%} | ||
{%- endfor -%} | ||
" | ||
{%- endif -%} | ||
{%- endif -%} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{%- assign breadcrumbsString = breadcrumbsScript | replace: '<script type="application/ld+json">', "" | replace: "</script>", "" | replace: site.url, "" | replace: "@", "" -%} | ||
{%- assign breadcrumbsObj = breadcrumbsString | json_parse -%} | ||
|
||
<ul class="menu menu-horizontal menu-public menu-breadcrumbs"> | ||
{%- if breadcrumbsObj.itemListElement.size > 2 or site.root_item.layout_title == product_list_layout and breadcrumbsObj.itemListElement.size > 1 -%} | ||
{% for listItem in breadcrumbsObj.itemListElement %} | ||
{%- if forloop.index != 1 or site.root_item.layout_title == product_list_layout -%} | ||
{%- assign pageUrl = page.url | remove_first: "/" -%} | ||
|
||
{%- if pageUrl == listItem.item.id -%} | ||
{%- assign breadcrumbTag = "div" -%} | ||
{%- assign isCurrentPage = true -%} | ||
{%- else -%} | ||
{%- assign breadcrumbTag = "a" -%} | ||
{%- assign isCurrentPage = false -%} | ||
{%- endif -%} | ||
|
||
<li class="menu-item"> | ||
<{{ breadcrumbTag }} class="{% if isCurrentPage == false %}menu-link" href="/{{ listItem.item.id }}{% endif %}"> | ||
{{ listItem.item.name }} | ||
</{{ breadcrumbTag }}> | ||
</li> | ||
{%- if forloop.rindex > 1 -%} | ||
<span class="menu-separator">/</span> | ||
{%- endif -%} | ||
{% endif -%} | ||
{% endfor %} | ||
{%- endif -%} | ||
|
||
{%- if editmode and page.layout_title != product_layout -%} | ||
{%- assign add_product_label = "add_product" | lce | escape_once -%} | ||
{%- assign add_product_title = "add_product_page" | lce | escape_once -%} | ||
<li class="menu-item menu-item-cms"> | ||
{% menuadd parent=page label=add_product_label title=add_product_title layout_title=product_layout %} | ||
</li> | ||
{% if site.root_item.selected? and site.root_item.layout_title == product_list_layout %} | ||
<li class="menu-item menu-item-cms float-right"> | ||
<a class="js-root-item-settings-toggle"></a> | ||
</li> | ||
{% endif %} | ||
{%- endif -%} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<li class="menu-item js-prevent-link-click{% if render_hidden_categories == true and item.layout_title == product_list_layout or item.layout_title == product_layout %}{% unless show_product_related_pages_in_main_menu %} is-hidden{% endunless %} js-menu-item-products{% endif %}"> | ||
<a class="menu-link{% if item.selected? %} active{% endif %}{% unless item.translated? %} fci-editor-menuadd untranslated{% endunless %}" href="{{ item.url }}">{{ item.title }}</a> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.