diff --git a/_filters/at_least.md b/_filters/at_least.md index 3e74b76..ab61b36 100644 --- a/_filters/at_least.md +++ b/_filters/at_least.md @@ -1,6 +1,7 @@ --- title: at_least description: Liquid filter that limits a number to a minimum value. +version-badge: 4.0.1 --- Limits a number to a minimum value. diff --git a/_filters/at_most.md b/_filters/at_most.md index 9c8ed37..f8f208c 100644 --- a/_filters/at_most.md +++ b/_filters/at_most.md @@ -1,6 +1,7 @@ --- title: at_most description: Liquid filter that limits a number to a maximum value. +version-badge: 4.0.1 --- Limits a number to a maximum value. diff --git a/_filters/compact.md b/_filters/compact.md index 2847104..d9c3075 100644 --- a/_filters/compact.md +++ b/_filters/compact.md @@ -1,6 +1,7 @@ --- title: compact description: Liquid filter that removes nil values from an array. +version-badge: 4.0.0 --- Removes any `nil` values from an array. diff --git a/_filters/concat.md b/_filters/concat.md index a41b604..18a9b44 100644 --- a/_filters/concat.md +++ b/_filters/concat.md @@ -1,6 +1,7 @@ --- title: concat 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. diff --git a/_filters/sort_natural.md b/_filters/sort_natural.md index 316cb76..dadeac7 100644 --- a/_filters/sort_natural.md +++ b/_filters/sort_natural.md @@ -1,6 +1,7 @@ --- title: sort_natural 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. diff --git a/_filters/url_decode.md b/_filters/url_decode.md index bf240c1..e2a7f05 100644 --- a/_filters/url_decode.md +++ b/_filters/url_decode.md @@ -1,6 +1,7 @@ --- title: url_decode 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 }}). diff --git a/_filters/where.md b/_filters/where.md index 70f797f..d28967e 100644 --- a/_filters/where.md +++ b/_filters/where.md @@ -1,6 +1,7 @@ --- title: where 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. diff --git a/_includes/version-badge.html b/_includes/version-badge.html new file mode 100644 index 0000000..880c516 --- /dev/null +++ b/_includes/version-badge.html @@ -0,0 +1 @@ + diff --git a/_layouts/default.html b/_layouts/default.html index e942e79..b0fe697 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -55,7 +55,12 @@ Menu - {% if page.title %}

{{ page.title }}

{% endif %} + {% if page.title -%} +

{{ page.title }} + {%- if page.version-badge -%} + {%- include version-badge.html version=page.version-badge -%} + {%- endif -%}

+ {%- endif %} {{ content }} diff --git a/_sass/modules/_content-area.scss b/_sass/modules/_content-area.scss index dbee405..ecbcac1 100644 --- a/_sass/modules/_content-area.scss +++ b/_sass/modules/_content-area.scss @@ -20,3 +20,18 @@ border-top: none; 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); +}