1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-21 05:41:46 +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

@@ -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);

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