From 6f69c0d978a9f44eaa05f43490c9797b7c19c65d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 2 Jan 2023 23:34:04 +1100 Subject: [PATCH] Add icons to landing page --- .github/get_stats.py | 14 ++++++-------- _data/general/stats.yml | 8 +++++++- _includes/base/head.html | 3 +++ _includes/block/stats.html | 7 ++++++- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/get_stats.py b/.github/get_stats.py index 89012427..73ce9c4d 100644 --- a/.github/get_stats.py +++ b/.github/get_stats.py @@ -49,19 +49,17 @@ file_name.write_text( f"""stats: - name: Docker pulls number: {docker} - icon: fab fa-docker + icon: fa-brands fa-docker - name: GitHub Stars number: {stars} - icon: fas fa-stars + icon: fa-solid fa-stars - name: Forks number: {forks} - icon: fas fa-code-map + icon: fa-solid fa-code-branch - name: Contributors number: {contributors} - icon: fas fa-hands-helping + icon: fa-solids fa-hands-helping - name: Languages number: {languages} - icon: fas fa fa-language - #- name: Translators - # number: {translators} - # """) + icon: fa-solid fa fa-language +""" \ No newline at end of file diff --git a/_data/general/stats.yml b/_data/general/stats.yml index 3e41ea99..c1b9c025 100644 --- a/_data/general/stats.yml +++ b/_data/general/stats.yml @@ -1,11 +1,17 @@ stats: - name: Docker pulls number: 2176492 + icon: fa-brands fa-docker - name: GitHub Stars number: 2250 + icon: fa-solid fa-stars - name: Forks number: 351 + icon: fa-solid fa-code-branch - name: Contributors number: 52 + icon: fa-solid fa-hands-helping - name: Languages - number: 26 \ No newline at end of file + number: 26 + icon: fa-solid fa-language + \ No newline at end of file diff --git a/_includes/base/head.html b/_includes/base/head.html index 4f4a3c27..686ddb7a 100644 --- a/_includes/base/head.html +++ b/_includes/base/head.html @@ -8,6 +8,9 @@ + + + {{ site.title }}{% if page.title %} - {{ page.title }}{% endif %} diff --git a/_includes/block/stats.html b/_includes/block/stats.html index 15ffbb44..46f5c6f5 100644 --- a/_includes/block/stats.html +++ b/_includes/block/stats.html @@ -5,7 +5,12 @@ {% assign stats = stats|default:site.data.general.stats.stats %} {% for item in stats %}
-

{{ item.number | intword }}

+

+ {% if item.icon %} +   + {% endif %} + {{ item.number | intword }} +

{{ item.name }}

{% endfor %}