This commit is contained in:
Rico Sta. Cruz 2017-08-29 02:42:51 +08:00
parent df73df7669
commit 29f92f6b12
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
8 changed files with 83 additions and 37 deletions

View File

@ -1,6 +1,7 @@
<a class='article item'
<a class='{{ include.class }} -item-{{ include.page.url | remove: '.html' | remove: '/' }}'
href="{{base}}{{ include.page.url | remove: '.html' }}"
data-js-searchable-item='{"slug":"{{ include.page.url | remove: '.html' | remove: '/' }}","category":"{{ include.page.category }}"}'>
<span class='info'>
<code class='slug'>{{ include.page.url | remove: '.html' | remove: '/' }}</code>
{% if include.page.layout == '2017/sheet' %}
@ -10,4 +11,5 @@
{% if include.page.title | downcase != include.page.url | remove: '.html' | remove: '/' %}
<span class='title'>{{ include.page.title }}</span>
{% endif %}
</span>
</a>

View File

@ -24,13 +24,9 @@ type: website
</div>
<div class='pages-list'>
<h2 class='category item' id='{{ category | downcase | replace: " ", "-" }}' data-js-searchable-header>
<span>Top cheatsheets</span>
</h2>
{% for page in site.pages %}
{% if page.tags contains 'Featured' %}
{% include 2017/pages-list-item.html page=page %}
{% include 2017/pages-list-item.html page=page class='item top-sheet' %}
{% endif %}
{% endfor %}
@ -41,7 +37,7 @@ type: website
{% for page in site.pages %}
{% if page.category == category %}
{% include 2017/pages-list-item.html page=page %}
{% include 2017/pages-list-item.html page=page class='article item' %}
{% endif %}
{% endfor %}
{% endfor %}

View File

@ -3,7 +3,6 @@
display: inline-block;
height: 12px;
width: 20px;
background: rgba(white, 0.1);
text-align: center;
}

View File

@ -1,14 +1,4 @@
.search-box {
background: $base-panel;
box-shadow: $shadow3;
& > input {
padding: 16px;
background: transparent;
border: 0;
width: 100%;
}
}
// search-box.scss
.pages-list {
& {
@ -20,6 +10,10 @@
padding: 4px 0;
flex: 0 0 50%;
}
> .item.top-sheet {
flex: 0 0 25%;
}
}
// Article
@ -33,20 +27,20 @@
color: $base-mute3;
}
& > code {
& > .info > .slug {
color: $base-head;
}
&:visited > code {
&:visited > .info > .slug {
color: $base-text;
}
& > .title::before {
& > .info > .title::before {
content: '';
margin: 0 4px;
}
& > .title {
& > .info > .title {
opacity: 0;
}
@ -56,12 +50,9 @@
color: $base-mute;
}
& > code {
color: $base-a;
}
& > .title {
& > .info > .title {
opacity: 1;
color: $base-a;
}
}
}
@ -75,3 +66,56 @@
color: $base-b;
flex: 0 0 100%;
}
.top-sheet.top-sheet {
padding: 4px;
text-decoration: none;
& > .info {
display: block;
background: darken($base-a, 8%);
color: white;
text-align: left;
padding: 16px;
width: auto;
border-radius: 3px;
box-shadow: $shadow2;
}
&:nth-of-type(3n + 1) {
& > .info {
background: darken($base-a, 8%);
}
&:hover > .info,
&:focus > .info {
background: darken($base-a, 16%);
}
}
&:nth-of-type(3n + 2) {
& > .info {
background: darken($base-b, 8%);
}
&:hover > .info,
&:focus > .info {
background: darken($base-b, 16%);
}
}
&:nth-of-type(3n + 3) {
& > .info {
background: darken($base-c, 8%);
}
&:hover > .info,
&:focus > .info {
background: darken($base-c, 16%);
}
}
& > .info > .title {
display: none;
}
}

5
bash.md Normal file
View File

@ -0,0 +1,5 @@
---
title: Bash scripting
category: CLI
redirect_to: /sh
---

View File

@ -2,7 +2,6 @@
title: Cron
category: CLI
layout: 2017/sheet
tags: [Featured]
---
## Format

View File

@ -2,6 +2,7 @@
title: React-router
category: React
layout: default-ad
tags: [Featured]
---
{% raw %}

2
sh.md
View File

@ -2,7 +2,7 @@
title: Bash scripting
category: CLI
layout: 2017/sheet
ads: true
tags: [Featured]
---
Getting started