-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcommunity.html
More file actions
57 lines (46 loc) · 2.08 KB
/
Copy pathcommunity.html
File metadata and controls
57 lines (46 loc) · 2.08 KB
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
<!DOCTYPE html>
<html lang="es">
{% include head.html %}
<body>
{% include nav.html %}
<main>
<article id="view-community" class="view">
<section>
<h2>Community</h2>
<p class="community-subtitle">Ruby & Rails open source projects built by our community</p>
<div class="community-controls">
<input type="search" id="community-search" class="community-search" placeholder="Search project or author..." autocomplete="off">
<div class="community-sort">
<button class="sort-btn active" data-sort="stars">By stars</button>
<button class="sort-btn" data-sort="user">By author</button>
<button class="sort-btn" data-sort="name">A–Z</button>
</div>
</div>
<p class="community-updated">Last updated: {{ site.data.community.last_updated | date: "%B %-d, %Y" }}</p>
</section>
<section id="community-list">
{% assign projects_sorted = site.data.community.projects | sort: "stars" | reverse %}
{% assign medals = "medal-gold,medal-silver,medal-bronze" | split: "," %}
{% for project in projects_sorted %}
{% assign person = nil %}
{% for p in site.data.people %}
{% if p[1].github == project.github_user %}
{% assign person = p[1] %}
{% endif %}
{% endfor %}
{% capture search_text %}{{ project.name }} {{ project.description }} {{ project.github_user }} {{ person.name }} {{ project.topics | join: ' ' }}{% endcapture %}
{% assign medal_name = "" %}
{% assign medal_class = "" %}
{% if forloop.index <= 3 %}
{% assign medal_name = medals[forloop.index0] %}
{% assign medal_class = "project--medal project--" | append: medal_name %}
{% endif %}
{% assign project_rank = forloop.index %}
{% include project_card.html %}
{% endfor %}
</section>
</article>
</main>
{% include footer.html %}
</body>
</html>