forked from rstacruz/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
198 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ruby 2.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<li class='{{ include.class }}'> | ||
<a href='{{ base }}{{ include.post.url | remove: '.html' }}'> | ||
<strong>{{ include.post.title }}</strong> | ||
<span>cheatsheet</span> | ||
</a> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% assign category_posts = site.pages | ||
| where: "category", include.page.category | ||
| where_exp: "page", "page.url != include.page.url" | ||
| where_exp: "page", "page.deprecated != true" | ||
| sort: "weight", "last" | ||
%} | ||
{% assign top_posts = site.pages | ||
| where_exp: "page", "page.tags contains 'Featured'" | ||
| where_exp: "page", "page.url != include.page.url" | ||
| where_exp: "page", "page.deprecated != true" | ||
| sort: "weight", "last" | ||
%} | ||
<div class='related-posts'> | ||
<div class='container'> | ||
{% if include.page.category == 'Others' %} | ||
<h3>Other cheatsheets</h3> | ||
{% else %} | ||
<h3>Other {{ include.page.category }} cheatsheets</h3> | ||
{% endif %} | ||
|
||
<ul class='related-post-list'> | ||
{% for post in category_posts limit: 6 %} | ||
{% include 2017/related-posts-item.html post=post class='item related-post-item' %} | ||
{% endfor %} | ||
</ul> | ||
|
||
<h3>Top cheatsheets</h3> | ||
|
||
<ul class='related-post-list'> | ||
{% for post in top_posts limit: 6 %} | ||
{% include 2017/related-posts-item.html post=post class='item related-post-item' %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
.related-posts { | ||
& { | ||
@include gutter(padding-top, $multiplier: 4); | ||
@include gutter(padding-bottom, $multiplier: 4); | ||
@include gutter(margin-top, $multiplier: 4); | ||
background: $gray-bg; | ||
} | ||
|
||
& > .container { | ||
@include gutter(padding-left); | ||
@include gutter(padding-right); | ||
max-width: $area-width; | ||
margin: 0 auto; | ||
} | ||
|
||
& > .container > h3 { | ||
@include font-size(1); | ||
font-weight: normal; | ||
color: $base-head; | ||
margin: 16px 0; | ||
padding: 0; | ||
} | ||
|
||
& > .container > :first-child { | ||
margin-top: 0; | ||
} | ||
|
||
& > .container > :last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
.related-post-list { | ||
&, | ||
& > li { | ||
margin: 0; | ||
padding: 0; | ||
list-style-type: none; | ||
} | ||
|
||
& { | ||
display: flex; | ||
margin: -4px; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
flex-wrap: wrap; | ||
} | ||
|
||
& > .item { | ||
flex: 1 1 (100% / 2); | ||
margin: 4px; | ||
|
||
@media (min-width: 481px) { | ||
flex: 1 1 (100% / 4); | ||
} | ||
|
||
@media (min-width: 769px) { | ||
flex: 1 1 (100% / 8); | ||
} | ||
} | ||
|
||
} | ||
|
||
.related-post-item.related-post-item { | ||
& { | ||
display: flex; | ||
text-align: left; | ||
line-height: 1.4; | ||
} | ||
|
||
// Layout | ||
& > a { | ||
flex: 1 1 100%; | ||
display: block; | ||
border-radius: 2px; | ||
box-shadow: $shadow2; | ||
padding: 16px; | ||
text-decoration: none; | ||
} | ||
|
||
// Color | ||
& > a, | ||
& > a:visited { | ||
background: white; | ||
color: $base-text; | ||
|
||
& > strong { | ||
color: $base-a; | ||
} | ||
|
||
&:hover, | ||
&:focus { | ||
color: $base-a; | ||
} | ||
|
||
&:hover > strong, | ||
&:focus > strong { | ||
color: darken($base-a, 16%); | ||
} | ||
} | ||
|
||
&:first-of-type > a, | ||
&:first-of-type > a:visited { | ||
background: $base-a; | ||
color: white; | ||
|
||
& > strong { | ||
color: white; | ||
} | ||
|
||
&:hover, | ||
&:focus { | ||
color: white; | ||
} | ||
|
||
&:hover > strong, | ||
&:focus > strong { | ||
color: white; | ||
} | ||
|
||
&:hover, | ||
&:focus { | ||
background: darken($base-a, 8%); | ||
} | ||
} | ||
|
||
@media (min-width: 481px) { | ||
& > a > strong, | ||
& > a > span { | ||
display: block; | ||
} | ||
} | ||
|
||
& > a > strong { | ||
@include font-size(1); | ||
font-weight: normal; | ||
} | ||
|
||
& > a > span { | ||
@include font-size(-1); | ||
opacity: 0.5; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Code stuff | ||
title: Code badges | ||
--- | ||
|
||
Here are some badges for open source projects. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ title: Cron | |
category: CLI | ||
layout: 2017/sheet | ||
updated: 201708 | ||
weight: -3 | ||
--- | ||
|
||
## Format | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ category: JavaScript | |
layout: 2017/sheet | ||
tags: [Featured] | ||
updated: 201708 | ||
weight: -10 | ||
--- | ||
|
||
### Promises | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ layout: 2017/sheet | |
ads: true | ||
tags: [Featured] | ||
updated: 201708 | ||
weight: -10 | ||
--- | ||
|
||
{%raw%} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
--- | ||
title: React.js | ||
title: React.js (v0.14) | ||
category: React | ||
layout: default-ad | ||
deprecated: true | ||
--- | ||
|
||
{%raw%} | ||
|