Skip to content

Instantly share code, notes, and snippets.

@eteubert
Created November 4, 2020 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eteubert/f59f9e842ecffdc9b8c9a0d7882aeecc to your computer and use it in GitHub Desktop.
Save eteubert/f59f9e842ecffdc9b8c9a0d7882aeecc to your computer and use it in GitHub Desktop.
{# Template: contributor-profile #}
{# Version: 1.2 #}
{# option.userid --- Name of user to be shown #}
{# option.social --- Display Social Icons #}
{# option.donations --- Display Donation Icons #}
{# option.flattr --- Display Contributor Flattr Button #}
{# option.show_name --- Show Contributor Name #}
{% if option.avatar_size %}
{% set avatar_size = option.avatar_size %}
{% else %}
{% set avatar_size = '128' %}
{% endif %}
<div class="contributor-profile">
{% set contributor = podcast.contributor(option.userid) %}
{% if contributor %}
{{ contributor.image.html({ width: avatar_size, title: contributor.name, alt: contributor.name }) }}
{%if option.show_name == "yes" %}
<br/>
<strong>{{ contributor.name }}</strong>
{% endif %}
{% if option.social == "yes" %}
{% for service in contributor.services({category: "social"}) %}
{% if loop.first %}<br/>{% endif %}
<a target="_blank" title="{{ service.title }}" href="{{ service.profileUrl }}">
{{ service.image.html({ width: 32, class: "podlove-contributor-button", alt: service.title }) }}
</a>
{% endfor %}
{% endif %}
{% if option.donations == "yes" %}
{% for service in contributor.services({category: "donation"}) %}
{% if loop.first %}<br/>{% endif %}
<a target="_blank" title="{{ service.title }}" href="{{ service.profileUrl }}">
{{ service.image.html({ width: 32, class: "podlove-contributor-button", alt: service.title }) }}
</a>
{% endfor %}
{% endif %}
{% if option.flattr == "yes" and contributor.flattr %}
<br/><a target="_blank"
class="FlattrButton"
title="Flattr {{ contributor.name }}"
rel="flattr;uid:{{ contributor.flattr }};button:compact;popout:0"
href="{{ contributor.flattr_url }}">
Flattr {{ contributor.name }}
</a>
{% endif %}
{% endif %}
</div>
<style>
div.contributor-profile {
float:right;
margin-left: 20px;
margin-left: 20px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment