diff --git a/_icons/ajdustments.svg b/_icons/ajdustments.svg
index b704cca66..b340ad17a 100644
--- a/_icons/ajdustments.svg
+++ b/_icons/ajdustments.svg
@@ -4,10 +4,10 @@
-
+
-
+
diff --git a/_icons/arrow-down-circle.svg b/_icons/arrow-down-circle.svg
index dd2629f61..cf1f6fb79 100644
--- a/_icons/arrow-down-circle.svg
+++ b/_icons/arrow-down-circle.svg
@@ -2,7 +2,7 @@
---
diff --git a/_icons/arrow-down-left-circle.svg b/_icons/arrow-down-left-circle.svg
index 951f580dd..4de13513c 100644
--- a/_icons/arrow-down-left-circle.svg
+++ b/_icons/arrow-down-left-circle.svg
@@ -2,6 +2,6 @@
---
diff --git a/_icons/arrow-down-right-circle.svg b/_icons/arrow-down-right-circle.svg
index e55a661ac..afc04acb0 100644
--- a/_icons/arrow-down-right-circle.svg
+++ b/_icons/arrow-down-right-circle.svg
@@ -2,6 +2,6 @@
---
diff --git a/_icons/arrow-left-circle.svg b/_icons/arrow-left-circle.svg
index aea56cb7c..03008660d 100644
--- a/_icons/arrow-left-circle.svg
+++ b/_icons/arrow-left-circle.svg
@@ -2,7 +2,7 @@
---
diff --git a/_icons/arrow-narrow-up.svg b/_icons/arrow-narrow-up.svg
index 41c499711..0ed04ce1a 100644
--- a/_icons/arrow-narrow-up.svg
+++ b/_icons/arrow-narrow-up.svg
@@ -1,7 +1,7 @@
---
---
diff --git a/_icons/arrow-right-circle.svg b/_icons/arrow-right-circle.svg
index f36f901e5..4a409d762 100644
--- a/_icons/arrow-right-circle.svg
+++ b/_icons/arrow-right-circle.svg
@@ -2,7 +2,7 @@
---
diff --git a/_icons/arrow-up-circle.svg b/_icons/arrow-up-circle.svg
index 9e46b27a9..c8142e7ca 100644
--- a/_icons/arrow-up-circle.svg
+++ b/_icons/arrow-up-circle.svg
@@ -2,7 +2,7 @@
---
diff --git a/_icons/arrow-up-left-circle.svg b/_icons/arrow-up-left-circle.svg
index 056deb048..7d5f597ea 100644
--- a/_icons/arrow-up-left-circle.svg
+++ b/_icons/arrow-up-left-circle.svg
@@ -2,6 +2,6 @@
---
diff --git a/_icons/arrow-up-right-circle.svg b/_icons/arrow-up-right-circle.svg
index 8dba8624f..246270386 100644
--- a/_icons/arrow-up-right-circle.svg
+++ b/_icons/arrow-up-right-circle.svg
@@ -2,6 +2,6 @@
---
diff --git a/_icons/battery-1.svg b/_icons/battery-1.svg
index fa6663bab..68643f9f3 100644
--- a/_icons/battery-1.svg
+++ b/_icons/battery-1.svg
@@ -2,7 +2,6 @@
group: battery
---
-
diff --git a/_icons/battery-2.svg b/_icons/battery-2.svg
index 6856ba338..121344e43 100644
--- a/_icons/battery-2.svg
+++ b/_icons/battery-2.svg
@@ -2,8 +2,7 @@
group: battery
---
-
diff --git a/_icons/battery-3.svg b/_icons/battery-3.svg
index 0489a1bce..49d453b13 100644
--- a/_icons/battery-3.svg
+++ b/_icons/battery-3.svg
@@ -2,8 +2,8 @@
group: battery
---
diff --git a/_icons/battery-4.svg b/_icons/battery-4.svg
index c0995de6b..decb6a0b1 100644
--- a/_icons/battery-4.svg
+++ b/_icons/battery-4.svg
@@ -2,9 +2,9 @@
group: battery
---
diff --git a/_icons/battery-charging.svg b/_icons/battery-charging.svg
index 33da7be65..10d1ef18f 100644
--- a/_icons/battery-charging.svg
+++ b/_icons/battery-charging.svg
@@ -2,7 +2,7 @@
group: battery
---
diff --git a/_icons/battery.svg b/_icons/battery.svg
index 38ac7a389..cabaf0389 100644
--- a/_icons/battery.svg
+++ b/_icons/battery.svg
@@ -2,5 +2,5 @@
group: battery
---
diff --git a/_icons/bookmark.svg b/_icons/bookmark.svg
index 7460087bc..94fff7290 100644
--- a/_icons/bookmark.svg
+++ b/_icons/bookmark.svg
@@ -1,5 +1,5 @@
---
---
diff --git a/_icons/border-bottom.svg b/_icons/border-bottom.svg
index efa6cd729..c11b0bd82 100644
--- a/_icons/border-bottom.svg
+++ b/_icons/border-bottom.svg
@@ -3,10 +3,10 @@
diff --git a/_icons/border-horizontal.svg b/_icons/border-horizontal.svg
index a5584175f..a0fbaac02 100644
--- a/_icons/border-horizontal.svg
+++ b/_icons/border-horizontal.svg
@@ -3,10 +3,10 @@
diff --git a/_icons/border-inner.svg b/_icons/border-inner.svg
index 660b51e98..bb8b46bda 100644
--- a/_icons/border-inner.svg
+++ b/_icons/border-inner.svg
@@ -4,9 +4,9 @@
-
-
-
-
+
+
+
+
diff --git a/_icons/border-left.svg b/_icons/border-left.svg
index 93bf95239..c75681591 100644
--- a/_icons/border-left.svg
+++ b/_icons/border-left.svg
@@ -3,10 +3,10 @@
diff --git a/_icons/border-none.svg b/_icons/border-none.svg
index 846225e93..ac8fe8eb3 100644
--- a/_icons/border-none.svg
+++ b/_icons/border-none.svg
@@ -2,11 +2,11 @@
---
diff --git a/_icons/border-outer.svg b/_icons/border-outer.svg
index bfb11415f..85b2ed611 100644
--- a/_icons/border-outer.svg
+++ b/_icons/border-outer.svg
@@ -3,7 +3,7 @@
diff --git a/_icons/border-right.svg b/_icons/border-right.svg
index 9e8d37d43..abcfd486e 100644
--- a/_icons/border-right.svg
+++ b/_icons/border-right.svg
@@ -3,10 +3,10 @@
diff --git a/_icons/border-top.svg b/_icons/border-top.svg
index 8c34639a9..a2eab109f 100644
--- a/_icons/border-top.svg
+++ b/_icons/border-top.svg
@@ -3,10 +3,10 @@
diff --git a/_icons/border-vertical.svg b/_icons/border-vertical.svg
index a10ec5b88..4295a5808 100644
--- a/_icons/border-vertical.svg
+++ b/_icons/border-vertical.svg
@@ -3,10 +3,10 @@
diff --git a/_icons/bulb-off.svg b/_icons/bulb-off.svg
index 938ad7702..c02323074 100644
--- a/_icons/bulb-off.svg
+++ b/_icons/bulb-off.svg
@@ -1,6 +1,6 @@
---
---
diff --git a/_icons/bulb.svg b/_icons/bulb.svg
index 186cde24f..9d944f6f6 100644
--- a/_icons/bulb.svg
+++ b/_icons/bulb.svg
@@ -1,7 +1,7 @@
---
---
diff --git a/_icons/calendar.svg b/_icons/calendar.svg
index b0f2c41ac..e17848362 100644
--- a/_icons/calendar.svg
+++ b/_icons/calendar.svg
@@ -1,11 +1,10 @@
---
---
diff --git a/_icons/camera.svg b/_icons/camera.svg
index 879b9393b..95133fe1d 100644
--- a/_icons/camera.svg
+++ b/_icons/camera.svg
@@ -1,6 +1,6 @@
---
---
diff --git a/_icons/cash.svg b/_icons/cash.svg
index 5a6b75f59..913ac3776 100644
--- a/_icons/cash.svg
+++ b/_icons/cash.svg
@@ -1,7 +1,7 @@
---
---
diff --git a/_icons/clipboard-check.svg b/_icons/clipboard-check.svg
index 74d887d29..bec4edcad 100644
--- a/_icons/clipboard-check.svg
+++ b/_icons/clipboard-check.svg
@@ -3,5 +3,5 @@
diff --git a/_icons/clipboard-list.svg b/_icons/clipboard-list.svg
index bf571040d..198a547c7 100644
--- a/_icons/clipboard-list.svg
+++ b/_icons/clipboard-list.svg
@@ -3,8 +3,8 @@
diff --git a/_icons/clipboard-x.svg b/_icons/clipboard-x.svg
index 779a4142e..77b6b5305 100644
--- a/_icons/clipboard-x.svg
+++ b/_icons/clipboard-x.svg
@@ -3,5 +3,5 @@
diff --git a/_icons/cloud-rain.svg b/_icons/cloud-rain.svg
index f985a4801..5228eb947 100644
--- a/_icons/cloud-rain.svg
+++ b/_icons/cloud-rain.svg
@@ -2,6 +2,6 @@
group: weather
---
diff --git a/_icons/cloud-snow.svg b/_icons/cloud-snow.svg
index afd065def..67e1f8e9f 100644
--- a/_icons/cloud-snow.svg
+++ b/_icons/cloud-snow.svg
@@ -2,6 +2,6 @@
group: weather
---
diff --git a/_icons/cloud-storm.svg b/_icons/cloud-storm.svg
index f43d73aa9..56f04a560 100644
--- a/_icons/cloud-storm.svg
+++ b/_icons/cloud-storm.svg
@@ -2,6 +2,6 @@
group: weather
---
diff --git a/_icons/cloud.svg b/_icons/cloud.svg
index 1596f3815..7635d477c 100644
--- a/_icons/cloud.svg
+++ b/_icons/cloud.svg
@@ -2,5 +2,5 @@
group: weather
---
diff --git a/_icons/code.svg b/_icons/code.svg
index 22b82a710..027357072 100644
--- a/_icons/code.svg
+++ b/_icons/code.svg
@@ -3,5 +3,5 @@
diff --git a/_icons/cog.svg b/_icons/cog.svg
index e5d00396f..08f19c572 100644
--- a/_icons/cog.svg
+++ b/_icons/cog.svg
@@ -1,6 +1,6 @@
---
---
diff --git a/_icons/copy.svg b/_icons/copy.svg
index a1ddd7d12..ab78c431c 100644
--- a/_icons/copy.svg
+++ b/_icons/copy.svg
@@ -1,6 +1,6 @@
---
---
diff --git a/_icons/credit-card.svg b/_icons/credit-card.svg
index da87cf6c2..0d92fbd67 100644
--- a/_icons/credit-card.svg
+++ b/_icons/credit-card.svg
@@ -1,8 +1,8 @@
---
---
diff --git a/_icons/device-desktop.svg b/_icons/device-desktop.svg
index 25563c4c8..e93b11423 100644
--- a/_icons/device-desktop.svg
+++ b/_icons/device-desktop.svg
@@ -1,8 +1,8 @@
---
---
diff --git a/_icons/device-mobile.svg b/_icons/device-mobile.svg
index 3d11be9aa..563fd2a33 100644
--- a/_icons/device-mobile.svg
+++ b/_icons/device-mobile.svg
@@ -1,7 +1,7 @@
---
---
diff --git a/_icons/device-tablet.svg b/_icons/device-tablet.svg
index 66fba6ac1..fae0f9ab6 100644
--- a/_icons/device-tablet.svg
+++ b/_icons/device-tablet.svg
@@ -1,6 +1,6 @@
---
---
diff --git a/_icons/download.svg b/_icons/download.svg
index 2df5c6bb4..b74b04e72 100644
--- a/_icons/download.svg
+++ b/_icons/download.svg
@@ -2,7 +2,7 @@
group: download
---
diff --git a/_icons/file-check.svg b/_icons/file-check.svg
index 03c29b4b5..b43696b00 100644
--- a/_icons/file-check.svg
+++ b/_icons/file-check.svg
@@ -1,7 +1,7 @@
---
---
diff --git a/_icons/file-download.svg b/_icons/file-download.svg
index 73a1f0e78..3b2cb66d5 100644
--- a/_icons/file-download.svg
+++ b/_icons/file-download.svg
@@ -1,8 +1,8 @@
---
---
diff --git a/_icons/file-minus.svg b/_icons/file-minus.svg
index b920bb25c..c0e7dfeba 100644
--- a/_icons/file-minus.svg
+++ b/_icons/file-minus.svg
@@ -1,7 +1,7 @@
---
---
diff --git a/_icons/file-plus.svg b/_icons/file-plus.svg
index 7bb1a7d63..37b629206 100644
--- a/_icons/file-plus.svg
+++ b/_icons/file-plus.svg
@@ -1,8 +1,8 @@
---
---
diff --git a/_icons/file-text.svg b/_icons/file-text.svg
index 92efa8f08..7ce900b8c 100644
--- a/_icons/file-text.svg
+++ b/_icons/file-text.svg
@@ -1,8 +1,8 @@
---
---
diff --git a/_icons/mood-smile.svg b/_icons/mood-smile.svg
index e489a147d..d1a0f8e31 100644
--- a/_icons/mood-smile.svg
+++ b/_icons/mood-smile.svg
@@ -4,5 +4,5 @@
-
+
diff --git a/_icons/moon.svg b/_icons/moon.svg
index be33f28e5..cec690788 100644
--- a/_icons/moon.svg
+++ b/_icons/moon.svg
@@ -1,5 +1,5 @@
---
---
-
+
diff --git a/_icons/photo.svg b/_icons/photo.svg
index a797f094e..be039f631 100644
--- a/_icons/photo.svg
+++ b/_icons/photo.svg
@@ -3,6 +3,6 @@
-
-
+
+
diff --git a/_icons/printer.svg b/_icons/printer.svg
index 2c5189733..17466827d 100644
--- a/_icons/printer.svg
+++ b/_icons/printer.svg
@@ -1,7 +1,7 @@
---
---
-
-
-
+
+
+
diff --git a/_icons/qrcode.svg b/_icons/qrcode.svg
index 90dbe5b38..0c9a5be5d 100644
--- a/_icons/qrcode.svg
+++ b/_icons/qrcode.svg
@@ -1,16 +1,16 @@
---
---
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_icons/search.svg b/_icons/search.svg
index 59d8fa457..ac604165b 100644
--- a/_icons/search.svg
+++ b/_icons/search.svg
@@ -1,6 +1,6 @@
---
---
-
-
+
+
diff --git a/_icons/sun.svg b/_icons/sun.svg
index 8176eeb98..7d246ca28 100644
--- a/_icons/sun.svg
+++ b/_icons/sun.svg
@@ -3,5 +3,5 @@ group: weather
---
-
+
diff --git a/_icons/swich-horizontal.svg b/_icons/swich-horizontal.svg
index 8527d4b22..e82c1372a 100644
--- a/_icons/swich-horizontal.svg
+++ b/_icons/swich-horizontal.svg
@@ -1,8 +1,8 @@
---
---
-
-
-
-
+
+
+
+
diff --git a/_icons/switch-vertical.svg b/_icons/switch-vertical.svg
index d64864916..b94844efc 100644
--- a/_icons/switch-vertical.svg
+++ b/_icons/switch-vertical.svg
@@ -2,9 +2,9 @@
---
-
-
-
-
+
+
+
+
diff --git a/_icons/trash.svg b/_icons/trash.svg
index 833b87fae..6c74ca513 100644
--- a/_icons/trash.svg
+++ b/_icons/trash.svg
@@ -1,9 +1,9 @@
---
---
-
-
-
-
-
+
+
+
+
+
diff --git a/_icons/upload.svg b/_icons/upload.svg
index cee55d47f..c38c83259 100644
--- a/_icons/upload.svg
+++ b/_icons/upload.svg
@@ -2,7 +2,7 @@
group: download
---
-
-
-
+
+
+
diff --git a/_icons/user-check.svg b/_icons/user-check.svg
index 80c32b8df..068672642 100644
--- a/_icons/user-check.svg
+++ b/_icons/user-check.svg
@@ -1,7 +1,7 @@
---
---
-
+
-
+
diff --git a/_icons/user-minus.svg b/_icons/user-minus.svg
index 13a14edd2..53252797f 100644
--- a/_icons/user-minus.svg
+++ b/_icons/user-minus.svg
@@ -1,7 +1,7 @@
---
---
-
+
-
+
diff --git a/_icons/user-plus.svg b/_icons/user-plus.svg
index 085c6ac85..6dd356a47 100644
--- a/_icons/user-plus.svg
+++ b/_icons/user-plus.svg
@@ -1,8 +1,8 @@
---
---
-
+
-
-
+
+
diff --git a/_icons/user-x.svg b/_icons/user-x.svg
index 4a62aa068..5345b8955 100644
--- a/_icons/user-x.svg
+++ b/_icons/user-x.svg
@@ -1,7 +1,7 @@
---
---
-
+
-
+
diff --git a/_icons/user.svg b/_icons/user.svg
index 6fe5c17e7..e08ed6892 100644
--- a/_icons/user.svg
+++ b/_icons/user.svg
@@ -1,6 +1,6 @@
---
---
-
+
diff --git a/_icons/viewfinder.svg b/_icons/viewfinder.svg
index 27f511b78..a55090fcb 100644
--- a/_icons/viewfinder.svg
+++ b/_icons/viewfinder.svg
@@ -2,9 +2,9 @@
---
-
-
-
-
-
+
+
+
+
+
diff --git a/_icons/zoom-in.svg b/_icons/zoom-in.svg
index bea038db5..55f1282bb 100644
--- a/_icons/zoom-in.svg
+++ b/_icons/zoom-in.svg
@@ -1,8 +1,8 @@
---
---
-
-
-
-
+
+
+
+
diff --git a/_icons/zoom-out.svg b/_icons/zoom-out.svg
index c38470677..6ebbb5756 100644
--- a/_icons/zoom-out.svg
+++ b/_icons/zoom-out.svg
@@ -1,7 +1,7 @@
---
---
-
-
-
+
+
+
diff --git a/gulpfile.js b/gulpfile.js
index beb3969de..c5939f7ad 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -51,16 +51,22 @@ gulp.task('icons-sprite', function (cb) {
});
});
-gulp.task('optimize', function(){
- glob("_site/icons/*.svg", {}, function (er, files) {
+gulp.task('optimize', function(cb){
+ glob("_icons/*.svg", {}, function (er, files) {
files.forEach(function (file, i) {
let svgFile = fs.readFileSync(file),
svgFileContent = svgFile.toString();
svgFileContent = svgFileContent
- .replace(/><\/(polyline|line|rect|circle)>/, '/>')
+ .replace(/><\/(polyline|line|rect|circle|path)>/g, '/>')
+ .replace(/rx="([^"]+)"\s+ry="\1"/g, 'rx="$1"')
+ .replace(/\s?\/>/g, ' />')
+ .replace(/\n\s*<(line|circle|path|polyline)/g, "\n <$1")
+ .replace(/polyline points="([0-9.]+)\s([0-9.]+)\s([0-9.]+)\s([0-9.]+)"/g, 'line x1="$1" y1="$2" x2="$3" y2="$4"')
.replace(/\n\n+/g, "\n");
+
+ console.log('file', file);
fs.writeFileSync(file, svgFileContent);
});
diff --git a/icons.svg b/icons.svg
index 260ce3ebf..d9c4b0cd1 100644
--- a/icons.svg
+++ b/icons.svg
@@ -1,280 +1,280 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
\ No newline at end of file
+