mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Add total count to all category
This commit is contained in:
parent
f6602cab8c
commit
05fabc002b
@ -372,6 +372,10 @@ p.note {
|
|||||||
@media only screen and (min-width: $desk-start) {
|
@media only screen and (min-width: $desk-start) {
|
||||||
#components-page {
|
#components-page {
|
||||||
.filter-button-group {
|
.filter-button-group {
|
||||||
|
.featured {
|
||||||
|
margin: 12px 0;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: block;
|
display: block;
|
||||||
background: 0;
|
background: 0;
|
||||||
|
@ -13,19 +13,22 @@ body_id: components-page
|
|||||||
regenerate: true
|
regenerate: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{% assign count = site.components | size %}
|
||||||
|
{% assign nocat = site.components | where: 'ha_category', null | size %}
|
||||||
|
{% assign tot = count | minus: nocat %}
|
||||||
|
{% assign components = site.components | sort: 'title' %}
|
||||||
|
{% assign categories = components | sort: 'ha_category' | map: 'ha_category' | uniq %}
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
Support for these components is provided by the Home Assistant community.
|
Support for these components is provided by the Home Assistant community.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% assign components = site.components | sort: 'title' %}
|
|
||||||
{% assign categories = components | sort: 'ha_category' | map: 'ha_category' | uniq %}
|
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div class="grid__item one-sixth lap-one-whole palm-one-whole">
|
<div class="grid__item one-sixth lap-one-whole palm-one-whole">
|
||||||
|
|
||||||
<div class="filter-button-group">
|
<div class="filter-button-group">
|
||||||
<a href='#all' class="btn">All</a>
|
<a href='#all' class="btn">All ({{tot}})</a>
|
||||||
<a href='#featured' class="btn">Featured</a>
|
<a href='#featured' class="btn featured">Featured</a>
|
||||||
|
|
||||||
{% for category in categories %}
|
{% for category in categories %}
|
||||||
{% if category and category != 'Other' %}
|
{% if category and category != 'Other' %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user