openhab / openhab-docs

This repository contains the documentation for openHAB.
https://www.openhab.org/docs/
Other
268 stars 683 forks source link

Add support for providing svg add-on logos #2245

Closed florian-h05 closed 4 months ago

florian-h05 commented 4 months ago

This extends the Groovy script used by Jenkins CI to process add-ons with support for svg add-on logos.

I have verified the websites compatibility with SVG logs with the local build.

jimtng commented 4 months ago

Cool! I was just thinking how it would be nice to be able to have svg icons. How would it work with webui addons page?

florian-h05 commented 4 months ago

How would it work with webui addons page?

Main UI is using a simple img element, which has SVG support, so this should not even require a change.

mherwege commented 4 months ago

Main UI is using a simple img element, which has SVG support, so this should not even require a change.

I do think there is an issue. There is an imageUrl method for the addon image in various places in the code (the same method is duplicated), that assumes a .png file. See here: https://github.com/openhab/openhab-webui/blob/57ed2da295007c939d0b219f9fcf034e658d39a9/bundles/org.openhab.ui/web/src/pages/addons/addon-details.vue#L219 https://github.com/openhab/openhab-webui/blob/57ed2da295007c939d0b219f9fcf034e658d39a9/bundles/org.openhab.ui/web/src/components/addons/addon-card.vue#L144 https://github.com/openhab/openhab-webui/blob/57ed2da295007c939d0b219f9fcf034e658d39a9/bundles/org.openhab.ui/web/src/components/addons/addon-list-item.vue#L76

florian-h05 commented 4 months ago

Hmm true. I will take care.