Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4178638

Browse files
committed
Rework logic to group items by the "builtin" key
This obviates the need for the Prettier workaround.
1 parentb451253 commit4178638

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

‎_layouts/whats_left.html‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,15 @@
4242
</div>
4343

4444
<divclass="section-title">What's left: Built-in Items</div>
45-
{% assign previous_builtin = "" %}
46-
{% comment %}<div><ol><!-- this makes prettier not crash -->{% endcomment %}
47-
{% for item in site.data.whats_left.builtin_items %}
48-
{% if item.builtin != previous_builtin %}
49-
{% if previous_builtin != "" %}
50-
</ol></div>
51-
{% endif %}
52-
<h4>{{ item.builtin }}</h4>
53-
<divclass="column-count-is-2"><ol>
54-
{% endif %}
55-
<liclass="word-wrap-anywhere"><code>{{ item.name }}</code> {% if item.is_inherited %}{{ item.is_inherited }}{% endif %}</li>
56-
{% assign previous_builtin = item.builtin %}
45+
{% assign items_by_builtin = site.data.whats_left.builtin_items | group_by: "builtin" %}
46+
{% for group in items_by_builtin %}
47+
<h4>{{ group.name }}</h4>
48+
<divclass="column-count-is-2">
49+
<ol>
50+
{% for item in group.items %}
51+
<liclass="word-wrap-anywhere"><code>{{ item.name }}</code> {% if item.is_inherited %}{{ item.is_inherited }}{% endif %}</li>
52+
{% endfor %}
53+
</ol>
54+
</div>
5755
{% endfor %}
58-
</ol></div>
5956
</div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp