update bg-id after upgrade to jdenticon

This commit is contained in:
ghost 2023-09-10 21:05:12 +03:00
parent d9df3578d9
commit d11f241bba

View File

@ -23,6 +23,12 @@
$hash = crc32($data[2]); $hash = crc32($data[2]);
$hex = str_split(substr(dechex($hash), 0, 6), 2);
$r = hexdec($hex[0]);
$g = hexdec($hex[1]);
$b = hexdec($hex[2]);
$result[] = sprintf('<div style="top:%s%%;left:%s%%">%s</div>', $result[] = sprintf('<div style="top:%s%%;left:%s%%">%s</div>',
self::_getSignalPosition($hash), self::_getSignalPosition($hash),
self::_getSignalPosition($hash, true), self::_getSignalPosition($hash, true),
@ -34,7 +40,7 @@
alt="%s" alt="%s"
style="%s" />', urlencode($host), style="%s" />', urlencode($host),
htmlentities($data[1]), htmlentities($data[1]),
sprintf('background:#%s', substr(dechex($hash), 0, 6))))); sprintf('background:rgba(%s,%s,%s,.3)', $r, $g, $b))));
} }
} }
} }