{% extends "base.html" %}
{% block title %}{{ article.title|striptags }} - {{ SITENAME }}{% endblock %}

{% block breadcrumbs %}
    {% if DISPLAY_BREADCRUMBS %}
        {% if DISPLAY_CATEGORY_IN_BREADCRUMBS %}
            <ol class="breadcrumb">
                <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
                <li><a href="{{ SITEURL }}/{{ article.category.url }}" title="{{ article.category }}">{{ article.category }}</a></li>
                <li class="active">{{ article.title }}</li>
            </ol>
        {% else %}
            <ol class="breadcrumb">
                <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
                <li class="active">{{ article.title }}</li>
            </ol>
        {% endif %}
    {% endif %}
{% endblock %}

{% block content %}
    <section id="content">
        <article>
            <header class="page-header">
                <h1>
                    <a href="{{ SITEURL }}/{{ article.url }}"
                       rel="bookmark"
                       title="Permalink to {{ article.title|striptags }}">
                        {{ article.title }}
                    </a>
                </h1>
            </header>
            <div class="entry-content">
                <div class="panel">
                    <div class="panel-body">
                        {% include "includes/article_info.html" %}
                    </div>
                </div>
                {{ article.content }}
                {% if article.album %}
                <div id="gallery" class="panel">
                <div class="panel-body">
                {% for image in article.galleryimages %}
                    <div class="gallery-element {{ "elem_" + article.album }}">
                    <div>
                        <p class="picture-title">{% if article.gallerycaptions.get(image) %}{{ article.gallerycaptions.get(image) }}{% endif %}&nbsp;</p>
                        <a class="{{ article.album }} cboxElement" href="{{ SITEURL }}/images/gallery/{{ article.album }}/{{ image }}"
                            {% if article.gallerycaptions.get(image) %}title="{{ article.gallerycaptions.get(image) }}"{% endif %}>
                            <img src="{{ SITEURL }}/images/thumbs/{{ article.album }}/{{ image }}" />
                        </a>
                     {% if article.galleryexif and article.galleryexif.get(image) %}
                        <table class="exif_info">
                            {% if article.galleryexif.get(image).get("Model") %}
                            <tr><th colspan="4">{{article.galleryexif.get(image).get("Model")}}</th></tr>
                            {% endif %}
                            {% if article.galleryexif.get(image).get("LensModel") %}
                            <tr><th colspan="4">{{article.galleryexif.get(image).get("LensModel")}}</th></tr>
                            {% endif %}
                            <tr>
                            {% if article.galleryexif.get(image).get("ISOSpeedRatings") %}
                                <td>{{article.galleryexif.get(image).get("ISOSpeedRatings")}}</td>
                            {% endif %}
                            {% if article.galleryexif.get(image).get("FocalLength") %}
                                <td>{{article.galleryexif.get(image).get("FocalLength")}}mm</td>
                            {% endif %}
                            {% if article.galleryexif.get(image).get("FNumber") %}
                                <td>f/{{article.galleryexif.get(image).get("FNumber")}}</td>
                            {% endif %}
                            {% if article.galleryexif.get(image).get("ExposureTime") %}
                                <td>{{article.galleryexif.get(image).get("ExposureTime")}}</td>
                            {% endif %}
                            </tr>
                        </table>
                    {% endif %}
                        <p class="picture-comment">{% if article.gallerycomments.get(image) %}{{ article.gallerycomments.get(image) }}{% endif %}</p>
                    </div>
                    </div>
                {% endfor %}
                </div>
                </div>
                {% endif %}
            </div>
            <!-- /.entry-content -->
            {% include 'includes/related-posts.html' %}
            {% include 'includes/addthis.html' %}
            {% include 'includes/comments.html' %}
        </article>
    </section>

{% endblock %}
