From d793fdeee529213af33d5b8fabcda06188daa740 Mon Sep 17 00:00:00 2001 From: Kilian PAQUIER Date: Wed, 13 Jul 2022 12:37:01 +0200 Subject: [PATCH 1/7] new feature: icons number - fix #1218 --- README.md | 3 +++ docs/assets/css/style.css | 17 ++++++++++++++--- docs/assets/js/script.js | 8 ++++++++ docs/index.html | 9 ++++++++- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90c04be6d..b1fc5b62b 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,9 @@ GitHub repository stars + + Registered icons +


diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css index b16c1d0e3..7e7687096 100644 --- a/docs/assets/css/style.css +++ b/docs/assets/css/style.css @@ -415,11 +415,22 @@ input[type='color']:hover { .main { margin: 0 0 0 480px; } +.result { + max-width: 75px; +} + +.computed-data { + margin-bottom: 1rem; + color: var(--primaryColor); + font-weight: bold; + text-align: center; +} + .search { - text-align: center; } + 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 2fb5cd5bd..9d1a35ec8 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).toFixed(2); // Avg number of fonts and SVGs combined + /*------ End of "Re-format devicon.json" ------*/ }); diff --git a/docs/index.html b/docs/index.html index 6b3b645ed..148e2957a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -203,10 +203,17 @@
If you have any legal concerns regarding copyrights or want to report an abu + +
+ Total icons = {{ icons.length }}, + Total versions = {{ totalFonts }}, + Average versions per icon = {{ avgFonts }}
    -
  • +
  • {{icon.name}}

    From 074c4dcff87d05985cbff61fe97c62daf85beeaa Mon Sep 17 00:00:00 2001 From: Kilian PAQUIER Date: Fri, 15 Jul 2022 10:25:51 +0200 Subject: [PATCH 2/7] icon numbers| review suggestions application Co-authored-by: Snailedlt --- README.md | 2 +- docs/assets/css/style.css | 11 +++++++++-- docs/index.html | 10 +++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b1fc5b62b..fa89f6859 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ GitHub repository stars - Registered icons + Registered logos


    diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css index 7e7687096..2ae904529 100644 --- a/docs/assets/css/style.css +++ b/docs/assets/css/style.css @@ -420,12 +420,19 @@ input[type='color']:hover { } .computed-data { - margin-bottom: 1rem; color: var(--primaryColor); font-weight: bold; - text-align: center; + 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; } diff --git a/docs/index.html b/docs/index.html index 148e2957a..1cd45292f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -206,11 +206,11 @@
    If you have any legal concerns regarding copyrights or want to report an abu
-
- Total icons = {{ icons.length }}, - Total versions = {{ totalFonts }}, - Average versions per icon = {{ avgFonts }} -
+