From bda103377856e42b7df5af4911ff7be3171ee36d Mon Sep 17 00:00:00 2001
From: kilianpaquier
Date: Wed, 15 Mar 2023 00:30:16 +0100
Subject: [PATCH] new feature: icons number (#1267)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* new feature: icons number - fix #1218
* icon numbers| review suggestions application
Co-authored-by: Snailedlt
* Change shield link to https://devicon.dev
* add titles and rename logos & icons to icons & icon-versions
* replace = with :
Co-authored-by: Josélio Júnior <76992016+lunatic-fox@users.noreply.github.com>
* fixed avg fonts number to integer and added float in title
* Update docs/index.html
Co-authored-by: Josélio Júnior <76992016+lunatic-fox@users.noreply.github.com>
---------
Co-authored-by: Kilian PAQUIER
Co-authored-by: Snailedlt
Co-authored-by: Jørgen Kalsnes Hagen <43886029+Snailedlt@users.noreply.github.com>
Co-authored-by: Josélio Júnior <76992016+lunatic-fox@users.noreply.github.com>
---
README.md | 3 +++
docs/assets/css/style.css | 24 +++++++++++++++++++++---
docs/assets/js/script.js | 8 ++++++++
docs/index.html | 9 ++++++++-
4 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 90c04be6..118f59db 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,9 @@
+
+
+
diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css
index b16c1d0e..2ae90452 100644
--- a/docs/assets/css/style.css
+++ b/docs/assets/css/style.css
@@ -415,11 +415,29 @@ input[type='color']:hover {
.main {
margin: 0 0 0 480px; }
-.search {
+.result {
+ max-width: 75px;
+}
+
+.computed-data {
+ color: var(--primaryColor);
+ font-weight: bold;
+ list-style: none;
+ padding: 0;
+ width: 80%;
+ margin: 25px auto;
+ display: flex;
+}
+
+.computed-data li {
+ width: 33.33%;
text-align: center; }
+
+.search {
+ text-align: center;
+ margin: 4rem 0 1rem 0; }
+
.search input {
- width: 300px;
- margin: 4rem;
padding: .5rem 1rem;
border: 0;
border-bottom: 2px solid var(--primaryColor);
diff --git a/docs/assets/js/script.js b/docs/assets/js/script.js
index 2fb5cd5b..6986daea 100644
--- a/docs/assets/js/script.js
+++ b/docs/assets/js/script.js
@@ -38,6 +38,9 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
$scope.icons = [];
$scope.selectedIcon = {};
+ // Miscellaneous stuff
+ $scope.totalFonts = 0; // Total fonts and SVGs combined
+
// background color related stuff
// default is the default site background color
$scope.DEFAULT_BACKGROUND = "#3D9561";
@@ -61,6 +64,8 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
main: ""
};
+ $scope.totalFonts += devicon.versions.font.length + devicon.versions.svg.length;
+
// Loop through devicon.json icons
for (var i = 0; i < devicon.versions.font.length; i++) {
@@ -96,6 +101,9 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
$scope.selectedFontIndex = 0;
$scope.selectedSvgIndex = 0;
+ // Computes miscellaneous data
+ $scope.avgFonts = $scope.totalFonts / $scope.icons.length // Avg number of fonts and SVGs combined
+
/*------ End of "Re-format devicon.json" ------*/
});
diff --git a/docs/index.html b/docs/index.html
index 6b3b645e..d980be20 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -203,10 +203,17 @@
+
+
+ - Total icons: {{ icons.length }}
+ - Total icon version: {{ totalFonts }}
+ - Average icon versions per icon: {{ avgFonts.toFixed(0) }}
+
+