1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-18 04:11:48 +02:00

new feature: icons number (#1267)

* new feature: icons number - fix #1218

* icon numbers| review suggestions application

Co-authored-by: Snailedlt <Snailedlt@users.noreply.github.com>

* 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 <contact@kilian-paquier.fr>
Co-authored-by: Snailedlt <Snailedlt@users.noreply.github.com>
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>
This commit is contained in:
kilianpaquier
2023-03-15 00:30:16 +01:00
committed by GitHub
parent 771daeb74d
commit bda1033778
4 changed files with 40 additions and 4 deletions

View File

@@ -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" ------*/
});