Skip to content

Commit

Permalink
add support for RSS without images
Browse files Browse the repository at this point in the history
  • Loading branch information
ugomeda committed Jan 28, 2025
1 parent e72f375 commit 3e9eebc
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions inkplate_dashboard/templates/widget-headlines.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{% macro widget_headlines(headlines) %}
<div class="widget-headlines">
<div class="widget-headlines-inner">
{% for headline in headlines[0:2] %}
<article>
<h2>{{ headlines[0].title }}</h2>
<h2>{{ headline.title }}</h2>
<div class="widget-headlines-content">
<div class="widget-headlines-illustration" style="background-image: url('data:image/png;base64,{{ headlines[0].get_image() }}')"></div>
<div class="widget-headlines-description">{{ headlines[0].description }}</div>
</div>
</article>
<article>
<h2>{{ headlines[1].title }}</h2>
<div class="widget-headlines-content">
<div class="widget-headlines-illustration" style="background-image: url('data:image/png;base64,{{ headlines[1].get_image() }}')"></div>
<div class="widget-headlines-description">{{ headlines[1].description }}</div>
{% if headline.image %}
<div class="widget-headlines-illustration" style="background-image: url('data:image/png;base64,{{ headline.get_image() }}')"></div>
{% endif %}
<div class="widget-headlines-description">{{ headline.description }}</div>
</div>
</article>
{% endfor %}
</div>
</div>
{% endmacro %}

0 comments on commit 3e9eebc

Please sign in to comment.