You are here

facebook-album-covers.html.twig in Facebook Album 8

{% for photo in photos %}

    {% set description = '' %}
    {% set location = '' %}

    {% if settings.show_description is not empty %}
        {% set description = photo.description|e('html') %}
    {% endif %}

    {% if settings.show_location is not empty %}
        {% set location = photo.location|e('html') %}
    {% endif %}
  <div class="album-wrapper" data-name="{{ photo.name }}" data-description="{{ description }}" data-location="{{ location }}">
  <div class="album-thumb fb-link" data-album-link="album/{{ photo.id }}">
    <span class="album-thumb-wrapper">
      <i data-cover-id="{{ photo.id }}" style="background-image: url({{ photo.cover_photo.images[0].source }});width: {{ settings.album_thumb_width }}px; height:{{ settings.album_thumb_height }}px;"></i>
    </span>
  </div>
    {% if settings.show_title is not empty %}
      <div class="album-details">
          <div class="album-text" style="max-width: {{ settings.album_thumb_width }}px;">
              <div class="fb-link" href="#album-{{ photo.id }}">{{ photo.name }}</div>
          </div>
      </div>
    {% endif %}
</div>
{% endfor %}

File

templates/facebook-album-covers.html.twig
View source
  1. {% for photo in photos %}
  2. {% set description = '' %}
  3. {% set location = '' %}
  4. {% if settings.show_description is not empty %}
  5. {% set description = photo.description|e('html') %}
  6. {% endif %}
  7. {% if settings.show_location is not empty %}
  8. {% set location = photo.location|e('html') %}
  9. {% endif %}
  10. <div class="album-wrapper" data-name="{{ photo.name }}" data-description="{{ description }}" data-location="{{ location }}">
  11. <div class="album-thumb fb-link" data-album-link="album/{{ photo.id }}">
  12. <span class="album-thumb-wrapper">
  13. <i data-cover-id="{{ photo.id }}" style="background-image: url({{ photo.cover_photo.images[0].source }});width: {{ settings.album_thumb_width }}px; height:{{ settings.album_thumb_height }}px;"></i>
  14. </span>
  15. </div>
  16. {% if settings.show_title is not empty %}
  17. <div class="album-details">
  18. <div class="album-text" style="max-width: {{ settings.album_thumb_width }}px;">
  19. <div class="fb-link" href="#album-{{ photo.id }}">{{ photo.name }}</div>
  20. </div>
  21. </div>
  22. {% endif %}
  23. </div>
  24. {% endfor %}