forked from cwtv/chaoswest.tv
				
			
		
			
				
	
	
		
			28 lines
		
	
	
		
			1003 B
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1003 B
		
	
	
	
		
			HTML
		
	
	
	
{%- macro render_blog_post(post, from_index=false) %}
 | 
						|
  <article>
 | 
						|
  {% if from_index %}
 | 
						|
    {% if post.logo is defined %}
 | 
						|
    <a href="{{ post|url(absolute=True) }}">
 | 
						|
        <img class="postlogo" alt="{{ post.logodesc }}" src="{{ post|url(absolute=True)}}{{ post.logo | url(absolute=False) }}" />
 | 
						|
    </a>
 | 
						|
    {% endif %}
 | 
						|
    <h2 class="headline"><a href="{{ post|url }}">{{ post.title }}</a>
 | 
						|
        <div class="subline">{{ post.event_start_date.strftime('%Y-%m-%d') }}/{{ post.event_end_date.strftime('%Y-%m-%d') }}</div>
 | 
						|
    </h2>
 | 
						|
  {% else %}
 | 
						|
    {% if post.logo is defined %}
 | 
						|
    <img class="postlogo" alt="{{ post.logodesc }}" src="{{ post.logo | url }}" />
 | 
						|
    {% endif %}
 | 
						|
    <h2 class="headline">{{ post.title }}
 | 
						|
        <div class="subline">{{ post.event_start_date.strftime('%Y-%m-%d') }}/{{ post.event_end_date.strftime('%Y-%m-%d') }}</div>
 | 
						|
    </h2>
 | 
						|
  {% endif %}
 | 
						|
 | 
						|
  {% if from_index -%}
 | 
						|
    {{ post.preview }}
 | 
						|
  {% else -%}
 | 
						|
    {{ post.body }}
 | 
						|
  {% endif -%}
 | 
						|
  </article>
 | 
						|
{% endmacro -%}
 |