More localizations
This commit is contained in:
parent
4d93951467
commit
c363322aa8
28
Readme.md
28
Readme.md
|
@ -1,14 +1,28 @@
|
||||||
:)
|
# Rico's cheatsheets
|
||||||
|
|
||||||
|
> Collection of web development cheatsheets:
|
||||||
|
|
||||||
|
Visit: **<https://ricostacruz.com/cheatsheets/>**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Notes
|
# Dev notes
|
||||||
|
|
||||||
|
## Starting a local instance
|
||||||
|
|
||||||
|
This is a mere Jekyll site, and `bundle exec jekyll serve` should be fine. But I suggest you use this instead:
|
||||||
|
|
||||||
|
```
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
## CSS classes
|
||||||
|
|
||||||
`h2` supports these:
|
`h2` supports these:
|
||||||
|
|
||||||
{: .-two-column}
|
{: .-two-column}
|
||||||
{: .-three-column}
|
{: .-three-column}
|
||||||
{: .-wide-second} # combine with -x-column
|
{: .-wide-second} # combine with -xxx-column
|
||||||
{: .-left-reference}
|
{: .-left-reference}
|
||||||
|
|
||||||
`h3` supports these:
|
`h3` supports these:
|
||||||
|
@ -32,6 +46,8 @@
|
||||||
{: .-four-column}
|
{: .-four-column}
|
||||||
{: .-six-column}
|
{: .-six-column}
|
||||||
|
|
||||||
|
## Frontmatter
|
||||||
|
|
||||||
Each sheet supports these metadata:
|
Each sheet supports these metadata:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
|
@ -49,6 +65,8 @@ prism_languages: [vim] # Extra syntax highlighting
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Prism languages
|
||||||
|
|
||||||
For supported prism languages:
|
For supported prism languages:
|
||||||
|
|
||||||
- <https://github.com/PrismJS/prism/tree/gh-pages/components>
|
- <https://github.com/PrismJS/prism/tree/gh-pages/components>
|
||||||
|
@ -65,3 +83,7 @@ category: Hidden
|
||||||
redirect_to: /es6
|
redirect_to: /es6
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Localizations
|
||||||
|
|
||||||
|
See `_data/content.yml` for chrome strings.
|
|
@ -59,9 +59,6 @@ defaults:
|
||||||
|
|
||||||
url: http://ricostacruz.com/cheatsheets
|
url: http://ricostacruz.com/cheatsheets
|
||||||
title: Cheatsheets
|
title: Cheatsheets
|
||||||
alt_title: Rico's Cheatsheets
|
|
||||||
home:
|
|
||||||
tagline: "Hey! I'm <a href='https://ricostacruz.com'>@rstacruz</a> and this is a modest collection of cheatsheets I've written."
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Google analytics
|
# Google analytics
|
||||||
|
@ -100,9 +97,3 @@ category_names:
|
||||||
|
|
||||||
# https://help.github.com/articles/repository-metadata-on-github-pages/
|
# https://help.github.com/articles/repository-metadata-on-github-pages/
|
||||||
repository: rstacruz/cheatsheets
|
repository: rstacruz/cheatsheets
|
||||||
|
|
||||||
#
|
|
||||||
# Disqus comments: uncomment to disable disqus
|
|
||||||
#
|
|
||||||
|
|
||||||
disqus_host: devhints.disqus.com
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
enabled: true
|
||||||
|
src: //cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom
|
|
@ -1,10 +1,35 @@
|
||||||
home:
|
home:
|
||||||
title: "Rico's cheatsheets"
|
title: "Rico's cheatsheets"
|
||||||
tagline: "Hey! I'm <a href='https://ricostacruz.com'>@rstacruz</a> and this is a modest collection of cheatsheets I've written."
|
tagline: "Hey! I'm <a href='https://ricostacruz.com'>@rstacruz</a> and this is a modest collection of cheatsheets I've written."
|
||||||
|
|
||||||
top_nav:
|
top_nav:
|
||||||
title: "Rico's cheatsheets"
|
title: "Rico's cheatsheets"
|
||||||
|
edit: Edit
|
||||||
|
edit_on_github: Edit this page on GitHub
|
||||||
|
|
||||||
|
sheet:
|
||||||
|
suffix: cheatsheet
|
||||||
|
|
||||||
social_list:
|
social_list:
|
||||||
default_description: "Grand collection of web development cheatsheets"
|
default_description: "Grand collection of web development cheatsheets"
|
||||||
description_prefix: "The ultimate cheatsheet for"
|
description: "The ultimate cheatsheet for TITLE."
|
||||||
facebook_share: Share on Facebook
|
facebook_share: Share on Facebook
|
||||||
twitter_share: Share on Twitter
|
twitter_share: Share on Twitter
|
||||||
|
|
||||||
|
related_posts_callout:
|
||||||
|
description: Over SIZE curated cheatsheets, by developers for developers.
|
||||||
|
link: Cheatsheets home
|
||||||
|
|
||||||
|
related_posts_group:
|
||||||
|
top: Top cheatsheets
|
||||||
|
other: Other cheatsheets
|
||||||
|
category: Other CATEGORY cheatsheets
|
||||||
|
|
||||||
|
search_form:
|
||||||
|
default_placeholder: Search SIZE+ cheatsheets
|
||||||
|
home_placeholder: Search...
|
||||||
|
prefix: devhints.io
|
||||||
|
|
||||||
|
comments_area:
|
||||||
|
suffix: for this cheatsheet.
|
||||||
|
link: "Write yours!"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
enabled: true
|
||||||
|
host: devhints.disqus.com
|
|
@ -1,22 +1,24 @@
|
||||||
{% assign identifier = include.page.url | remove: '.html' | remove_first: '/' %}
|
{% assign identifier = include.page.url | remove: '.html' | remove_first: '/' %}
|
||||||
<section class='comments-area' id='comments'>
|
{% if site.data.disqus.enabled %}
|
||||||
<div class='container'>
|
<section class='comments-area' id='comments'>
|
||||||
<details class='comments-details'>
|
<div class='container'>
|
||||||
<summary>
|
<details class='comments-details'>
|
||||||
<strong class='count'>
|
<summary>
|
||||||
<span class='disqus-comment-count' data-disqus-identifier="{{ identifier }}" data-disqus-url='{{ site.url }}/{{ identifier }}'>0 Comments</span>
|
<strong class='count'>
|
||||||
</strong>
|
<span class='disqus-comment-count' data-disqus-identifier="{{ identifier }}" data-disqus-url='{{ site.url }}/{{ identifier }}'>0 Comments</span>
|
||||||
<span class='suffix'>for this cheatsheet.</span>
|
</strong>
|
||||||
<span class='fauxlink'>Write yours!</span>
|
<span class='suffix'>{{ site.data.content.comments_area.suffix }}</span>
|
||||||
</summary>
|
<span class='fauxlink'>{{ site.data.content.comments_area.link }}</span>
|
||||||
<div class='comments-section'>
|
</summary>
|
||||||
<div class='comments'>
|
<div class='comments-section'>
|
||||||
<div id='disqus_thread'></div>
|
<div class='comments'>
|
||||||
<noscript data-js-disqus='{"host":"{{ site.disqus_host }}","url":"{{ site.url }}/{{ identifier }}","identifier":"{{ identifier }}"}'></noscript>
|
<div id='disqus_thread'></div>
|
||||||
|
<noscript data-js-disqus='{"host":"{{ site.data.disqus.host }}","url":"{{ site.url }}/{{ identifier }}","identifier":"{{ identifier }}"}'></noscript>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</details>
|
||||||
</details>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
|
|
||||||
<script id='dsq-count-scr' src='//{{ site.disqus_host }}/count.js' async></script>
|
<script id='dsq-count-scr' src='//{{ site.data.disqus.host }}/count.js' async></script>
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
| where_exp: "page", "page.deprecated != true"
|
| where_exp: "page", "page.deprecated != true"
|
||||||
| sort: "weight", "last"
|
| sort: "weight", "last"
|
||||||
%}
|
%}
|
||||||
|
{% assign size = site.pages | size %}
|
||||||
<footer class='related-posts-area' id='related'>
|
<footer class='related-posts-area' id='related'>
|
||||||
<div class='container'>
|
<div class='container'>
|
||||||
<div class='related-posts-section'>
|
<div class='related-posts-section'>
|
||||||
|
@ -19,11 +20,11 @@
|
||||||
<i class='icon'></i>
|
<i class='icon'></i>
|
||||||
|
|
||||||
<span class='description'>
|
<span class='description'>
|
||||||
Over {{ site.pages | size }} curated cheatsheets, by developers for developers.
|
{{ site.data.content.related_posts_callout.description | replace: "SIZE", size }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class='push-button -dark'>
|
<span class='push-button -dark'>
|
||||||
Cheatsheets home
|
{{ site.data.content.related_posts_callout.link }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -32,9 +33,9 @@
|
||||||
<div class='group'>
|
<div class='group'>
|
||||||
<div class='related-posts-group'>
|
<div class='related-posts-group'>
|
||||||
{% if include.page.category == 'Others' %}
|
{% if include.page.category == 'Others' %}
|
||||||
<h3>Other cheatsheets</h3>
|
<h3>{{ site.data.content.related_posts_group.other }}</h3>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>Other {{ include.page.category }} cheatsheets</h3>
|
<h3>{{ site.data.content.related_posts_group.category | replace: "CATEGORY", include.page.category }}</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<ul class='related-post-list'>
|
<ul class='related-post-list'>
|
||||||
|
@ -47,7 +48,7 @@
|
||||||
|
|
||||||
<div class='group'>
|
<div class='group'>
|
||||||
<div class='related-posts-group'>
|
<div class='related-posts-group'>
|
||||||
<h3>Top cheatsheets</h3>
|
<h3>{{ site.data.content.related_posts_group.top }}</h3>
|
||||||
|
|
||||||
<ul class='related-post-list'>
|
<ul class='related-post-list'>
|
||||||
{% for page in top_pages limit: 6 %}
|
{% for page in top_pages limit: 6 %}
|
||||||
|
|
|
@ -3,16 +3,19 @@
|
||||||
class='search'action='{{ base }}' method='get'>
|
class='search'action='{{ base }}' method='get'>
|
||||||
<label class='search-box {{ include.class }}'>
|
<label class='search-box {{ include.class }}'>
|
||||||
{% comment %}
|
{% comment %}
|
||||||
<span class='prefix'>devhints.io</span>
|
<span class='prefix'>{{ site.data.content.search_form.prefix }}</span>
|
||||||
<span class='sep'>/</span>
|
<span class='sep'>/</span>
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
<input name='q'
|
<input name='q'
|
||||||
type='text'
|
type='text'
|
||||||
{% if include.live %}
|
{% if include.live %}
|
||||||
|
{% assign placeholder = site.data.content.search_form.home_placeholder | replace: "%{size}", size %}
|
||||||
autofocus data-js-search-input
|
autofocus data-js-search-input
|
||||||
placeholder='Search...'
|
placeholder='{{ placeholder }}'
|
||||||
{% else %}
|
{% else %}
|
||||||
placeholder='Search {{ site.pages | size }}+ cheatsheets'
|
{% assign size = site.pages | size %}
|
||||||
|
{% assign placeholder = site.data.content.search_form.default_placeholder | replace: "SIZE", size %}
|
||||||
|
placeholder='{{ placeholder }}'
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -14,15 +14,15 @@
|
||||||
<div class='actions'>
|
<div class='actions'>
|
||||||
{% include social-list.html class="social page-actions" page=include.page %}
|
{% include social-list.html class="social page-actions" page=include.page %}
|
||||||
|
|
||||||
{% if include.page.type != 'website' %}
|
{% unless include.is_home %}
|
||||||
<ul class='page-actions'>
|
<ul class='page-actions'>
|
||||||
<li class='link github -button hint--bottom' data-hint='Edit this page on GitHub'>
|
<li class='link github -button hint--bottom' data-hint='{{ site.data.content.top_nav.edit_on_github }}'>
|
||||||
<a href='{{ site.github.repository_url }}/blob/gh-pages/{{ page.path | remove: '.html' }}'>
|
<a href='{{ site.github.repository_url }}/blob/gh-pages/{{ page.path | remove: '.html' }}'>
|
||||||
<span class='text -visible'>Edit</span>
|
<span class='text -visible'>{{ site.data.content.top_nav.edit }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endunless %}
|
||||||
</div>
|
</div>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% if include.page.home %}
|
{% if include.page.home %}
|
||||||
{% assign description = site.data.content.social_list.default_description %}
|
{% assign description = site.data.content.social_list.default_description %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% assign description = site.data.content.social_list.description_prefix | append: " " | append: include.page.title | append: "." %}
|
{% assign description = site.data.content.social_list.description | replace: "TITLE", include.page.title %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ul class="social-list {{ include.class }}">
|
<ul class="social-list {{ include.class }}">
|
||||||
<li class="facebook link hint--bottom" data-hint="{{ site.data.content.social_list.facebook_share }}"><a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ include.page.url }}" target="share"><span class="text"></span></a></li>
|
<li class="facebook link hint--bottom" data-hint="{{ site.data.content.social_list.facebook_share }}"><a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ include.page.url }}" target="share"><span class="text"></span></a></li>
|
||||||
|
|
|
@ -11,9 +11,11 @@ type: website
|
||||||
{% include 2017/head.html %}
|
{% include 2017/head.html %}
|
||||||
{% include 2017/top-nav.html page=page is_home=true %}
|
{% include 2017/top-nav.html page=page is_home=true %}
|
||||||
|
|
||||||
<div class='SideAd'>
|
{% if site.data.carbon.enabled %}
|
||||||
<script async src='//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom' id="_carbonads_js"></script>
|
<div class='SideAd'>
|
||||||
</div>
|
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class='body-area -slim'>
|
<div class='body-area -slim'>
|
||||||
<div class='site-header'>
|
<div class='site-header'>
|
||||||
|
|
|
@ -7,11 +7,13 @@ type: article
|
||||||
|
|
||||||
<div class='body-area'>
|
<div class='body-area'>
|
||||||
<header class='main-heading {% if page.ads != false %}-with-ads{% endif %}'>
|
<header class='main-heading {% if page.ads != false %}-with-ads{% endif %}'>
|
||||||
<h1 class='h1'>{{ page.title }} <em>cheatsheet</em></h1>
|
<h1 class='h1'>{{ page.title }} <em>{{ site.data.content.sheet.suffix }}</em></h1>
|
||||||
{% if page.ads != false %}
|
{% if page.ads != false %}
|
||||||
<div class='HeadlineAd ad'>
|
{% if site.data.carbon.enabled %}
|
||||||
<script async src='//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom' id="_carbonads_js"></script>
|
<div class='HeadlineAd ad'>
|
||||||
</div>
|
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
@ -28,10 +30,7 @@ type: article
|
||||||
|
|
||||||
<div class='pre-footer'><i class='icon'></i></div>
|
<div class='pre-footer'><i class='icon'></i></div>
|
||||||
|
|
||||||
{% if site.disqus_host %}
|
|
||||||
{% include 2017/comments-area.html page=page %}
|
{% include 2017/comments-area.html page=page %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% include 2017/search-footer.html %}
|
{% include 2017/search-footer.html %}
|
||||||
{% include 2017/related-posts.html page=page %}
|
{% include 2017/related-posts.html page=page %}
|
||||||
{% include 2017/foot.html %}
|
{% include 2017/foot.html %}
|
||||||
|
|
|
@ -13,9 +13,11 @@ type: article
|
||||||
<h1><span>{{ page.title }}</span></h1>
|
<h1><span>{{ page.title }}</span></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='headline-ad'>
|
{% if site.data.carbon.enabled %}
|
||||||
<script async src='//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom' id="_carbonads_js"></script>
|
<div class='headline-ad'>
|
||||||
</div>
|
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class='post-content -cheatsheet'>
|
<div class='post-content -cheatsheet'>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
|
@ -20,8 +20,10 @@ html_class: home
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<div class='side-ad'>
|
{% if site.data.carbon.enabled %}
|
||||||
<script async src='//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom' id="_carbonads_js"></script>
|
<div class='side-ad'>
|
||||||
</div>
|
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include foot.html %}
|
{% include foot.html %}
|
||||||
|
|
Loading…
Reference in New Issue