Marquee
<!-- run string https://www.npmjs.com/package/jquery.marquee -->
<p class="marquee" style="overflow:hidden">
<span>Text</span>
</p>
Figure
<figure>
<img src="./img.png" alt="">
<figcaption>Text</figcaption>
</figure>
if page template
{% if template contains 'collection' %}
{% section 'popup-geolocation' %}
{% endif %}
Metafield
# get product metafield data
{%- if product.metafields.custom.m_name != blank -%}
{{ product.metafields.custom.m_name | metafield_tag }}
{%- endif -%}
Menu
# get from link menu image collection
{{ childlink.object.image }}
File
{% assign my_variable = false %}
{% render 'filename' %}
{{ 'file.css' | asset_url | stylesheet_tag }}
Image picker
{
"type": "image_picker",
"id": "account_image",
"label": "Image for account"
}
{{
section.settings.account_image
| image_url: width: 364
| image_tag: class: 'account__image', loading: 'lazy'
}}
for in order
{%- for order_item in order.line_items -%}
{%- for prod_image in order_item.product.images -%}
{{ prod_image | image_url: width: 150 | image_tag: class: 'order-item__image', loading: 'lazy' }}
{%- endfor -%}
{%- endfor -%}
for in index
{%- for address in customer.addresses -%}
{{ forloop.index }}
{%- endfor -%}
for in blog
{% for article in blogs.news.articles %}
{{- article.title | link_to: article.url }}
{% endfor %}
form
{% form 'customer_login', return_to: routes.root_url %}
<!-- form content -->
{% endform %}
order
{%- if customer.orders_count == 0 -%}
You haven`t placed any orders yet
Go Shopping
{% else %}
{%- endif -%}
{%- if order.line_items -%}
{% else %}
{%- endif -%}
section
{{ 'about-us.css' | asset_url | stylesheet_tag }}
{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}
@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}
<div class="about-us__wrapper page-width section-{{ section.id }}-padding">
<h1>{{ section.settings.title }}</h1>
<p>{{ section.settings.content_1 }}</p>
<div>
{%- if section.settings.image_1 != blank and section.settings.image_2 != blank -%}
{{ section.settings.image_1 | image_url: width: 100 | image_tag: class: '__image', loading: 'lazy' }}
{{ section.settings.image_2 | image_url: width: 100 | image_tag: class: '__image', loading: 'lazy' }}
{%- endif -%}
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => { });
</script>
{% schema %}
{
"name": "About us",
"tag": "section",
"class": "page__about-us",
"settings": [
{
"type": "header",
"content": "t:sections.all.padding.section_padding_heading"
},
{
"type": "range",
"id": "padding_top",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_top",
"default": 36
},
{
"type": "range",
"id": "padding_bottom",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_bottom",
"default": 36
},
{
"type": "text",
"id": "nav_logout",
"label": "Menu item for the logout",
"default": "Sign Out"
},
{
"type": "image_picker",
"id": "account_image",
"label": "Image for account"
},
{
"id": "blog",
"type": "blog",
"label": "Blog"
}
]
}
{% endschema %}
popup
{% if template contains 'timetable' %}
{% section 'popup-geolocation' %}
{% endif %}
{{ 'popup-geolocation.css' | asset_url | stylesheet_tag }}
<article class="popup-wrapper">
<span class="icon-close-wrapper">{% render 'icon-close' %}</span>
<div class="wrapper__content">
<h2>TEST</h2>
</div>
</article>
<script>
document.addEventListener('DOMContentLoaded', (event) => {
let popup_wrapper = document.querySelector('.popup-custom');
let popup_iconClose = document.querySelector('.icon-close-wrapper');
if (popup_wrapper && popup_iconClose) {
if (true) {
popup_wrapper.classList.remove('is-hide-popup');
}
popup_wrapper?.addEventListener('click', (event) => {
if (event.target.classList.contains('popup-custom')) {
popup_wrapper.classList.add('is-hide-popup');
}
});
popup_iconClose?.addEventListener('click', () => {
popup_wrapper.classList.add('is-hide-popup');
});
}
});
</script>
{% schema %}
{
"name": "Popup",
"class": "popup-custom is-hide-popup",
"tag": "section",
"settings": []
}
{% endschema %}
:root {
--timer-animate: 500ms;
}
body {
position: relative;
}
.popup-custom.is-hide-popup {
display: none;
}
.popup-custom {
display: flex;
justify-content: center;
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
z-index: 1000;
background-color: rgba(38, 38, 38, 0.5);
}
.popup-wrapper {
background-color: var(--color-text-header);
padding: 112px;
height: fit-content;
margin-top: 5%;
position: fixed;
width: 984px;
}
@media (max-width: 1024px) {
.popup-wrapper {
width: 90%;
margin-top: 15%;
}
}
@media (max-width: 768px) {
.popup-wrapper {
flex-direction: column;
padding: 40px 16px 16px 16px;
}
.popup-wrapper button {
margin: 0 auto;
}
}
.popup-wrapper .icon-close-wrapper {
width: 30px;
position: absolute;
right: 10px;
top: 10px;
padding: 8px;
cursor: pointer;
transition-duration: var(--timer-animate);
}
.popup-wrapper .icon-close-wrapper:hover svg {
stroke: var(--color-background-header);
}