create a script to convert images to ico; convert pngs to icos

Basically, all this commit does is create and execute a script
(`./customize.dist/favicon/convert.sh`) that uses ImageMagick to convert
various PNGs to ICOs(the format of favicon). It also adds the favicons
to the HTML document through `./www/common/notify.js`.
This commit is contained in:
Ahmed Mazen 2023-06-29 08:32:44 +08:00
parent a5d5dba9f2
commit 6d41d64cb8
25 changed files with 15 additions and 0 deletions

BIN
customize.dist/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@ -87,6 +87,21 @@ define(['/api/config'], function (ApiConfig) {
fav.setAttribute(k, attrs[k]);
});
document.head.appendChild(fav);
var faviconLink = document.createElement('link');
attrs.href = attrs.href.replaceAll(".png", ".ico")
console.debug("ATTRS", attrs.href)
attrs.id = 'favicon-ico'
attrs.type = 'image/x-icon'
delete attrs['data-main-favicon'];
delete attrs['data-alt-favicon'];
Object.keys(attrs).forEach(function (k) {
faviconLink.setAttribute(k, attrs[k]);
});
document.head.appendChild(faviconLink);
};
if (document && !document.getElementById('favicon')) { createFavicon(); }