{% 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', 'github', 'Git repository'), ('youtube.com', 'play-fill', 'Play video'), ('ohloh.net', 'graph-up', 'Contribution statistics'), ('stackoverflow.com', 'stack-overflow', 'Community support'), ('stackexchange.com', 'stack-overflow', 'Community support'), ('twitter.com', 'twitter', 'Social media activities'), ('bugs.launchpad.net', 'bug-fill', 'Reported bugs'), ('trac.wordpress.org', 'bug-fill', 'Reported bugs'), ('sourceforge.net/apps/trac', 'bug-fill', 'Reported bugs'), ('bugs.debian.org', 'bug-fill', 'Reported bugs'), ('bugs.kde.org', 'bug-fill', 'Reported bugs'), ('mantis', 'bug-fill', 'Reported bugs'), ('ticket=on', 'bug-fill', 'Reported bugs'), ('gmane.org', 'envelope-fill', 'Mailing-list participation'), ('type_of_search=mlists', 'envelope-fill', 'Mailing-list participation'), (SITEURL, 'megaphone-fill', '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 = [('', 'house-fill', '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 %}