{% macro link_to(text, endpoint) -%} {{ text }} {%- endmacro %} {% macro render_tag_area(content)%} tagged {% for tag in content.tags%}{{tag}} {% endfor %} {% endmacro %} {% macro render_grid_item(content) %}
{%if Config.get('site', 'list_avatar_enabled', default="enabled") == "enabled" %} {%if content.has_multiple_authors %} {% for author in content.get_authors()|sort(attribute="display_name") %} {{render_author_avatar(author, size=144 / content.get_authors()|length)}} {% endfor %} {%else%} {% if content.created_by.email %} {{render_author_avatar(content.created_by)}} {% endif %} {%endif%} {% endif %}
{{ content.title }}
{% with main_image=content.get_main_image_url(thumb=True, default=None) %} {% if main_image %} {% endif %} {% endwith %}

{{content.get_summary()|truncate(255)|safe()}}

Read more...
{% endmacro %} {% macro render_grid(contents) %} {% for content in contents %} {{render_grid_item(content)}} {% else%} {{channel.get_text()|safe}} {% endfor %} {% endmacro %} {% macro render_author_avatar(author, size=70, css="post-avatar avatar") %} {{ author.display_name }} {% endmacro %} {% macro render_author_sidebar(author, size=120, multiple=False) %}
{% if author.email and Config.get('site', 'sidebar_avatar_enabled', default='enabled') == 'enabled' %} {{render_author_avatar(author, size=size, css="article-avatar")}} {% endif %}

{{ author.display_name }}

{{ author.tagline }}
{% endmacro%} {% macro render_list_item(content) %}
{%if Config.get('site', 'list_avatar_enabled', default="enabled") == "enabled" %} {%if content.has_multiple_authors %} {% for author in content.get_authors()|sort(attribute="display_name") %} {{render_author_avatar(author, size=144 / content.get_authors()|length)}} {% endfor %} {%else%} {% if content.created_by.email %} {{render_author_avatar(content.created_by)}} {% endif %} {%endif%} {% endif %}

{{ content.title }}

{% with main_image=content.get_main_image_url(thumb=True, default=None) %} {% if main_image %} {% endif %} {% endwith %}

{{content.get_summary()|truncate(255)|safe()}}

Read more...
{% endmacro %} {% macro render_list(contents) %} {% for content in contents %} {{render_list_item(content)}} {% else%} {{channel.get_text()|safe}} {% endfor %} {% endmacro %} {# --- Content areas ----- #} {% macro load_share_area(content) %}

// Share

Tweetar
{% endmacro %} {% macro render_license_area(content) %} {% if content.license.title %}
{% if content.license.identifier == 'creative_commons_by_nc_nd' %} Licença Creative Commons
"{{ content.title }}" by "{{ content.created_by.display_name }}" is licensed under Creative Commons - Attribution Non Commercial No Derivatives 4.0 Internacional. {% else %} "{{ content.title }}" by "{{ content.created_by.display_name }}" is licensed under {{content.license.title}} {% endif %}
{% endif %} {% endmacro %} {% macro render_recommend_item(content) %}
  • {{ content.title }} in {{ content.channel.title }} · {{ content.created_at.strftime('%H:%M of %m/%d/%Y') }}
  • {% endmacro %} {% macro load_recommendation_area(content) %} {% with %} {% set recommendations=content.get_recommendations()%} {% if recommendations %}

    // You may also like

    {% for item in recommendations %} {{render_recommend_item(item)}} {% endfor %}
    {% endif %} {% endwith %} {% endmacro %} {% macro load_tags_area(content) %}
    {% for tag in content.tags %} {{tag}} {% endfor %}
    {% endmacro %} {% macro load_comment_area(content) %} {% if content.comments_enabled %}

    // Comment

    {% if Config.get('comments', 'system') == 'internal' %}
    {% elif Config.get('comments', 'system') == 'custom'%} {{Config.get('comments', 'custom_script', '')|safe()}} {% elif Config.get('comments', 'system') == 'disqus'%} {%if Config.get('comments', 'disqus_script') %} {{Config.get('comments', 'disqus_script', '')|safe()}} {% else %} {% include theme('disqus.html') %} {% endif %} {% endif %} {% endif %} {% endmacro %} {% macro load_page_header(content, link=False) %} {% endmacro %} {% macro load_page_time(content) %} {%if content.created_by %} {{ content.created_by.name }} {%else%} {{Config.get('site', 'site_author', '')}} {%endif%} at {{ content.created_at.strftime('%H:%M of %m/%d/%Y') }} {% endmacro %} {% macro load_breadcrumbs() %} {% if channel %} {%for crumb in channel.get_ancestors()|reverse %} {% if loop.last and not content %} > {{crumb.title}} {% else %} > {{crumb.title}} {% endif %} {% endfor %} {% endif %} {% endmacro %} {% macro load_page_content(content, truncate=None, sidebar=True, link_in_title=False, breadcrumbs=True, license=True, share=True, rec=True, comments=True, footer=True, container_css="") %} {%if sidebar %}
    {% if content.has_multiple_authors %} {%for author in content.get_authors()|sort(attribute="display_name")%} {{render_author_sidebar(author, size=100 / content.get_authors()|length, multiple=True)}} {% endfor %} {% else %} {{render_author_sidebar(content.created_by)}} {%endif%}

    Published in {{ content.created_at.strftime('%H:%M of %m/%d/%Y') }}

    ←Home
    {% endif%}
    {% if not link_in_title %}

    {{ content.title }}

    {%else%}

    {{ content.title }}

    {% endif %} {% if breadcrumbs %} {% endif %}
    {% with main_image=content.get_main_image_url(thumb=False, default=None) %} {% if main_image %}
    {% endif %} {% endwith %}
    {{ content.get_text()|safe() }} {% if license %} {{render_license_area(content)}} {% endif %} {%if share %} {{load_share_area(content)}} {% endif %} {%if rec%} {{load_recommendation_area(content)}} {% endif %} {% if comments %} {{ load_comment_area(content) }} {%endif%} {%if footer%} Go Top {% include theme('footer.html') %} {%endif%}
    {% endmacro %} {# blog list#} {% macro render_blog(contents) %} {% for content in contents %} {{load_page_content(content, truncate=2000, sidebar=False, link_in_title=True, breadcrumbs=False, license=False, share=False, rec=False, comments=False, footer=False, container_css="pure-blog")}}
    read more...
    {% endfor %} {% endmacro %} {# --------- pagination ----------- #} {% macro render_pagination(pagination, endpoint) %}
    {% if pagination.pages > 1 %} {% endif %} {% endmacro %}