From 05fabc002b3b09c4ec7f06ddbd6edaae44ccbf0f Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 14 Aug 2016 15:09:21 -0700 Subject: [PATCH] Add total count to all category --- sass/custom/_paulus.scss | 4 ++++ source/components/index.html | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sass/custom/_paulus.scss b/sass/custom/_paulus.scss index 04aff728974..623bb8db3de 100644 --- a/sass/custom/_paulus.scss +++ b/sass/custom/_paulus.scss @@ -372,6 +372,10 @@ p.note { @media only screen and (min-width: $desk-start) { #components-page { .filter-button-group { + .featured { + margin: 12px 0; + } + .btn { display: block; background: 0; diff --git a/source/components/index.html b/source/components/index.html index d9ee273e703..1dd28d43c85 100644 --- a/source/components/index.html +++ b/source/components/index.html @@ -13,19 +13,22 @@ body_id: components-page 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 %} +

Support for these components is provided by the Home Assistant community.

-{% assign components = site.components | sort: 'title' %} -{% assign categories = components | sort: 'ha_category' | map: 'ha_category' | uniq %} -
- All - Featured + All ({{tot}}) + Featured {% for category in categories %} {% if category and category != 'Other' %}