How would I do this on my website www.XGear101.com
here is my code for the card-collection
{% comment %}
Renders a collection card
Accepts:
- card_collection: {Object} Collection Liquid object
- media_aspect_ratio: {String} Size of the product image card. Values are “square” and “portrait”. Default is “square” (optional)
- columns: {Number}
- extend_height: {Boolean} Card height extends to available container space. Default: false (optional)
- wrapper_class: {String} Wrapper class for card (optional)
Usage:
{% render ‘card-collection’ %}
{% endcomment %}
{%- liquid
assign ratio = 1
if card_collection.featured_image and media_aspect_ratio == ‘portrait’
assign ratio = 0.8
elsif card_collection.featured_image and media_aspect_ratio == ‘adapt’
assign ratio = card_collection.featured_image.aspect_ratio
endif
if ratio == 0 or ratio == null
assign ratio = 1
endif
assign card_color_scheme = settings.card_color_scheme
assign card_style = settings.card_style
if wrapper_class == null or wrapper_class == ‘none’
assign card_color_scheme = settings.collection_card_color_scheme
assign card_style = settings.collection_card_style
endif
-%}
{%- if card_collection.title != blank -%} {{- card_collection.title | escape -}} {%- else -%} {{ 'onboarding.collection_title' | t }} {%- endif -%} {%- if card_collection.description == blank -%} {% render 'icon-arrow' %} {%- endif %}
{%- if card_collection.description != blank -%}{{- card_collection.description | strip_html | truncatewords: 12 -}} {% render 'icon-arrow' %}
{%- endif -%}{%- if card_collection.title != blank -%} {{- card_collection.title | escape -}} {%- else -%} {{ 'onboarding.collection_title' | t }} {%- endif -%} {%- if card_collection.featured_image or card_collection.description == blank -%} {% render 'icon-arrow' %} {%- endif %}
{%- if card_collection.featured_image == null and card_collection.description != blank -%}{{- card_collection.description | strip_html | truncatewords: 12 -}} {% render 'icon-arrow' %}
{%- endif -%}