add "personal" category page

This commit is contained in:
Ramon Ayco Jr 2021-10-04 10:07:40 +08:00
parent 14386ae29f
commit ffa664a7d1
2 changed files with 58 additions and 2 deletions

View file

@ -96,7 +96,7 @@ prose:
element: text
label: category
type: text
placeholder: productivity | entertaining | motivational | technology
placeholder: personal | productivity | entertaining | motivational | technology
_drafts:
- name: "published"
field:
@ -138,7 +138,7 @@ prose:
element: text
label: category
type: text
placeholder: productivity | entertaining | motivational | technology
placeholder: personal | productivity | entertaining | motivational | technology
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.

56
personal.html Normal file
View file

@ -0,0 +1,56 @@
---
layout: category
category-name: personal
---
<h1>Personal Posts</h1>
<div class="blog-home">
{% if site.categories.personal.size > 0 %}
<ul class="blog-home__list-items">
{% for post in site.categories.personal %}
<li class="blog-home__list-items__item">
<div class="blog-home__list-items__item__header">
<div>
<h3 class="blog-home__list-items__item__header__title">
<a href="{{ post.url | relative_url }}"
>{{ post.title | escape }}</a
>
</h3>
</div>
<div class="blog-home__list-items__item__header__description">
<span>{{post.description}}</span>
</div>
</div>
<div class="blog-home__list-items__item__excerpt">
{% if post.image %}
<a href="{{post.url | relative_url}}"
><img
class="blog-home__list-items__item__excerpt__thumb"
alt="{{ post.description | escape }}"
title="{{ post.description | escape }}"
src="../assets/images/{{ post.image }}.jpg"
/></a>
{% else %}
<a href="{{post.url | relative_url}}"
><img
class="blog-home__list-items__item__excerpt__thumb"
alt="{{ post.description | escape }}"
title="{{ post.description | escape }}"
src="../assets/images/hello-world.jpg"
/></a>
{% endif %} {{ post.excerpt }}
</div>
<div class="blog-home__list-items__item__readmore">
<a href="{{ post.url | relative_url }}" class="button"
>Continue Reading</a
>
</div>
</li>
{% endfor %}
</ul>
{% else %}
<span>No posts to show.</span>
{% endif %}
</div>