From c437e7a3973c2d00aee21b901c6743b9a052635c Mon Sep 17 00:00:00 2001 From: codecalm Date: Thu, 5 Mar 2020 23:48:52 +0100 Subject: news, refresh, sticker, archive, stroke icons --- _icons/archive.svg | 7 + _icons/inbox.svg | 6 + _icons/message-circle.svg | 8 +- _icons/news.svg | 8 + _icons/paint.svg | 7 + _icons/refresh.svg | 6 + _icons/sticker.svg | 6 + gulpfile.js | 44 +++- icons-stroke.svg | 19 ++ icons.svg | 544 ++++++++++++++++++++++++---------------------- readme.md | 6 +- 11 files changed, 391 insertions(+), 270 deletions(-) create mode 100644 _icons/archive.svg create mode 100644 _icons/inbox.svg create mode 100644 _icons/news.svg create mode 100644 _icons/paint.svg create mode 100644 _icons/refresh.svg create mode 100644 _icons/sticker.svg create mode 100644 icons-stroke.svg diff --git a/_icons/archive.svg b/_icons/archive.svg new file mode 100644 index 00000000..0957ea89 --- /dev/null +++ b/_icons/archive.svg @@ -0,0 +1,7 @@ +--- +--- + + + + + diff --git a/_icons/inbox.svg b/_icons/inbox.svg new file mode 100644 index 00000000..e6f3700f --- /dev/null +++ b/_icons/inbox.svg @@ -0,0 +1,6 @@ +--- +--- + + + + diff --git a/_icons/message-circle.svg b/_icons/message-circle.svg index 61b4c7a4..11990734 100644 --- a/_icons/message-circle.svg +++ b/_icons/message-circle.svg @@ -1,8 +1,8 @@ --- --- - - - - + + + + diff --git a/_icons/news.svg b/_icons/news.svg new file mode 100644 index 00000000..e7006f7f --- /dev/null +++ b/_icons/news.svg @@ -0,0 +1,8 @@ +--- +--- + + + + + + diff --git a/_icons/paint.svg b/_icons/paint.svg new file mode 100644 index 00000000..a0862604 --- /dev/null +++ b/_icons/paint.svg @@ -0,0 +1,7 @@ +--- +--- + + + + + diff --git a/_icons/refresh.svg b/_icons/refresh.svg new file mode 100644 index 00000000..ad5962f7 --- /dev/null +++ b/_icons/refresh.svg @@ -0,0 +1,6 @@ +--- +--- + + + + diff --git a/_icons/sticker.svg b/_icons/sticker.svg new file mode 100644 index 00000000..295e558e --- /dev/null +++ b/_icons/sticker.svg @@ -0,0 +1,6 @@ +--- +--- + + + + diff --git a/gulpfile.js b/gulpfile.js index a0d8a9f0..a60efe63 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -51,7 +51,47 @@ gulp.task('icons-sprite', function (cb) { }); }); -gulp.task('optimize', function(cb){ +gulp.task('icons-stroke', function (cb) { + + const icon = "disabled", + strokes = ['.5', '1', '1.5', '2', '2.75'], + svgFileContent = fs.readFileSync(`_site/icons/tabler-${icon}.svg`).toString(), + padding = 32, + paddingOuter = 32, + iconSize = 128, + width = (strokes.length * (iconSize + padding) - padding) + paddingOuter * 2, + height = iconSize + paddingOuter * 2; + + let svgContentSymbols = '', + svgContentIcons = '', + x = paddingOuter; + + console.log('width', width); + + strokes.forEach(function (stroke) { + console.log('stroke', stroke); + + let svgFileContentStroked = svgFileContent + .replace('', '') + .replace(/\n\s+/g, ''); + + svgContentSymbols += `\t${svgFileContentStroked}\n`; + svgContentIcons += `\t\n`; + + x += padding + iconSize; + }); + + const svgContent = `\n${svgContentSymbols}\n${svgContentIcons}\n`; + + fs.writeFileSync('icons-stroke.svg', svgContent); + + cb(); +}); + +gulp.task('optimize', function (cb) { glob("_icons/*.svg", {}, function (er, files) { files.forEach(function (file, i) { @@ -66,7 +106,7 @@ gulp.task('optimize', function(cb){ .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(/\s+"/g, '"') .replace(/\n\n+/g, "\n"); - + console.log('file', file); fs.writeFileSync(file, svgFileContent); diff --git a/icons-stroke.svg b/icons-stroke.svg new file mode 100644 index 00000000..7db1ef83 --- /dev/null +++ b/icons-stroke.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons.svg b/icons.svg index e94d3576..dc98bbf7 100644 --- a/icons.svg +++ b/icons.svg @@ -1,4 +1,4 @@ - + @@ -14,6 +14,8 @@ + + @@ -320,6 +322,8 @@ + + @@ -383,7 +387,7 @@ - + @@ -412,8 +416,12 @@ + + + + @@ -434,6 +442,8 @@ + + @@ -474,6 +484,8 @@ + + @@ -546,266 +558,272 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/readme.md b/readme.md index c1eed391..dc8fbf18 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,9 @@ # Tabler icons -A set of over 200 free MIT-licensed high-quality SVG icons for you to use in your web projects. +A set of almost 300 free MIT-licensed high-quality SVG icons for you to use in your web projects. ![Tabler icons](./icons.svg) + +### Multiple strokes + +![Tabler icons](./icons-stroke.svg) -- cgit v1.2.1