diff --git a/_includes/2017/pages-list-item.html b/_includes/2017/pages-list-item.html
index fa6929c15..63db99cd6 100644
--- a/_includes/2017/pages-list-item.html
+++ b/_includes/2017/pages-list-item.html
@@ -9,6 +9,6 @@
{% endif %}
- {{ include.page.title }}
+ {{ include.page.title }} {{ include.page.redirect_to }}
diff --git a/_layouts/2017/home.html b/_layouts/2017/home.html
index 37125ce07..cb2e28147 100644
--- a/_layouts/2017/home.html
+++ b/_layouts/2017/home.html
@@ -1,8 +1,14 @@
---
type: website
---
+{% assign featured_pages = site.pages
+ | where_exp: "page", "page.tags contains 'Featured'"
+%}
+{% assign recent_pages = site.pages
+ | where_exp: "page", "page.updated"
+ | where_exp: "page", "page.updated >= site.last_updated"
+%}
{% include 2017/head.html %}
-
{% include 2017/top-nav.html page=page %}
@@ -26,24 +32,18 @@ type: website
- {% for page in site.pages %}
- {% if page.tags contains 'Featured' %}
- {% include 2017/pages-list-item.html page=page class='item top-sheet' %}
- {% endif %}
+ {% for page in featured_pages %}
+ {% include 2017/pages-list-item.html page=page class='item top-sheet' %}
{% endfor %}
Recently updated
- {% for page in site.pages %}
- {% if page.updated %}
- {% if page.updated >= site.last_updated %}
- {% unless page.tags contains 'Featured' %}
- {% include 2017/pages-list-item.html page=page class='article item' %}
- {% endunless %}
- {% endif %}
- {% endif %}
+ {% for page in recent_pages %}
+ {% unless page.tags contains 'Featured' %}
+ {% include 2017/pages-list-item.html page=page class='article item' %}
+ {% endunless %}
{% endfor %}
{% for category in site.category_names %}
diff --git a/css-tricks.md b/css-tricks.md
index 2596c8347..100ad4e1a 100644
--- a/css-tricks.md
+++ b/css-tricks.md
@@ -1,78 +1,105 @@
---
title: CSS tricks
category: CSS
+layout: 2017/sheet
---
### Heading kerning pairs and ligature
- h1, h2, h3 { text-rendering: optimizeLegibility; }
+```css
+h1, h2, h3 { text-rendering: optimizeLegibility; }
+```
### Native-like iOS scrolling
- -webkit-overflow-scrolling: touch;
- overflow-y: auto;
+```css
+-webkit-overflow-scrolling: touch;
+overflow-y: auto;
+```
### Gradient text
- background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333));
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
+```css
+background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333));
+-webkit-background-clip: text;
+-webkit-text-fill-color: transparent;
+```
### Text stroke
- /* http://www.webkit.org/blog/85/introducing-text-stroke/ */
- -webkit-text-stroke: 3px black;
+```css
+-webkit-text-stroke: 3px black;
+```
+
+See: [Introducing text stroke](http://www.webkit.org/blog/85/introducing-text-stroke/)
### iOS Scrolling prevention
- document.ontouchstart = (e) ->
- $pane = $(e.target).closest('.scrollable>div')
- if $pane.length is 0 or $pane[0].scrollHeight <= $pane.innerHeight()
- e.preventDefault()
+```css
+document.ontouchstart = (e) ->
+ $pane = $(e.target).closest('.scrollable>div')
+ if $pane.length is 0 or $pane[0].scrollHeight <= $pane.innerHeight()
+ e.preventDefault()
+```
- %ios-scrollable
- &, >div
- -webkit-overflow-scrolling: touch
- overflow: auto
+```scss
+%ios-scrollable {
+ &, >div {
+ -webkit-overflow-scrolling: touch;
+ overflow: auto;
+ }
- >div
- position: absolute
- top: 0
- left: 0
- right: 0
- bottom: 0
+ >div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+}
+```
+
+Relevant in iOS6, but maybe not anymore.
### UIWebView optimizations
- /* http://www.bitsandpix.com/entry/ios-webkit-uiwebview-remove-tapclick-highlightborder-with-css/ */
- /*
- http://www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
- */
+```css
+* {
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
+ -webkit-user-select: none; /* disable text select */
+ -webkit-touch-callout: none; /* disable callout, image save panel (popup) */
+ -webkit-tap-highlight-color: transparent; /* "turn off" link highlight */
+}
- * {
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- -webkit-user-select: none; /* disable text select */
- -webkit-touch-callout: none; /* disable callout, image save panel (popup) */
- -webkit-tap-highlight-color: transparent; /* "turn off" link highlight */
- }
+a:focus {
+ outline: 0; // Firefox (remove border on link click)
+}
+```
- a:focus {
- outline:0; // Firefox (remove border on link click)
- }
+See:
+
+See:
Browser hacks
-------------
+{: .-three-column}
+
+### Disclaimer
Not recommended, but here they are if you ever need them. Note that vendor
prefixes may go away eventually.
### Mozilla-only
- @-moz-document url-prefix() {
- .box { color: blue; }
- }
+```css
+@-moz-document url-prefix() {
+ .box { color: blue; }
+}
+```
### Webkit-only
- @media all and (-webkit-min-device-pixel-ratio: 1) {
- }
+```css
+@media all and (-webkit-min-device-pixel-ratio: 1) {
+}
+```
diff --git a/dockerfile.md b/dockerfile.md
index a44b6bff1..6c58b9494 100644
--- a/dockerfile.md
+++ b/dockerfile.md
@@ -1,8 +1,12 @@
---
title: Dockerfile
category: Devops
+layout: 2017/sheet
---
+## Reference
+{: .-three-column}
+
### Inheritance
```
@@ -28,8 +32,9 @@ WORKDIR /myapp
### Onbuild
-```docker
-ONBUILD RUN bundle install # when used with another file
+```bash
+ONBUILD RUN bundle install
+# when used with another file
```
### Commands
@@ -39,6 +44,7 @@ EXPOSE 5900
CMD ["bundle", "exec", "rails", "server"]
```
-### Reference
+## See also
+{: .-one-column}
-
diff --git a/rsync.md b/rsync.md
index b5e46a3ac..89d9a2026 100644
--- a/rsync.md
+++ b/rsync.md
@@ -1,62 +1,84 @@
---
title: Rsync
category: CLI
+layout: 2017/sheet
---
- rsync -avz ./src /dest
+### Basic example
+{: .-prime}
+
+```bash
+rsync -avz ./src /dest
+```
### OSX
- --exclude '.Trashes'
- --exclude '.Spotlight-V100'
- --exclude '.fseventsd'
+```bash
+--exclude '.Trashes'
+--exclude '.Spotlight-V100'
+--exclude '.fseventsd'
+```
-### Options
+### Transfer options
-Transfer:
+```bash
+-z, --compress
+-n, --dry-run
+```
- -z, --compress
- -n, --dry-run
+### Display options
-Display:
+```bash
+-q, --quiet
+-v, --verbose
+-h, --human-readable
+ --progress
+```
- -q, --quiet
- -v, --verbose
- -h, --human-readable
- --progress
+### Skipping options
-Skipping:
+```bash
+-u, --update # skip files newer on dest
+-c, --checksum # skip based on checksum, not mod-time & size
+```
- -u, --update # skip files newer on dest
- -c, --checksum # skip based on checksum, not mod-time & size
+### Backup options
-Backups:
+```bash
+-b, --backup # backup with suffix
+ --suffix=SUFFIX # default ~ without --backup-dir
+ --backup-dir=DIR
+```
- -b, --backup # backup with suffix
- --suffix=SUFFIX # default ~ without --backup-dir
+### Include options
- --backup-dir=DIR
+```bash
+--exclude=PATTERN
+--include=PATTERN
+```
-### Include
+```bash
+--exclude-from=FILE
+--include-from=FILE
+--files-from=FILE # read list of filenames from FILe
+```
- --exclude=PATTERN
- --include=PATTERN
+### Archive options
- --exclude-from=FILE
- --include-from=FILE
- --files-from=FILE # read list of filenames from FILe
+```bash
+-a, --archive # archive (-rlptgoD)
+```
-### Archive
-
- -a, --archive # archive (-rlptgoD)
-
- -r, --recursive
- -l, --links # copy symlinks as links
- -p, --perms # preserve permissions
- -t, --times # preserve times
- -g, --group # preserve group
- -o, --owner # preserve owner
- -D # --devices --specials
-
- --delete # Delete extra files
+```bash
+-r, --recursive
+-l, --links # copy symlinks as links
+-p, --perms # preserve permissions
+-t, --times # preserve times
+-g, --group # preserve group
+-o, --owner # preserve owner
+-D # --devices --specials
+```
+```bash
+--delete # Delete extra files
+```