diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css index 2c4bb129..fe691c0f 100644 --- a/docs/assets/css/style.css +++ b/docs/assets/css/style.css @@ -409,3 +409,9 @@ header { .footer { margin-top: 6rem; text-align: center; } + +input[type='color'] { + width: 1.25em; + height: 1.25em; + margin-left: 0.5em; +} \ No newline at end of file diff --git a/docs/assets/js/script.js b/docs/assets/js/script.js index 66c7d724..f12c4ca1 100644 --- a/docs/assets/js/script.js +++ b/docs/assets/js/script.js @@ -1,4 +1,5 @@ var devicon = angular.module('devicon', ['ngSanitize', 'ngAnimate']); +const DEFAULT_BACKGROUND = "#60be86"; /* ||============================================================== @@ -34,9 +35,15 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) { |----------------------------------------- */ + // icons related stuff $scope.icons = []; $scope.selectedIcon = {}; + // background color related stuff + // default is the default site background color + $scope.fontBackground = DEFAULT_BACKGROUND; + $scope.svgBackground = DEFAULT_BACKGROUND; + // Loop through devicon.json angular.forEach(data, function(devicon, key) { @@ -95,6 +102,9 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) { $scope.selectedFontIndex = 0; $scope.selectedSvgIcon = $scope.selectSvg(icon.svg[0], 0); + // reset color + $scope.fontBackground = DEFAULT_BACKGROUND; + $scope.svgBackground = DEFAULT_BACKGROUND; } /*---- End of "Change selected icon" ----*/ @@ -145,7 +155,6 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) { }); } /*---- End of "Change selected svg icon" ----*/ - }); /*================ End of "Devicons controller" ================*/ diff --git a/docs/index.html b/docs/index.html index dd424029..018bc328 100644 --- a/docs/index.html +++ b/docs/index.html @@ -54,13 +54,13 @@
First select an icon on the right, then select the version below and copy/paste the code into your project.