mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(control) Better UUID accessibility
This commit is contained in:
parent
731afcb864
commit
e4bddb4993
@ -31,14 +31,22 @@ public class MustacheRenderer<T> {
|
||||
String instance = context.toString();
|
||||
if (instance.length() < 31) return "";
|
||||
|
||||
instance = instance.replace("-", "");
|
||||
String color1 = "#"+instance.substring(0, 6);
|
||||
String color2 = "#"+instance.substring(25, 31);
|
||||
String shortName = instance.substring(0, 8);
|
||||
String color2 = "#"+instance.substring(6, 12);
|
||||
String color3 = "#"+instance.substring(12, 18);
|
||||
String color4 = "#"+instance.substring(18, 24);
|
||||
|
||||
String shortName1 = instance.substring(0, 2);
|
||||
String shortName2 = instance.substring(2, 4);
|
||||
String shortName3 = instance.substring(4, 6);
|
||||
String shortName4 = instance.substring(6, 8);
|
||||
|
||||
String ret = "<span title=\"%s\">".formatted(instance) +
|
||||
"<span style=\"background-color: %s\" class=\"uuidPip\"> </span>".formatted(color1) +
|
||||
"<span style=\"background-color: %s\" class=\"uuidPip\"> </span>".formatted(color2) +
|
||||
" " + shortName + "</span>";
|
||||
"<span style=\"text-shadow: 0 0 0.2ch %s; font-family: monospace;\">%s</span>".formatted(color1, shortName1) +
|
||||
"<span style=\"text-shadow: 0 0 0.2ch %s; font-family: monospace;\">%s</span>".formatted(color2, shortName2) +
|
||||
"<span style=\"text-shadow: 0 0 0.2ch %s; font-family: monospace;\">%s</span>".formatted(color3, shortName3) +
|
||||
"<span style=\"text-shadow :0 0 0.2ch %s; font-family: monospace;\">%s</span>".formatted(color4, shortName4);
|
||||
return ret;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user