{%- assign work = include.work -%} {%- assign status_slug = work.status | default: 'archive' | slugify -%} {%- assign series_name = work.series | default: work.section | default: 'Other work' -%} {%- assign series_slug = series_name | slugify -%} {%- comment -%} PRICE: Front matter should store a plain number, e.g. price: 1545 Not price: "$1,545". This lets us format it for display AND pass a clean number to Offer schema. {%- endcomment -%} {%- assign price_number = work.price | remove: '$' | remove: ',' | strip -%} {%- assign is_available = false -%} {%- if work.status == 'Available' -%}{%- assign is_available = true -%}{%- endif -%} {%- assign has_price = false -%} {%- if price_number != blank and price_number != '0' -%}{%- assign has_price = true -%}{%- endif -%} {%- comment -%} DIMENSIONS: Prefer structured fields, fall back to a single string. Front matter ideal: width: 24 height: 30 depth: 1.5 Fallback: size: "24 × 30 × 1.5 in" dimensions: "24 × 30 × 1.5 in" Never parse "24x30x1.5" in Liquid — it is too fragile. {%- endcomment -%} {%- capture dimensions_display -%} {%- if work.width and work.height -%} {{ work.width }} × {{ work.height }}{%- if work.depth %} × {{ work.depth }}{%- endif %} in {%- elsif work.dimensions -%} {{ work.dimensions }} {%- elsif work.size -%} {{ work.size }} {%- endif -%} {%- endcapture -%} {%- assign dimensions_display = dimensions_display | strip -%} {%- comment -%} ALT: Descriptive, not just the title. Front matter alt wins when it exists. Otherwise build: Title — medium, dimensions. Example: "Aurum Rising — acrylic on canvas, 24 × 30 × 1.5 in" {%- endcomment -%} {%- capture alt_fallback -%} {{ work.title }}{%- if work.medium or dimensions_display != blank %} — {%- endif -%} {%- if work.medium %}{{ work.medium }}{%- endif -%} {%- if work.medium and dimensions_display != blank %}, {% endif -%} {{- dimensions_display -}} {%- endcapture -%} {%- assign alt_text = work.alt | default: alt_fallback | strip -%} {%- comment -%} AVAILABILITY for schema. Only Available = InStock. Everything else is NOT offered for sale in the card. {%- endcomment -%} {%- assign availability_url = 'https://schema.org/OutOfStock' -%} {%- if is_available -%}{%- assign availability_url = 'https://schema.org/InStock' -%} {%- elsif status_slug contains 'sold' -%}{%- assign availability_url = 'https://schema.org/SoldOut' -%}{%- endif -%}
{%- if work.image -%} {{ alt_text | escape }} {%- else -%} {%- endif -%} {%- if work.status -%} {{ work.status }} {%- endif -%} {%- if work.featured -%} Featured {%- endif -%}

{{ series_name }}

{{ work.title }}

{%- if dimensions_display != blank or work.medium -%}

{%- if dimensions_display != blank %}{{ dimensions_display }}{%- endif -%} {%- if dimensions_display != blank and work.medium -%} · {%- endif -%} {%- if work.medium -%}{{ work.medium }}{%- endif -%}

{%- endif -%} {%- comment -%} PRICING DISPLAY: Only show a price when Available. Sold / Private Collection / Archive never shows a price here. That also stops the old bug where sold work leaked its price. {%- endcomment -%} {%- if is_available -%}

{%- if has_price -%}${{ price_number }}{%- else -%}Price on request{%- endif -%}

{%- endif -%} {%- if work.subtitle -%}

{{ work.subtitle }}

{%- endif -%} View artwork details
{%- comment -%} OFFER SCHEMA: Only emit when Available AND a numeric price exists. No Offer for sold, private-collection, archive, or price-on-request work. That keeps Google from showing "InStock" for a sold painting. {%- endcomment -%} {%- if is_available and has_price -%} {%- endif -%}