{"id":302116,"date":"2020-04-18T15:00:30","date_gmt":"2020-04-18T15:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302116"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302116","title":{"rendered":"\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e Material \u0438\u043a\u043e\u043d\u043e\u043a \u0434\u043b\u044f MacOSX \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Home Assistant \u043d\u0430 Electron"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/497880\/\">\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/496856\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0435\u0440\u0438\u0438<\/a> \u044f \u0437\u0430\u0432\u0430\u0440\u0438\u043b \u0443\u043c\u043d\u044b\u0439 \u0434\u043e\u043c \u043d\u0430 Home Assistant. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u044f \u0432\u043b\u044e\u0431\u0438\u043b\u0441\u044f \u0432 Home Assistant \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0438 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0423 Home Assitant \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0432 Electron, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0438\u043a\u043e\u043d\u043a\u0443 \u0432 \u0434\u043e\u043a\u0435, \u0440\u043e\u0434\u043d\u044b\u0435 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, menu bar \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 zeroconf. Home Assistant \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Material Icons: \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u0434\u043b\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a, \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u044c \u0432\u0435\u0441\u044c \u043d\u0430\u0431\u043e\u0440 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Electron.<br \/>  <a name=\"habracut\"><\/a><br \/>  Electron \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 API <a href=\"https:\/\/www.electronjs.org\/docs\/api\/native-image\" rel=\"nofollow\">nativeImage<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 2020\u043c \u0433\u043e\u0434\u0443 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0438 \u0438\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e PNG \u0438 JPG. JPG \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438 \u0434\u043b\u044f \u0438\u043a\u043e\u043d\u043e\u043a \u0443\u0431\u0438\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b. \u0417\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0434\u043e \u0433\u0434\u0435-\u0442\u043e \u0434\u043e\u0431\u044b\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0435\u0440\u0435\u0433\u043e\u043d\u044f\u0435\u043c\u044b\u0439 \u0432 PNG. \u0417\u0430\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u043d\u0430 <a href=\"https:\/\/materialdesignicons.com\/\" rel=\"nofollow\">\u0440\u043e\u0434\u043d\u043e\u0439 \u0441\u0430\u0439\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a<\/a> \u044f \u043c\u0438\u043d\u0443\u0442 15 \u0438\u0441\u043a\u0430\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a \u0434\u043b\u044f MacOSX \u043d\u0430\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 png \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 dpi\u2026 \u0421\u043b\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0442\u0430\u043c \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  <a href=\"https:\/\/www.home-assistant.io\/\" rel=\"nofollow\">Home Assistant<\/a> \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u201cmdi:home-cirlce\u201d \u2014 \u0438\u043c\u044f \u0438\u043a\u043e\u043d\u043a\u0438 (<a href=\"https:\/\/materialdesignicons.com\/cdn\/2.0.46\/\" rel=\"nofollow\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>) \u0441 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u2018-\u2019 \u043d\u0430 \u2018:\u2019. \u0417\u0430\u043c\u0435\u043d\u0443 \u201c-\u201c=&gt;\u201d:\u201d \u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0431\u043b\u0438\u0436\u0435 \u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0443 \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u201c:\u201d \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041f\u0435\u0440\u0432\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c, \u043a\u0443\u0434\u0430 \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0438, \u0431\u044b\u043b\u043e <a href=\"https:\/\/www.home-assistant.io\/docs\/ecosystem\/hadashboard\/\" rel=\"nofollow\">\u043c\u0435\u043d\u044e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 Home Assistant<\/a>. \u0414\u043b\u044f menubar \u0432 macosx \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 16&#215;16 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438 @2 \u0434\u043b\u044f \u0440\u0435\u0442\u0438\u043d\u044b (\u043c\u043e\u0436\u0435\u0442 \u0435\u0449\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e, \u043d\u0430 \u043c\u043e\u0451\u043c \u043c\u0430\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0430\u043b\u043e @2). \u0417\u043d\u0430\u0447\u0438\u0442 \u043c\u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043a\u043e\u043d\u043a\u0438 \u0438\u0437 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u043e \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code class=\"bash\">mdi-icon-name16.png mdi-icon-name16@2.png <\/code><\/pre>\n<p>  \u0412 \u0438\u043c\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0440\u0430\u0437\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0448\u0440\u0438\u0444\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a SVG, \u044d\u0442\u043e \u043f\u043e\u0440\u043e\u0434\u0438\u043b\u043e \u0434\u0432\u0435 \u0437\u0430\u0434\u0430\u0447\u0438: 1 \u2014 \u043d\u0430\u0439\u0442\u0438 svg \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a, 2 \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430\u0440\u0435\u0437\u043a\u0443 \u0434\u043b\u044f &gt;5000 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  \u0420\u043e\u0434\u043d\u043e\u0439 \u0441\u0430\u0439\u0442 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0441\u044f, \u0442\u0430\u043c \u044f \u043d\u0430\u0448\u0435\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u00abnpm install <a href=\"https:\/\/habr.com\/ru\/users\/mdi\/\" class=\"user_link\">mdi<\/a>\/font\u201d. \u041d\u0430\u0443\u0433\u0430\u0434 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 svg \u0432\u043c\u0435\u0441\u0442\u043e font \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u201enpm install <a href=\"https:\/\/habr.com\/ru\/users\/mdi\/\" class=\"user_link\">mdi<\/a>\/svg\u201d \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0432\u0435\u0441\u044c \u043d\u0430\u0431\u043e\u0440 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 node_modules\/@mdi\/svg\/svg\/ \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 mdi-icon-name.svg. \u041f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 ImageMagick \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0438\u0437\u043a\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 svg2png \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0435\u0449\u0435 \u0445\u0443\u0436\u0435. \u041d\u043e \u0434\u043e\u0431\u0440\u044b\u0439 stackoverflow \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0441 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f <a href=\"https:\/\/inkscape.org\/\" rel=\"nofollow\">inkscape<\/a> \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code class=\"bash\">inkscape -w 16 -h 16 node_modules\/@mdi\/svg\/svg\/ab-testing.svg \\     -o images\/mdi-ab-testing16.png<\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/h7\/u5\/3w\/h7u53wlvlxmjfgh5gf8hdkcrajm.png\"><\/p>\n<p>  \u041d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u0432 Dark Mode \u0442\u0430\u043a\u0438\u0435 \u0438\u043a\u043e\u043d\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0443\u043d\u044b\u043b\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ag\/k_\/tj\/agk_tjmhekpylck8-0y9nv2w6fc.png\"><\/p>\n<p>  \u0421\u0430\u0439\u0442 \u044d\u043f\u043f\u043b\u0430 \u043f\u043e\u0432\u0435\u0434\u0430\u043b, \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u043b\u0438 \u043e\u0441\u043e\u0431\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 <a href=\"https:\/\/developer.apple.com\/design\/human-interface-guidelines\/macos\/icons-and-images\/custom-icons\/\" rel=\"nofollow\">Template<\/a> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430, \u043a\u043e\u043b\u0438 \u0441\u0443\u0434\u044c\u0431\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u0432 Dark Mode. \u0412 \u0440\u043e\u043b\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u044b \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 PNG \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 \u0432\u0441\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u0447\u0435\u0440\u043d\u044b\u0435, \u0430 \u0441\u0430\u043c\u0430 \u0438\u043a\u043e\u043d\u043a\u0430 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e (\u043d\u0430 \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b\u0435). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c Electron \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0435\u0441\u043b\u0438 \u0432 \u0438\u0445 \u0438\u043c\u0435\u043d\u0438 \u0435\u0441\u0442\u044c \u201cTemplate\u201d. \u0417\u043d\u0430\u0447\u0438\u0442 \u043a \u0434\u0432\u0443\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u0441 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u0434\u0432\u0430 \u0441 Template \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043a\u043e\u043d\u043a\u0438:<\/p>\n<pre><code class=\"bash\">mdi-icon-name16.png mdi-icon-name16@2.png mdi-icon-name16Template.png mdi-icon-name16Template@2.png <\/code><\/pre>\n<p>  Inkscape \u0447\u0443\u0434\u0435\u0441\u0430 \u0441 \u0430\u043b\u044c\u0444\u0430\u043a\u0430\u043d\u0430\u043b\u043e\u043c \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442, \u0430 \u0432\u043e\u0442 convert \u0438\u0437 ImageMagick \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e. <\/p>\n<p>  \u0414\u0435\u043b\u0430\u0435\u043c \u0432 \u0442\u0440\u0438 \u0448\u0430\u0433\u0430:<\/p>\n<pre><code class=\"bash\">inkscape -w 16 -h 16 \\     node_modules\/@mdi\/svg\/svg\/ab-testing.svg \\     -o images\/mdi-ab-testing16.png convert -size 16x16 xc:none images\/background16.png convert -verbose -composite images\/background16.png \\     images\/mdi-ab-testing16.png -compose CopyAlpha \\     menuicons\/ab-testingTemplate16.png<\/code><\/pre>\n<p>  1 \u2014 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0430<br \/>  2 \u2014 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043b\u044f \u0448\u0430\u0433\u0430 \u0442\u0440\u0438<br \/>  3 \u2014 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u043c \u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0439 \u0441\u0435\u0440\u043e\u0433\u043e \u0432 \u0430\u043b\u044c\u0444\u0430\u043a\u0430\u043d\u0430\u043b<\/p>\n<p>  \u0423\u0436\u0435 \u0441 Template \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438 \u043c\u0435\u043d\u044e \u0432 Dark Mode \u0441\u0442\u0430\u043b\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mj\/g4\/w7\/mjg4w7raoh9flq3szdvkgllte9a.png\"><\/p>\n<p>  \u041e\u043a, \u0446\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430. \u0421\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0433\u043e\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b<\/p>\n<pre><code class=\"bash\"> #!\/bin\/sh -x  set -e  # Run 'npm install @mdi\/svg' beforehead MDISVG_PATH='node_modules\/@mdi\/svg\/svg\/'  #Put inkscape and convert into PATH PATH=$PATH:\/Applications\/Inkscape.app\/Contents\/MacOS\/  mkdir -p images convert -size 32x32 xc:none images\/background16@2x.png convert -size 16x16 xc:none images\/background16.png  SIZES=&quot; 16,16 32,16@2x &quot; FILES=`ls ${MDISVG_PATH} |grep svg` for SVG in $FILES; do     BASE=$(basename &quot;$SVG&quot; | sed 's\/\\.[^\\.]*$\/\/')     for PARAMS in $SIZES; do         SIZE=$(echo $PARAMS | cut -d, -f1)         LABEL=$(echo $PARAMS | cut -d, -f2)         inkscape -w $SIZE -h $SIZE &quot;$MDISVG_PATH\/$SVG&quot; \\             -o &quot;images\/mdi-${BASE}${LABEL}&quot;.png         convert -verbose \\             -composite images\/background${LABEL}.png &quot;images\/mdi-${BASE}${LABEL}&quot;.png \\             -compose CopyAlpha \\             &quot;images\/${BASE}Template${LABEL}&quot;.png     done done <\/code><\/pre>\n<p>  \u0416\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u043a\u0430 \u0441 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0441\u043e\u0439\u0434\u0435\u0442 &gt;20000 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a\u2026<\/p>\n<p>  P.S. \u042d\u0442\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Electron, \u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u0445 \u043e\u0442\u043f\u0438\u0448\u0443 \u043f\u043e \u043c\u0435\u0440\u0435 \u0438\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u2026<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/497880\/\"> https:\/\/habr.com\/ru\/post\/497880\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/497880\/\">\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/496856\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0435\u0440\u0438\u0438<\/a> \u044f \u0437\u0430\u0432\u0430\u0440\u0438\u043b \u0443\u043c\u043d\u044b\u0439 \u0434\u043e\u043c \u043d\u0430 Home Assistant. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u044f \u0432\u043b\u044e\u0431\u0438\u043b\u0441\u044f \u0432 Home Assistant \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0438 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0423 Home Assitant \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0432 Electron, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0438\u043a\u043e\u043d\u043a\u0443 \u0432 \u0434\u043e\u043a\u0435, \u0440\u043e\u0434\u043d\u044b\u0435 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, menu bar \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 zeroconf. Home Assistant \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Material Icons: \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u0434\u043b\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a, \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u044c \u0432\u0435\u0441\u044c \u043d\u0430\u0431\u043e\u0440 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Electron.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-302116","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=302116"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302116\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}