1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-01 11:50:25 +02:00

generate dark version of generated icons

This commit is contained in:
codecalm
2022-09-23 22:26:09 +02:00
parent 1d5893559f
commit c18af4523e
4 changed files with 6 additions and 4 deletions

BIN
.github/icons-dark.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 830 6374" width="830" height="6374" style="color: #ffffff"><rect x="0" y="0" width="830" height="6374" fill="#fff"></rect>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 830 6374" width="830" height="6374" style="color: #ffffff"><rect x="0" y="0" width="830" height="6374" fill="transparent"></rect>
<symbol id="2fa" class="icon icon-tabler icon-tabler-2fa" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 16h-4l3.47 -4.66a2 2 0 1 0 -3.47 -1.54" /><path d="M10 16v-8h4" /><line x1="10" y1="12" x2="13" y2="12" /><path d="M17 16v-6a2 2 0 0 1 4 0v6" /><line x1="17" y1="13" x2="21" y2="13" />
</symbol>
<symbol id="3d-cube-sphere-off" class="icon icon-tabler icon-tabler-3d-cube-sphere-off" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 17.6l-2 -1.1v-2.5" /><path d="M4 10v-2.5l2 -1.1" /><path d="M10 4.1l2 -1.1l2 1.1" /><path d="M18 6.4l2 1.1v2.5" /><path d="M20 14v2" /><path d="M14 19.9l-2 1.1l-2 -1.1" /><path d="M18 8.6l2 -1.1" /><path d="M12 12v2.5" /><path d="M12 18.5v2.5" /><path d="M12 12l-2 -1.12" /><path d="M6 8.6l-2 -1.1" /><path d="M3 3l18 18" />

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@@ -167,7 +167,8 @@ const printChangelog = function(newIcons, modifiedIcons, renamedIcons, pretty =
const generateIconsPreview = function(files, destFile, cb, {
columnsCount = 19,
paddingOuter = 7,
color = '#354052'
color = '#354052',
background = '#fff'
} = {}) {
const padding = 20,
@@ -205,7 +206,7 @@ const generateIconsPreview = function(files, destFile, cb, {
}
})
const svgContent = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 ${width} ${height}" width="${width}" height="${height}" style="color: ${color}"><rect x="0" y="0" width="${width}" height="${height}" fill="#fff"></rect>\n${svgContentSymbols}\n${svgContentIcons}\n</svg>`
const svgContent = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 ${width} ${height}" width="${width}" height="${height}" style="color: ${color}"><rect x="0" y="0" width="${width}" height="${height}" fill="${background}"></rect>\n${svgContentSymbols}\n${svgContentIcons}\n</svg>`
fs.writeFileSync(destFile, svgContent)
createScreenshot(destFile)
@@ -451,7 +452,8 @@ gulp.task('icons-preview', (cb) => {
glob('icons/*.svg', {}, function(er, files) {
generateIconsPreview(files, '.github/icons.svg', cb)
generateIconsPreview(files, '.github/icons-dark.svg', cb, {
color: '#ffffff'
color: '#ffffff',
background: 'transparent'
})
})
})