MCPcopy
hub / github.com/stemdeckapp/stemdeck / artStyle

Function artStyle

static/mobile/app.js:112–118  ·  view source on GitHub ↗
(card)

Source from the content-addressed store, hash-verified

110 return typeof url === "string" && /^https:\/\/[^"'()\\\s]+$/.test(url) ? url : "";
111}
112function artStyle(card) {
113 const g = (card && card.gradient) || DEFAULT_GRADIENT;
114 const t = card && safeThumb(card.thumb);
115 return t
116 ? `background-image:url('${t}'), ${g};background-size:cover;background-position:center;`
117 : `background:${g};`;
118}
119function artLabel(card) {
120 return card && safeThumb(card.thumb) ? "" : esc((card && card.initial) || "♪");
121}

Callers 3

mixerScreenFunction · 0.85
libraryBodyFunction · 0.85
miniPlayerFunction · 0.85

Calls 1

safeThumbFunction · 0.85

Tested by

no test coverage detected