Initial Shopify theme
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{% style %}
|
||||
{% # Loads all font variantions with display: swap %}
|
||||
{{ settings.type_primary_font | font_face: font_display: 'swap' }}
|
||||
{{ settings.type_primary_font | font_modify: 'weight', 'bold' | font_face: font_display: 'swap' }}
|
||||
{{ settings.type_primary_font | font_modify: 'weight', 'bold' | font_modify: 'style', 'italic' | font_face: font_display: 'swap' }}
|
||||
{{ settings.type_primary_font | font_modify: 'style', 'italic' | font_face: font_display: 'swap' }}
|
||||
|
||||
:root {
|
||||
--font-primary--family: {{ settings.type_primary_font.family }}, {{ settings.type_primary_font.fallback_families }};
|
||||
--font-primary--style: {{ settings.type_primary_font.style }};
|
||||
--font-primary--weight: {{ settings.type_primary_font.weight }};
|
||||
--page-width: {{ settings.max_page_width }};
|
||||
--page-margin: {{ settings.min_page_margin }}px;
|
||||
--color-background: {{ settings.background_color }};
|
||||
--color-foreground: {{ settings.foreground_color }};
|
||||
--style-border-radius-inputs: {{ settings.input_corner_radius }}px;
|
||||
}
|
||||
{% endstyle %}
|
||||
@@ -0,0 +1,64 @@
|
||||
{% doc %}
|
||||
Renders a responsive image that might be wrapped in a link.
|
||||
|
||||
When `width`, `height` and `crop` are provided, the image will be rendered
|
||||
with a fixed aspect ratio.
|
||||
|
||||
Serves as an example of how to use the `image_url` filter and `image_tag` filter
|
||||
as well as how you can use LiquidDoc to document your code.
|
||||
|
||||
@param {image} image - The image to be rendered
|
||||
@param {string} [url] - An optional destination URL for the image
|
||||
@param {string} [class] - Optional class to be added to the image wrapper
|
||||
@param {number} [width] - The highest resolution width of the image to be rendered
|
||||
@param {number} [height] - The highest resolution height of the image to be rendered
|
||||
@param {string} [crop] - The crop position of the image
|
||||
|
||||
@example
|
||||
{% render 'image', image: product.featured_image %}
|
||||
{% render 'image', image: product.featured_image, url: product.url %}
|
||||
{% render 'image',
|
||||
class: 'product__image',
|
||||
image: product.featured_image,
|
||||
url: product.url,
|
||||
width: 1200,
|
||||
height: 800,
|
||||
crop: 'center',
|
||||
%}
|
||||
{% enddoc %}
|
||||
|
||||
{% liquid
|
||||
unless height
|
||||
assign width = width | default: image.width
|
||||
endunless
|
||||
|
||||
if url
|
||||
assign wrapper = 'a'
|
||||
else
|
||||
assign wrapper = 'div'
|
||||
endif
|
||||
%}
|
||||
|
||||
<{{ wrapper }}
|
||||
class="image {{ class }}"
|
||||
{% if url %}
|
||||
href="{{ url }}"
|
||||
{% endif %}
|
||||
>
|
||||
{{ image | image_url: width: width, height: height, crop: crop | image_tag }}
|
||||
</{{ wrapper }}>
|
||||
|
||||
{% stylesheet %}
|
||||
.image {
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.image > img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
{% endstylesheet %}
|
||||
@@ -0,0 +1,105 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
{%- liquid
|
||||
assign og_title = page_title | default: shop.name
|
||||
assign og_url = canonical_url | default: request.origin
|
||||
assign og_type = 'website'
|
||||
assign og_description = page_description | default: shop.description | default: shop.name
|
||||
|
||||
if request.page_type == 'product'
|
||||
assign og_type = 'product'
|
||||
elsif request.page_type == 'article'
|
||||
assign og_type = 'article'
|
||||
elsif request.page_type == 'password'
|
||||
assign og_url = request.origin
|
||||
endif
|
||||
%}
|
||||
|
||||
<meta
|
||||
property="og:site_name"
|
||||
content="{{ shop.name }}"
|
||||
>
|
||||
<meta
|
||||
property="og:url"
|
||||
content="{{ og_url }}"
|
||||
>
|
||||
<meta
|
||||
property="og:title"
|
||||
content="{{ og_title | escape }}"
|
||||
>
|
||||
<meta
|
||||
property="og:type"
|
||||
content="{{ og_type }}"
|
||||
>
|
||||
<meta
|
||||
property="og:description"
|
||||
content="{{ og_description | escape }}"
|
||||
>
|
||||
|
||||
{%- if page_image -%}
|
||||
<meta
|
||||
property="og:image"
|
||||
content="http:{{ page_image | image_url }}"
|
||||
>
|
||||
<meta
|
||||
property="og:image:secure_url"
|
||||
content="https:{{ page_image | image_url }}"
|
||||
>
|
||||
<meta
|
||||
property="og:image:width"
|
||||
content="{{ page_image.width }}"
|
||||
>
|
||||
<meta
|
||||
property="og:image:height"
|
||||
content="{{ page_image.height }}"
|
||||
>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if request.page_type == 'product' -%}
|
||||
<script type="application/ld+json">
|
||||
{{ product | structured_data }}
|
||||
</script>
|
||||
|
||||
<meta
|
||||
property="og:price:amount"
|
||||
content="{{ product.price | money_without_currency | strip_html }}"
|
||||
>
|
||||
<meta
|
||||
property="og:price:currency"
|
||||
content="{{ cart.currency.iso_code }}"
|
||||
>
|
||||
{%- endif -%}
|
||||
|
||||
<meta
|
||||
name="twitter:card"
|
||||
content="summary_large_image"
|
||||
>
|
||||
<meta
|
||||
name="twitter:title"
|
||||
content="{{ og_title | escape }}"
|
||||
>
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="{{ og_description | escape }}"
|
||||
>
|
||||
|
||||
<title>
|
||||
{{ page_title }}
|
||||
{%- if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif -%}
|
||||
{%- if current_page != 1 %} – Page {{ current_page }}{% endif -%}
|
||||
{%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%}
|
||||
</title>
|
||||
|
||||
<link
|
||||
rel="canonical"
|
||||
href="{{ canonical_url }}"
|
||||
>
|
||||
|
||||
{% if page_description %}
|
||||
<meta
|
||||
name="description"
|
||||
content="{{ page_description | escape }}"
|
||||
>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user