-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path_social_slider.html
executable file
·70 lines (69 loc) · 2.83 KB
/
_social_slider.html
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
66
67
68
69
70
{% if page.type_name == "Donation" %}
{% assign activity_type = "Donation" %}
{% assign ignore_types = "Donation Cancel|Donation Deleted" | split: "|" %}
{% assign activity_title = "Who's donating" %}
{% elsif page.type_name == "Endorsement" %}
{% assign activity_type = "Endorsement" %}
{% assign ignore_types = "" %}
{% assign activity_title = "Who's endorsing" %}
{% elsif page.type_name == "Event" %}
{% assign activity_type = "Event RSVP" %}
{% assign ignore_types = "Event RSVP Cancel" %}
{% assign activity_title = "Who's RSVPing" %}
{% elsif page.type_name == "Moneybomb" %}
{% assign activity_type = "Pledge" %}
{% assign ignore_types = "Pledge Cancel" %}
{% assign activity_title = "Who's pledging" %}
{% elsif page.type_name == "Petition" %}
{% assign activity_type = "Petition Signature" %}
{% assign ignore_types = "" %}
{% assign activity_title = "Who's signing" %}
{% elsif page.type_name == "Signup" %}
{% assign activity_type = "Signup" %}
{% assign ignore_types = "" %}
{% assign activity_title = "Who's joining" %}
{% elsif page.type_name == "Volunteer Signup" %}
{% assign activity_type = "Volunteer Signup" %}
{% assign ignore_types = "Volunteer Quit" %}
{% assign activity_title = "Who's volunteering" %}
{% elsif page.type_name == "Vote Pledge" %}
{% assign activity_type = "Supporter Pledge Yes" %}
{% assign ignore_types = "Supporter Pledge Yes Cancel" %}
{% assign activity_title = "Who's pledging" %}
{% endif %}
{% if activity_type %}
{% assign ignore_list = "" %}
<h4>{{ activity_title }}</h4>
<div id="slider-cards">
<div class="slider-card-wrap">
{% for activity in page.activities %}
{% for ignore_type in ignore_types %}
{% if ignore_type == activity.type_name %}
{% capture ignore_list %}{{ ignore_list }}{{ activity.signup.id | append: "|" }}{% endcapture %}
{% endif %}
{% endfor %}
{% capture current_signup %}{{ activity.signup.id | append: "|" }}{% endcapture %}
{% unless ignore_list contains current_signup %}
{% if activity_type == activity.type_name %}
<div class="slider-card" data-id="{{ activity.signup.profile_url }}">
<div class="slider-card-profile clearfix">
{% if activity.signup.has_facebook_info? %}
<img src="http://graph.facebook.com/{{ activity.signup.facebook_uid }}/picture?width=72&height=72" alt="Profile Photo">
{% else %}
<img src="{{ activity.signup.profile_image_url }}" alt="Profile Photo">
{% endif %}
<span class="slider-name">
{% if activity.data.is_organization == true %}
{{ activity.signup.employer }}
{% else %}
{{ activity.signup.published_name_linked }}
{% endif %}
</span>
</div>
</div>
{% endif %}
{% endunless %}
{% endfor %}
</div>
</div>
{% endif %}