feat: slightly tweak subject position

pull/8/head
Amio 2018-08-06 19:26:14 +08:00
rodzic 39cb1778ef
commit ed1105b32a
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -9,7 +9,7 @@ module.exports = function ({subject, status, color, style, emoji, icon, iconWidt
const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 2) : 0
const sbTextWidth = calcWidth(subject, emoji)
const stTextWidth = calcWidth(status, emoji)
const sbRectWidth = sbTextWidth + 10 + iconSpanWidth
const sbRectWidth = sbTextWidth + 10.2 + iconSpanWidth
const stRectWidth = stTextWidth + 10
const width = sbRectWidth + stRectWidth
@ -21,8 +21,8 @@ module.exports = function ({subject, status, color, style, emoji, icon, iconWidt
<rect x="${sbRectWidth}" width="${stRectWidth}" height="20" fill="#${color}"/>
</g>
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
<text x="${icon ? '22.5' : '6'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.1">${subject}</text>
<text x="${icon ? '21.5' : '5'}" y="13.8" textLength="${sbTextWidth}">${subject}</text>
<text x="${icon ? '22.5' : '6.3'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.1">${subject}</text>
<text x="${icon ? '21.5' : '5.3'}" y="13.8" textLength="${sbTextWidth}">${subject}</text>
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.1" textLength="${stTextWidth}">${status}</text>
<text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text>
</g>
@ -44,8 +44,8 @@ module.exports = function ({subject, status, color, style, emoji, icon, iconWidt
<rect width="${width}" height="20" fill="url(#a)"/>
</g>
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
<text x="${icon ? '22.5' : '6'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.25">${subject}</text>
<text x="${icon ? '21.5' : '5'}" y="13.8" textLength="${sbTextWidth}">${subject}</text>
<text x="${icon ? '22.5' : '6.5'}" y="14.8" textLength="${sbTextWidth}" fill="#000" opacity="0.25">${subject}</text>
<text x="${icon ? '21.5' : '5.5'}" y="13.8" textLength="${sbTextWidth}">${subject}</text>
<text x="${sbRectWidth + 5.5}" y="14.8" fill="#000" opacity="0.25" textLength="${stTextWidth}">${status}</text>
<text x="${sbRectWidth + 4.5}" y="13.8" textLength="${stTextWidth}">${status}</text>
</g>