fix: дизайн — DT-квадрат красный, заголовки таблиц красные, цвет #CC3300

This commit is contained in:
Alexey Pavlov
2026-06-09 09:44:57 +03:00
parent 1b853c9c6b
commit e3197d7b54
5 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -154,8 +154,8 @@ async function chart2_leaders ({
function wrapSvg (inner, W, H, regionLabel) {
return `<svg width="${W}" height="${H + 40}" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system, 'Helvetica Neue', Arial, sans-serif">
<rect x="0" y="0" width="3" height="40" fill="#C0272D"/>
<text x="14" y="18" font-size="12" font-weight="bold" fill="#C0272D">DairyTrends · dairy-news.ru/dairytrends</text>
<rect x="0" y="0" width="3" height="40" fill="#CC3300"/>
<text x="14" y="18" font-size="12" font-weight="bold" fill="#CC3300">DairyTrends · dairy-news.ru/dairytrends</text>
<text x="14" y="34" font-size="11" fill="#808080">${esc(regionLabel)}</text>
<g transform="translate(0,40)">${inner}</g>
</svg>`
+2 -2
View File
@@ -95,8 +95,8 @@ async function chart3_ebitdaByOrg ({ items, regionLabel, unit = 'EBITDA margin,
})
const fullSvg = `<svg width="${W}" height="${H + 40}" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system, 'Helvetica Neue', Arial, sans-serif">
<rect x="0" y="0" width="3" height="40" fill="#C0272D"/>
<text x="14" y="18" font-size="12" font-weight="bold" fill="#C0272D">DairyTrends · dairy-news.ru/dairytrends</text>
<rect x="0" y="0" width="3" height="40" fill="#CC3300"/>
<text x="14" y="18" font-size="12" font-weight="bold" fill="#CC3300">DairyTrends · dairy-news.ru/dairytrends</text>
<text x="14" y="34" font-size="11" fill="${MDGRAY}">${esc(regionLabel)}</text>
<g transform="translate(0,40)">${svg}</g>
</svg>`
+2 -2
View File
@@ -174,8 +174,8 @@ async function chart4_regionCompare ({
const divider = `<line x1="${divX.toFixed(1)}" y1="${PT - 18}" x2="${divX.toFixed(1)}" y2="${PT + cH}" stroke="${LTGRAY}" stroke-width="1" stroke-dasharray="4,4"/>`
const fullSvg = `<svg width="${W}" height="${H + 40}" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system, 'Helvetica Neue', Arial, sans-serif">
<rect x="0" y="0" width="3" height="40" fill="#C0272D"/>
<text x="14" y="18" font-size="12" font-weight="bold" fill="#C0272D">DairyTrends · dairy-news.ru/dairytrends</text>
<rect x="0" y="0" width="3" height="40" fill="#CC3300"/>
<text x="14" y="18" font-size="12" font-weight="bold" fill="#CC3300">DairyTrends · dairy-news.ru/dairytrends</text>
<text x="14" y="34" font-size="11" fill="${MDGRAY}">${esc(regionLabel)}</text>
<g transform="translate(0,40)">${leftSvg}${divider}${rightSvg}</g>
</svg>`
+2 -2
View File
@@ -27,7 +27,7 @@ const PALETTE = {
rLight: 'rgba(216,90,48,0.10)',
// ── Расширения для отчётов ─────────────────────────────
red: '#C0272D', // основной красный заголовков (как в Вологда-образце)
red: '#CC3300', // основной красный заголовков (как в Вологда-образце)
redLt: '#E5969A', // светлый красный (заливки прогнозных зон)
redBg: '#FCE8E9', // фон callout-блоков
dark: '#2A2A2A',
@@ -39,7 +39,7 @@ const PALETTE = {
// ── Для DOCX (без #) ───────────────────────────────────
docx: {
red: 'C0272D',
red: 'CC3300',
black: '1A1A1A',
dGray: '404040',
mGray: '808080',
+2 -2
View File
@@ -104,7 +104,7 @@ function stdTable (cols, rows) {
width: { size: CONTENT_W, type: WidthType.DXA },
columnWidths: cols.map(c => c.width),
rows: [
tr(cols.map(c => tc(c.label, { bg: D.tbHd, bold: true, align: AlignmentType.LEFT, color: D.black, width: c.width }))),
tr(cols.map(c => tc(c.label, { bg: D.red, bold: true, align: AlignmentType.LEFT, color: D.white, width: c.width }))),
...rows.map(row => tr(
row.map((cell, i) => {
const c = typeof cell === 'string' ? { text: cell } : cell
@@ -170,7 +170,7 @@ function makeHeader (subjectName) {
const dtCell = new TableCell({
borders: bNoneAll,
width: { size: 700, type: WidthType.DXA },
shading: { fill: D.black, type: ShadingType.CLEAR },
shading: { fill: D.red, type: ShadingType.CLEAR },
margins: { top: 80, bottom: 80, left: 140, right: 100 },
verticalAlign: VerticalAlign.CENTER,
children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { after: 0 },