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`.
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 173 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 168 KiB |
|
@ -87,6 +87,21 @@ define(['/api/config'], function (ApiConfig) {
|
||||||
fav.setAttribute(k, attrs[k]);
|
fav.setAttribute(k, attrs[k]);
|
||||||
});
|
});
|
||||||
document.head.appendChild(fav);
|
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(); }
|
if (document && !document.getElementById('favicon')) { createFavicon(); }
|
||||||
|
|