www_duniayetu/templates/partials/newsCard.html
2023-12-15 21:12:07 +01:00

59 lines
2.5 KiB
HTML

<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
<div class="flex-1">
<a href={{ post.permalink }} class="block" style="pointer-events: none;">
<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-s">
{% if post.extra.socialLinks.contact %}
<a href="{{ post.extra.socialLinks.contact }}" class="border-1 text-s font-bold border-gray-600 hover:text-blue-700 py-1 px-2 mr-2 my-1 border hover:border-blue-500 border-gray-600 text-gray-700 rounded-full" target="_blank">
<u>Read More</u>
</a>
{% endif %}
</p>
</div>
</div>
</div>
</div>