{% set LAYOUT = 'full-width' %} {% extends "base.html" %} {% block extra_js %} {% endblock %} {% set ICONS = { 'github.com': 'fa-github-alt' , SITEURL: 'fa-bullhorn' , 'type_of_search=mlists': 'fa-envelope-o' , 'gmane.org': 'fa-envelope-o' , 'bitbucket.org': 'fa-bitbucket' , 'youtube.com': 'fa-play' , 'bugs.launchpad.net': 'fa-bug' , 'trac.wordpress.org': 'fa-bug' , 'sourceforge.net/apps/trac': 'fa-bug' , 'bugs.debian.org': 'fa-bug' , 'bugs.kde.org': 'fa-bug' , 'mantis': 'fa-bug' , 'ticket=on': 'fa-bug' , 'ohloh.net': 'fa-bar-chart-o' , 'stackoverflow.com': 'fa-stack-overflow' , 'stackexchange.com': 'fa-stack-exchange' , 'twitter.com': 'fa-twitter' } %} {% set LABELS = { 'fa-github-alt': 'Git repository' , 'fa-bullhorn': 'Announcement on this blog' , 'fa-envelope-o': 'Mailing-list participation' , 'fa-bitbucket': 'Mercurial repository' , 'fa-play': 'Play video' , 'fa-bug': 'Reported bugs' , 'fa-bar-chart-o': 'Contribution statistics' } %} {% macro render_project(all_tags, project) %}
{% if project.inactive %}
Inactive
{% endif %} {% if project.thumb %} {% if project.thumb_link %} {% endif %} {{ project.name }} thumbnail {% if project.thumb_link %} {% endif %} {% endif %}

{{ project.name }}

{% if project.desc %}

{{ project.desc }}

{% endif %} {% if project.roles or project.tools %}

{% for role in project.roles %} {{ role }} {% endfor %} {% for tag in all_tags|sort(reverse=True, attribute='articles') %} {% if tag.name in project.tools %} {{ m.render_tag(tag) }} {% endif %} {% endfor %} {% set tag_names = [] %} {% for tag in all_tags %} {% if tag_names.append(tag.name) %}{% endif %} {% endfor %} {% for tool in project.tools %} {% if tool not in tag_names %} {{ tool }} {% endif %} {% endfor %}

{% endif %} {% if project.links %}

{% for link in project.links %} {% set link_icon = ['fa-home'] %} {% for (domain, icon) in ICONS.items() %} {% if link.find(domain) != -1 %} {% if link_icon.append(icon) %}{% endif %} {% endif %} {% endfor %} {% set link_icon = link_icon[-1] %} {% endfor %}

{% endif %}
{% endmacro %} {% macro render_projects(projects) %} {% set all_tags = [] %} {% for tag, articles in tags %} {% if all_tags.append({'name': tag.name, 'url': tag.url, 'articles': articles|length()}) %}{% endif %} {% endfor %} {% if projects is defined %}
{% block project_pre_content %}{% endblock %} {% set active_projects = [] %} {% set inactive_projects = [] %} {% for project in projects %} {% if project.inactive %} {% if inactive_projects.append(project) %}{% endif %} {% else %} {% if active_projects.append(project) %}{% endif %} {% endif %} {% endfor %} {% for project_list in [active_projects, inactive_projects] %} {% for project in project_list %} {{ render_project(all_tags, project) }} {% endfor %} {% endfor %} {% block project_post_content %}{% endblock %}
{% endif %} {% endmacro %} {% macro render_project_group(group, projects) %} {{ group.pre }} {{ render_projects(projects) }} {{ group.post }} {% endmacro %} {% block content %} {% if PROJECT_GROUPS is defined %} {% for group in PROJECT_GROUPS %} {{ render_project_group(group, PROJECTS|selectattr("group", "sameas", group.id)) }} {% endfor %} {{ render_projects(PROJECTS|rejectattr("group", "defined")) }} {% else %} {{ render_projects(PROJECTS) }} {% endif %} {% endblock %}