Left-aligned table headers

This commit is contained in:
Tetsuro
2015-07-25 17:09:54 -04:00
parent a3ceafbcd0
commit 7f550c8bce
24 changed files with 23 additions and 25 deletions

View File

@@ -5,7 +5,7 @@ title: capitalize
`capitalize` ensures the first character of your string is capitalized.
| Input | Output |
|-----------------------------------------------------------:|:-----------------|
|:-----------------------------------------------------------|:-----------------|
| {% raw %}`{{ "title" | capitalize }}` {% endraw %} | "Title" |
| {% raw %}`{{ "my great title" | capitalize }}`{% endraw %} | "My great title" |

View File

@@ -6,7 +6,7 @@ layout: default
`ceil` rounds the input up to the nearest whole number.
| Input | Output |
|-------------------------------------------:|:-------|
|:-------------------------------------------|:-------|
| {% raw %}`{{ 1.2 | ceil }}` {% endraw %} | 2 |
| {% raw %}`{{ 1.7 | ceil }}` {% endraw %} | 2 |
| {% raw %}`{{ 2.0 | ceil }}` {% endraw %} | 2 |

View File

@@ -5,7 +5,7 @@ title: date
`date` converts a timestamp into another date format.
| Input | Output |
|--------------------------------------------------------------------------:|:---------------------|
|:--------------------------------------------------------------------------|:---------------------|
| {% raw %}`{{ article.published_at | date: "%a, %b %d, %y" }}`{% endraw %} | Tue, Apr 22, 14 |
| {% raw %}`{{ article.published_at | date: "%Y" }}`{% endraw %} | 2014 |

View File

@@ -5,7 +5,7 @@ title: divided_by
This filter divides its input by its parameter.
| Code | Output |
|--------------------------------------------------:|:-------|
|:--------------------------------------------------|:-------|
| {% raw %}`{{ 4 | divided_by: 2 }}` {% endraw %} | 2 |
| {% raw %}`{{ "16" | divided_by: 4 }}`{% endraw %} | 4 |

View File

@@ -5,7 +5,7 @@ title: downcase
This filter makes the entire input string the lower case version of each character within.
| Code | Output |
|-------------------------------------------------------:|:-----------------|
|:-------------------------------------------------------|:-----------------|
| {% raw %}`{{ "Peter Parker" | downcase }}`{% endraw %} | `"peter parker"` |
It doesn't modify strings which are already entirely lowercase. It works with anything that has a `#to_s` method.

View File

@@ -5,7 +5,7 @@ title: escape
Escapes a string by replacing characters with escape sequences (so that the string can be used in a URI).
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ "Need tips? Ask a friend!" | escape }}`{% endraw %} | `"Need%20tips%3F%Ask%20a%20friend%21"` |
| {% raw %}`{{ "Nope" | escape }}`{% endraw %} | `"Nope"` |

View File

@@ -5,7 +5,7 @@ title: escape_once
Escapes a string without affecting existing escaped entities.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ "1 < 2 & 3" | escape_once }}`{% endraw %} | `"1 < 2 & 3"` |
| {% raw %}`{{ "<< Accept & Checkout" | escape_once }}`{% endraw %} | `"<< Accept & Checkout"` |
| {% raw %}`{{ "Nope" | escape_once }}`{% endraw %} | `"Nope"` |

View File

@@ -5,7 +5,7 @@ title: first
Return the first element of an array.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ product.tags | first }}`{% endraw %} | `"sale"` |
In the sample above, assume that `product.tags` resolves to: `["sale", "mens", "womens", "awesome"]`.

View File

@@ -5,7 +5,7 @@ title: floor
`floor` rounds the input down to the nearest whole number.
| Input | Output |
|-------------------------------------------:|:-------|
|:-------------------------------------------|:-------|
| {% raw %}`{{ 1.2 | floor }}` {% endraw %} | 1 |
| {% raw %}`{{ 1.7 | floor }}` {% endraw %} | 1 |
| {% raw %}`{{ 2.0 | floor }}` {% endraw %} | 2 |

View File

@@ -5,7 +5,7 @@ title: join
`join` joins the elements of an array, using the character you provide.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ product.tags | join: ', ' }}`{% endraw %} | `"sale, mens, womens, awesome` |
In the sample above, assume that `product.tags` resolves to: `["sale", "mens", "womens", "awesome"]`.

View File

@@ -5,7 +5,7 @@ title: last
Return the last element of an array.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ product.tags | last }}`{% endraw %} | `"awesome"` |
In the sample above, assume that `product.tags` resolves to: `["sale", "mens", "womens", "awesome"]`.

View File

@@ -5,5 +5,5 @@ title: lstrip
Strips all whitespace (tabs, spaces, and newlines) from the left side of a string.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ ' too many spaces ' | lstrip }}`{% endraw %} | `"too many spaces "` |

View File

@@ -5,7 +5,7 @@ title: map
Collects an array of properties from a hash.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ product | map: 'tag' }}`{% endraw %} | `["sale", "mens", "womens", "awesome"]` |
In the sample above, assume that `product` resolves to: `[{ tags: "sale"}, { tags: "mens"}, { tags: "womens"}, { tags: "awesome"}]`.

View File

@@ -5,5 +5,5 @@ title: minus
Subtracts two numbers.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 100 | minus: 10 }}`{% endraw %} | `90` |

View File

@@ -5,5 +5,5 @@ title: modulo
Performs a modulo operation (eg., fetches the remainder).
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 2 | modulo: 2 }}`{% endraw %} | `1` |

View File

@@ -5,5 +5,5 @@ title: newline_to_br
Replace every newline (`n`) with an HTML break (`<br>`).
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ "hello\nthere" | newline_to_br }}`{% endraw %} | `hello<br/>there` |

View File

@@ -5,5 +5,5 @@ title: plus
Adds two numbers.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 100 | plus: 10 }}`{% endraw %} | `110` |

View File

@@ -5,5 +5,5 @@ title: prepend
Prepends a string onto another.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 'world' | prepend: 'hello ' }}`{% endraw %} | `hello world` |

View File

@@ -5,5 +5,5 @@ title: remove
Removes every occurrence of a given string.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 'hello, hello world' | remove: 'hello' }}`{% endraw %} | `, world` |

View File

@@ -5,5 +5,5 @@ title: remove_first
Removes the first occurrence of a given string.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 'hello, hello world' | remove_first: 'hello' }}`{% endraw %} | `, hello world` |

View File

@@ -5,5 +5,5 @@ title: replace_first
Replaces the first occurrence of a given string.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ 'hello, hello world' | replace_first: 'hello', 'goodbye' }}`{% endraw %} | `goodbye, hello world` |

View File

@@ -5,5 +5,5 @@ title: rstrip
Strips all whitespace (tabs, spaces, and newlines) from the right side of a string.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ ' too many spaces ' | rstrip }}`{% endraw %} | `"too many spaces "` |

View File

@@ -5,5 +5,5 @@ title: strip
Strips all whitespace (tabs, spaces, and newlines) from a string.
| Code | Output |
|-------------------------------------------------------:|:-------------------|
|:-------------------------------------------------------|:-------------------|
| {% raw %}`{{ ' too many spaces ' | strip }}`{% endraw %} | `"too many spaces"` |

View File

@@ -45,8 +45,6 @@
<div class="content">
{{ content }}
</div>
<a href="{{ page.previous }}">Previous </a>
<a href="{{ page.next }}">Next </a>
</div>
</div>