-
Notifications
You must be signed in to change notification settings - Fork 9
/
contributor-profile.twig
65 lines (54 loc) · 2 KB
/
contributor-profile.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{# 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.contributors({scope: "podcast", id: 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>