refactor: remove non-functional export mode dropdown

Remove the export mode dropdown from both export modal and settings
since switching between "typography" and "style-preserving" modes
had no actual effect on PDF output.

Changes:
- Remove ExportMode enum and all references
- Remove export mode UI from modal and settings tab
- Clean up unused export_mode parameter from templates
- Remove export_mode variable passing to Pandoc
- Add "sharp" to esbuild external dependencies

This simplifies the UI and removes confusing options that didn't
work, focusing users on the functional typography settings instead.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-09-01 10:45:57 +02:00
1 parent 3fd6dde592
commit 4a7831d86f
6 files changed
+816 -206

No files matched your search

+193 -38
View File
@@ -1,3 +1,52 @@
// Email block styling function - compact for single page
#let email-block(from: none, to: none, subject: none, date: none, body) = {
block(
width: 100%,
inset: 8pt,
fill: white,
stroke: 1pt + rgb("#e5e7eb"),
radius: 4pt,
breakable: true
)[
#text(size: 0.8em, weight: "semibold", fill: rgb("#374151"))[Email]
#v(0.2em)
#grid(
columns: (auto, 1fr),
row-gutter: 2pt,
column-gutter: 8pt,
if from != none [
#text(style: "italic", size: 0.8em, fill: rgb("#6b7280"))[From:]
] else [],
if from != none [
#text(size: 0.8em)[#from]
] else [],
if to != none [
#text(style: "italic", size: 0.8em, fill: rgb("#6b7280"))[To:]
] else [],
if to != none [
#text(size: 0.8em)[#to]
] else [],
if subject != none [
#text(style: "italic", size: 0.8em, fill: rgb("#6b7280"))[Subject:]
] else [],
if subject != none [
#text(size: 0.8em, weight: "medium")[#subject]
] else [],
)
#if body != none [
#v(0.3em)
#block(
width: 100%,
inset: 4pt,
fill: rgb("#f8f9fa"),
radius: 2pt,
)[
#text(size: 0.8em)[#body]
]
]
]
}
#let conf(
title: none,
authors: (),
@@ -5,83 +54,189 @@
lang: "en",
region: "US",
paper: "a4",
margin: (x: 2.5cm, y: 2cm),
margin: (x: 1.8cm, y: 1.5cm),
cols: 1,
font: ("Concourse OT"),
fontsize: 12pt,
sectionnumbering: "1.",
font: ("Concourse OT", "Helvetica Neue", "Arial", "sans-serif"),
fontsize: 10pt,
sectionnumbering: none,
pagenumbering: none, // Single page doesn't need page numbers
// Support for UI-configurable options
heading_font: none,
monospace_font: none,
heading_fontsize: none,
small_fontsize: none,
margin_top: none,
margin_right: none,
margin_bottom: none,
margin_left: none,
orientation: "portrait",
export_format: none,
doc,
) = {
// Set document properties
set document(
title: title
// Skip author in document metadata to avoid type issues
)
// Set page layout - single page with auto height
// Modern single page layout with auto height
// Use UI-configured margins if available, otherwise fall back to template defaults
let page-margin = if margin_top != none {
(
top: if margin_top != none { margin_top } else { 1.5cm },
right: if margin_right != none { margin_right } else { 1.8cm },
bottom: if margin_bottom != none { margin_bottom } else { 1.5cm },
left: if margin_left != none { margin_left } else { 1.8cm },
)
} else {
margin
}
set page(
paper: paper,
margin: margin,
margin: page-margin,
height: auto,
numbering: pagenumbering
numbering: pagenumbering,
fill: rgb("#fafafa")
)
// Set text properties
// Modern sans-serif fonts
// Use UI-configured font if available, otherwise use template default
let body-font = if font != none and type(font) == "string" {
(font, "Concourse OT", "Helvetica Neue", "Arial", "sans-serif")
} else {
font
}
let body-fontsize = fontsize
set text(
font: font,
size: fontsize,
font: body-font,
size: body-fontsize,
lang: lang,
region: region
)
// Set paragraph properties
set par(justify: true, leading: 0.65em)
// Tight paragraph spacing for CV style
set par(justify: false, leading: 0.5em)
// Set heading numbering
// No section numbering for modern look
if sectionnumbering != none {
set heading(numbering: sectionnumbering)
}
// Custom heading styles for single page
// Modern heading styles with color accents
// Use UI-configured heading font and size if available
let heading-font = if heading_font != none and type(heading_font) == "string" {
(heading_font, "SF Pro Text", "Helvetica Neue", "Arial", "sans-serif")
} else if heading_font != none {
heading_font
} else {
("SF Pro Text", "Helvetica Neue", "Arial", "sans-serif")
}
let heading-fontsize = if heading_fontsize != none { heading_fontsize } else { 13pt }
show heading.where(level: 1): it => block(
width: 100%,
below: 1.5em,
above: 1.5em,
below: 1em,
above: 1.2em,
fill: rgb("#2563eb"),
inset: (x: 12pt, y: 8pt),
radius: 6pt,
)[
#set text(16pt, weight: "bold")
#it
#set text(font: heading-font, size: heading-fontsize, weight: "bold", fill: white)
#upper[#it.body]
]
show heading.where(level: 2): it => block(
width: 100%,
below: 1em,
below: 0.6em,
above: 1em,
inset: (bottom: 3pt),
stroke: (bottom: 2pt + rgb("#2563eb")),
)[
#set text(14pt, weight: "bold")
#it
#set text(font: heading-font, size: heading-fontsize * 0.85, weight: "semibold", fill: rgb("#1e40af"))
#it.body
]
// Title block (inline, not separate page)
show heading.where(level: 3): it => block(
width: 100%,
below: 0.4em,
above: 0.8em,
)[
#set text(size: 10pt, weight: "medium", fill: rgb("#374151"))
#it.body
]
// Modern title header with sidebar design
if title != none and title != "" [
#align(center, text(18pt, weight: "bold")[#title])
#block(
width: 100%,
fill: gradient.linear(rgb("#1e40af"), rgb("#3b82f6"), angle: 45deg),
inset: 16pt,
radius: (top: 8pt),
)[
#grid(
columns: (2fr, 1fr),
column-gutter: 16pt,
// Main title area
[
#text(24pt, weight: "bold", fill: white)[#title]
#if authors != () and authors != none [
#v(0.3em)
#for author in authors [
#if author.name != none and author.name != "" [
#text(14pt, fill: rgb("#dbeafe"))[#author.name]
]
]
]
],
// Contact info sidebar
align(right + top)[
#if date != none [
#text(11pt, fill: rgb("#dbeafe"), style: "italic")[#date]
]
]
)
]
#v(1em)
]
if authors != () and authors != none [
#align(center, text(14pt)[
#for author in authors [
#if author.name != none and author.name != "" [#author.name]
] else [
// If no title, still show authors and date in a header
#if authors != () and authors != none or date != none [
#block(
width: 100%,
fill: rgb("#f1f5f9"),
inset: 12pt,
radius: 6pt,
stroke: 1pt + rgb("#e2e8f0"),
)[
#grid(
columns: (1fr, auto),
if authors != () and authors != none [
#for author in authors [
#if author.name != none and author.name != "" [
#text(14pt, weight: "semibold", fill: rgb("#1e40af"))[#author.name]
]
]
] else [],
if date != none [
#text(10pt, style: "italic", fill: rgb("#64748b"))[#date]
] else []
)
]
])
#v(0.5em)
#v(1em)
]
]
if date != none [
#align(center, text(12pt)[#date])
#v(2em)
// Document content in a clean container
block(
width: 100%,
fill: white,
inset: 16pt,
radius: (bottom: 8pt),
stroke: 1pt + rgb("#e5e7eb"),
)[
#doc
]
// Document content
doc
}