Skip to content

Ecosystem sort #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2020
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
17 changes: 17 additions & 0 deletions _includes/ecosystem_sort.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<a id="dropdownSortLeft" data-toggle="dropdown" data-target="#dropdownSortMenuLeft" >
Sort <img src="{{ site.baseurl }}/assets/images/filter-arrow.svg">
</a>

<div class="dropdown-menu sort-menu" id="#dropdownSortMenuLeft">
<div class="ecosystem-filter-menu">
<ul>
<li>
<a class="ecosystem-filter" id="sortLowLeft">GitHub Stars - Lowest</a>
</li>

<li>
<a class="ecosystem-filter" id="sortHighLeft">GitHub Stars - Highest</a>
</li>
</ul>
</div>
</div>
45 changes: 45 additions & 0 deletions _sass/ecosystem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,48 @@
}
}
}

.ecosystem-divider {
position: relative;
margin-bottom: 4rem;
margin-top: 1.5rem;
top: 3rem;
}

.ecosystem{
#dropdownSort, #dropdownSortLeft {
margin-left: 0;
}
}

.ecosystem-filter-menu {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit - Can you add a space above ecosystem-filter-menu?

ul {
list-style-type: none;
padding-left: rem(20px);
li {
padding-right: rem(20px);
word-break: break-all;

a {
color: $mid_gray;
&:hover {
color: $orange;
}
}
}
}
}

.ecosystem .ecosystem-filter {
cursor: pointer;
ul {
list-style-type: none;
}
}

.ecosystem #dropdownFilter, #dropdownSort, #dropdownSortLeft {
color: $mid_gray;
cursor: pointer;
z-index: 1;
position: absolute;
}
61 changes: 35 additions & 26 deletions ecosystem/ecosystem.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,34 +62,40 @@ <h1>

<!-- START CONTENT -->

<div class="row ecosystem-cards-wrapper">
{% assign ecosystem = site.ecosystem | sort_natural: "title" %}

{% for item in ecosystem %}
<div class="col-md-6 ecosystem-card-wrapper" data-categories="{{ item.category | join: "," }}">
<div class="card ecosystem-card">
<a href="{{ item.link }}" target="_blank">
<div class="card-body {{ item.logo-class }} {% if item.experimental %}experimental{% endif %}">
<div class="ecosystem-card-title-container">
<ul class="star-list">
<li class="card-title">{{ item.title }}</li>
<div class="icon-count-container">
<li><img class="github-logo" src="/assets/images/logo-github.svg"></li>
<li class="github-stars-count">27</li>
</div>
</ul>
{% if item.experimental %}
<div class="experimental-badge">
Experimental
</div>
{% endif %}
{% include ecosystem_sort.html %}

<hr class="ecosystem-divider">

<div id="ecosystem-index-cards">
<div class="list row ecosystem-cards-wrapper cards-right">
{% assign ecosystem = site.ecosystem | sort_natural: "title" %}

{% for item in ecosystem %}
<div class="col-md-6 ecosystem-card-wrapper" id="ecosystemCards" data-categories="{{ item.category | join: "," }}">
<div class="card ecosystem-card">
<a href="{{ item.link }}" target="_blank">
<div class="card-body {{ item.logo-class }} {% if item.experimental %}experimental{% endif %}">
<div class="ecosystem-card-title-container">
<ul class="star-list">
<li class="card-title">{{ item.title }}</li>
<div class="icon-count-container">
<li><img class="github-logo" src="/assets/images/logo-github.svg"></li>
<li class="github-stars-count">27</li>
</div>
</ul>
{% if item.experimental %}
<div class="experimental-badge">
Experimental
</div>
{% endif %}
</div>
<p class="card-summary">{{ item.summary }}</p>
</div>
<p class="card-summary">{{ item.summary }}</p>
</div>
</a>
</a>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>

<div class="join-notice">
Expand Down Expand Up @@ -146,4 +152,7 @@ <h1>
$(".nav-link[data-category=" + category + "]").addClass('selected');
}
</script>

<script star-count-call-date="ecosystemStarCountCallDate" star-count-data="ecosystemStarCountData" src="{{ site.baseurl }}/assets/github-stars.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<script list-id="ecosystem-index-cards" display-count="100" pagination="false" src="{{ site.baseurl }}/assets/filter-hub-tags.js"></script>