Created
November 21, 2018 08:28
-
-
Save marioloncarek/35dc032ad8dc38ea12fa0a943ca951d1 to your computer and use it in GitHub Desktop.
how to write conditional classes in liquid because of whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main class="giftcard {% if gift_card.expired or gift_card.enabled != true %} giftcard--disabled{% endif %}"> | |
{%- if gift_card.expired != true and gift_card.expires_on and gift_card.enabled -%} | |
<span class="giftcard-tag giftcard-tag--active">{{ 'gift_cards.issued.active' | t: expiry: gift_card_expiry_date }}</span> | |
{%- endif -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment