Improved category name for reading optimisation
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -125,7 +125,7 @@ ul.list-unstyled li {
|
|||||||
|
|
||||||
// limit width of article to optimise reading experience
|
// limit width of article to optimise reading experience
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
article, .index, .category {
|
.reading-optimised {
|
||||||
width: 550px;
|
width: 550px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|||||||
@ -2,29 +2,31 @@
|
|||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
|
|
||||||
{{ content }}
|
<div class="reading-optimised">
|
||||||
<ul class="post-list list-unstyled">
|
{{ content }}
|
||||||
{% assign categories = page.categories | split:',' %}
|
<ul class="post-list list-unstyled">
|
||||||
{% assign posts = site.categories[categories.first] %}
|
{% assign categories = page.categories | split:',' %}
|
||||||
{% for category in categories %}
|
{% assign posts = site.categories[categories.first] %}
|
||||||
{% if category != categories.first %}
|
{% for category in categories %}
|
||||||
{% assign posts = site.categories[category] | concat: posts %}
|
{% if category != categories.first %}
|
||||||
{% endif %}
|
{% assign posts = site.categories[category] | concat: posts %}
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
{% assign posts = posts | sort: 'date' | reverse %}
|
{% endfor %}
|
||||||
{% for post in posts %}
|
{% assign posts = posts | sort: 'date' | reverse %}
|
||||||
<li class="mb-4">
|
{% for post in posts %}
|
||||||
<p class="small text-muted">
|
<li class="mb-4">
|
||||||
<span class="far fa-calendar-alt"></span>
|
<p class="small text-muted">
|
||||||
<time datetime="{{ post.date | date_to_xmlschema }}">
|
<span class="far fa-calendar-alt"></span>
|
||||||
{{ post.date | date: "%b %-d, %Y" }}
|
<time datetime="{{ post.date | date_to_xmlschema }}">
|
||||||
</time>
|
{{ post.date | date: "%b %-d, %Y" }}
|
||||||
• {% include reading-time.html content=post.content %}
|
</time>
|
||||||
</p>
|
• {% include reading-time.html content=post.content %}
|
||||||
|
</p>
|
||||||
|
|
||||||
<p class="h4 post-title">
|
<p class="h4 post-title">
|
||||||
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
<div class="category">
|
|
||||||
|
<div class="reading-optimised">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
<ul class="post-list list-unstyled">
|
<ul class="post-list list-unstyled">
|
||||||
{% for post in site.categories[page.category] %}
|
{% for post in site.categories[page.category] %}
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
<article class="post">
|
|
||||||
|
<article class="post reading-optimised">
|
||||||
|
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<h1 class="post-title">{{ page.title }}</h1>
|
<h1 class="post-title">{{ page.title }}</h1>
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
|
|
||||||
{% if page.date_modified %}
|
{% if page.date_modified %}
|
||||||
{% assign modified = page.date_modified %}
|
{% assign modified = page.date_modified %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% assign modified = page.date %}
|
{% assign modified = page.date %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
<article class="post reading-optimised" itemscope itemtype="http://schema.org/BlogPosting">
|
||||||
|
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
|
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user