Add carbon

This commit is contained in:
Rico Sta. Cruz 2016-08-13 10:11:32 +08:00
parent cf9d5f8737
commit 8986e7d2f6
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
23 changed files with 135 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{% assign description = "The ultimate cheatsheet for " | append: include.page.title | append: "." %} {% assign description = "The ultimate cheatsheet for " | append: include.page.title | append: "." %}
<ul class="social-list"> <ul class="social-list {{ include.class }}">
<li class="facebook hint--bottom" data-hint="Share on Facebook"><a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ include.page.url }}" target="share"><span class="text">Like</span></a></li> <li class="facebook hint--bottom" data-hint="Share on Facebook"><a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ include.page.url }}" target="share"><span class="text">Like</span></a></li>
<li class="twitter hint--bottom" data-hint="Share on Twitter"><a href="https://twitter.com/intent/tweet?text={{ description }} {{ site.url }}{{ include.page.url }}" target="share"><span class="text">Tweet</span></a></li> <li class="twitter hint--bottom" data-hint="Share on Twitter"><a href="https://twitter.com/intent/tweet?text={{ description }} {{ site.url }}{{ include.page.url }}" target="share"><span class="text">Tweet</span></a></li>
<li class="googleplus hint--bottom" data-hint="Share on Google Plus"><a href="https://plus.google.com/share?url={{ site.url }}{{ include.page.url }}" target="share"><span class="text">+1</span></a></li> <li class="googleplus hint--bottom" data-hint="Share on Google Plus"><a href="https://plus.google.com/share?url={{ site.url }}{{ include.page.url }}" target="share"><span class="text">+1</span></a></li>

28
_layouts/default-ad.html Normal file
View File

@ -0,0 +1,28 @@
---
type: article
---
{% include head.html %}
{% include site-header.html %}
<div class='post-list -single -cheatsheet'>
<div class='post-item'>
{% include social-list.html page=page class="-collapse" %}
<div class='post-headline -cheatsheet'>
<p class='prelude'><span></span></p>
<h1><span>{{ page.title }}</span></h1>
</div>
<div class='headline-ad'>
<script async src='//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom' id="_carbonads_js"></script>
</div>
<div class='post-content -cheatsheet'>
{{ content }}
</div>
{% include social-list.html page=page %}
</div>
</div>
{% include foot.html %}

View File

@ -20,4 +20,8 @@ html_class: home
</div> </div>
{% endfor %} {% endfor %}
<div class='side-ad'>
<script async src='//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=ricostacruzcom' id="_carbonads_js"></script>
</div>
{% include foot.html %} {% include foot.html %}

View File

@ -61,7 +61,7 @@
} }
.post-headline.-cheatsheet .prelude span:before { .post-headline.-cheatsheet .prelude span:before {
content: 'The great cheatsheet for'; content: 'Cheatsheet for';
} }
@media (min-width: 769px) { @media (min-width: 769px) {
@ -191,3 +191,85 @@
box-shadow: none; box-shadow: none;
margin: 0; margin: 0;
} }
/*
* Carbon: side
*/
.side-ad {
position: absolute;
top: 80px;
right: 20px;
width: 130px;
display: block;
font-size: .8em;
}
.side-ad a {
text-decoration: none;
box-shadow: none;
}
.side-ad .carbon-text {
margin-top: 5px;
display: block;
}
.side-ad .carbon-poweredby {
display: block;
color: #aaa;
}
/*
* Cardbon: headline
*/
.headline-ad {
width: 300px;
min-height: 100px;
font-size: .8em;
margin: 0 auto 45px auto;
line-height: 1.5;
}
.headline-ad:after {
content: '';
display: table;
clear: both;
zoom: 1;
}
.headline-ad a {
text-decoration: none;
box-shadow: none;
}
.headline-ad img {
float: left;
margin-right: 15px;
background: #fafafa;
}
.headline-ad .carbon-text {
}
.headline-ad .carbon-poweredby {
display: block;
color: #aaa;
margin-top: 5px;
}
.social-list.-collapse {
margin-top: 0;
position: absolute;
top: 40vh;
left: 30px;
width: 32px;
}
@media (max-width: 480px) {
.social-list.-collapse {
display: none;
}
}

View File

@ -1,6 +1,7 @@
--- ---
title: Awesome-redux title: Awesome-redux
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
### [redux-actions](https://www.npmjs.com/package/redux-actions) ### [redux-actions](https://www.npmjs.com/package/redux-actions)

View File

@ -1,6 +1,7 @@
--- ---
title: bluebird.js title: bluebird.js
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
Also see the [promise cheatsheet](promise.html) and [Bluebird.js API](https://github.com/petkaantonov/bluebird/blob/master/API.md) (github.com). Also see the [promise cheatsheet](promise.html) and [Bluebird.js API](https://github.com/petkaantonov/bluebird/blob/master/API.md) (github.com).

View File

@ -1,6 +1,7 @@
--- ---
title: Chai.js title: Chai.js
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
### Assert ### Assert

View File

@ -1,6 +1,7 @@
--- ---
title: CSS antialiasing title: CSS antialiasing
category: CSS category: CSS
layout: default-ad
--- ---
* { * {

View File

@ -1,6 +1,7 @@
--- ---
title: Docker CLI title: Docker CLI
category: Devops category: Devops
layout: default-ad
--- ---
Manage images Manage images

1
es6.md
View File

@ -1,6 +1,7 @@
--- ---
title: ES2015 title: ES2015
category: JavaScript category: JavaScript
layout: default-ad
--- ---
## Stable in io.js ## Stable in io.js

View File

@ -1,6 +1,7 @@
--- ---
title: FactoryGirl title: FactoryGirl
category: Ruby libraries category: Ruby libraries
layout: default-ad
--- ---
### Paths ### Paths

View File

@ -1,5 +1,6 @@
--- ---
title: Homebrew title: Homebrew
layout: default-ad
--- ---
### Commands ### Commands

View File

@ -1,6 +1,7 @@
--- ---
title: httpie title: httpie
category: CLI category: CLI
layout: default-ad
--- ---
$ http POST example.com/posts/3 \ $ http POST example.com/posts/3 \

View File

@ -1,6 +1,7 @@
--- ---
title: Immutable.js title: Immutable.js
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
```js ```js

View File

@ -1,6 +1,7 @@
--- ---
title: Jasmine title: Jasmine
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
describe("A suite", function() { describe("A suite", function() {

View File

@ -1,5 +1,6 @@
--- ---
title: Parsley.js title: Parsley.js
layout: default-ad
--- ---
### Enabling ### Enabling

View File

@ -1,6 +1,7 @@
--- ---
title: React-router title: React-router
category: React category: React
layout: default-ad
--- ---
### Basic ### Basic

View File

@ -1,6 +1,7 @@
--- ---
title: React.js title: React.js
category: React category: React
layout: default-ad
--- ---
{%raw%} {%raw%}

View File

@ -1,6 +1,7 @@
--- ---
title: Riot.js title: Riot.js
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
## Tags ## Tags

View File

@ -1,6 +1,7 @@
--- ---
title: Sinon-chai title: Sinon-chai
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
* [Sinon-chai](https://github.com/domenic/sinon-chai) * [Sinon-chai](https://github.com/domenic/sinon-chai)

View File

@ -1,6 +1,7 @@
--- ---
title: Sinon title: Sinon
category: JavaScript libraries category: JavaScript libraries
layout: default-ad
--- ---
### Creating spies ### Creating spies

View File

@ -2,6 +2,7 @@
title: Vim script title: Vim script
category: Vim category: Vim
hljs_languages: [vim] hljs_languages: [vim]
layout: default-ad
--- ---
### Start hacking. ### Start hacking.

View File

@ -1,6 +1,7 @@
--- ---
title: Xpath title: Xpath
category: HTML category: HTML
layout: default-ad
--- ---
### Descendant selectors ### Descendant selectors