-
Notifications
You must be signed in to change notification settings - Fork 492
Conversation
{% if type == "stripe" %}<li>S</li>{% endif %} | ||
{% if type == "bitcoin" %}<li>B</li>{% endif %} | ||
<li> | ||
<span class="icon-fallback-text"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobi @mpiotrowicz Moved to a much simpler icon approach with text fallback when font-face isn't supported.
<li> | ||
<span class="icon-fallback-text"> | ||
<span class="icon icon-{{type}}" aria-hidden="true"></span> | ||
<span class="fallback-text">{{type | replace: '_',' '}}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should just make type.name work instead of relying on magical replace. @markdunkley know someone who could do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gauravmc thoughts? {{ type | name }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobi making {{ type.name }} work will mean making some drop instead of simple type
string right?
It'll be simple enough to add a filter as @markdunkley's suggesting. We can add a humanize
filter that replaces underscores with spaces. @cshold is such operation common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say common, though I'm also not very familiar with similar languages. humanize
has a nice ring to it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like humanize as a filter.
-- Tobi
CEO Shopify
(mobile)
On Jun 3, 2014, at 7:05 PM, Carson Shold notifications@github.com wrote:
In snippets/footer.liquid:
{% if type == "interac" %}<li>I</li>{% endif %}
{% if type == "visa" %}<li>V</li>{% endif %}
{% if type == "master" %}<li>M</li>{% endif %}
{% if type == "discover" %}<li>D</li>{% endif %}
{% if type == "dk" %}<li>d</li>{% endif %}
{% if type == "american_express" %}<li>A</li>{% endif %}
{% if type == "google" %}<li>G</li>{% endif %}
{% if type == "paypal" %}<li>P</li>{% endif %}
{% if type == "jcb" %}<li>J</li>{% endif %}
{% if type == "cirrus" %}<li>C</li>{% endif %}
{% if type == "stripe" %}<li>S</li>{% endif %}
{% if type == "bitcoin" %}<li>B</li>{% endif %}
<li>
<span class="icon-fallback-text">
<span class="icon icon-{{type}}" aria-hidden="true"></span>
I wouldn't say common, though I'm also not very familiar with similar languages. humanize has a nice ring to it though.<span class="fallback-text">{{type | replace: '_',' '}}</span>
—
Reply to this email directly or view it on GitHub.
Icons and Modernizer Adjustments
Icons and Modernizer Adjustments
font-face
not supported