From 2e6142e55b31bb9a80a501631997c244c928d908 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Fri, 25 Sep 2026 13:26:23 -0600 Subject: [PATCH] Initial Shopify theme --- .gitattributes | 1 + .gitignore | 17 + .shopifyignore | 13 + .theme-check.yml | 1 + AGENTS.md | 1489 +++++++++++++++++++++++++++++++ CLAUDE.md | 1 + CODE_OF_CONDUCT.md | 132 +++ CONTRIBUTING.md | 24 + LICENSE.md | 9 + README.md | 161 +++- assets/critical.css | 117 +++ assets/icon-account.svg | 6 + assets/icon-cart.svg | 5 + assets/shoppy-x-ray.svg | 1 + blocks/group.liquid | 105 +++ blocks/text.liquid | 59 ++ config/settings_data.json | 12 + config/settings_schema.json | 83 ++ copilot-instructions.md | 1 + layout/password.liquid | 19 + layout/theme.liquid | 36 + locales/en.default.json | 52 ++ locales/en.default.schema.json | 77 ++ sections/404.liquid | 23 + sections/article.liquid | 68 ++ sections/blog.liquid | 35 + sections/cart.liquid | 37 + sections/collection.liquid | 47 + sections/collections.liquid | 83 ++ sections/custom-section.liquid | 60 ++ sections/footer-group.json | 25 + sections/footer.liquid | 57 ++ sections/header-group.json | 22 + sections/header.liquid | 77 ++ sections/hello-world.liquid | 144 +++ sections/page.liquid | 17 + sections/password.liquid | 35 + sections/product.liquid | 52 ++ sections/search.liquid | 70 ++ snippets/css-variables.liquid | 18 + snippets/image.liquid | 64 ++ snippets/meta-tags.liquid | 105 +++ templates/404.json | 20 + templates/article.json | 20 + templates/blog.json | 20 + templates/cart.json | 20 + templates/collection.json | 20 + templates/gift_card.liquid | 73 ++ templates/index.json | 20 + templates/list-collections.json | 20 + templates/page.json | 20 + templates/password.json | 21 + templates/product.json | 20 + templates/search.json | 20 + 54 files changed, 3753 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .shopifyignore create mode 100644 .theme-check.yml create mode 100644 AGENTS.md create mode 120000 CLAUDE.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE.md create mode 100644 assets/critical.css create mode 100644 assets/icon-account.svg create mode 100644 assets/icon-cart.svg create mode 100644 assets/shoppy-x-ray.svg create mode 100644 blocks/group.liquid create mode 100644 blocks/text.liquid create mode 100644 config/settings_data.json create mode 100644 config/settings_schema.json create mode 120000 copilot-instructions.md create mode 100644 layout/password.liquid create mode 100644 layout/theme.liquid create mode 100644 locales/en.default.json create mode 100644 locales/en.default.schema.json create mode 100644 sections/404.liquid create mode 100644 sections/article.liquid create mode 100644 sections/blog.liquid create mode 100644 sections/cart.liquid create mode 100644 sections/collection.liquid create mode 100644 sections/collections.liquid create mode 100644 sections/custom-section.liquid create mode 100644 sections/footer-group.json create mode 100644 sections/footer.liquid create mode 100644 sections/header-group.json create mode 100644 sections/header.liquid create mode 100644 sections/hello-world.liquid create mode 100644 sections/page.liquid create mode 100644 sections/password.liquid create mode 100644 sections/product.liquid create mode 100644 sections/search.liquid create mode 100644 snippets/css-variables.liquid create mode 100644 snippets/image.liquid create mode 100644 snippets/meta-tags.liquid create mode 100644 templates/404.json create mode 100644 templates/article.json create mode 100644 templates/blog.json create mode 100644 templates/cart.json create mode 100644 templates/collection.json create mode 100644 templates/gift_card.liquid create mode 100644 templates/index.json create mode 100644 templates/list-collections.json create mode 100644 templates/page.json create mode 100644 templates/password.json create mode 100644 templates/product.json create mode 100644 templates/search.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f42cf6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.json linguist-language=jsonc \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a638c16 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db +node_modules/ + +# Shopify CLI files +.shopify/ + +## Release files +release +*.zip diff --git a/.shopifyignore b/.shopifyignore new file mode 100644 index 0000000..59a11a1 --- /dev/null +++ b/.shopifyignore @@ -0,0 +1,13 @@ +# This file contains a list of files that will be excluded from Shopify CLI +# operations such as push, pull, dev, etc. +# +# Examples: +# +# Ignore a specific file: +# templates/product.json +# +# Ignore templates with a wildcard pattern: +# templates/*.json +# +# Ignore templates and sections with a regular expression: +# /(templates|sections)/.*\.json/ diff --git a/.theme-check.yml b/.theme-check.yml new file mode 100644 index 0000000..f9576a6 --- /dev/null +++ b/.theme-check.yml @@ -0,0 +1 @@ +extends: theme-check:recommended diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1910b17 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,1489 @@ +# AGENTS.md + +🚨 MANDATORY: YOU MUST CALL "learn_shopify_api" ONCE WHEN WORKING WITH LIQUID THEMES. + +Use the [Shopify AI Toolkit](https://shopify.dev/docs/apps/build/ai-toolkit) for all Shopify API and platform work. If missing, install it in the agent host per that page (or `npx skills add Shopify/shopify-ai-toolkit --list` for skill-compatible hosts). + +## Theme Architecture + +**Key principles: focus on generating snippets, blocks, and sections; users may create templates using the theme editor** + +### Directory structure + +``` +. +β”œβ”€β”€ assets # Stores static assets (CSS, JS, images, fonts, etc.) +β”œβ”€β”€ blocks # Reusable, nestable, customizable components +β”œβ”€β”€ config # Global theme settings and customization options +β”œβ”€β”€ layout # Top-level wrappers for pages (layout templates) +β”œβ”€β”€ locales # Translation files for theme internationalization +β”œβ”€β”€ sections # Modular full-width page components +β”œβ”€β”€ snippets # Reusable Liquid code or HTML fragments +└── templates # Templates combining sections and blocks to define page structures +``` + +#### `sections` + +- Sections are `.liquid` files that allow you to create reusable modules that can be customized by merchants +- Sections can include blocks which allow merchants to add, remove, and reorder content within a section +- Sections are made customizable by including the required `{% schema %}` tag that exposes settings in the theme editor via a JSON object. Validate that JSON object using the `schemas/section.json` JSON schema +- Examples of sections: hero banners, product grids, testimonials, featured collections + +#### `blocks` + +- Blocks are `.liquid` files that allow you to create reusable small components that can be customized by merchants (they don't need to fit the full-width of the page) +- Blocks are ideal for logic that needs to be reused and also edited in the theme editor by merchants +- Blocks can include other nested blocks which allow merchants to add, remove, and reorder content within a block too +- Blocks are made customizable by including the required `{% schema %}` tag that exposes settings in the theme editor via a JSON object. Validate that JSON object using the `schemas/theme_block.json` JSON schema +- Blocks must have the `{% doc %}` tag as the header if you directly/staticly render them in other file via `{% content_for 'block', id: '42', type: 'block_name' %}` +- Examples of blocks: individual testimonials, slides in a carousel, feature items + +#### `snippets` + +- Snippets are reusable code fragments rendered in blocks, sections, and layouts files via the `render` tag +- Snippets are ideal for logic that needs to be reused but not directly edited in the theme editor by merchants +- Snippets accept parameters when rendered for dynamic behavior +- Snippets must have the `{% doc %}` tag as the header +- Examples of sections: buttons, meta-tags, css-variables, and form elements + +#### `layout` + +- Defines the overall HTML structure of the site, including `` and ``, and wraps other templates to provide a consistent frame +- Contains repeated global elements like navigation, cart drawer, footer, and usually includes CSS/JS assets and meta tags +- Must include `{{ content_for_header }}` to inject Shopify scripts in the `` and `{{ content_for_layout }}` to render the page content + +#### `config` + +- `config/settings_schema.json` is a JSON file that defines schema for global theme settings. Validate the shape shape of this JSON file using the `schemas/theme_settings.json` JSON schema +- `config/settings_data.json` is JSON file that holds the data for the settings defined by `config/settings_schema.json` + +#### `assets` + +- Contains static files like CSS, JavaScript, and imagesβ€”including compiled and optimized assetsβ€”referenced in templates via the `asset_url` filter +- Keep it here only `critical.css` and static files necessary for every page, otherwise prefer the usage of the `{% stylesheet %}` and `{% javascript %}` tags + +#### `locales` + +- Stores translation files organized by language code (e.g., `en.default.json`, `fr.json`) to localize all user-facing theme content and editor strings +- Enables multi-language support by providing translations accessible via filters like `{{ 'key' | t }}` in Liquid for proper internationalization +- Validate `locales` JSON files using the `schemas/translations.json` JSON schema + +#### `templates` + +- JSON file that define the structure, ordering, and which sections and blocks appear on each page type, allowing merchants to customize layouts without code changes + +### CSS & JavaScript + +- Write CSS and JavaScript per components using the `{% stylesheet %}` and `{% javascript %}` tags +- Note: `{% stylesheet %}` and `{% javascript %}` are only supported in `snippets/`, `blocks/`, and `sections/` + +### LiquidDoc + +Snippets and blocks (when blocks are statically rendered) must include the LiquidDoc header that documents the purpose of the file and required parameters. Example: + +```liquid +{% doc %} + Renders a responsive image that might be wrapped in a link. + + @param {image} image - The image to be rendered + @param {string} [url] - An optional destination URL for the image + + @example + {% render 'image', image: product.featured_image %} +{% enddoc %} + +{{ image | image_url: width: 200, height: 200 | image_tag }} +``` + +## The `{% schema %}` tag on blocks and sections + +**Key principles: follow the "Good practices" and "Validate the `{% schema %}` content" using JSON schemas** + +### Good practices + +When defining the `{% schema %}` tag on sections and blocks, follow these guidelines to use the values: + +**Single property settings**: For settings that correspond to a single CSS property, use CSS variables: +```liquid +
+ Example +
+ +{% stylesheet %} + .collection { + gap: var(--gap); + } +{% endstylesheet %} + +{% schema %} +{ + "settings": [{ + "type": "range", + "label": "gap", + "id": "gap", + "min": 0, + "max": 100, + "unit": "px", + "default": 0, + }] +} +{% endschema %} +``` + +**Multiple property settings**: For settings that control multiple CSS properties, use CSS classes: +```liquid +
+ Example +
+ +{% stylesheet %} + .collection--full-width { + /* multiple styles */ + } + .collection--narrow { + /* multiple styles */ + } +{% endstylesheet %} + +{% schema %} +{ + "settings": [{ + "type": "select", + "id": "layout", + "label": "layout", + "values": [ + { "value": "collection--full-width", "label": "t:options.full" }, + { "value": "collection--narrow", "label": "t:options.narrow" } + ] + }] +} +{% endschema %} +``` + +#### Mobile layouts + +If you need to create a mobile layout and you want the merchant to be able to select one or two columns, use a select input: + +```liquid +{% schema %} +{ + "type": "select", + "id": "columns_mobile", + "label": "Columns on mobile", + "options": [ + { "value": 1, "label": "1" }, + { "value": "2", "label": "2" } + ] +} +{% endschema %} +``` + +## Liquid + +### Liquid delimiters + +- **`{{ ... }}`**: Output – prints a value. +- **`{{- ... -}}`**: Output, trims whitespace around the value. +- **`{% ... %}`**: Logic/control tag (if, for, assign, etc.), does not print anything, no whitespace trim. +- **`{%- ... -%}`**: Logic/control tag, trims whitespace around the tag. + +**Tip:** +Adding a dash (`-`) after `{%`/`{{` or before `%}`/`}}` trims spaces or newlines next to the tag. + +**Examples:** +- `{{- product.title -}}` β†’ print value, remove surrounding spaces or lines. +- `{%- if available -%}In stock{%- endif -%}` β†’ logic, removes extra spaces/lines. + +### Liquid operators + +**Comparison operators:** +- == +- != +- > +- < +- >= +- <= + +**Logical operators:** +- `or` +- `and` +- `contains` - checks if a string contains a substring, or if an array contains a string + +#### Comparison and comparison tags + +**Key condition principles:** +- For simplificity, ALWAYS use nested `if` conditions when the logic requires more than one logical operator +- Parentheses are not supported in Liquid +- Ternary conditionals are not supported in Liquid, so always use `{% if cond %}` + +**Basic comparison example:** +```liquid +{% if product.title == "Awesome Shoes" %} + These shoes are awesome! +{% endif %} +``` + +**Multiple Conditions:** +```liquid +{% if product.type == "Shirt" or product.type == "Shoes" %} + This is a shirt or a pair of shoes. +{% endif %} +``` + +**Contains Usage:** +- For strings: `{% if product.title contains "Pack" %}` +- For arrays: `{% if product.tags contains "Hello" %}` +- Note: `contains` only works with strings, not objects in arrays + +**{% elsif %} (used inside if/unless only)** +```liquid +{% if a %} + ... +{% elsif b %} + ... +{% endif %} +``` + +**{% unless %}** +```liquid +{% unless condition %} + ... +{% endunless %} +``` + +**{% case %}** +```liquid +{% case variable %} + {% when 'a' %} + a + {% when 'b' %} + b + {% else %} + other +{% endcase %} +``` + +**{% else %} (used inside if, unless, case, or for)** +```liquid +{% if product.available %} + In stock +{% else %} + Sold out +{% endif %} +``` +_or inside a for loop:_ +```liquid +{% for item in collection.products %} + {{ item.title }} +{% else %} + No products found. +{% endfor %} +``` + +#### Variables and variable tags + +```liquid +{% assign my_variable = 'value' %} + +{% capture my_variable %} + Contents of variable +{% endcapture %} + +{% increment counter %} +{% decrement counter %} +``` + +### Liquid filters + +You can chain filters in Liquid, passing the result of one filter as the input to the next. + +See these filters: + +- `upcase`: `{{ string | upcase }}` returns a **string** +- `split`: `{{ string | split: string }}` returns an **array** (as we may notice in the docs, `split` receives a string as its argument) +- `last`: `{{ array | last }}` returns **untyped** + +Each filter can pass its return value to the next filter as long as the types match. + +For example, `upcase` returns a string, which is suitable input for `split`, which then produces an array for `last` to use. + +Here's how the filters are executed step by step to eventually return `"WORLD"`: + +```liquid +{{ "hello world" | upcase | split: " " | last }} +``` + +- First, `"hello world"` is converted to uppercase: `"HELLO WORLD"`, which is a string +- Next, `split` can act on strings, so it splits the value by space into an array: `["HELLO", "WORLD"]` +- Finally, the `last` filter work with array, so `"WORLD"` is returned + +#### Array +- `compact`: `{{ array | compact }}` returns `array` +- `concat`: `{{ array | concat: array }}` returns `array` +- `find`: `{{ array | find: string, string }}` returns `untyped` +- `find_index`: `{{ array | find_index: string, string }}` returns `number` +- `first`: `{{ array | first }}` returns `untyped` +- `has`: `{{ array | has: string, string }}` returns `boolean` +- `join`: `{{ array | join }}` returns `string` +- `last`: `{{ array | last }}` returns `untyped` +- `map`: `{{ array | map: string }}` returns `array` +- `reject`: `{{ array | reject: string, string }}` returns `array` +- `reverse`: `{{ array | reverse }}` returns `array` +- `size`: `{{ variable | size }}` returns `number` +- `sort`: `{{ array | sort }}` returns `array` +- `sort_natural`: `{{ array | sort_natural }}` returns `array` +- `sum`: `{{ array | sum }}` returns `number` +- `uniq`: `{{ array | uniq }}` returns `array` +- `where`: `{{ array | where: string, string }}` returns `array` + +#### Cart +- `item_count_for_variant`: `{{ cart | item_count_for_variant: {variant_id} }}` returns `number` +- `line_items_for`: `{{ cart | line_items_for: object }}` returns `array` + +#### Collection +- `link_to_type`: `{{ string | link_to_type }}` returns `string` +- `link_to_vendor`: `{{ string | link_to_vendor }}` returns `string` +- `sort_by`: `{{ string | sort_by: string }}` returns `string` +- `url_for_type`: `{{ string | url_for_type }}` returns `string` +- `url_for_vendor`: `{{ string | url_for_vendor }}` returns `string` +- `within`: `{{ string | within: collection }}` returns `string` +- `highlight_active_tag`: `{{ string | highlight_active_tag }}` returns `string` + +#### Color +- `brightness_difference`: `{{ string | brightness_difference: string }}` returns `number` +- `color_brightness`: `{{ string | color_brightness }}` returns `number` +- `color_contrast`: `{{ string | color_contrast: string }}` returns `number` +- `color_darken`: `{{ string | color_darken: number }}` returns `string` +- `color_desaturate`: `{{ string | color_desaturate: number }}` returns `string` +- `color_difference`: `{{ string | color_difference: string }}` returns `number` +- `color_extract`: `{{ string | color_extract: string }}` returns `number` +- `color_lighten`: `{{ string | color_lighten: number }}` returns `string` +- `color_mix`: `{{ string | color_mix: string, number }}` returns `string` +- `color_modify`: `{{ string | color_modify: string, number }}` returns `string` +- `color_saturate`: `{{ string | color_saturate: number }}` returns `string` +- `color_to_hex`: `{{ string | color_to_hex }}` returns `string` +- `color_to_hsl`: `{{ string | color_to_hsl }}` returns `string` +- `color_to_oklch`: `{{ string | color_to_oklch }}` returns `string` +- `color_to_rgb`: `{{ string | color_to_rgb }}` returns `string` +- `hex_to_rgba`: `{{ string | hex_to_rgba }}` returns `string` + +#### Customer +- `customer_login_link`: `{{ string | customer_login_link }}` returns `string` +- `customer_logout_link`: `{{ string | customer_logout_link }}` returns `string` +- `customer_register_link`: `{{ string | customer_register_link }}` returns `string` +- `avatar`: `{{ customer | avatar }}` returns `string` +- `login_button`: `{{ shop | login_button }}` returns `string` + +#### Date +- `date`: `{{ date | date: string }}` returns `string` + +#### Default +- `default_errors`: `{{ string | default_errors }}` returns `string` +- `default`: `{{ variable | default: variable }}` returns `untyped` +- `default_pagination`: `{{ paginate | default_pagination }}` returns `string` + +#### Font +- `font_face`: `{{ font | font_face }}` returns `string` +- `font_modify`: `{{ font | font_modify: string, string }}` returns `font` +- `font_url`: `{{ font | font_url }}` returns `string` + +#### Format +- `date`: `{{ string | date: string }}` returns `string` +- `json`: `{{ variable | json }}` returns `string` +- `structured_data`: `{{ variable | structured_data }}` returns `string` +- `unit_price_with_measurement`: `{{ number | unit_price_with_measurement: unit_price_measurement }}` returns `string` +- `weight_with_unit`: `{{ number | weight_with_unit }}` returns `string` + +#### Hosted_file +- `asset_img_url`: `{{ string | asset_img_url }}` returns `string` +- `asset_url`: `{{ string | asset_url }}` returns `string` +- `file_img_url`: `{{ string | file_img_url }}` returns `string` +- `file_url`: `{{ string | file_url }}` returns `string` +- `global_asset_url`: `{{ string | global_asset_url }}` returns `string` +- `shopify_asset_url`: `{{ string | shopify_asset_url }}` returns `string` + +#### Html +- `time_tag`: `{{ string | time_tag: string }}` returns `string` +- `inline_asset_content`: `{{ asset_name | inline_asset_content }}` returns `string` +- `highlight`: `{{ string | highlight: string }}` returns `string` +- `link_to`: `{{ string | link_to: string }}` returns `string` +- `placeholder_svg_tag`: `{{ string | placeholder_svg_tag }}` returns `string` +- `preload_tag`: `{{ string | preload_tag: as: string }}` returns `string` +- `script_tag`: `{{ string | script_tag }}` returns `string` +- `stylesheet_tag`: `{{ string | stylesheet_tag }}` returns `string` + +#### Localization +- `currency_selector`: `{{ form | currency_selector }}` returns `string` +- `translate`: `{{ string | t }}` returns `string` +- `format_address`: `{{ address | format_address }}` returns `string` + +#### Math +- `abs`: `{{ number | abs }}` returns `number` +- `at_least`: `{{ number | at_least }}` returns `number` +- `at_most`: `{{ number | at_most }}` returns `number` +- `ceil`: `{{ number | ceil }}` returns `number` +- `divided_by`: `{{ number | divided_by: number }}` returns `number` +- `floor`: `{{ number | floor }}` returns `number` +- `minus`: `{{ number | minus: number }}` returns `number` +- `modulo`: `{{ number | modulo: number }}` returns `number` +- `plus`: `{{ number | plus: number }}` returns `number` +- `round`: `{{ number | round }}` returns `number` +- `times`: `{{ number | times: number }}` returns `number` + +#### Media +- `external_video_tag`: `{{ variable | external_video_tag }}` returns `string` +- `external_video_url`: `{{ media | external_video_url: attribute: string }}` returns `string` +- `image_tag`: `{{ string | image_tag }}` returns `string` +- `media_tag`: `{{ media | media_tag }}` returns `string` +- `model_viewer_tag`: `{{ media | model_viewer_tag }}` returns `string` +- `video_tag`: `{{ media | video_tag }}` returns `string` +- `article_img_url`: `{{ variable | article_img_url }}` returns `string` +- `collection_img_url`: `{{ variable | collection_img_url }}` returns `string` +- `image_url`: `{{ variable | image_url: width: number, height: number }}` returns `string` +- `img_tag`: `{{ string | img_tag }}` returns `string` +- `img_url`: `{{ variable | img_url }}` returns `string` +- `product_img_url`: `{{ variable | product_img_url }}` returns `string` + +#### Metafield +- `metafield_tag`: `{{ metafield | metafield_tag }}` returns `string` +- `metafield_text`: `{{ metafield | metafield_text }}` returns `string` + +#### Money +- `money`: `{{ number | money }}` returns `string` +- `money_with_currency`: `{{ number | money_with_currency }}` returns `string` +- `money_without_currency`: `{{ number | money_without_currency }}` returns `string` +- `money_without_trailing_zeros`: `{{ number | money_without_trailing_zeros }}` returns `string` + +#### Payment +- `payment_button`: `{{ form | payment_button }}` returns `string` +- `payment_terms`: `{{ form | payment_terms }}` returns `string` +- `payment_type_img_url`: `{{ string | payment_type_img_url }}` returns `string` +- `payment_type_svg_tag`: `{{ string | payment_type_svg_tag }}` returns `string` + +#### String +- `blake3`: `{{ string | blake3 }}` returns `string` +- `hmac_sha1`: `{{ string | hmac_sha1: string }}` returns `string` +- `hmac_sha256`: `{{ string | hmac_sha256: string }}` returns `string` +- `md5`: `{{ string | md5 }}` returns `string` +- `sha1`: `{{ string | sha1: string }}` returns `string` +- `sha256`: `{{ string | sha256: string }}` returns `string` +- `append`: `{{ string | append: string }}` returns `string` +- `base64_decode`: `{{ string | base64_decode }}` returns `string` +- `base64_encode`: `{{ string | base64_encode }}` returns `string` +- `base64_url_safe_decode`: `{{ string | base64_url_safe_decode }}` returns `string` +- `base64_url_safe_encode`: `{{ string | base64_url_safe_encode }}` returns `string` +- `capitalize`: `{{ string | capitalize }}` returns `string` +- `downcase`: `{{ string | downcase }}` returns `string` +- `escape`: `{{ string | escape }}` returns `string` +- `escape_once`: `{{ string | escape_once }}` returns `string` +- `lstrip`: `{{ string | lstrip }}` returns `string` +- `newline_to_br`: `{{ string | newline_to_br }}` returns `string` +- `prepend`: `{{ string | prepend: string }}` returns `string` +- `remove`: `{{ string | remove: string }}` returns `string` +- `remove_first`: `{{ string | remove_first: string }}` returns `string` +- `remove_last`: `{{ string | remove_last: string }}` returns `string` +- `replace`: `{{ string | replace: string, string }}` returns `string` +- `replace_first`: `{{ string | replace_first: string, string }}` returns `string` +- `replace_last`: `{{ string | replace_last: string, string }}` returns `string` +- `rstrip`: `{{ string | rstrip }}` returns `string` +- `slice`: `{{ string | slice }}` returns `string` +- `split`: `{{ string | split: string }}` returns `array` +- `strip`: `{{ string | strip }}` returns `string` +- `strip_html`: `{{ string | strip_html }}` returns `string` +- `strip_newlines`: `{{ string | strip_newlines }}` returns `string` +- `truncate`: `{{ string | truncate: number }}` returns `string` +- `truncatewords`: `{{ string | truncatewords: number }}` returns `string` +- `upcase`: `{{ string | upcase }}` returns `string` +- `url_decode`: `{{ string | url_decode }}` returns `string` +- `url_encode`: `{{ string | url_encode }}` returns `string` +- `camelize`: `{{ string | camelize }}` returns `string` +- `handleize`: `{{ string | handleize }}` returns `string` +- `url_escape`: `{{ string | url_escape }}` returns `string` +- `url_param_escape`: `{{ string | url_param_escape }}` returns `string` +- `pluralize`: `{{ number | pluralize: string, string }}` returns `string` + +#### Tag +- `link_to_add_tag`: `{{ string | link_to_add_tag }}` returns `string` +- `link_to_remove_tag`: `{{ string | link_to_remove_tag }}` returns `string` +- `link_to_tag`: `{{ string | link_to_tag }}` returns `string` + +### Liquid objects + +#### Global objects +- `collections` +- `pages` +- `all_products` +- `articles` +- `blogs` +- `cart` +- `closest` +- `content_for_header` +- `customer` +- `images` +- `linklists` +- `localization` +- `metaobjects` +- `request` +- `routes` +- `shop` +- `theme` +- `settings` +- `template` +- `additional_checkout_buttons` +- `all_country_option_tags` +- `canonical_url` +- `content_for_additional_checkout_buttons` +- `content_for_index` +- `content_for_layout` +- `country_option_tags` +- `current_page` +- `handle` +- `page_description` +- `page_image` +- `page_title` +- `powered_by_link` +- `scripts` + +#### `/article` page +- `article` +- `blog` + +#### `/blog` page +- `blog` +- `current_tags` + +#### `/cart` page +- `cart` + +#### `/checkout` page +- `checkout` + +#### `/collection` page +- `collection` +- `current_tags` + +#### `/customers/account` page +- `customer` + +#### `/customers/addresses` page +- `customer` + +#### `/customers/order` page +- `customer` +- `order` + +#### `/gift_card.liquid` page +- `gift_card` +- `recipient` + +#### `/metaobject` page +- `metaobject` + +#### `/page` page +- `page` + +#### `/product` page +- `product` +- `remote_product` + +#### `/robots.txt.liquid` page +- `robots` + +#### `/search` page +- `search` +### Liquid tags + + +#### content_for +The `content_for` tag requires a type parameter to differentiate between rendering a number of theme blocks (`'blocks'`) and a single static block (`'block'`). + + +Syntax: +``` +{% content_for 'blocks' %} +{% content_for 'block', type: "slide", id: "slide-1" %} +``` + +#### form +Because there are many different form types available in Shopify themes, the `form` tag requires a type. Depending on the +form type, an additional parameter might be required. You can specify the following form types: + +- [`activate_customer_password`](https://shopify.dev/docs/api/liquid/tags/form#form-activate_customer_password) +- [`cart`](https://shopify.dev/docs/api/liquid/tags/form#form-cart) +- [`contact`](https://shopify.dev/docs/api/liquid/tags/form#form-contact) +- [`create_customer`](https://shopify.dev/docs/api/liquid/tags/form#form-create_customer) +- [`currency`](https://shopify.dev/docs/api/liquid/tags/form#form-currency) +- [`customer`](https://shopify.dev/docs/api/liquid/tags/form#form-customer) +- [`customer_address`](https://shopify.dev/docs/api/liquid/tags/form#form-customer_address) +- [`customer_login`](https://shopify.dev/docs/api/liquid/tags/form#form-customer_login) +- [`guest_login`](https://shopify.dev/docs/api/liquid/tags/form#form-guest_login) +- [`localization`](https://shopify.dev/docs/api/liquid/tags/form#form-localization) +- [`new_comment`](https://shopify.dev/docs/api/liquid/tags/form#form-new_comment) +- [`product`](https://shopify.dev/docs/api/liquid/tags/form#form-product) +- [`recover_customer_password`](https://shopify.dev/docs/api/liquid/tags/form#form-recover_customer_password) +- [`reset_customer_password`](https://shopify.dev/docs/api/liquid/tags/form#form-reset_customer_password) +- [`storefront_password`](https://shopify.dev/docs/api/liquid/tags/form#form-storefront_password) + + +Syntax: +``` +{% form 'form_type' %} + content +{% endform %} +``` + +#### layout + +Syntax: +``` +{% layout name %} +``` + +#### assign +You can create variables of any [basic type](https://shopify.dev/docs/api/liquid/basics#types), [object](https://shopify.dev/docs/api/liquid/objects), or object property. + +> Caution: +> Predefined Liquid objects can be overridden by variables with the same name. +> To make sure that you can access all Liquid objects, make sure that your variable name doesn't match a predefined object's name. + + +Syntax: +``` +{% assign variable_name = value %} +``` + +#### break + +Syntax: +``` +{% break %} +``` + +#### capture +You can create complex strings with Liquid logic and variables. + +> Caution: +> Predefined Liquid objects can be overridden by variables with the same name. +> To make sure that you can access all Liquid objects, make sure that your variable name doesn't match a predefined object's name. + + +Syntax: +``` +{% capture variable %} + value +{% endcapture %} +``` + +#### case + +Syntax: +``` +{% case variable %} + {% when first_value %} + first_expression + {% when second_value %} + second_expression + {% else %} + third_expression +{% endcase %} +``` + +#### comment +Any text inside `comment` tags won't be output, and any Liquid code will be parsed, but not executed. + + +Syntax: +``` +{% comment %} + content +{% endcomment %} +``` + +#### continue + +Syntax: +``` +{% continue %} +``` + +#### cycle +The `cycle` tag must be used inside a `for` loop. + +> Tip: +> Use the `cycle` tag to output text in a predictable pattern. For example, to apply odd/even classes to rows in a table. + + +Syntax: +``` +{% cycle string, string, ... %} +``` + +#### decrement +Variables that are declared with `decrement` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates), +or [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across +[snippets](/themes/architecture/snippets) included in the file. + +Similarly, variables that are created with `decrement` are independent from those created with [`assign`](https://shopify.dev/docs/api/liquid/tags/assign) +and [`capture`](https://shopify.dev/docs/api/liquid/tags/capture). However, `decrement` and [`increment`](https://shopify.dev/docs/api/liquid/tags/increment) share +variables. + + +Syntax: +``` +{% decrement variable_name %} +``` + +#### doc +The `doc` tag allows developers to include documentation within Liquid +templates. Any content inside `doc` tags is not rendered or outputted. +Liquid code inside will be parsed but not executed. This facilitates +tooling support for features like code completion, linting, and inline +documentation. + +For detailed documentation syntax and examples, see the +[`LiquidDoc` reference](https://shopify.dev/docs/storefronts/themes/tools/liquid-doc). + + +Syntax: +``` +{% doc %} + Renders a message. + + @param {string} foo - A string value. + @param {string} [bar] - An optional string value. + + @example + {% render 'message', foo: 'Hello', bar: 'World' %} +{% enddoc %} +``` + +#### echo +Using the `echo` tag is the same as wrapping an expression in curly brackets (`{{` and `}}`). However, unlike the curly +bracket method, you can use the `echo` tag inside [`liquid` tags](https://shopify.dev/docs/api/liquid/tags/liquid). + +> Tip: +> You can use [filters](https://shopify.dev/docs/api/liquid/filters) on expressions inside `echo` tags. + + +Syntax: +``` +{% liquid + echo expression +%} +``` + +#### for +You can do a maximum of 50 iterations with a `for` loop. If you need to iterate over more than 50 items, then use the +[`paginate` tag](https://shopify.dev/docs/api/liquid/tags/paginate) to split the items over multiple pages. + +> Tip: +> Every `for` loop has an associated [`forloop` object](https://shopify.dev/docs/api/liquid/objects/forloop) with information about the loop. + + +Syntax: +``` +{% for variable in array %} + expression +{% endfor %} +``` + +#### if + +Syntax: +``` +{% if condition %} + expression +{% endif %} +``` + +#### increment +Variables that are declared with `increment` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates), +or [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across +[snippets](/themes/architecture/snippets) included in the file. + +Similarly, variables that are created with `increment` are independent from those created with [`assign`](https://shopify.dev/docs/api/liquid/tags/assign) +and [`capture`](https://shopify.dev/docs/api/liquid/tags/capture). However, `increment` and [`decrement`](https://shopify.dev/docs/api/liquid/tags/decrement) share +variables. + + +Syntax: +``` +{% increment variable_name %} +``` + +#### raw + +Syntax: +``` +{% raw %} + expression +{% endraw %} +``` + +#### render +Inside snippets and app blocks, you can't directly access variables that are [created](https://shopify.dev/docs/api/liquid/tags/variable-tags) outside +of the snippet or app block. However, you can [specify variables as parameters](https://shopify.dev/docs/api/liquid/tags/render#render-passing-variables-to-a-snippet) +to pass outside variables to snippets. + +While you can't directly access created variables, you can access global objects, as well as any objects that are +directly accessible outside the snippet or app block. For example, a snippet or app block inside the [product template](/themes/architecture/templates/product) +can access the [`product` object](https://shopify.dev/docs/api/liquid/objects/product), and a snippet or app block inside a [section](/themes/architecture/sections) +can access the [`section` object](https://shopify.dev/docs/api/liquid/objects/section). + +Outside a snippet or app block, you can't access variables created inside the snippet or app block. + +> Note: +> When you render a snippet using the `render` tag, you can't use the [`include` tag](https://shopify.dev/docs/api/liquid/tags/include) +> inside the snippet. + + +Syntax: +``` +{% render 'filename' %} +``` + +#### tablerow +The `tablerow` tag must be wrapped in HTML `` and `
` tags. + +> Tip: +> Every `tablerow` loop has an associated [`tablerowloop` object](https://shopify.dev/docs/api/liquid/objects/tablerowloop) with information about the loop. + + +Syntax: +``` +{% tablerow variable in array %} + expression +{% endtablerow %} +``` + +#### unless +> Tip: +> Similar to the [`if` tag](https://shopify.dev/docs/api/liquid/tags/if), you can use `elsif` to add more conditions to an `unless` tag. + + +Syntax: +``` +{% unless condition %} + expression +{% endunless %} +``` + +#### paginate +Because [`for` loops](https://shopify.dev/docs/api/liquid/tags/for) are limited to 50 iterations per page, you need to use the `paginate` tag to +iterate over an array that has more than 50 items. The following arrays can be paginated: + +- [`article.comments`](https://shopify.dev/docs/api/liquid/objects/article#article-comments) +- [`blog.articles`](https://shopify.dev/docs/api/liquid/objects/blog#blog-articles) +- [`collections`](https://shopify.dev/docs/api/liquid/objects/collections) +- [`collection.products`](https://shopify.dev/docs/api/liquid/objects/collection#collection-products) +- [`customer.addresses`](https://shopify.dev/docs/api/liquid/objects/customer#customer-addresses) +- [`customer.orders`](https://shopify.dev/docs/api/liquid/objects/customer#customer-orders) +- [`metaobject_definition.values`](https://shopify.dev/docs/api/liquid/objects/metaobject_definition#metaobject_definition-values) +- [`pages`](https://shopify.dev/docs/api/liquid/objects/pages) +- [`product.variants`](https://shopify.dev/docs/api/liquid/objects/product#variants) +- [`search.results`](https://shopify.dev/docs/api/liquid/objects/search#search-results) +- [`article_list` settings](/themes/architecture/settings/input-settings#article_list) +- [`collection_list` settings](/themes/architecture/settings/input-settings#collection_list) +- [`product_list` settings](/themes/architecture/settings/input-settings#product_list) + +Within the `paginate` tag, you have access to the [`paginate` object](https://shopify.dev/docs/api/liquid/objects/paginate). You can use this +object, or the [`default_pagination` filter](https://shopify.dev/docs/api/liquid/filters/default_pagination), to build page navigation. + +> Note: +> The `paginate` tag allows the user to paginate to the 25,000th item in the array and no further. To reach items further in +> the array the array should be filtered further before paginating. See +> [Pagination Limits](/themes/best-practices/performance/platform#pagination-limits) for more information. + + +Syntax: +``` +{% paginate array by page_size %} + {% for item in array %} + forloop_content + {% endfor %} +{% endpaginate %} +``` + +#### javascript +Each section, block or snippet can have only one `{% javascript %}` tag. + +To learn more about how JavaScript that's defined between the `javascript` tags is loaded and run, refer to the documentation for [javascript tags](/storefronts/themes/best-practices/javascript-and-stylesheet-tags#javascript). +> Caution: +> Liquid isn't rendered inside of `{% javascript %}` tags. Including Liquid code can cause syntax errors. + + +Syntax: +``` +{% javascript %} + javascript_code +{% endjavascript %} +``` + +#### section +Rendering a section with the `section` tag renders a section statically. To learn more about sections and how to use +them in your theme, refer to [Render a section](/themes/architecture/sections#render-a-section). + + +Syntax: +``` +{% section 'name' %} +``` + +#### stylesheet +Each section, block or snippet can have only one `{% stylesheet %}` tag. + +To learn more about how CSS that's defined between the `stylesheet` tags is loaded and run, refer to the documentation for [stylesheet tags](/storefronts/themes/best-practices/javascript-and-stylesheet-tags#stylesheet). +> Caution: +> Liquid isn't rendered inside of `{% stylesheet %}` tags. Including Liquid code can cause syntax errors. + + +Syntax: +``` +{% stylesheet %} + css_styles +{% endstylesheet %} +``` + +#### sections +Use this tag to render section groups as part of the theme's [layout](/themes/architecture/layouts) content. Place the `sections` tag where you want to render it in the layout. + +To learn more about section groups and how to use them in your theme, refer to [Section groups](/themes/architecture/section-groups#usage). + + +Syntax: +``` +{% sections 'name' %} +``` + +#### style +> Note: +> If you reference [color settings](/themes/architecture/settings/input-settings#color) inside `style` tags, then +> the associated CSS rules will update as the setting is changed in the theme editor, without a page refresh. + + +Syntax: +``` +{% style %} + CSS_rules +{% endstyle %} +``` + +#### else +You can use the `else` tag with the following tags: + +- [`case`](https://shopify.dev/docs/api/liquid/tags/case) +- [`if`](https://shopify.dev/docs/api/liquid/tags/if) +- [`unless`](https://shopify.dev/docs/api/liquid/tags/unless) + + +Syntax: +``` +{% else %} + expression +``` + +#### else + +Syntax: +``` +{% for variable in array %} + first_expression +{% else %} + second_expression +{% endfor %} +``` + +#### liquid +Because the tags don't have delimeters, each tag needs to be on its own line. + +> Tip: +> Use the [`echo` tag](https://shopify.dev/docs/api/liquid/tags/echo) to output an expression inside `liquid` tags. + + +Syntax: +``` +{% liquid + expression +%} +``` + + +## Translation development standards + +### Translation requirements + +- **Every user-facing text** must use translation filters. +- **Update `locales/en.default.json`** with all new keys. +- **Use descriptive, hierarchical keys** for organization. +- **Only add English text**; translators handle other languages. + +### Translation filter usage + +**Use `{{ 'key' | t }}` for all text:** + +```liquid + +

{{ 'sections.featured_collection.title' | t }}

+

{{ 'sections.featured_collection.description' | t }}

+ + + +

Featured Collection

+

Check out our best products

+ +``` + +### Translation with variables + +**Use variables for interpolation:** + +```liquid + +

{{ 'products.price_range' | t: min: product.price_min | money, max: product.price_max | money }}

+

{{ 'general.pagination.page' | t: page: paginate.current_page, pages: paginate.pages }}

+``` + +**Corresponding keys in locale files:** + +```json +{ + "products": { + "price_range": "From {{ min }} to {{ max }}" + }, + "general": { + "pagination": { + "page": "Page {{ page }} of {{ pages }}" + } + } +} +``` + +### Best practices + +**Content guidelines:** +- Write clear, concise text. +- **Use sentence case** for all user-facing text, including titles, headings, and button labels (capitalize only the first word and proper nouns; e.g., `Featured collection` β†’ `Featured collection`, not `Featured Collection`). +- Be consistent with terminology. +- Consider character limits for UI elements. + +**Variable usage:** +- Use interpolation rather than appending strings together. +- Prioritize clarity over brevity for variable naming. +- Escape variables unless they output HTML: `{{ variable | escape }}`. + + +## Localization standards + +Auto-attached when working in `locales/` directory. + +### File structure + +``` +locales/ +β”œβ”€β”€ en.default.json # English (required) +β”œβ”€β”€ en.default.schema.json # English (required) +β”œβ”€β”€ es.json # Spanish +β”œβ”€β”€ est.schema.json # Spanish +β”œβ”€β”€ fr.json # French +β”œβ”€β”€ frt.schema.json # French +└── pt-BR.json # Portuguese +└── pt-BR..schema.json # Portuguese +``` + +#### Locale files + +Locale files are JSON files containing translations for all the text strings used throughout a Shopify theme and its editor. They let merchants easily update and localize repeated words and phrases, making it possible to translate store content and settings into multiple languages for international customers. These files provide a centralized way to manage and edit translations. + +**Example:** +```json +{ + "general": { + "cart": "Cart", + "checkout": "Checkout" + }, + "products": { + "add_to_cart": "Add to Cart" + } +} +``` + +#### Schema locale files + +Schema locale files, saved with a .schema.json extension, store translation strings specifically for theme editor setting schemas. They follow a structured organizationβ€”category, group, and descriptionβ€”to give context to each translation, enabling accurate localization of editor content. Schema locale files must use the IETF language tag format in their naming, such as en-GB.schema.json for British English or fr-CA.schema.json for Canadian French. + +**Example:** +```json +{ + "products": { + "card": { + "description": "Product card layout" + } + } +} +``` + +### Key organization + +**Hierarchical structure:** +```json +{ + "general": { + "meta": { + "title": "{{ shop_name }}", + "description": "{{ shop_description }}" + }, + "accessibility": { + "skip_to_content": "Skip to content", + "close": "Close" + } + }, + "products": { + "add_to_cart": "Add to cart", + "quick_view": "Quick view", + "price": { + "regular": "Regular price", + "sale": "Sale price", + "unit": "Unit price" + } + } +} +``` +**Usage** +```liquid +{{ 'general.meta.title' | t: shop_name: shop.name }} +{{ 'general.meta.description' | t: shop_description: shop.description }} +``` + +### Translation guidelines + +**Key naming:** +- Use descriptive, hierarchical keys +- Maximum 3 levels deep +- Use snake_case for key names +- Group related translations + +**Content rules:** +- Keep text concise for UI elements +- Use variables for dynamic content +- Consider character limits +- Maintain consistent terminology + +## Examples per kind of asset + +### `snippet` + +```liquid +{% 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} [css_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', + css_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 {{ css_class }}" + {% if url %} + href="{{ url }}" + {% endif %} +> + {{ image | image_url: width: width, height: height, crop: crop | image_tag }} + + +{% stylesheet %} + .image { + display: block; + position: relative; + overflow: hidden; + width: 100%; + height: auto; + } + + .image > img { + width: 100%; + height: auto; + } +{% endstylesheet %} + +{% javascript %} + function doSomething() { + // example + } + doSomething() +{% endjavascript %} + +``` + +### `block` + +#### Text + +```liquid +{% doc %} + Renders a text block. + + @example + {% content_for 'block', type: 'text', id: 'text' %} +{% enddoc %} + +
+ {{ block.settings.text }} +
+ +{% stylesheet %} + .text { + text-align: var(--text-align); + } + .text--title { + font-size: 2rem; + font-weight: 700; + } + .text--subtitle { + font-size: 1.5rem; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.text", + "settings": [ + { + "type": "text", + "id": "text", + "label": "t:labels.text", + "default": "Text" + }, + { + "type": "select", + "id": "text_style", + "label": "t:labels.text_style", + "options": [ + { "value": "text--title", "label": "t:options.text_style.title" }, + { "value": "text--subtitle", "label": "t:options.text_style.subtitle" }, + { "value": "text--normal", "label": "t:options.text_style.normal" } + ], + "default": "text--title" + }, + { + "type": "text_alignment", + "id": "alignment", + "label": "t:labels.alignment", + "default": "left" + } + ], + "presets": [{ "name": "t:general.text" }] +} +{% endschema %} +``` + +#### Group + +```liquid +{% doc %} + Renders a group of blocks with configurable layout direction, gap and + alignment. + + All settings apply to only one dimension to reduce configuration complexity. + + This component is a wrapper concerned only with rendering its children in + the specified layout direction with appropriate padding and alignment. + + @example + {% content_for 'block', type: 'group', id: 'group' %} +{% enddoc %} + +
+ {% content_for 'blocks' %} +
+ +{% stylesheet %} + .group { + display: flex; + flex-wrap: nowrap; + overflow: hidden; + width: 100%; + } + .group--horizontal { + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 0 var(--padding); + } + .group--vertical { + flex-direction: column; + align-items: var(--alignment); + padding: var(--padding) 0; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.group", + "blocks": [{ "type": "@theme" }], + "settings": [ + { + "type": "select", + "id": "layout_direction", + "label": "t:labels.layout_direction", + "default": "group--vertical", + "options": [ + { "value": "group--horizontal", "label": "t:options.direction.horizontal" }, + { "value": "group--vertical", "label": "t:options.direction.vertical" } + ] + }, + { + "visible_if": "{{ block.settings.layout_direction == 'group--vertical' }}", + "type": "select", + "id": "alignment", + "label": "t:labels.alignment", + "default": "flex-start", + "options": [ + { "value": "flex-start", "label": "t:options.alignment.left" }, + { "value": "center", "label": "t:options.alignment.center" }, + { "value": "flex-end", "label": "t:options.alignment.right" } + ] + }, + { + "type": "range", + "id": "padding", + "label": "t:labels.padding", + "default": 0, + "min": 0, + "max": 200, + "step": 2, + "unit": "px" + } + ], + "presets": [ + { + "name": "t:general.column", + "category": "t:general.layout", + "settings": { + "layout_direction": "group--vertical", + "alignment": "flex-start", + "padding": 0 + } + }, + { + "name": "t:general.row", + "category": "t:general.layout", + "settings": { + "layout_direction": "group--horizontal", + "padding": 0 + } + } + ] +} +{% endschema %} +``` + +### `section` + +```liquid +
+ {% if section.settings.background_image %} +
+ {{ section.settings.background_image | image_url: width: 2000 | image_tag }} +
+ {% endif %} + +
+ {% content_for 'blocks' %} +
+
+ +{% stylesheet %} + .example-section { + position: relative; + overflow: hidden; + width: 100%; + } + .example-section__background { + position: absolute; + width: 100%; + height: 100%; + z-index: -1; + overflow: hidden; + } + .example-section__background img { + position: absolute; + width: 100%; + height: auto; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + .example-section__content { + display: grid; + grid-template-columns: var(--content-grid); + } + + .example-section__content > * { + grid-column: 2; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.custom_section", + "blocks": [{ "type": "@theme" }], + "settings": [ + { + "type": "image_picker", + "id": "background_image", + "label": "t:labels.background" + } + ], + "presets": [ + { + "name": "t:general.custom_section" + } + ] +} +{% endschema %} +``` + diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..1fa7e0b --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +C:/laragon/www/season/nuevo-theme/AGENTS.md \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2ac6ce6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +opensource@shopify.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0877f74 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to Skeleton Theme + +## How to contribute + +We ❀️ pull requests. If you'd like to fix a bug, contribute a feature, or just correct a typo, feel free to do so, as long as you follow our [Code of Conduct](./CODE_OF_CONDUCT.md). + +If you're thinking of adding a new feature or proposing a new pattern across the theme, please consider opening an issue first. This will allow us to discuss your idea, ensure it aligns with the project's direction, and potentially save you some time. + +For your contribution to be accepted, you'll need to sign the [Shopify Contributor License Agreement (CLA)](https://cla.shopify.com/). + +## Standards + +* This codebase must be minimalist, not a fully featured theme. +* This theme must provide a common foundational starting point for most developers. +* Do not include or reference legacy or non-recommended features. +* All changes must preserve the principles defined in the README. + +## Steps to contribute + +1. Fork the repository: [https://github.com/Shopify/skeleton-theme/fork](https://github.com/Shopify/skeleton-theme/fork) +2. Create your feature branch: `git checkout -b my-new-feature` +3. Commit your changes: `git commit -am 'Add some feature'` +4. Push to your branch: `git push origin my-new-feature` +5. Create a new Pull Request diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..611b31d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,9 @@ +Copyright (c) 2018-present Shopify Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, sell and/or create derivative works of the Software or any part thereof, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The rights granted above may only be exercised to develop themes that integrate or interoperate with Shopify software or services, and, if applicable, to distribute, offer for sale or otherwise make available any such themes via the Shopify Theme Store. All other uses of the Software are strictly prohibited. + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index f4688f7..e7935cd 100644 --- a/README.md +++ b/README.md @@ -1 +1,160 @@ -Tema de shopify para Season \ No newline at end of file +

+
+ logo +
+ Shopify Skeleton Theme +

+ +A minimal, carefully structured Shopify theme designed to help you quickly get started. Designed with modularity, maintainability, and Shopify's best practices in mind. + +

+ License + CI +

+ +## Getting started + +### Prerequisites + +Before starting, ensure you have the latest Shopify CLI installed: + +- [Shopify CLI](https://shopify.dev/docs/api/shopify-cli) – helps you download, upload, preview themes, and streamline your workflows + +If you use VS Code: + +- [Shopify Liquid VS Code Extension](https://shopify.dev/docs/storefronts/themes/tools/shopify-liquid-vscode) – provides syntax highlighting, linting, inline documentation, and auto-completion specifically designed for Liquid templates + +### Clone + +Clone this repository using Git or Shopify CLI: + +```bash +git clone git@github.com:Shopify/skeleton-theme.git +# or +shopify theme init +``` + +### Preview + +Preview this theme using Shopify CLI: + +```bash +shopify theme dev +``` + +## Theme architecture + +```bash +. +β”œβ”€β”€ assets # Stores static assets (CSS, JS, images, fonts, etc.) +β”œβ”€β”€ blocks # Reusable, nestable, customizable UI components +β”œβ”€β”€ config # Global theme settings and customization options +β”œβ”€β”€ layout # Top-level wrappers for pages (layout templates) +β”œβ”€β”€ locales # Translation files for theme internationalization +β”œβ”€β”€ sections # Modular full-width page components +β”œβ”€β”€ snippets # Reusable Liquid code or HTML fragments +└── templates # Templates combining sections to define page structures +``` + +To learn more, refer to the [theme architecture documentation](https://shopify.dev/docs/storefronts/themes/architecture). + +### Templates + +[Templates](https://shopify.dev/docs/storefronts/themes/architecture/templates#template-types) control what's rendered on each type of page in a theme. + +The Skeleton Theme scaffolds [JSON templates](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates) to make it easy for merchants to customize their store. + +None of the template types are required, and not all of them are included in the Skeleton Theme. Refer to the [template types reference](https://shopify.dev/docs/storefronts/themes/architecture/templates#template-types) for a full list. + +### Sections + +[Sections](https://shopify.dev/docs/storefronts/themes/architecture/sections) are Liquid files that allow you to create reusable modules of content that can be customized by merchants. They can also include blocks which allow merchants to add, remove, and reorder content within a section. + +Sections are made customizable by including a `{% schema %}` in the body. For more information, refer to the [section schema documentation](https://shopify.dev/docs/storefronts/themes/architecture/sections/section-schema). + +### Blocks + +[Blocks](https://shopify.dev/docs/storefronts/themes/architecture/blocks) let developers create flexible layouts by breaking down sections into smaller, reusable pieces of Liquid. Each block has its own set of settings, and can be added, removed, and reordered within a section. + +Blocks are made customizable by including a `{% schema %}` in the body. For more information, refer to the [block schema documentation](https://shopify.dev/docs/storefronts/themes/architecture/blocks/theme-blocks/schema). + +## Schemas + +When developing components defined by schema settings, we recommend these guidelines to simplify your code: + +- **Single property settings**: For settings that correspond to a single CSS property, use CSS variables: + + ```liquid +
+ ... +
+ + {% stylesheet %} + .collection { + gap: var(--gap); + } + {% endstylesheet %} + + {% schema %} + { + "settings": [{ + "type": "range", + "label": "gap", + "id": "gap", + "min": 0, + "max": 100, + "unit": "px", + "default": 0, + }] + } + {% endschema %} + ``` + +- **Multiple property settings**: For settings that control multiple CSS properties, use CSS classes: + + ```liquid +
+ ... +
+ + {% stylesheet %} + .collection--full-width { + /* multiple styles */ + } + .collection--narrow { + /* multiple styles */ + } + {% endstylesheet %} + + {% schema %} + { + "settings": [{ + "type": "select", + "id": "layout", + "label": "layout", + "values": [ + { "value": "collection--full-width", "label": "t:options.full" }, + { "value": "collection--narrow", "label": "t:options.narrow" } + ] + }] + } + {% endschema %} + ``` + +## CSS & JavaScript + +For CSS and JavaScript, we recommend using the [`{% stylesheet %}`](https://shopify.dev/docs/api/liquid/tags#stylesheet) and [`{% javascript %}`](https://shopify.dev/docs/api/liquid/tags/javascript) tags. They can be included multiple times, but the code will only appear once. + +### `critical.css` + +The Skeleton Theme explicitly separates essential CSS necessary for every page into a dedicated `critical.css` file. + +## Contributing + +We're excited for your contributions to the Skeleton Theme! This repository aims to remain as lean, lightweight, and fundamental as possible, and we kindly ask your contributions to align with this intention. + +Visit our [CONTRIBUTING.md](./CONTRIBUTING.md) for a detailed overview of our process, guidelines, and recommendations. + +## License + +Skeleton Theme is open-sourced under the [MIT](./LICENSE.md) License. diff --git a/assets/critical.css b/assets/critical.css new file mode 100644 index 0000000..cdb1ae1 --- /dev/null +++ b/assets/critical.css @@ -0,0 +1,117 @@ +/** Critical CSS for the theme. This file is included on every page. */ + +/* Reset styles inspired by https://www.joshwcomeau.com/css/custom-css-reset/ */ +* { + box-sizing: border-box; + margin: 0; +} + +body { + display: flex; + flex-direction: column; + margin: 0; + min-height: 100svh; +} + +html:has(dialog[scroll-lock][open], details[scroll-lock][open]) { + overflow: hidden; +} + +img, +picture, +video, +canvas, +svg { + display: block; + max-width: 100%; + height: auto; +} + +input, +textarea, +select { + font: inherit; + border-radius: var(--style-border-radius-inputs); +} + +select { + background-color: var(--color-background); + color: currentcolor; +} + +dialog { + background-color: var(--color-background); + color: var(--color-foreground); +} + +p { + text-wrap: pretty; +} +p, +h1, +h2, +h3, +h4, +h5, +h6 { + overflow-wrap: break-word; +} + +p:empty { + display: none; +} + +:is(p, h1, h2, h3, h4, h5, h6):first-child, +:empty:first-child + :where(p, h1, h2, h3, h4, h5, h6) { + margin-block-start: 0; +} + +:is(p, h1, h2, h3, h4, h5, h6):last-child, +:where(p, h1, h2, h3, h4, h5, h6) + :has(+ :empty:last-child) { + margin-block-end: 0; +} + +/** Theme styles below */ +body { + font-family: var(--font-primary--family); + background-color: var(--color-background); + color: var(--color-foreground); +} + +/** Section layout utilities */ + +/** + * Setup a grid that enables both full-width and constrained layouts + * depending on the class of the child elements. + * + * By default, a minimum content margin is set on the left and right + * sides of the section and the content is centered in the viewport to + * not exceed the maximum page width. + * + * When a child element is given the `full-width` class, it will span + * the entire viewport. + */ +.shopify-section { + --content-width: min( + calc(var(--page-width) - var(--page-margin) * 2), + calc(100% - var(--page-margin) * 2) + ); + --content-margin: minmax(var(--page-margin), 1fr); + --content-grid: var(--content-margin) var(--content-width) var(--content-margin); + + /* This is required to make elements work as background images */ + position: relative; + grid-template-columns: var(--content-grid); + display: grid; + width: 100%; +} + +/* Child elements, by default, are constrained to the central column of the grid. */ +.shopify-section > * { + grid-column: 2; +} + +/* Child elements that use the full-width utility class span the entire viewport. */ +.shopify-section > .full-width { + grid-column: 1 / -1; +} diff --git a/assets/icon-account.svg b/assets/icon-account.svg new file mode 100644 index 0000000..5c523a3 --- /dev/null +++ b/assets/icon-account.svg @@ -0,0 +1,6 @@ + + + + diff --git a/assets/icon-cart.svg b/assets/icon-cart.svg new file mode 100644 index 0000000..0a8d0a9 --- /dev/null +++ b/assets/icon-cart.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/assets/shoppy-x-ray.svg b/assets/shoppy-x-ray.svg new file mode 100644 index 0000000..6937b3c --- /dev/null +++ b/assets/shoppy-x-ray.svg @@ -0,0 +1 @@ + diff --git a/blocks/group.liquid b/blocks/group.liquid new file mode 100644 index 0000000..baea31c --- /dev/null +++ b/blocks/group.liquid @@ -0,0 +1,105 @@ +{% doc %} + Renders a group of blocks with configurable layout direction, gap and + alignment. + + All settings apply to only one dimension to reduce configuration complexity. + + This component is a wrapper concerned only with rendering its children in + the specified layout direction with appropriate padding and alignment. + + @example + {% content_for 'block', type: 'group', id: 'group' %} +{% enddoc %} + +
+ {% content_for 'blocks' %} +
+ +{% stylesheet %} + .group { + display: flex; + flex-wrap: nowrap; + overflow: hidden; + width: 100%; + } + + .group--horizontal { + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 0 var(--padding); + } + + .group--vertical { + flex-direction: column; + align-items: var(--alignment); + padding: var(--padding) 0; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.group", + "blocks": [{ "type": "@theme" }], + "settings": [ + { + "type": "select", + "id": "layout_direction", + "label": "t:labels.layout_direction", + "default": "group--vertical", + "options": [ + { "value": "group--horizontal", "label": "t:options.direction.horizontal" }, + { "value": "group--vertical", "label": "t:options.direction.vertical" } + ] + }, + { + "visible_if": "{{ block.settings.layout_direction == 'group--vertical' }}", + "type": "select", + "id": "alignment", + "label": "t:labels.alignment", + "default": "flex-start", + "options": [ + { "value": "flex-start", "label": "t:options.alignment.left" }, + { "value": "center", "label": "t:options.alignment.center" }, + { "value": "flex-end", "label": "t:options.alignment.right" } + ] + }, + { + "type": "range", + "id": "padding", + "label": "t:labels.padding", + "default": 0, + "min": 0, + "max": 200, + "step": 2, + "unit": "px" + } + ], + "presets": [ + { + "name": "t:general.column", + "category": "t:general.layout", + "settings": { + "layout_direction": "group--vertical", + "alignment": "flex-start", + "padding": 0 + } + }, + { + "name": "t:general.row", + "category": "t:general.layout", + "settings": { + "layout_direction": "group--horizontal", + "padding": 0 + } + } + ] +} +{% endschema %} diff --git a/blocks/text.liquid b/blocks/text.liquid new file mode 100644 index 0000000..b985c38 --- /dev/null +++ b/blocks/text.liquid @@ -0,0 +1,59 @@ +{% doc %} + Renders a text block. + + @example + {% content_for 'block', type: 'text', id: 'text' %} +{% enddoc %} + +
+ {{ block.settings.text }} +
+ +{% stylesheet %} + .text { + text-align: var(--text-align); + } + .text--title { + font-size: 2rem; + font-weight: 700; + } + .text--subtitle { + font-size: 1.5rem; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.text", + "settings": [ + { + "type": "text", + "id": "text", + "label": "t:labels.text", + "default": "Text" + }, + { + "type": "select", + "id": "text_style", + "label": "t:labels.text_style", + "options": [ + { "value": "text--title", "label": "t:options.text_style.title" }, + { "value": "text--subtitle", "label": "t:options.text_style.subtitle" }, + { "value": "text--normal", "label": "t:options.text_style.normal" } + ], + "default": "text--title" + }, + { + "type": "text_alignment", + "id": "alignment", + "label": "t:labels.alignment", + "default": "left" + } + ], + "presets": [{ "name": "t:general.text" }] +} +{% endschema %} diff --git a/config/settings_data.json b/config/settings_data.json new file mode 100644 index 0000000..512f358 --- /dev/null +++ b/config/settings_data.json @@ -0,0 +1,12 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "current": {} +} diff --git a/config/settings_schema.json b/config/settings_schema.json new file mode 100644 index 0000000..8d3b532 --- /dev/null +++ b/config/settings_schema.json @@ -0,0 +1,83 @@ +[ + { + "name": "theme_info", + "theme_name": "Skeleton", + "theme_version": "0.1.0", + "theme_author": "Shopify", + "theme_documentation_url": "https://help.shopify.com/manual/online-store/themes", + "theme_support_url": "https://support.shopify.com/" + }, + { + "name": "t:general.typography", + "settings": [ + { + "type": "header", + "content": "t:general.fonts" + }, + { + "type": "font_picker", + "id": "type_primary_font", + "default": "work_sans_n4", + "label": "t:general.primary" + } + ] + }, + { + "name": "t:general.layout", + "settings": [ + { + "type": "select", + "id": "max_page_width", + "label": "t:labels.page_width", + "options": [ + { + "value": "90rem", + "label": "t:options.page_width.narrow" + }, + { + "value": "110rem", + "label": "t:options.page_width.wide" + } + ], + "default": "90rem" + }, + { + "type": "range", + "id": "min_page_margin", + "min": 10, + "max": 100, + "step": 1, + "unit": "px", + "label": "t:labels.page_margin", + "default": 20 + } + ] + }, + { + "name": "t:general.colors", + "settings": [ + { + "type": "color", + "id": "background_color", + "default": "#FFFFFF", + "label": "t:labels.background" + }, + { + "type": "color", + "id": "foreground_color", + "default": "#333333", + "label": "t:labels.foreground" + }, + { + "type": "range", + "id": "input_corner_radius", + "min": 0, + "max": 10, + "step": 1, + "unit": "px", + "label": "t:labels.input_corner_radius", + "default": 4 + } + ] + } +] diff --git a/copilot-instructions.md b/copilot-instructions.md new file mode 120000 index 0000000..1fa7e0b --- /dev/null +++ b/copilot-instructions.md @@ -0,0 +1 @@ +C:/laragon/www/season/nuevo-theme/AGENTS.md \ No newline at end of file diff --git a/layout/password.liquid b/layout/password.liquid new file mode 100644 index 0000000..350ec0b --- /dev/null +++ b/layout/password.liquid @@ -0,0 +1,19 @@ + + + + {% # Inlined CSS Variables %} + {% render 'css-variables' %} + + {% # Load and preload the critical CSS %} + {{ 'critical.css' | asset_url | stylesheet_tag: preload: true }} + + {% # Social, title, etc. %} + {% render 'meta-tags' %} + + {{ content_for_header }} + + + + {{ content_for_layout }} + + diff --git a/layout/theme.liquid b/layout/theme.liquid new file mode 100644 index 0000000..0e3fd39 --- /dev/null +++ b/layout/theme.liquid @@ -0,0 +1,36 @@ + + + + {% # Inlined CSS Variables %} + {% render 'css-variables' %} + + {% comment %} + Font preloading: + 1. Preconnect to font CDN for faster connection + 2. Preload only the critical font variant (base weight) + 3. Additional variants load on-demand via @font-face + {% endcomment %} + {% unless settings.type_primary_font.system? %} + + + {% comment %} Preload the base font variant for initial page render {% endcomment %} + {{ settings.type_primary_font | font_url | preload_tag: as: 'font', crossorigin: 'anonymous' }} + {% endunless %} + + {% # Load and preload the critical CSS %} + {{ 'critical.css' | asset_url | stylesheet_tag: preload: true }} + + {% # Social, title, etc. %} + {% render 'meta-tags' %} + + {{ content_for_header }} + + + + {% sections 'header-group' %} + + {{ content_for_layout }} + + {% sections 'footer-group' %} + + diff --git a/locales/en.default.json b/locales/en.default.json new file mode 100644 index 0000000..3a43570 --- /dev/null +++ b/locales/en.default.json @@ -0,0 +1,52 @@ +{ + "404": { + "title": "404", + "not_found": "Page not found.", + "back_to_shopping": "Back to shopping" + }, + "blog": { + "article_comments": "Comments", + "article_metadata_html": "{{ date }} by {{ author }}", + "comment_form_body": "Comment", + "comment_form_email": "Email", + "comment_form_name": "Name", + "comment_form_submit": "Post", + "comment_form_title": "Add a comment" + }, + "cart": { + "checkout": "Checkout", + "title": "Cart", + "update": "Update", + "remove": "Remove" + }, + "customers": { + "login": { + "email": "Email", + "password": "Password", + "submit": "Sign in", + "title": "Login" + } + }, + "collections": { + "title": "Collections" + }, + "gift_card": { + "add_to_apple_wallet": "Add to Apple Wallet", + "card": "Gift card", + "expired": "This gift card has expired", + "expires_on": "Expires on {{ expires_on }}", + "use_at_checkout": "Use this gift card at checkout" + }, + "password": { + "title": "This shop is private", + "password": "Password", + "enter": "Enter" + }, + "search": { + "title": "Search", + "placeholder": "Search articles, pages, or products", + "submit": "Search", + "no_results_html": "No results found for {{ terms }}", + "results_for_html": "{{ count }} results found for {{ terms }}" + } +} diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json new file mode 100644 index 0000000..2dfbc2f --- /dev/null +++ b/locales/en.default.schema.json @@ -0,0 +1,77 @@ +{ + "general": { + "404": "Not found", + "article": "Article", + "block": "Block", + "blog": "Blog", + "cart": "Cart", + "collection": "Collection", + "collections": "Collections", + "collection_card": "Collection card", + "collections_grid": "Collections grid", + "colors": "Colors", + "column": "Column", + "content": "Content", + "custom_section": "Custom section", + "fonts": "Fonts", + "footer": "Footer", + "group": "Group", + "header": "Header", + "layout": "Layout", + "main": "Main", + "page": "Page", + "password": "Password", + "primary": "Primary", + "product": "Product", + "row": "Row", + "search": "Search", + "secondary": "Secondary", + "section": "Section", + "settings": "Settings", + "sidebar": "Sidebar", + "text": "Text", + "theme": "Theme", + "typography": "Typography" + }, + "labels": { + "alignment": "Alignment", + "background": "Background", + "foreground": "Foreground", + "grid_gap": "Grid spacing", + "grid_item_width": "Grid item width", + "input_corner_radius": "Input corner radius", + "layout_direction": "Layout direction", + "menu": "Menu", + "customer_account_menu": "Customer account menu", + "padding": "Padding", + "page_margin": "Page margin", + "page_width": "Page width", + "show_payment_icons": "Show payment icons", + "text_style": "Text style", + "text": "Text" + }, + "options": { + "alignment": { + "left": "Left", + "center": "Center", + "right": "Right" + }, + "direction": { + "horizontal": "Horizontal", + "vertical": "Vertical" + }, + "page_width": { + "narrow": "Narrow", + "wide": "Wide" + }, + "size": { + "large": "Large", + "small": "Small" + }, + "text_style": { + "title": "Title", + "subtitle": "Subtitle", + "normal": "Normal text" + }, + } +} diff --git a/sections/404.liquid b/sections/404.liquid new file mode 100644 index 0000000..076cfc9 --- /dev/null +++ b/sections/404.liquid @@ -0,0 +1,23 @@ +{% comment %} + This section is used in the 404 template to render page shown when customers + enter an invalid store URL. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/404 +{% endcomment %} + +

{{ '404.title' | t }}

+ +

+ {{ '404.not_found' | t }} +

+ + + {{ '404.back_to_shopping' | t }} + + +{% schema %} +{ + "name": "t:general.404", + "settings": [] +} +{% endschema %} diff --git a/sections/article.liquid b/sections/article.liquid new file mode 100644 index 0000000..146acd1 --- /dev/null +++ b/sections/article.liquid @@ -0,0 +1,68 @@ +{% comment %} + This section is used in the article template to render the article page, which + displays the full content of the blog post and can optionally include a + comments section for customers (not shown in this example). + + https://shopify.dev/docs/storefronts/themes/architecture/templates/article +{% endcomment %} + +{% if article.image %} + {{ article.image | image_url: width: 1000 | image_tag }} +{% endif %} + +

{{ article.title }}

+ +{% assign date = article.published_at | time_tag: format: 'date' %} +

{{ 'blog.article_metadata_html' | t: date: date, author: article.author }}

+ +{{ article.content }} + +{% if blog.comments_enabled? %} +

{{ 'blog.article_comments' | t }}

+ +
+ {% paginate article.comments by 10 %} + {% for comment in article.comments %} +
+

{{ comment.author }}

+

+ {{- comment.created_at | time_tag: format: 'date' -}} +

+

{{ comment.content }}

+
+ {% endfor %} + + {{ paginate | default_pagination: anchor: 'comments' }} + {% endpaginate %} +
+ + {% form 'new_comment', article %} +

{{ 'blog.comment_form_title' | t }}

+ + {{ form.errors | default_errors }} + +
+ + +
+ +
+ + +
+ +
+ + +
+ + + {% endform %} +{% endif %} + +{% schema %} +{ + "name": "t:general.article", + "settings": [] +} +{% endschema %} diff --git a/sections/blog.liquid b/sections/blog.liquid new file mode 100644 index 0000000..0ea2113 --- /dev/null +++ b/sections/blog.liquid @@ -0,0 +1,35 @@ +{% comment %} + This section is used in the blog template to render the blog page listing all + articles within a blog. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/blog +{% endcomment %} + +

{{ blog.title }}

+ +{% paginate blog.articles by 5 %} + {% for article in blog.articles %} +
+ {% if article.image %} + {{ article.image | image_url: width: 1000 | image_tag }} + {% endif %} +

+ {{ article.title | link_to: article.url }} +

+ {% assign date = article.published_at | time_tag: format: 'date' %} +

{{ 'blog.article_metadata_html' | t: date: date, author: article.author }}

+

{{ article.excerpt }}

+
+ {% endfor %} + + {%- if paginate.pages > 1 -%} + {{- paginate | default_pagination -}} + {%- endif -%} +{% endpaginate %} + +{% schema %} +{ + "name": "t:general.blog", + "settings": [] +} +{% endschema %} diff --git a/sections/cart.liquid b/sections/cart.liquid new file mode 100644 index 0000000..6d7e498 --- /dev/null +++ b/sections/cart.liquid @@ -0,0 +1,37 @@ +{% comment %} + This section is used in the cart template to render /cart page with an + overview of the items in customer's cart. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/cart +{% endcomment %} + +

{{ 'cart.title' | t }}

+ +
+ + {% for item in cart.items %} + + + + + + {% endfor %} +
+ {% render 'image', image: item.image, url: item.url %} + +

{{ item.product.title }}

+ {{ 'cart.remove' | t | link_to: item.url_to_remove }} +
+ + +
+ + +
+ +{% schema %} +{ + "name": "t:general.cart", + "settings": [] +} +{% endschema %} diff --git a/sections/collection.liquid b/sections/collection.liquid new file mode 100644 index 0000000..e5a7868 --- /dev/null +++ b/sections/collection.liquid @@ -0,0 +1,47 @@ +{% comment %} + This section is used in the collection template to render collection page + listing all products within a collection. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/collection +{% endcomment %} + +

{{ collection.title }}

+ +
+ {% paginate collection.products by 20 %} + {% for product in collection.products %} +
+ {% if product.featured_image %} + {% render 'image', + class: 'collection-product__image', + image: product.featured_image, + url: product.url, + width: 400, + height: 400, + crop: 'center' + %} + {% endif %} +
+

{{ product.title | escape | link_to: product.url }}

+

{{ product.price | money }}

+
+
+ {% endfor %} + + {{ paginate | default_pagination }} + {% endpaginate %} +
+ +{% stylesheet %} + .collection-products { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.collection", + "settings": [] +} +{% endschema %} diff --git a/sections/collections.liquid b/sections/collections.liquid new file mode 100644 index 0000000..db897a3 --- /dev/null +++ b/sections/collections.liquid @@ -0,0 +1,83 @@ +{% comment %} + This section is used in the list-collections template to render a list of + collections. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/collection +{% endcomment %} + +

{{ 'collections.title' | t }}

+ +
+ {% for collection in collections %} + + {% if collection.featured_image %} + {% render 'image', + class: 'collection-card__image', + image: collection.featured_image, + width: 600, + height: 600, + crop: 'center' + %} + {% endif %} + +
+

{{ collection.title }}

+ + {% if collection.description %} +

{{ collection.description | strip_html | truncatewords: 15 }}

+ {% endif %} +
+
+ {% endfor %} +
+ +{% stylesheet %} + .collections { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(min(var(--collection-card-size), 100%), 1fr)); + gap: var(--grid-gap); + } + .collections--compact { + --collection-card-size: 160px; + } + .collections--full { + --collection-card-size: 280px; + } + .collection-card { + display: flex; + flex-direction: column; + width: 100%; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.collections_grid", + "settings": [ + { + "type": "select", + "id": "grid_item_width", + "label": "t:labels.grid_item_width", + "options": [ + { "value": "collections--compact", "label": "t:options.size.small" }, + { "value": "collections--full", "label": "t:options.size.large" } + ], + "default": "collections--full" + }, + { + "type": "range", + "id": "grid_gap", + "label": "t:labels.grid_gap", + "min": 0, + "max": 50, + "step": 5, + "unit": "px", + "default": 10 + } + ], + "presets": [{ "name": "t:general.collections_grid" }] +} +{% endschema %} diff --git a/sections/custom-section.liquid b/sections/custom-section.liquid new file mode 100644 index 0000000..529d497 --- /dev/null +++ b/sections/custom-section.liquid @@ -0,0 +1,60 @@ +
+ {% if section.settings.background_image %} +
+ {{ section.settings.background_image | image_url: width: 2000 | image_tag }} +
+ {% endif %} + +
+ {% content_for 'blocks' %} +
+
+ +{% stylesheet %} + .custom-section { + position: relative; + overflow: hidden; + width: 100%; + } + .custom-section__background { + position: absolute; + width: 100%; + height: 100%; + z-index: -1; + overflow: hidden; + } + .custom-section__background img { + position: absolute; + width: 100%; + height: auto; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + .custom-section__content { + display: grid; + grid-template-columns: var(--content-grid); + } + .custom-section__content > * { + grid-column: 2; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.custom_section", + "blocks": [{ "type": "@theme" }], + "settings": [ + { + "type": "image_picker", + "id": "background_image", + "label": "t:labels.background" + } + ], + "presets": [ + { + "name": "t:general.custom_section" + } + ] +} +{% endschema %} diff --git a/sections/footer-group.json b/sections/footer-group.json new file mode 100644 index 0000000..6560feb --- /dev/null +++ b/sections/footer-group.json @@ -0,0 +1,25 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "type": "footer", + "name": "t:general.footer", + "sections": { + "footer": { + "type": "footer", + "settings": { + "menu": "", + "show_payment_icons": true + } + } + }, + "order": [ + "footer" + ] +} diff --git a/sections/footer.liquid b/sections/footer.liquid new file mode 100644 index 0000000..66e6f09 --- /dev/null +++ b/sections/footer.liquid @@ -0,0 +1,57 @@ + + +{% stylesheet %} + footer { + display: flex; + justify-content: space-between; + margin-top: 2rem; + } + footer a { + text-decoration: none; + color: var(--color-foreground); + } + footer .footer__links, + footer .footer__payment { + display: flex; + gap: 1rem; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.footer", + "settings": [ + { + "type": "link_list", + "id": "menu", + "label": "t:labels.menu" + }, + { + "type": "checkbox", + "id": "show_payment_icons", + "label": "t:labels.show_payment_icons", + "default": true + } + ] +} +{% endschema %} diff --git a/sections/header-group.json b/sections/header-group.json new file mode 100644 index 0000000..25ed907 --- /dev/null +++ b/sections/header-group.json @@ -0,0 +1,22 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "type": "header", + "name": "t:general.header", + "sections": { + "header": { + "type": "header", + "settings": {} + } + }, + "order": [ + "header" + ], +} diff --git a/sections/header.liquid b/sections/header.liquid new file mode 100644 index 0000000..d873bdd --- /dev/null +++ b/sections/header.liquid @@ -0,0 +1,77 @@ +
+

+ {{ shop.name | link_to: routes.root_url }} +

+ +
+ {% for link in section.settings.menu.links %} + {{ link.title | link_to: link.url }} + {% endfor %} +
+ +
+ {% if shop.customer_accounts_enabled %} + + {{ 'icon-account.svg' | inline_asset_content }} + + {% endif %} + + + {% if cart.item_count > 0 %} + {{ cart.item_count }} + {% endif %} + + {{ 'icon-cart.svg' | inline_asset_content }} + +
+
+ +{% stylesheet %} + header { + height: 5rem; + display: flex; + align-items: center; + justify-content: space-between; + } + header a { + position: relative; + text-decoration: none; + color: var(--color-foreground); + display: flex; + align-items: center; + justify-content: center; + } + header a sup { + position: absolute; + left: 100%; + overflow: hidden; + max-width: var(--page-margin); + } + header svg { + width: 2rem; + } + header .header__menu, + header .header__icons { + display: flex; + gap: 1rem; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.header", + "settings": [ + { + "type": "link_list", + "id": "menu", + "label": "t:labels.menu" + }, + { + "type": "link_list", + "id": "customer_account_menu", + "label": "t:labels.customer_account_menu", + "default": "customer-account-main-menu" + } + ] +} +{% endschema %} diff --git a/sections/hello-world.liquid b/sections/hello-world.liquid new file mode 100644 index 0000000..839823a --- /dev/null +++ b/sections/hello-world.liquid @@ -0,0 +1,144 @@ +{% comment %} + Welcome to Shopify theme development! +{% endcomment %} + +
+
+
+

Hello, World!

+ +

+ The Skeleton theme is a minimal, carefully structured Shopify theme designed to help you quickly get started. + Designed with modularity, maintainability, and Shopify's best practices in mind. +

+ +

+ Themes shape the online store experience for merchants and their customers. Build fast, flexible themes at scale + using Liquid, Shopify's theme templating language, along with HTML, CSS, JavaScript, and JSON. +

+
+
+ +
+
+
+ +
+
+

Key Concepts

+

+ Shopify themes are a package of template files, building blocks, and supporting assets. Use these building blocks + to create modular, customizable themes. +

+

{{ 'Learn more about key concepts' | link_to: 'https://shopify.dev/docs/storefronts/themes/architecture' }}

+
+ +
+

Liquid

+

+ The Liquid templating language is the backbone of Shopify themes, and is used to load dynamic content on + storefronts. Extend Liquid objects to store and present custom data using metafields. +

+

{{ 'View the Liquid reference' | link_to: 'https://shopify.dev/docs/api/liquid' }}

+
+ +
+

Best Practices

+

+ To optimize your theme development experience, Shopify has established a set of best practices that you can refer + to when developing your theme and setting up your toolchains and processes. +

+

{{ 'Follow best practices' | link_to: 'https://shopify.dev/docs/storefronts/themes/best-practices' }}

+
+
+ +{% stylesheet %} + .welcome { + display: grid; + grid-template-columns: var(--content-grid); + background-color: #f6f6f7; + padding: 72px 0; + } + + .welcome-content { + grid-column: 2; + display: flex; + justify-content: space-between; + align-items: center; + gap: 1rem; + width: 100%; + padding: 0 24px; + } + + .welcome-description { + max-width: 80ch; + line-height: 1.4; + margin-top: 1.5rem; + } + + .icon { + width: 300px; + } + + .highlights { + display: grid; + gap: 2rem; + grid-template-columns: repeat(3, 1fr); + margin-top: 50px; + } + + @media (max-width: 1100px) { + .highlights { + grid-template-columns: 1fr; + } + } + + .highlight { + display: flex; + flex-direction: column; + height: 100%; + padding: 24px; + border-radius: 8px; + background-color: #eef3ff; + color: rgb(92, 95, 98); + line-height: 1.4; + } + + .highlight > * + * { + margin-top: 1rem; + } + + .highlight h3 { + font-size: 1rem; + color: rgb(32, 34, 35); + } + + .highlight-description { + flex: 1 1; + } + + .highlight a { + display: flex; + width: fit-content; + background-color: rgb(250, 251, 251); + box-shadow: rgba(0, 0, 0, 0.2) 0px -3px 0px 0px inset, rgba(255, 255, 255, 0.9) 0px 2px 0px 0px inset; + border: 1px solid rgb(140, 145, 150); + border-radius: 4px; + color: rgb(92, 95, 98); + padding: 3px 10px 5px; + text-decoration: none; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "Hello World", + "settings": [], + "presets": [ + { + "name": "Hello World Template", + "category": "Demo" + } + ] +} +{% endschema %} diff --git a/sections/page.liquid b/sections/page.liquid new file mode 100644 index 0000000..1a3fea1 --- /dev/null +++ b/sections/page.liquid @@ -0,0 +1,17 @@ +{% comment %} + This section is used in the page template to render store pages like About us + or Contact us. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/page +{% endcomment %} + +

{{ page.title }}

+ +{{ page.content }} + +{% schema %} +{ + "name": "t:general.page", + "settings": [] +} +{% endschema %} diff --git a/sections/password.liquid b/sections/password.liquid new file mode 100644 index 0000000..6f22721 --- /dev/null +++ b/sections/password.liquid @@ -0,0 +1,35 @@ +{% comment %} + This section is used in the password template to render landing page shown + when password protection is applied to a store. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/password +{% endcomment %} + +

{{ 'password.title' | t }}

+ +{% if shop.password_message %} +

{{ shop.password_message }}

+{% endif %} + +{% form 'storefront_password' %} + {% if form.errors %} + {{ form.errors | default_errors }} + {% endif %} + + + + + + +{% endform %} + +{% schema %} +{ + "name": "t:general.password", + "settings": [] +} +{% endschema %} diff --git a/sections/product.liquid b/sections/product.liquid new file mode 100644 index 0000000..9664dfd --- /dev/null +++ b/sections/product.liquid @@ -0,0 +1,52 @@ +{% comment %} + This section is used in the product template to render product page with + media, content, and add-to-cart form. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/product +{% endcomment %} + +
+ {% for image in product.images %} + {% render 'image', class: 'product-image', image: image %} + {% endfor %} +
+ +
+

{{ product.title }}

+

{{ product.price | money }}

+

{{ product.description }}

+
+ +
+ {% form 'product', product %} + {% assign current_variant = product.selected_or_first_available_variant %} + + + + + + + {{ form | payment_button }} + {% endform %} +
+ +{% schema %} +{ + "name": "t:general.product", + "settings": [], + "disabled_on": { + "groups": ["header", "footer"] + } +} +{% endschema %} diff --git a/sections/search.liquid b/sections/search.liquid new file mode 100644 index 0000000..7177c18 --- /dev/null +++ b/sections/search.liquid @@ -0,0 +1,70 @@ +{% comment %} + This section is used in the search template to render search results for + products, articles, and pages. + + https://shopify.dev/docs/storefronts/themes/architecture/templates/search +{% endcomment %} + +

{{ 'search.title' | t }}

+ +
+ + +
+ +{% if search.performed %} + {% if search.results_count == 0 %} +

{{ 'search.no_results_html' | t: terms: search.terms }}

+ {% else %} +

{{ 'search.results_for_html' | t: terms: search.terms, count: search.results_count }}

+ +
+ {% paginate search.results by 20 %} + {% # Search result items may be an article, a page, or a product. %} + {% for result in search.results %} +
+ {% assign featured_image = result.featured_image | default: result.image %} + {% if featured_image %} + {% render 'image', class: 'search-result__image', image: featured_image, url: result.url, width: 400 %} + {% endif %} +
+

+ {{ result.title | link_to: result.url }} + {% if result.price %} + {{ result.price | money_with_currency }} + {% endif %} +

+
+
+ {% endfor %} + + {{ paginate | default_pagination }} + {% endpaginate %} +
+ {% endif %} +{% endif %} + +{% stylesheet %} + .search-results { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + } + .search-results .prev, + .search-results .page, + .search-results .next { + grid-column: 1 / -1; + } +{% endstylesheet %} + +{% schema %} +{ + "name": "t:general.search", + "settings": [] +} +{% endschema %} diff --git a/snippets/css-variables.liquid b/snippets/css-variables.liquid new file mode 100644 index 0000000..99b5497 --- /dev/null +++ b/snippets/css-variables.liquid @@ -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 %} diff --git a/snippets/image.liquid b/snippets/image.liquid new file mode 100644 index 0000000..9ea580a --- /dev/null +++ b/snippets/image.liquid @@ -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 }} + + +{% stylesheet %} + .image { + display: block; + position: relative; + overflow: hidden; + width: 100%; + height: auto; + } + + .image > img { + width: 100%; + height: auto; + } +{% endstylesheet %} diff --git a/snippets/meta-tags.liquid b/snippets/meta-tags.liquid new file mode 100644 index 0000000..67299c0 --- /dev/null +++ b/snippets/meta-tags.liquid @@ -0,0 +1,105 @@ + + + + +{%- 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 +%} + + + + + + + +{%- if page_image -%} + + + + +{%- endif -%} + +{%- if request.page_type == 'product' -%} + + + + +{%- endif -%} + + + + + + + {{ 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 -%} + + + + +{% if page_description %} + +{% endif %} diff --git a/templates/404.json b/templates/404.json new file mode 100644 index 0000000..fc12fc7 --- /dev/null +++ b/templates/404.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ + { + "sections": { + "main": { + "type": "404", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/article.json b/templates/article.json new file mode 100644 index 0000000..d3bc0df --- /dev/null +++ b/templates/article.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "article", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/blog.json b/templates/blog.json new file mode 100644 index 0000000..09705d7 --- /dev/null +++ b/templates/blog.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "blog", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/cart.json b/templates/cart.json new file mode 100644 index 0000000..78c2add --- /dev/null +++ b/templates/cart.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "cart", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/collection.json b/templates/collection.json new file mode 100644 index 0000000..7592ac0 --- /dev/null +++ b/templates/collection.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "collection", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/gift_card.liquid b/templates/gift_card.liquid new file mode 100644 index 0000000..db5d828 --- /dev/null +++ b/templates/gift_card.liquid @@ -0,0 +1,73 @@ +{% layout none %} + + + + + {% # Inlined CSS Variables %} + {% render 'css-variables' %} + + {% # Load and preload the critical CSS %} + {{ 'critical.css' | asset_url | stylesheet_tag: preload: true }} + + {% # Social, title, etc. %} + {% render 'meta-tags' %} + + {% style %} + main { + text-align: center; + } + main img { + display: unset; + } + {% endstyle %} + + {{ content_for_header }} + + + +
+
+

{{ gift_card.balance | money }}

+ + {% if gift_card.enabled == false or gift_card.expired %} +

{{ 'gift_card.expired' | t }}

+ {% endif %} + + {% if gift_card.expires_on %} + {% assign expires_on = gift_card.expires_on | date: '%B %e, %Y' %} +

+ {{ 'gift_card.expires_on' | t: expires_on: expires_on }} +

+ {% endif %} + +

+ {% if settings.logo %} + {{ settings.logo | image_url: width: 300 | image_tag: alt: shop.name }} + {% else %} + {{ 'gift_card.card' | t }} + {% endif %} +

+ +

{{ shop.name }}

+

{{ 'gift_card.use_at_checkout' | t }}

+

{{ gift_card.code | format_code }}

+ + {% if gift_card.pass_url %} + + {{ 'gift_card.add_to_apple_wallet' | t }} + + {% endif %} +
+
+ + diff --git a/templates/index.json b/templates/index.json new file mode 100644 index 0000000..1f827db --- /dev/null +++ b/templates/index.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "hello-world", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/list-collections.json b/templates/list-collections.json new file mode 100644 index 0000000..3098428 --- /dev/null +++ b/templates/list-collections.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "collections", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/page.json b/templates/page.json new file mode 100644 index 0000000..36d2300 --- /dev/null +++ b/templates/page.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "page", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/password.json b/templates/password.json new file mode 100644 index 0000000..030b725 --- /dev/null +++ b/templates/password.json @@ -0,0 +1,21 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "layout": "password", + "sections": { + "main": { + "type": "password", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/product.json b/templates/product.json new file mode 100644 index 0000000..8329ddc --- /dev/null +++ b/templates/product.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "product", + "settings": {} + } + }, + "order": [ + "main" + ] +} diff --git a/templates/search.json b/templates/search.json new file mode 100644 index 0000000..8c540c5 --- /dev/null +++ b/templates/search.json @@ -0,0 +1,20 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ +{ + "sections": { + "main": { + "type": "search", + "settings": {} + } + }, + "order": [ + "main" + ] +}