fix: PPTX watermark + black slide + pricing page /pricing
- export-pptx.ts: fix watermark position for LAYOUT_WIDE (13.33"×7.5") → moved from y:5.35 (71% height) to y:7.1 near bottom-right (x:10.0) - export-pptx.ts: fix buildSummarySlide dark background (T.primary overlay covered 100% of slide appearing black) → cream bg with colored stat cards matching design of other brainstorm slides - pptx.tool.ts: fix addImageFullSlide using t.primary as bg when no imageUrl → falls back to t.bg (light); text colors adapt accordingly - pricing/page.tsx: create /pricing standalone page reusing exact landing page pricing section (PLANS array, billing toggle, i18n keys) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -624,26 +624,30 @@ function addImageContentSlide(pres: PptxGenJSModule, slide: SlideSpec, t: Theme,
|
||||
/** Full-bleed image slide with title + subtitle overlay */
|
||||
function addImageFullSlide(pres: PptxGenJSModule, slide: SlideSpec, t: Theme, style: StyleCfg, idx: number) {
|
||||
const s = pres.addSlide()
|
||||
s.background = { color: t.primary }
|
||||
const hasImage = !!slide.imageUrl
|
||||
// Use light bg as fallback when no image — t.primary makes the slide appear black without an image
|
||||
s.background = { color: hasImage ? t.primary : t.bg }
|
||||
|
||||
if (slide.imageUrl) {
|
||||
if (hasImage) {
|
||||
try {
|
||||
s.addImage({ x: 0, y: 0, w: 10, h: 5.63, ...resolveImageProps(slide.imageUrl) })
|
||||
} catch { /* fallback: colored bg */ }
|
||||
s.addImage({ x: 0, y: 0, w: 10, h: 5.63, ...resolveImageProps(slide.imageUrl!) })
|
||||
} catch { s.background = { color: t.bg } }
|
||||
}
|
||||
|
||||
// Dark overlay at bottom for text legibility
|
||||
s.addShape(SHAPE_RECT, { x: 0, y: 3.3, w: 10, h: 2.33, fill: { color: '000000', transparency: 40 } })
|
||||
// Overlay at bottom (dark for image, accent-tinted for no-image)
|
||||
const overlayColor = hasImage ? '000000' : t.primary
|
||||
s.addShape(SHAPE_RECT, { x: 0, y: 3.3, w: 10, h: 2.33, fill: { color: overlayColor, transparency: hasImage ? 40 : 10 } })
|
||||
s.addShape(SHAPE_RECT, { x: 0, y: 3.3, w: 0.12, h: 2.33, fill: { color: t.accent } })
|
||||
|
||||
const titleColor = hasImage ? 'FFFFFF' : textOnBg(t.primary)
|
||||
s.addText(slide.title, {
|
||||
x: 0.3, y: 3.45, w: 9.4, h: 1.0,
|
||||
fontSize: 28, fontFace: 'Arial', color: 'FFFFFF', bold: true, valign: 'middle', fit: 'shrink',
|
||||
fontSize: 28, fontFace: 'Arial', color: titleColor, bold: true, valign: 'middle', fit: 'shrink',
|
||||
})
|
||||
if (slide.subtitle) {
|
||||
s.addText(slide.subtitle, {
|
||||
x: 0.3, y: 4.5, w: 9.4, h: 0.8,
|
||||
fontSize: 15, fontFace: 'Arial', color: 'FFFFFF', valign: 'middle', fit: 'shrink', transparency: 15,
|
||||
fontSize: 15, fontFace: 'Arial', color: titleColor, valign: 'middle', fit: 'shrink', transparency: 15,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user