fix: logic to construct SVG #2

Merged
knadh merged 4 commits from Aditya-ds-1806/alar.ink:fix/svg-share-logic into master 2025-12-13 04:46:05 +00:00
Showing only changes of commit a8d586eb4a - Show all commits

View File

@@ -83,35 +83,30 @@ async function screenshotDOM(el, opts = {}) {
<style> <style>
.card { fill: #ffffff; stroke: #e5e7eb; stroke-width: 1.2; rx: 5; ry: 5; } .card { fill: #ffffff; stroke: #e5e7eb; stroke-width: 1.2; rx: 5; ry: 5; }
.headword { .headword {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.03)}px; font-size: ${Math.round(width * 0.03)}px;
font-weight: 700; font-weight: 700;
fill: #111827; fill: #111827;
} }
.pron { .pron {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px; font-size: ${Math.round(width * 0.025)}px;
fill: #6b7280; fill: #6b7280;
} }
.pos { .pos {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.017)}px; font-size: ${Math.round(width * 0.017)}px;
font-weight: bold; font-weight: bold;
fill: #666; fill: #666;
} }
.def { .def {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px; font-size: ${Math.round(width * 0.025)}px;
fill: #111827; fill: #111827;
} }
.num { .num {
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
font-size: ${Math.round(width * 0.025)}px; font-size: ${Math.round(width * 0.025)}px;
fill: #6b7280; fill: #6b7280;
} }
text { text {
white-space: pre-wrap; font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
} }
</style> </style>