{% extends 'layouts/layout.html.twig' %}
{% block content %}
<div class="movie-info">
<div class="row" style="display: flex; justify-content: center;">
<div class="d-flex flex-wrap" align="center" style="justify-content:center">
<div class="movie-text">
<h2>{{ movie.title("de") }}</h2>
<p>{{ movie.description("de") }}</p>
<p>{{ movie.releaseyear }}</p>
<p class="badge">{{ movie.genre }}</p>
</div>
<img src="{{ movie.imageURL }}" alt="{{ movie.title("de") }} poster">
</div>
{% if actors|length > 0 %}
<div class="actors">
<h3 align="center" ><b>Cast</b></h3>
<div class="row" style="display: flex; justify-content: center;">
<div class="d-flex flex-wrap" align="center" style="justify-content:center">
{% for actor in actors %}
<a href="/actor-detail/{{actor.id}}">
<div data-content="{{actor.name}}" class="image-cast">
{% if actor.actorImage != "" %} <img src="{{ actor.actorImage }}" alt="{{ actor.name }}"> {% endif %}
</div>
</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class="similar-movies">
<h3 align="center" ><b>Similar movies</b></h3>
<div class="row" style="display: flex; justify-content: center;">
<div class="d-flex flex-wrap" style="justify-content:center">
{% for smovie in similarmovies %}
<a href="/movie-detail/{{smovie.id}}">
<div data-content="{{ smovie.title("de")}}" class="image">
{# @var movies \Pimcore\Model\DataObject\Movies #}
{% if smovie %}
{% if smovie.getImageURL().getUrl() != "" %}
{# TODO get Image Thumbnail #}
<img src="{{ smovie.getImageURL().getUrl() }}"/>
{% endif %}
{% endif %}
</div>
</a>
{% endfor %}
</div>
{% endblock %}