Files
Komodo-Hub/templates/featured_species.jinja

28 lines
1.2 KiB
Django/Jinja

{% macro featured_species_section(featured_species, species_button)%}
<!-- Featured Species -->
{# If you want to change the featured species please do so in config.ini - CS #}
{# This macro requires to input variables (featured_species & species button), featured species should #}
{# be a list and species button is a boolean. #}
<section id="featured-species" style="padding: 10px 20px; background-color: #047f02; text-align: center;"
class="container-full-bright">
<h2>Featured Species</h2>
<div
style="display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; text-decoration: none; justify-content: space-evenly">
{%for species in featured_species%}
<a href="/species/{{ species['species_english'] }}" class="container-lite">
<h3 class="plain-white-text">{{ species['species_english'] }}</h3>
<div style="background-image: url('/species/image/{{ species['photoid'] }}');" class="div-image">
</div>
</a>
{%endfor%}
</div>
{%if species_button == True%}
<a href="/species" class="boring-button">
View All Species
</a>
{% else %}
{%endif%}
</section>
{% endmacro %}