mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Show version badge on recently-added tags
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: at_least
|
title: at_least
|
||||||
description: Liquid filter that limits a number to a minimum value.
|
description: Liquid filter that limits a number to a minimum value.
|
||||||
|
version-badge: 4.0.1
|
||||||
---
|
---
|
||||||
|
|
||||||
Limits a number to a minimum value.
|
Limits a number to a minimum value.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: at_most
|
title: at_most
|
||||||
description: Liquid filter that limits a number to a maximum value.
|
description: Liquid filter that limits a number to a maximum value.
|
||||||
|
version-badge: 4.0.1
|
||||||
---
|
---
|
||||||
|
|
||||||
Limits a number to a maximum value.
|
Limits a number to a maximum value.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: compact
|
title: compact
|
||||||
description: Liquid filter that removes nil values from an array.
|
description: Liquid filter that removes nil values from an array.
|
||||||
|
version-badge: 4.0.0
|
||||||
---
|
---
|
||||||
|
|
||||||
Removes any `nil` values from an array.
|
Removes any `nil` values from an array.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: concat
|
title: concat
|
||||||
description: Liquid filter that concatenates arrays.
|
description: Liquid filter that concatenates arrays.
|
||||||
|
version-badge: 4.0.0
|
||||||
---
|
---
|
||||||
|
|
||||||
Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.
|
Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: sort_natural
|
title: sort_natural
|
||||||
description: Liquid filter that sorts an array in case-insensitive order.
|
description: Liquid filter that sorts an array in case-insensitive order.
|
||||||
|
version-badge: 4.0.0
|
||||||
---
|
---
|
||||||
|
|
||||||
Sorts items in an array in case-insensitive order.
|
Sorts items in an array in case-insensitive order.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: url_decode
|
title: url_decode
|
||||||
description: Liquid filter that decodes percent-encoded characters in a string.
|
description: Liquid filter that decodes percent-encoded characters in a string.
|
||||||
|
version-badge: 4.0.0
|
||||||
---
|
---
|
||||||
|
|
||||||
Decodes a string that has been encoded as a URL or by [url_encode]({{ "/filters/url_encode/" | prepend: site.baseurl }}).
|
Decodes a string that has been encoded as a URL or by [url_encode]({{ "/filters/url_encode/" | prepend: site.baseurl }}).
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: where
|
title: where
|
||||||
description: Liquid filter that selects from arrays.
|
description: Liquid filter that selects from arrays.
|
||||||
|
version-badge: 4.0.2
|
||||||
---
|
---
|
||||||
|
|
||||||
Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy/#truthy" | prepend: site.baseurl }}) value by default.
|
Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy/#truthy" | prepend: site.baseurl }}) value by default.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<span class="version-badge" title="This feature is available since version {{ include.version }}" data-version="{{ include.version }}"></span>
|
||||||
@@ -55,7 +55,12 @@
|
|||||||
<span aria-hidden="true">{% include icons/three-bars.svg %}</span>
|
<span aria-hidden="true">{% include icons/three-bars.svg %}</span>
|
||||||
<span>Menu</span>
|
<span>Menu</span>
|
||||||
</button>
|
</button>
|
||||||
{% if page.title %}<h1>{{ page.title }}</h1>{% endif %}
|
{% if page.title -%}
|
||||||
|
<h1>{{ page.title }}
|
||||||
|
{%- if page.version-badge -%}
|
||||||
|
{%- include version-badge.html version=page.version-badge -%}
|
||||||
|
{%- endif -%}</h1>
|
||||||
|
{%- endif %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -20,3 +20,18 @@
|
|||||||
border-top: none;
|
border-top: none;
|
||||||
border-radius: 0 0 3px 3px;
|
border-radius: 0 0 3px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version-badge {
|
||||||
|
padding: 4px;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 300;
|
||||||
|
background: lighten($color-blue-1, 1);
|
||||||
|
border: 1px solid $color-blue-2;
|
||||||
|
border-radius: 3px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version-badge:before {
|
||||||
|
content: attr(data-version);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user