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:
@@ -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" ------*/
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user