feat(branding): embed slohmaier logo on cover + running page header

- branding/: light + dark logo SVG sources and 1600x452 PNG renders
- build_word_template.py: replace [LOGO] placeholder with add_picture
  on cover (7 cm wide, right-aligned) plus a 2.8 cm logo as a second
  paragraph in the running page header so derived pandoc-generated
  templates inherit the branding on every page

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Lohmaier
2026-05-18 22:47:08 -07:00
parent 247b8311f3
commit 5a1ee8cc43
16 changed files with 101 additions and 4 deletions
+17 -4
View File
@@ -246,6 +246,11 @@ def build_header_footer(doc, doc_id_placeholder="<DOC-ID>", classification="CONF
r3 = header_para.add_run(doc_id_placeholder)
r3.font.size = Pt(9)
r3.font.color.rgb = RGBColor(0x59, 0x59, 0x59)
if LOGO_PATH.exists():
logo_para = header.add_paragraph()
logo_para.alignment = WD_ALIGN_PARAGRAPH.RIGHT
logo_run = logo_para.add_run()
logo_run.add_picture(str(LOGO_PATH), width=Cm(2.8))
# --- Default footer (skipped on cover page) ---
footer = section.footer
@@ -283,13 +288,21 @@ def build_header_footer(doc, doc_id_placeholder="<DOC-ID>", classification="CONF
# Content
# ---------------------------------------------------------------------------
REPO_ROOT = Path(__file__).resolve().parent.parent
LOGO_PATH = REPO_ROOT / "branding" / "logo-doc-light.png"
def add_cover_page(doc):
# Top logo placeholder
# Top logo (right-aligned, ~7 cm wide)
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.RIGHT
r = p.add_run("[LOGO]")
r.font.size = Pt(10)
r.font.color.rgb = RGBColor(0x80, 0x80, 0x80)
if LOGO_PATH.exists():
run = p.add_run()
run.add_picture(str(LOGO_PATH), width=Cm(7))
else:
r = p.add_run("[LOGO]")
r.font.size = Pt(10)
r.font.color.rgb = RGBColor(0x80, 0x80, 0x80)
# Vertical space
for _ in range(8):