factor out preview content
This commit is contained in:
parent
0d95e04598
commit
28338bbe5e
|
@ -27,26 +27,7 @@
|
|||
|
||||
|
||||
<div class="large-4 medium-4 columns">
|
||||
{% if events.children.all %}
|
||||
<h4 class="sidebar-h4"> Related </h4>
|
||||
{% for child in events.children.all %}
|
||||
<div class="row related-row">
|
||||
<div class="small-6 columns">
|
||||
<img src="{{ child.image_url }}">
|
||||
</div>
|
||||
<div class="small-6 columns">
|
||||
<h6><a href="{{ child.get_absolute_url }}" class="sidebar-title"> {{child}} </a> </h6>
|
||||
<h6 class="sidebar-date">
|
||||
<font color="#ef4e5c">
|
||||
<b> {{ child.datestart }} {% if child.dateend %} - {{child.dateend}} {% endif %} </b>
|
||||
</font>
|
||||
{% if content.place %}<br/>{{content.place}}{% endif%}
|
||||
</h6>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% include "related.html" with related=events.children.all %}
|
||||
<h4 class="sidebar-h4">Events </h4>
|
||||
<div class="row">
|
||||
|
||||
|
|
19
content/templates/preview.html
Normal file
19
content/templates/preview.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<div class="row related-row">
|
||||
<div class="small-6 columns">
|
||||
{% if content.image_url %}
|
||||
<img src="{{ content.image_url }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="small-6 columns">
|
||||
<h6><a href="{{ content.get_absolute_url }}" class="sidebar-title"> {{content.title}} </a> </h6>
|
||||
<h6 class="sidebar-date">
|
||||
{% if content.type.name == 'events' %}
|
||||
<font color="#ef4e5c">
|
||||
<b> {{ content.datestart }} {% if content.dateend %} - {{content.dateend}} {% endif %} </b>
|
||||
</font>
|
||||
{% if content.place %}<br/>{{content.place}}{% endif%}
|
||||
{% endif %}
|
||||
</h6>
|
||||
<p> {{ content.formatted_teaser }} </p>
|
||||
</div>
|
||||
</div>
|
|
@ -19,19 +19,7 @@
|
|||
{% if latest_content_list %}
|
||||
|
||||
<div class="large-4 medium-4 columns">
|
||||
{% if projects.children.all %}
|
||||
<h4 class="sidebar-h4"> Related </h4>
|
||||
{% for child in projects.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 %}
|
||||
{% include "related.html" with related=projects.children.all %}
|
||||
<h4 class="sidebar-h4">Projects </h4>
|
||||
<div class="row">
|
||||
|
||||
|
|
8
content/templates/related.html
Normal file
8
content/templates/related.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% if related %}
|
||||
<h4 class="sidebar-h4"> Related </h4>
|
||||
{% for content in related %}
|
||||
{% include "preview.html" %}
|
||||
{% endfor %}
|
||||
<br>
|
||||
<br>
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user