Skip to content

Commit b296ac2

Browse files
committed
wip
1 parent 68a94e4 commit b296ac2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/actions/gitcoverage/action.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ runs:
8888
set -euo pipefail
8989
mkdir -p "coverage/${BRANCH}"
9090
91-
- name: Parse coverage input and generate SVG badge (variable width, 25% opacity text)
91+
- name: Parse coverage input and generate SVG badge
9292
shell: bash
9393
env:
9494
BRANCH: ${{ steps.branch.outputs.branch }}
@@ -165,7 +165,7 @@ runs:
165165
LABEL_X=$(( LEFT_W / 2 ))
166166
VALUE_X=$(( LEFT_W + RIGHT_W / 2 ))
167167
168-
# --- 4) Emit SVG (texts at 25% opacity) ---
168+
# --- 4) Emit SVG ---
169169
SVG="$(cat <<EOF
170170
<svg xmlns="http://www.w3.org/2000/svg" width="${WIDTH}" height="20" role="img" aria-label="${LABEL}: ${VALUE}">
171171
<linearGradient id="s" x2="0" y2="100%">
@@ -178,9 +178,11 @@ runs:
178178
<rect x="${LEFT_W}" width="${RIGHT_W}" height="20" fill="${HEX}"/>
179179
<rect width="${WIDTH}" height="20" fill="url(#s)"/>
180180
</g>
181-
<g fill="#fff" opacity="0.25" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
182-
<text x="${LABEL_X}" y="15">${LABEL}</text>
183-
<text x="${VALUE_X}" y="15">${VALUE}</text>
181+
<g fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="11">
182+
<text x="${LABEL_X}+5" y="16" textLength="503" fill="#000" opacity="0.25">${LABEL}</text>
183+
<text x="${LABEL_X}-5" y="15" textLength="503">${LABEL}</text>
184+
<text x="${VALUE_X}+5" y="16" fill="#000" opacity="0.25">${VALUE}</text>
185+
<text x="${VALUE_X}-5" y="15">${VALUE}</text>
184186
</g>
185187
</svg>
186188
EOF

0 commit comments

Comments
 (0)