|
20 | 20 | {% assign components = site.components | sort: 'title' %}
|
21 | 21 | {% assign categories = components | sort: 'ha_category' | map: 'ha_category' | uniq %}
|
22 | 22 |
|
23 |
| -<div class="filter-button-group"> |
24 |
| - <a href='#all' class="btn">All</a> |
25 |
| - <a href='#featured' class="btn">Featured</a> |
26 |
| - |
27 |
| - {% for category in categories %} |
28 |
| - {% if category and category != 'Other' %} |
29 |
| - <a href='#{{ category | slugify }}' class="btn">{{ category }}</a> |
30 |
| - {% endif %} |
31 |
| - {% endfor %} |
32 |
| - |
33 |
| - <a href='#other' class="btn">Other</a> |
34 |
| -</div> |
35 |
| - |
36 |
| -<div id="componentContainer"> |
37 |
| - {% for component in components %} |
38 |
| - {% if component.ha_category %} |
39 |
| - <a href='{{ component.url }}' |
40 |
| - class='{{ component.ha_category | slugify }}{% if component.featured %} featured{% endif %}' |
41 |
| - {% unless component.featured %}style='display: none'{% endunless %}> |
42 |
| - <div class='img-container'> |
43 |
| - {% if component.logo %} |
44 |
| - <img src='/images/supported_brands/{{ component.logo }}'> |
45 |
| - {% endif %} |
46 |
| - </div> |
47 |
| - <div class='title'>{{ component.title }}</div> |
48 |
| - <div class='category'>{{ component.ha_category }}</div> |
49 |
| - </a> |
50 |
| - {% endif %} |
51 |
| - {% endfor %} |
| 23 | +<div class="grid"> |
| 24 | + <div class="grid__item one-sixth lap-one-whole palm-one-whole"> |
| 25 | + |
| 26 | + <div class="filter-button-group"> |
| 27 | + <a href='#all' class="btn">All</a> |
| 28 | + <a href='#featured' class="btn">Featured</a> |
| 29 | + |
| 30 | + {% for category in categories %} |
| 31 | + {% if category and category != 'Other' %} |
| 32 | + <a href='#{{ category | slugify }}' class="btn"> |
| 33 | + {{ category }} |
| 34 | + ({{ components | where: 'ha_category', category | size }}) |
| 35 | + </a> |
| 36 | + {% endif %} |
| 37 | + {% endfor %} |
| 38 | + |
| 39 | + <a href='#other' class="btn">Other</a> |
| 40 | + </div> |
| 41 | + </div> |
| 42 | + <div class="grid__item five-sixths lap-one-whole palm-one-whole" id="componentContainer"> |
| 43 | + {% for component in components %} |
| 44 | + {% if component.ha_category %} |
| 45 | + <a href='{{ component.url }}' |
| 46 | + class='{{ component.ha_category | slugify }}{% if component.featured %} featured{% endif %}' |
| 47 | + {% unless component.featured %}style='display: none'{% endunless %}> |
| 48 | + <div class='img-container'> |
| 49 | + {% if component.logo %} |
| 50 | + <img src='/images/supported_brands/{{ component.logo }}'> |
| 51 | + {% endif %} |
| 52 | + </div> |
| 53 | + <div class='title'>{{ component.title }}</div> |
| 54 | + <div class='category'>{{ component.ha_category }}</div> |
| 55 | + </a> |
| 56 | + {% endif %} |
| 57 | + {% endfor %} |
| 58 | + </div> |
52 | 59 | </div>
|
53 | 60 |
|
54 | 61 | {% comment %}
|
55 | 62 | ## Pages without categories
|
56 |
| - |
57 | 63 | {% for component in components %}
|
58 | 64 | {% unless component.ha_category %}
|
59 | 65 | <p>{{ component.title }}</p>
|
|
0 commit comments