Each iconset are specifically created for a different section of Domoweb (page, usage, etc ...) But one type is available so far in Domoweb 0.3: ‘iconset_page’
The iconset root folder name should be identical to the iconset id:
/var/lib/domoweb/packs/iconsets/page/< id >/...
or in dev. mode:
../src/packs/iconsets/page/< id >/...
Each icon should be named according to the info.json section:
< id >_< size >.png
(ex. myicon_16.png)
The info.json file declare all icons available in the set.
{
json_version: 1,
identity: {
type: 'iconset_page',
id: 'myicons',
version: 0.1,
name: 'My iconset',
description: 'Description for iconset..',
creator: 'Domogik',
creator_email: 'xx@xxx.xx',
...
},
images: {...},
icons: [
{
id: 'myicon',
label: 'My Icon',
sizes: [16, 32, 64],
},
{...},
],
}
When Domoweb starts the packs/iconsets/
folder is parsed
Todo
If not available the CSS file is generated .icon64-iconsetid-iconid { background-image:url(images/iconid_64.png);} .icon32-iconsetid-iconid { background-image:url(images/iconid_32.png);} .icon16-iconsetid-iconid { background-image:url(images/iconid_16.png);}
The couple iconsetid-iconid
is attribued to the page item on the Domogik table ui_page
.
To apply an icon to a HTML element, we attribute the icon css class:
class='icon<size>-iconsetid-iconid'