fix author images on news cards

This commit is contained in:
timurgordon
2023-01-17 14:19:44 +03:00
parent 1eea75a810
commit 965e0e0fbc

View File

@@ -21,9 +21,12 @@
<div class="flex items-center"> <div class="flex items-center">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<ul class="list-none flex author-list my-10 mr-2 px-0"> <ul class="list-none flex author-list my-10 mr-2 px-0">
{% if featured.taxonomies.people %} {% if post.taxonomies.people %}
{% for author in featured.taxonomies.people %} {% for author in post.taxonomies.people %}
{% set author_path = 'people/' ~ author ~ '/index.md' %} {% 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 = 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)) %} {% 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"> <li class="author-list-item">
@@ -37,6 +40,7 @@
" /> " />
</a> </a>
</li> </li>
{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</ul> </ul>