Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
564 changes: 564 additions & 0 deletions _data/community.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions _includes/default_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ <h2>Sé parte_</h2>
{{ service[0] }}<img src='/assets/images/arrow.svg' aria-hidden="true" focuseable="false"/>
</a>
{% endfor %}
<a href="/community">Community<img src='/assets/images/arrow.svg' aria-hidden="true" focuseable="false"/></a>
</div>
</div>
</header>
40 changes: 40 additions & 0 deletions _includes/project_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<div class="project {{ medal_class }}"
data-search="{{ search_text | downcase | strip_html | strip_newlines }}"
data-user="{{ project.github_user }}"
data-stars="{{ project.stars }}"
data-name="{{ project.name | downcase }}">

{% if medal_name != "" %}
<div class="project-medal-wrap">
<img src="/assets/images/{{ medal_name }}.svg" alt="Rank {{ project_rank }}" class="project-medal">
</div>
{% endif %}

<div class="project-body">
<div class="project-header">
<h4>
<a href="{{ project.url }}" target="_blank" rel="noopener">{{ project.name }}</a>
</h4>
<span class="project-stars">★ {{ project.stars }}</span>
</div>

{% if project.description != "" %}
<p class="project-description">{{ project.description }}</p>
{% endif %}

<div class="project-meta">
{% if person.github %}
<img src="https://github.com/{{ person.github }}.png?size=30" alt="{{ person.name }}" loading="lazy" style="border-radius: 50%; width: 30px; vertical-align: middle;"/>
{% endif %}
<span class="project-author">{{ person.name | default: project.github_user }}</span>

{% if project.topics.size > 0 %}
<div class="project-topics">
{% for topic in project.topics limit: 4 %}
<span class="project-topic">{{ topic }}</span>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
58 changes: 58 additions & 0 deletions _layouts/community.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!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 %}
<script src="/assets/js/community.js"></script>
</body>
</html>
107 changes: 107 additions & 0 deletions _sass/community.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#view-community {
h2 {
overflow-wrap: break-word;

@media (max-width: 480px) {
font-size: 1.75rem;
}
}

.community-subtitle {
color: #2E2E2E;
margin-bottom: 1.5rem;
opacity: 0.7;
}

.community-controls {
display: flex;
flex-direction: column;
gap: 1rem;
}

.community-search {
background-color: #F6EEEC;
border: 3px solid #2E2E2E;
box-shadow: 6px 6px 0 #3967D1;
color: #3967D1;
font: 700 1rem 'Syncopate', sans-serif;
letter-spacing: 0.05em;
padding: 1rem 1.25rem;
text-transform: uppercase;
transition: box-shadow 0.15s ease, transform 0.15s ease;
width: 100%;

&::placeholder {
color: #3967D1;
opacity: 0.5;
}

&:focus {
box-shadow: 6px 6px 0 #FFC24D;
outline: none;
transform: translate(-2px, -2px);
}
}

.community-sort {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;

.sort-btn {
background-color: transparent;
border: 3px solid #2E2E2E;
box-shadow: 4px 4px 0 #2E2E2E;
cursor: pointer;
font: 700 0.75rem 'Syncopate', sans-serif;
letter-spacing: 0.05em;
padding: 0.5rem 1rem;
text-transform: uppercase;
transition: box-shadow 0.15s ease, transform 0.15s ease;
white-space: nowrap;

@media (max-width: 480px) {
font-size: 0.65rem;
letter-spacing: 0.02em;
padding: 0.5rem 0.75rem;
}

&:hover {
transform: translate(-2px, -2px);
box-shadow: 6px 6px 0 #2E2E2E;
}

&.active {
background-color: #3967D1;
border-color: #3967D1;
box-shadow: 4px 4px 0 #2E2E2E;
color: #fff;
}
}
}

.community-updated {
color: #2E2E2E;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.05em;
margin-top: 1rem;
opacity: 0.6;
text-transform: uppercase;
}

.community-user-group {
border-bottom: 2px solid #3967D1;
color: #3967D1;
font-size: 1.5rem;
font-weight: bold;
margin: 2rem 0 1rem;
padding-bottom: 0.5rem;
}

&.sort-by-user {
.project-medal-wrap { display: none; }

[class*="project--medal-"] { box-shadow: 4px 4px 0 #2E2E2E; }
}
}
124 changes: 124 additions & 0 deletions _sass/project-card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#view-community {
.project {
align-items: stretch;
border: 3px solid #2E2E2E;
box-shadow: 4px 4px 0 #2E2E2E;
display: flex;
margin: 1rem 0;
position: relative;
transition: box-shadow 0.15s ease, transform 0.15s ease;

&[hidden] { display: none; }

&:hover {
box-shadow: 6px 6px 0 #3967D1;
transform: translate(-2px, -2px);
}

&.project--medal-gold { box-shadow: 6px 6px 0 #FFC24D; }
&.project--medal-silver { box-shadow: 6px 6px 0 #C0C0C0; }
&.project--medal-bronze { box-shadow: 6px 6px 0 #CD7F32; }

.project-header h4 a::after {
content: "";
inset: 0;
position: absolute;
}
}

.project-medal-wrap {
align-items: center;
background-color: #F6EEEC;
border-right: 3px solid #2E2E2E;
display: flex;
justify-content: center;
padding: 0 1rem;
min-width: 4.5rem;

@media (max-width: 480px) {
min-width: 2.75rem;
padding: 0 0.4rem;
}
}

.project-medal {
height: 2.5rem;
width: 2.5rem;

@media (max-width: 480px) {
height: 1.75rem;
width: 1.75rem;
}
}

.project-body {
flex: 1;
min-width: 0;
padding: 1.25rem;
}

.project-header {
align-items: center;
display: flex;
justify-content: space-between;
gap: 1rem;

h4 {
min-width: 0;
overflow-wrap: break-word;

a {
color: #2E2E2E;
text-decoration: none;

&:hover { color: #3967D1; }
}
}
}

.project-stars {
background-color: #FFC24D;
border: 2px solid #2E2E2E;
color: #2E2E2E;
font: 700 0.9rem 'Syncopate', sans-serif;
padding: 0.2rem 0.6rem;
white-space: nowrap;
}

.project-description {
color: #2E2E2E;
margin: 0.5rem 0;
opacity: 0.8;
overflow-wrap: break-word;
}

.project-meta {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.75rem;
}

.project-author {
color: #2E2E2E;
font-size: 0.85rem;
opacity: 0.7;
}

.project-topics {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
margin-left: 0.5rem;
}

.project-topic {
background-color: #F6EEEC;
border: 2px solid #2E2E2E;
font-size: 0.7rem;
letter-spacing: 0.03em;
padding: 0.15rem 0.4rem;
text-transform: uppercase;
}
}
2 changes: 1 addition & 1 deletion assets/css/styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
---
@import 'reset', 'application', 'header', 'nav', 'next_meetup', 'view', 'meetups', 'sponsors', 'footer', 'talks';
@import 'reset', 'application', 'header', 'nav', 'next_meetup', 'view', 'meetups', 'sponsors', 'footer', 'talks', 'community', 'project-card';
6 changes: 6 additions & 0 deletions assets/images/medal-bronze.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/images/medal-gold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions assets/images/medal-silver.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading