{% set LAYOUT = 'full-width' %} {% extends "base.html" %} {# Map URL substring matches to link's icon, then label. Sorted by priority: the first items takes precedence over those at the end. #} {% set ICONS = [ ('github.com', 'fab fa-github-alt', 'Git repository'), ('bitbucket.org', 'fab fa-bitbucket', 'Mercurial repository'), ('youtube.com', 'fas fa-play', 'Play video'), ('ohloh.net', 'fas fa-bar-chart-o', 'Contribution statistics'), ('stackoverflow.com', 'fab fa-stack-overflow', 'Community support'), ('stackexchange.com', 'fab fa-stack-exchange', 'Community support'), ('twitter.com', 'fab fa-twitter', 'Social media activities'), ('bugs.launchpad.net', 'fas fa-bug', 'Reported bugs'), ('trac.wordpress.org', 'fas fa-bug', 'Reported bugs'), ('sourceforge.net/apps/trac', 'fas fa-bug', 'Reported bugs'), ('bugs.debian.org', 'fas fa-bug', 'Reported bugs'), ('bugs.kde.org', 'fas fa-bug', 'Reported bugs'), ('mantis', 'fas fa-bug', 'Reported bugs'), ('ticket=on', 'fas fa-bug', 'Reported bugs'), ('gmane.org', 'fas fa-envelope-o', 'Mailing-list participation'), ('type_of_search=mlists', 'fas fa-envelope-o', 'Mailing-list participation'), (SITEURL, 'fas fa-bullhorn', 'Announcement on this blog'), ] %} {% macro render_card(all_tags, project) %}
{{ project.desc }}
{% endif %} {% if project.links %}{% for link in project.links %} {# Default icon in case of no match #} {% set matches = [('', 'fas fa-home', 'Project home')] %} {% for rule in ICONS|reverse %} {% if rule[0] and link.find(rule[0]) != -1 %} {% if matches.append(rule) %} {% endif %} {% endif %} {% endfor %} {% endfor %}
{% endif %}