Last active
October 3, 2024 10:38
-
-
Save apsolut/3935b5ad3a7374623c3f45a55e9efbc1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="post-listing"> | |
{% set post_ids = [] %} | |
{% for post_item in module.posts %} | |
{% do post_ids.append(post_item.post_id) %} | |
{% endfor %} | |
{% set contents = content_by_ids(post_ids) %} | |
{% for content in contents %} | |
<div class="post-item"> | |
<a href="{{ content.absolute_url }}"> | |
{% if content.featured_image %} | |
<div class="post-image"> | |
{% set featuredImage = content.post_list_summary_featured_image %} | |
{% set featuredImageURL = resize_image_url(featuredImage, 0, 0, 400, true, true) %} | |
<img src="{{ featuredImageURL }}" alt="{{ content.title }}" class="img-responsive" /> | |
</div> | |
{% else %} | |
<div class="post-image" style="background-color: #f2f6f7;"></div> | |
{% endif %} | |
<h3 class="post-title"> | |
{{ content.name }} | |
</h3> | |
</a> | |
</div> | |
{% endfor %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment