Skip to content

Commit

Permalink
Fix features sort order
Browse files Browse the repository at this point in the history
Now `@media` will appear before `@media (-webkit-device-pixel-ratio)`. Finally!
  • Loading branch information
hteumeuleu committed Mar 4, 2021
1 parent a600d44 commit b924315
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion _js/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ layout: null
permalink: /assets/js/features.json
---
[
{% for feature in site.features %}
{% assign features = site.features | sort:'id' %}
{% for feature in features %}
{
"slug": {{ feature.slug | jsonify }},
"title": {{ feature.title | strip_newlines | remove_chars | escape_once | jsonify }},
Expand Down
2 changes: 1 addition & 1 deletion pages/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% for category in features-by-category %}
<h1 class="list-title" id="title-{{ category.name | slugify }}">{{ site.data.nicenames.category[category.name] | default: category.name }}</h1>
<ul class="list list--features">
{% assign features = category.items %}
{% assign features = category.items | sort:'id' %}
{% for feature in features %}
<li><a href="{{ feature.url }}">{{ feature.title | escape_once }}</a></li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion pages/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 class="post-title">Search</h1>
{% for category in features-by-category %}
<h2 class="list-title">{{ site.data.nicenames.category[category.name] | default: category.name }}</h2>
<ul class="list list--features">
{% assign features = category.items %}
{% assign features = category.items | sort:'id' %}
{% for feature in features %}
<li>
<a href="{{ feature.url }}">{{ feature.title | escape_once }}</a>
Expand Down

0 comments on commit b924315

Please sign in to comment.