

{% extends 'base.html' %}

{% block content %}

<div class="large-8 medium-8 columns special-column">
	<img src="{{ works.image_url }}">
	<div class="index-text">
	<h4><a href="{{ works.get_absolute_url }}" class="big-title">{{works.title}} </a></h4>
	<p> {{works.formatted_header|safe}} </p>
	<p> {{works.formatted_body|safe}} </p>
</div>
</div>

{% if latest_content_list %}

	<div class="large-4 medium-4 columns">
	{% if works.children.all %}
		<h4 class="sidebar-h4"> Related </h4>
		{% for child in works.children.all %}
		<div class="row related-row">
		<div class="small-6 columns">
			<a href="{{ child.get_absolute_url }}"> <img src="{{ child.image_url }}"> </a>
		</div>
		<div class="small-6 columns">
		<h6><a href="{{ child.get_absolute_url }}" class="sidebar-title"> {{child}} </a> </h6>
		</div>
		</div>
		{% endfor %}
		{% endif %}
		<h4 class="sidebar-h4"> Works </h4>
		<div class="row">
		
		    {% for works in latest_content_list %}
		    <div class="row right-items">
			    <div class="small-6 columns">
			        <a href="{{ works.get_absolute_url }}"> <img src="{{ works.image_url }}"></a>
			    </div>
			    <div class="small-6 columns">
			        <a href="{{ works.get_absolute_url }}" class="sidebar-title">{{ works.title }}</a>
			    	<p> {{works.header|striptags|truncatechars:100}} </p>
			    </div>
			</div>
		    {% endfor %}
			{% else %}
			    <p>No works.</p>
			{% endif %}
				</div>
			</div>		

{% endblock %}
