Created
February 3, 2019 02:38
-
-
Save mariohernandez/fa3a6a277b15f7d85d1ae6f5bbce2294 to your computer and use it in GitHub Desktop.
Movie card twig template.
This file contains 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
<article class="movie-card {{ modifier_class }}" | |
{{ attributes ? attributes.class }}" | |
{{ attributes ? attributes|without(class) }}> | |
{{ title_prefix }} | |
{{ title_suffix }} | |
{% if cover_image %} | |
<div class="movie-card__cover-image"> | |
{{ cover_image }} | |
</div> | |
{% endif %} | |
<div class="movie-card__content"> | |
{% if heading %} | |
{% | |
include '@nitflex_dev_theme/heading/heading.twig' with { | |
"heading": { | |
"title": heading.title, | |
"url": heading.url, | |
"heading_level": heading.heading_level, | |
"classes": 'movie-card__heading' | |
} | |
} only | |
%} | |
{% endif %} | |
<div class="movie-card__favorites-toggle"> | |
{% block favorites_toggle %} | |
{% | |
include '@nitflex_dev_theme/add-to-favorites/add-to-favorites.twig' with { | |
url: '#', | |
} only | |
%} | |
{% endblock %} | |
</div> | |
{% if mpaa_rating %} | |
<div class="movie-card__mpaa-rating"> | |
{% include '@nitflex_dev_theme/mpaa-rating/mpaa-rating.twig' with { | |
rating: mpaa_rating | |
} only | |
%} | |
</div> | |
{% endif %} | |
{% if average_rating %} | |
<div class="movie-card__average-rating"> | |
{% include '@nitflex_dev_theme/average-rating/average-rating.twig' with { | |
count: average_rating | |
} only | |
%} | |
</div> | |
{% endif %} | |
{% if synopsis %} | |
<div class="movie-card__synopsis"> | |
{{ synopsis }} | |
</div> | |
{% endif %} | |
</div> | |
</article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment