This commit is contained in:
2024-08-19 01:29:54 +02:00
parent 4c0bd27a91
commit 92ebcbd49f
26 changed files with 608 additions and 109 deletions

View File

@@ -1,75 +1,57 @@
{% if post.date %}
{% if post.taxonomies.people %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(post.taxonomies.people[0]) %}
{% set author_path = 'people/' ~ post.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% set content = get_page(path=author_path) %}
{% endif %}
{% endif %}
{% if post.taxonomies.people %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(post.taxonomies.people[0]) %}
{% set author_path = 'people/' ~ post.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% endif %}
{% endif %}
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
<div class="flex-1 border-b">
<a href="{{ post.permalink }}" class="block">
{% if post.extra.imgPath %}
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md',
to=post.extra.imgPath)) %}
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden bg-white">
{% if post.extra.imgPath %}
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
<div class="flex-shrink-0">
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="{{post.title ~ ' Picture'}}" />
<img class="h-24 w-full object-cover" src="{{ img_url }}" alt="{{ post.title ~ ' Picture' }}" />
</div>
{%endif%}
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
{% endif %}
<h3 class="mt-2 text-xl leading-6 font-medium text-gray-900 text-left not-italic">
{{ post.title }}
</h3>
{% if post.description %}
<p class="mt-3 text-sm font-normal text-gray-500 text-left">
<div class="flex-1 p-6 flex flex-col">
<h3 class="text-base text-left font-medium text-gray-900 mb-2">
{{ post.title }}
</h3>
{% if post.description %}
<p class="text-sm text-left text-gray-500 mb-3">
{{ post.description }}
</p>
{% endif %}
<div class="article hidden">{{ post.content | safe }}</div>
{% endif %}
<div class="w-full post-card-meta py-3">
<div class="avatars">
<div class="flex">
<div class="flex">
<ul class="list-none flex author-list mr-2 pl-0">
{% if author %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') |
replace(from='index.md', to=author.extra.imgPath)) %}
<li class="author-list-item"><img alt="{{author.title}}" src="{{author_img}}"
class="w-8 h-8 rounded-full bg-gray-200 border-2 border-white"></li>
{% endif %}
</ul>
</div>
<div class="flex flex-col text-left leading-none uppercase">
{% if author %}
<p class="text-gray-700 text-xs">{{ author.title }}</p>
{% endif %}
<p class="text-gray-700 text-xs">
<time datetime="{{post.date}}">
{{ post.date | date(format="%B %e, %Y", timezone="America/Chicago") }}
</time>
</p>
<p class="flex justify-between lowercase my-2 items-center text-gray-700 text-xs"><span id="time"
class="time"></span>
</p>
</div>
<br />
</div>
<div class="article hidden">
{{ post.content | safe }}
</div>
<div class="mt-auto py-3">
<div class="flex items-center">
<div class="flex-shrink-0">
{% if author %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
<img alt="{{ author.title }}" src="{{ author_img }}" class="w-8 h-8 rounded-full border-2 border-white bg-gray-200" />
{% endif %}
</div>
<div class="ml-3 text-gray-700 text-xs flex flex-col">
{% if author %}
<p class="uppercase">{{ author.title }}</p>
{% endif %}
<p>
<time class="text-xs" datetime="{{ post.date }}">
{{ post.date | date(format="%B %e, %Y", timezone="America/Chicago") }}
</time>
</p>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<style>
.border-b {
border-bottom-width: 1px !important;
}
</style>
{% endif %}
{% endif %}