fix: дизайн — DT-квадрат красный, заголовки таблиц красные, цвет #CC3300
This commit is contained in:
@@ -154,8 +154,8 @@ async function chart2_leaders ({
|
|||||||
|
|
||||||
function wrapSvg (inner, W, H, regionLabel) {
|
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">
|
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"/>
|
<rect x="0" y="0" width="3" height="40" fill="#CC3300"/>
|
||||||
<text x="14" y="18" font-size="12" font-weight="bold" fill="#C0272D">DairyTrends · dairy-news.ru/dairytrends</text>
|
<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>
|
<text x="14" y="34" font-size="11" fill="#808080">${esc(regionLabel)}</text>
|
||||||
<g transform="translate(0,40)">${inner}</g>
|
<g transform="translate(0,40)">${inner}</g>
|
||||||
</svg>`
|
</svg>`
|
||||||
|
|||||||
@@ -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">
|
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"/>
|
<rect x="0" y="0" width="3" height="40" fill="#CC3300"/>
|
||||||
<text x="14" y="18" font-size="12" font-weight="bold" fill="#C0272D">DairyTrends · dairy-news.ru/dairytrends</text>
|
<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>
|
<text x="14" y="34" font-size="11" fill="${MDGRAY}">${esc(regionLabel)}</text>
|
||||||
<g transform="translate(0,40)">${svg}</g>
|
<g transform="translate(0,40)">${svg}</g>
|
||||||
</svg>`
|
</svg>`
|
||||||
|
|||||||
@@ -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 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">
|
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"/>
|
<rect x="0" y="0" width="3" height="40" fill="#CC3300"/>
|
||||||
<text x="14" y="18" font-size="12" font-weight="bold" fill="#C0272D">DairyTrends · dairy-news.ru/dairytrends</text>
|
<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>
|
<text x="14" y="34" font-size="11" fill="${MDGRAY}">${esc(regionLabel)}</text>
|
||||||
<g transform="translate(0,40)">${leftSvg}${divider}${rightSvg}</g>
|
<g transform="translate(0,40)">${leftSvg}${divider}${rightSvg}</g>
|
||||||
</svg>`
|
</svg>`
|
||||||
|
|||||||
+2
-2
@@ -27,7 +27,7 @@ const PALETTE = {
|
|||||||
rLight: 'rgba(216,90,48,0.10)',
|
rLight: 'rgba(216,90,48,0.10)',
|
||||||
|
|
||||||
// ── Расширения для отчётов ─────────────────────────────
|
// ── Расширения для отчётов ─────────────────────────────
|
||||||
red: '#C0272D', // основной красный заголовков (как в Вологда-образце)
|
red: '#CC3300', // основной красный заголовков (как в Вологда-образце)
|
||||||
redLt: '#E5969A', // светлый красный (заливки прогнозных зон)
|
redLt: '#E5969A', // светлый красный (заливки прогнозных зон)
|
||||||
redBg: '#FCE8E9', // фон callout-блоков
|
redBg: '#FCE8E9', // фон callout-блоков
|
||||||
dark: '#2A2A2A',
|
dark: '#2A2A2A',
|
||||||
@@ -39,7 +39,7 @@ const PALETTE = {
|
|||||||
|
|
||||||
// ── Для DOCX (без #) ───────────────────────────────────
|
// ── Для DOCX (без #) ───────────────────────────────────
|
||||||
docx: {
|
docx: {
|
||||||
red: 'C0272D',
|
red: 'CC3300',
|
||||||
black: '1A1A1A',
|
black: '1A1A1A',
|
||||||
dGray: '404040',
|
dGray: '404040',
|
||||||
mGray: '808080',
|
mGray: '808080',
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ function stdTable (cols, rows) {
|
|||||||
width: { size: CONTENT_W, type: WidthType.DXA },
|
width: { size: CONTENT_W, type: WidthType.DXA },
|
||||||
columnWidths: cols.map(c => c.width),
|
columnWidths: cols.map(c => c.width),
|
||||||
rows: [
|
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(
|
...rows.map(row => tr(
|
||||||
row.map((cell, i) => {
|
row.map((cell, i) => {
|
||||||
const c = typeof cell === 'string' ? { text: cell } : cell
|
const c = typeof cell === 'string' ? { text: cell } : cell
|
||||||
@@ -170,7 +170,7 @@ function makeHeader (subjectName) {
|
|||||||
const dtCell = new TableCell({
|
const dtCell = new TableCell({
|
||||||
borders: bNoneAll,
|
borders: bNoneAll,
|
||||||
width: { size: 700, type: WidthType.DXA },
|
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 },
|
margins: { top: 80, bottom: 80, left: 140, right: 100 },
|
||||||
verticalAlign: VerticalAlign.CENTER,
|
verticalAlign: VerticalAlign.CENTER,
|
||||||
children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { after: 0 },
|
children: [new Paragraph({ alignment: AlignmentType.CENTER, spacing: { after: 0 },
|
||||||
|
|||||||
Reference in New Issue
Block a user