www_ourverse.tf/templates/partials/newsCard.html

57 lines
2.3 KiB
HTML
Raw Normal View History

2023-08-14 21:32:09 +00:00
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
<div class="flex-1">
<a href={{ post.permalink }} class="block">
<div class="flex-shrink-0">
{% if post.extra.imgPath %}
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="" />
{% endif %}
</div>
<div class="flex-1 bg-white p-4 flex flex-col justify-between">
<h3 class="mt-2 text-xl leading-7 font-medium text-gray-900 text-left not-italic">
{{ post.title }}
</h3>
{% if post.description %}
<p class="mt-3 text-sm font-normal leading-5 text-gray-500 text-left">
{{ post.description }}
</p>
{% endif %}
</a>
<div class="flex items-center">
<div class="flex justify-between items-center">
<ul class="list-none flex author-list my-10 mr-2 px-0">
{% if post.taxonomies.people %}
{% for author in post.taxonomies.people %}
{% set author_path = 'people/' ~ author ~ '/index.md' %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(author) %}
{% set author = get_page(path=author_path) %}
{% 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">
<a href="{{ author.permalink }}" tooltip="{{ author.title }}">
<img src="{{ author_img }}" alt="{{ author.title }}" class="
w-8
h-8
rounded-full
bg-gray-200
border-2 border-white
" />
</a>
</li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</div>
<p class="text-gray-700 text-xs">
<time datetime="{{post.date}}">
{{ post.date | date(format="%B %e, %Y", timezone="America/Chicago") }}
</time>
</p>
</div>
</div>
</div>
</div>