<div class="hero-body movie-body">
  {% if request.get_full_path == "/" %}
    <div class="stats">
      <p class="stars">{{ movie.stars_icons }}</p>
      <p><i class="gg-time"></i>{{ movie.duration_formatted | safe }}</p>
      {% if user.is_authenticated %}
        <p><i class="gg-software-download"></i>{{ movie.count_formatted }}</p>
      {% endif %}
    </div>
  {% else %}
    <div class="about">
      <div class="columns is-desktop">
        <div class="column">
          <h2 class="subtitle">Cartel</h2>
          <figure>
            <img src="{{ movie.cartel }}">
          </figure>
        </div>
        <div class="column">
          <h2 class="subtitle">Ficha técnica</h2>
          <table class="table infobox">
            <tbody>
              <tr><td>Título original</td><td>{{ movie.original_name }}<td></tr>
              <tr><td>Año</td><td>
                  <a href="{% url 'search' %}?q=y:{{ movie.year | slugify }}">{{ movie.year }}</a>
              <td></tr>
              <tr><td>País</td><td>
                {% for country in movie.countries %}
                  <a href="{% url 'search' %}?q=p:{{ country | slugify }}">
                      {{ country }}</a>{% if not forloop.last %},{% endif %}
                {% endfor %}
              <td></tr>
              <tr><td>Duración</td><td>{{ movie.duration }} min<td></tr>
              <tr><td>Dirección</td><td>
                {% for director in movie.directors %}
                  <a href="{% url 'search' %}?q=d:{{ director | slugify }}">
                      {{ director }}</a>{% if not forloop.last %},{% endif %}
                {% endfor %}
              <td></tr>
              <tr><td>Reparto</td><td>
                {% for actor in movie.actors %}
                  <a href="{% url 'search' %}?q=a:{{ actor | slugify}}">
                      {{ actor }}</a>{% if not forloop.last %},{% endif %}
                {% endfor %}
              <td></tr>
              <tr><td>Género</td><td>
                {% for gender in movie.genders %}
                  <a href="{% url 'search' %}?q=g:{{ gender | slugify }}">
                      {{ gender }}</a>{% if not forloop.last %},{% endif %}
                {% endfor %}
              <td></tr>
            </tbody>
          </table>
        </div>
      </div>
      {% if movie.wiki.summary %}
        <h2 class="subtitle">Sinopsis de <a href="{{ movie.wiki.url }}" target="_blank">Wikipedia</a></h2>
        {{ movie.wiki.summary | safe }}
      {% else %}
        <h2 class="subtitle">Sinopsis de Wikipedia</h2>
        <p>No se encontró su artículo en Wikipedia, haz <a href="https://es.wikipedia.org/wiki/{{ movie.name }}">clic aquí</a> para escribirlo o solicitarlo.</p>
      {% endif %}
    </div>
    {% if user.is_authenticated %}
      <video id="player" playsinline controls data-poster="{{ movie.cartel }}">
        <source src="{{ movie.file_name }}"  type="video/mp4">
      </video>
      {% load static %}
      <!-- CSS y JS necesario paara el reproductor -->
      <!-- Cfr. https://github.com/sampotts/plyr -->
      <link rel="stylesheet" href="{% static 'css/plyr.css' %}">
      <script type="text/javascript" src="{% static 'js/plyr.js' %}"></script>
      <script type="text/javascript" src="{% static 'js/player.js' %}"></script>
    {% endif %}
  {% endif %}
</div>
