From c09cb6e05a927e6ed88f392a602d268241316cfb Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 15 Mar 2015 18:20:25 -0700 Subject: [PATCH 1/4] Add scrollbar to the left sidebar --- css/main.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/css/main.scss b/css/main.scss index bd0769a1..41b2ddda 100755 --- a/css/main.scss +++ b/css/main.scss @@ -85,6 +85,7 @@ $on-laptop: 900px; width: $sidebar-width; height: 100vh; position: fixed; + overflow: scroll; } .sidebar--logo { From 2232f9157c6310cb0476f270f58f035626d953f5 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 15 Mar 2015 18:20:32 -0700 Subject: [PATCH 2/4] Add documentation for `date` --- _filters/date.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_filters/date.md b/_filters/date.md index 1c281473..cfc81821 100644 --- a/_filters/date.md +++ b/_filters/date.md @@ -1,3 +1,12 @@ --- 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 | + +The format for this syntax is the same as [`strftime`](http://strftime.net/). From 601e49dc55ab82c93d1253ba0bd7c3771dfd6ddd Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 15 Mar 2015 18:23:17 -0700 Subject: [PATCH 3/4] pretty tables --- _filters/date.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_filters/date.md b/_filters/date.md index cfc81821..627368aa 100644 --- a/_filters/date.md +++ b/_filters/date.md @@ -4,9 +4,9 @@ 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 | +| Input | Output | +|--------------------------------------------------------------------------:|:---------------------| +| {% raw %}`{{ article.published_at | date: "%a, %b %d, %y" }}`{% endraw %} | Tue, Apr 22, 14 | +| {% raw %}`{{ article.published_at | date: "%Y" }}`{% endraw %} | 2014 | The format for this syntax is the same as [`strftime`](http://strftime.net/). From d65511e328e22e8b7f061b7741ae4836ac12e602 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 15 Mar 2015 22:10:36 -0700 Subject: [PATCH 4/4] Add some more docs --- _filters/escape.md | 9 +++++++++ _filters/escape_once.md | 10 ++++++++++ _filters/first.md | 8 ++++++++ _filters/floor.md | 11 +++++++++++ _filters/join.md | 8 ++++++++ _filters/last.md | 8 ++++++++ 6 files changed, 54 insertions(+) diff --git a/_filters/escape.md b/_filters/escape.md index fc6ec992..800651bd 100644 --- a/_filters/escape.md +++ b/_filters/escape.md @@ -1,3 +1,12 @@ --- 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"` | + +It doesn't modify strings that have nothing to escape. diff --git a/_filters/escape_once.md b/_filters/escape_once.md index 8b243299..0ae33be5 100644 --- a/_filters/escape_once.md +++ b/_filters/escape_once.md @@ -1,3 +1,13 @@ --- 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"` | + +It doesn't modify strings that have nothing to escape. diff --git a/_filters/first.md b/_filters/first.md index 8dc4da66..825949ce 100644 --- a/_filters/first.md +++ b/_filters/first.md @@ -1,3 +1,11 @@ --- 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"]`. diff --git a/_filters/floor.md b/_filters/floor.md index 2f03820a..7d2aefa5 100644 --- a/_filters/floor.md +++ b/_filters/floor.md @@ -1,3 +1,14 @@ --- 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 | +| {% raw %}`{{ "18.3" | floor }}`{% endraw %} | 18 | + +It will attempt to cast any input to a number. diff --git a/_filters/join.md b/_filters/join.md index 2de563e9..c74c1b90 100644 --- a/_filters/join.md +++ b/_filters/join.md @@ -1,3 +1,11 @@ --- 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"]`. diff --git a/_filters/last.md b/_filters/last.md index 28ab8462..1a311b0b 100644 --- a/_filters/last.md +++ b/_filters/last.md @@ -1,3 +1,11 @@ --- 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"]`.