Add new layout indicators

This commit is contained in:
Rico Sta. Cruz 2017-08-30 01:06:07 +08:00
parent 12339b0ed1
commit b590dd799a
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
3 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,12 @@
<li class='{{ include.class }}'> <li class='{{ include.class }}'>
<a href='{{ base }}{{ include.post.url | remove: '.html' }}'> <a href='{{ base }}{{ include.page.url | remove: '.html' }}'>
<strong>{{ include.post.title }}</strong> <strong>{{ include.page.title }}</strong>
<span>cheatsheet</span> <span>
cheatsheet
{% if include.page.layout == '2017/sheet' %}
<abbr class='attribute-peg -new-layout hint--bottom' data-hint='New layout!'><span></span></abbr>
{% endif %}
</span>
</a> </a>
</li> </li>

View File

@ -1,10 +1,10 @@
{% assign category_posts = site.pages {% assign category_pages = site.pages
| where: "category", include.page.category | where: "category", include.page.category
| where_exp: "page", "page.url != include.page.url" | where_exp: "page", "page.url != include.page.url"
| where_exp: "page", "page.deprecated != true" | where_exp: "page", "page.deprecated != true"
| sort: "weight", "last" | sort: "weight", "last"
%} %}
{% assign top_posts = site.pages {% assign top_pages = site.pages
| where_exp: "page", "page.tags contains 'Featured'" | where_exp: "page", "page.tags contains 'Featured'"
| where_exp: "page", "page.url != include.page.url" | where_exp: "page", "page.url != include.page.url"
| where_exp: "page", "page.deprecated != true" | where_exp: "page", "page.deprecated != true"
@ -19,16 +19,16 @@
{% endif %} {% endif %}
<ul class='related-post-list'> <ul class='related-post-list'>
{% for post in category_posts limit: 6 %} {% for page in category_pages limit: 6 %}
{% include 2017/related-posts-item.html post=post class='item related-post-item' %} {% include 2017/related-posts-item.html page=page class='item related-post-item' %}
{% endfor %} {% endfor %}
</ul> </ul>
<h3>Top cheatsheets</h3> <h3>Top cheatsheets</h3>
<ul class='related-post-list'> <ul class='related-post-list'>
{% for post in top_posts limit: 6 %} {% for page in top_pages limit: 6 %}
{% include 2017/related-posts-item.html post=post class='item related-post-item' %} {% include 2017/related-posts-item.html page=page class='item related-post-item' %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>

View File

@ -83,7 +83,7 @@
& > a, & > a,
& > a:visited { & > a:visited {
background: white; background: white;
color: $base-text; color: $base-mute;
& > strong { & > strong {
color: $base-a; color: $base-a;
@ -103,7 +103,7 @@
&:first-of-type > a, &:first-of-type > a,
&:first-of-type > a:visited { &:first-of-type > a:visited {
background: $base-a; background: $base-a;
color: white; color: rgba(white, 0.5);
& > strong { & > strong {
color: white; color: white;
@ -139,6 +139,5 @@
& > a > span { & > a > span {
@include font-size(-1); @include font-size(-1);
opacity: 0.5;
} }
} }