{% extends "base.html" %}
{% load compress staticfiles i18n %}
{% load number_of_collabs_and_artworks %}
{% load embed_video_tags %}
{% load thumbnail %}
{% get_current_language as LANGUAGE_CODE %}
{% block page_title %}
{{ article.title }}
{% endblock %}
{% block meta_og_title %}{{ article.title }}{% endblock %}
{% block meta_og_site_name %}BLAENKS.COM{% endblock %}
{% block meta_og_url %}{% if request.is_secure %}https://{% else %}http://{% endif %}{{ request.get_host }}{% url 'articles:article-details' article.slug %}{% endblock %}
{% block meta_description %}{% if article.subheadline %}{{ article.subheadline|striptags }}{% endif %}{% endblock %}
{% block meta_og_description %}{% if article.subheadline %}{{ article.subheadline|striptags }}{% endif %}{% endblock %}
{% block meta_og_image %}{% if request.is_secure %}https://{% else %}http://{% endif %}{{ request.get_host }}{{ article.cover_photo.url }}{% endblock %}
{% block meta_og_type %}Article{% endblock %}
{% block content %}
<section class="article_wrapper">
<div class="container">
<div class="row">
<div class="col-md-9 col-sm-8 col-xs-12">
{% if request.user.is_staff %}
<div>
<a target="_blaenk" href="{% url 'admin:articles_article_change' article.pk %}" > EDIT </a>
</div>
{% endif %}
<div class="article_body">
{% if article.title %}
<h1 class="article_page_title">{{ article.title }}</h1>
{% endif %}
{% autoescape off %}
{% if article.subheadline %}
{{ article.subheadline }}
{% endif %}
{% endautoescape %}
</div>
</div>
<div class="col-md-3 clo-sm-4 col-xs-12 article_right_bar">
<div class="article_pagenition_wrapper">
<a class="left {% if not next_article %}pagenition_disabled{% endif %}" {% if next_article %}href="{% url 'articles:article-details' next_article.slug %}"{% endif %} data-slide="prev">< Newer</a>
<span class="article_pagenition_counter">
<small>
<ol class="article_pagenition_counter_inner">{{ current }} / {{ total_articles }}</ol>
</small>
</span>
<a class="right {% if not previous_article %}pagenition_disabled{% endif %}" {% if previous_article %}href="{% url 'articles:article-details' previous_article.slug %}"{% endif %} data-slide="next"> Older > </a>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-9 col-sm-8 col-xs-12">
<div class="article_body">
{% if article.cover_photo %}
<img class="img-responsive article_featured_img" src="{{ article.cover_photo.url }}">
{% endif %}
{% autoescape off %}
{% if article.details %}
<p>{{ article.details }}</p>
{% endif %}
{% endautoescape %}
</div>
</div>
<div class="col-md-3 clo-sm-4 col-xs-12 article_right_bar">
{% if artworks %}
<div id="artwork_items" class="article_artwork_wrapper artwork_common_item">
<h4 class="article_block_title">Related Artwork</h4>
<div class="clearfix"></div>
{% for artwork in artworks %}
<div class="article_artwork_item">
<div class="article_artwork_img_title small_artwork_popup_wrapper artwork-item-popup" data-artwork-url="{% url 'artwork:artwork-item' artwork.id %}" data-toggle="modal">
<img src="
{% if artwork.artwork_type.artwork_type == 'image' %}
{% if not artwork.artwork_cover_thumbnail and artwork.gallery_images.all%}
{% thumbnail artwork.gallery_images.all.0.gallery_image 230x230 crop=',0' upscale %}
{% else %}
{% thumbnail artwork.artwork_cover_thumbnail 230x230 crop=',0' upscale %}
{% endif %}
{% else %}
{% thumbnail artwork.artwork_cover_thumbnail 230x230 crop=',0' upscale %}
{% endif %}
" alt="">
<h4>{{ artwork.artwork_name }}</h4>
</div>
<div class="article_artwork_body">
<div class="col-md-12 article_artwork_body_top">
{% if artwork.collaborators %}
<span>
<img src="{% static 'images/icons/collaborator-icon.png' %}" height="15">
{{ artwork.collaborators.count }}
</span>
{% endif %}
{% if artwork.pub_date %}
<span class="artwork_pub_date"> {{ artwork.pub_date|date:"d.m.Y" }} </span>
{% endif %}
</div>
<div class="clearfix"></div>
<div class="col-md-12 article_artwork_body_bottom">
<span>
<img src="{% static 'images/icons/making-of.png' %}" height="15">
{% if artwork.making_of.all and artwork.making_of.all.0.makingof_images.count %}
{{ artwork.making_of.all.0.makingof_images.count }}
{% else %}
0
{% endif %}
</span>
{% if artwork.location %}
<span class="artwork_location">
<i class="fa fa-map-marker"></i>{{ artwork.location|truncatechars:20 }}
</span>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if artists %}
<div class="article_artist_wrapper">
<h4 class="article_block_title">Related Artist</h4>
{% for artist in artists %}
<a href="{% url 'profile:my_profile' artist.id %}" class="article_artist_item">
<img class="img-responsive" src="{% if artist.profile_thumbnail %}{{ artist.profile_thumbnail.url }}{% else %}{% static 'images/person.jpg' %}{% endif %}">
<div class="article_artist_item_body">
<h3>{{ artist.get_full_name|truncatechars:25 }}</h3>
<span>{% if artist.city %}{{ artist.city|truncatechars:15 }},{% endif %} {{ artist.get_user_expertises|truncatechars:15 }}</span>
</div>
</a>
{% endfor %}
</div>
{% endif %}
</div>
<div class="clearfix"></div>
<div class="col-md-9">
{% if posted_by %}
<p class="article_posted_by">
Posted by: <a href="{% url 'profile:my_profile' posted_by.id %}">{{ posted_by.get_full_name }}</a>
</p>
{% endif %}
</div>
<div class="col-md-3">
<div class="article_pagenition_wrapper">
<a class="left {% if not next_article %}pagenition_disabled{% endif %}" {% if next_article %}href="{% url 'articles:article-details' next_article.slug %}"{% endif %} data-slide="prev">< Newer</a>
<span class="article_pagenition_counter">
<small>
<ol class="article_pagenition_counter_inner">{{ current }} / {{ total_articles }}</ol>
</small>
</span>
<a class="right {% if not previous_article %}pagenition_disabled{% endif %}" {% if previous_article %}href="{% url 'articles:article-details' previous_article.slug %}"{% endif %} data-slide="next"> Older > </a>
</div>
</div>
</div>
</div>
</section>
<div id="artwork_popup_modal" class="modal fade article_artwork_modal" data-backdrop="static" data-keyboard="false" style="display: none; padding: 5px; overflow: auto;">
</div>
{% endblock %}
{% block extra_js %}
{% compress js %}
<script src="{% static 'js/imagesloaded.js' %}"></script>
<script src="{% static 'js/masonry.min.js' %}"></script>
<script src="{% static 'js/simple-gallery.js' %}"></script>
<script src="{% static 'js/artwork.js' %}"></script>
{% endcompress %}
{% endblock %}