Skip to content

Commit c305eb9

Browse files
committed
release: v2.9.9 bold Markdown to PDF header, system-ui fonts, dev ergonomics
1 parent 6a8441d commit c305eb9

9 files changed

Lines changed: 53 additions & 21 deletions

File tree

.cursor/rules/header-toolbar.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ alwaysApply: false
66

77
# Header toolbar
88

9-
The title stays **bold** (**`font-weight: 600`** on `.project`). Primary actions (**Import**, **Export**) should stay **readable but not visually heavy**: use **`font-weight: 500`**, **`font-size: 14px`**, **`height: 32px`** (not bold 15px chips that compete with the title).
9+
The app uses **`system-ui, sans-serif`** globally (see [`App/index.js`](src/App/index.js) and [`styles.css`](src/styles.css)). The product name **Markdown to PDF** in the header uses **`.brand-title`** at **`font-weight: 700`**; **Import** / **Export** and version `small` stay **`font-weight: 400`** with **`font-size: 14px`** on buttons / **`15px`** on the title row, **`height: 32px`** on buttons.
1010

1111
When editing [`Header/index.js`](src/App/Components/Header/index.js) or [`Upload.js`](src/App/Components/Header/Upload.js):
1212

1313
- Prefer **`font-family: inherit`** on header and toolbar controls.
1414
- If you change the header **overall height** (**`min-height`** on `<header>`), update [`Markdown/index.js`](src/App/Components/Markdown/index.js) **`height: calc(100% - …px)`** so the subtraction matches that bar height (currently **48px**).
1515
- The **GitHub icon-only** control should match toolbar button height; icons **18px** align with **`32px`** rows.
1616

17-
Avoid regressing only to **`font-weight: 400`** on action labels unless you widen size/tracking and verify with the real app font (**`App/index.js`** stack).
17+
If labels feel too light on a given OS, adjust **`letter-spacing`** or **`font-size`** before bumping weight above **400** on chrome.

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "yarn: start (Vite dev server)",
6+
"type": "shell",
7+
"command": "yarn start",
8+
"options": {
9+
"cwd": "${workspaceFolder}"
10+
},
11+
"isBackground": true,
12+
"problemMatcher": {
13+
"owner": "vite",
14+
"pattern": { "regexp": "^$" },
15+
"background": {
16+
"activeOnStart": true,
17+
"beginsPattern": ".",
18+
"endsPattern": "^.*VITE.*ready in \\d+ ms.*$"
19+
}
20+
},
21+
"presentation": {
22+
"reveal": "always",
23+
"panel": "dedicated"
24+
}
25+
}
26+
]
27+
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 2.9.9
4+
5+
- style(ui): bold product name **Markdown to PDF** in the header (toolbar actions stay regular weight)
6+
- copy: default onboarding uses **Markdown to PDF** casing to match the header
7+
- style(ui): default `system-ui, sans-serif`; preview body uses the same stack with emoji fallbacks
8+
- fix(dev): Vite `strictPort` on port 5173; strip strict CSP meta during `vite serve` so HMR is reliable
9+
- chore: `.vscode` task to run the Vite dev server from the editor
10+
311
## 2.9.8
412

513
- style(ui): taller header toolbar, stronger action labels (\`font-weight: 600\`, 15px), larger icons; fix main layout \`calc\` to match bar height

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "md2pdf",
3-
"version": "2.9.8",
3+
"version": "2.9.9",
44
"description": "In-browser Markdown to PDF: GFM preview, syntax-highlighted code, Mermaid, PWA/offline. Responsive (tabbed editor/preview on small screens). Local conversion, no upload to an app server. Fork of realdennis/md2pdf (MIT).",
55
"keywords": [
66
"markdown",

src/App/Components/Header/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ const Header = ({ className }) => {
3434
</Helmet>
3535
<header className={className + ' no-print'}>
3636
<p className="project">
37-
Markdown To PDF <small>v{version}</small>
37+
<strong className="brand-title">Markdown to PDF</strong>{' '}
38+
<small>v{version}</small>
3839
</p>
3940

4041
<div className="menu">
@@ -78,17 +79,21 @@ export default styled(Header)`
7879
-webkit-font-smoothing: antialiased;
7980
8081
.project {
81-
font-weight: 600;
82+
font-weight: 400;
8283
font-size: 15px;
8384
letter-spacing: 0.2px;
8485
margin: 0;
8586
flex-shrink: 0;
8687
line-height: 1.35;
8788
89+
.brand-title {
90+
font-weight: 700;
91+
}
92+
8893
small {
8994
margin-left: 4px;
9095
color: #656d76;
91-
font-weight: 500;
96+
font-weight: 400;
9297
}
9398
9499
@media (max-width: 420px) {
@@ -119,7 +124,7 @@ export default styled(Header)`
119124
padding: 0 12px;
120125
font-size: 14px;
121126
font-family: inherit;
122-
font-weight: 500;
127+
font-weight: 400;
123128
border: 1px solid #d0d7de;
124129
border-radius: 6px;
125130
cursor: pointer;

src/App/Components/Markdown/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const TabButton = styled.button`
121121
border: none;
122122
border-radius: 6px;
123123
font-size: 14px;
124-
font-weight: 500;
124+
font-weight: 400;
125125
cursor: pointer;
126126
background-color: ${(props) => (props.$active ? '#0984e3' : 'transparent')};
127127
color: ${(props) => (props.$active ? '#fff' : '#333')};

src/App/Container/Hooks/InitialText.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const initialText = `# Hello World!
22
3-
**Markdown To PDF** is an offline Markdown editor with a live preview. Everything runs in your browser (no separate backend).
3+
**Markdown to PDF** is an offline Markdown editor with a live preview. Everything runs in your browser (no separate backend).
44
55
- **GitHub-flavored Markdown**: tables, task lists, syntax-highlighted fenced code blocks
66
- **Mermaid diagrams**: use a fenced block with the \`mermaid\` language tag

src/App/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default styled(App)`
1717
height: 100%;
1818
display: flex;
1919
flex-direction: column;
20-
font-family: 微軟正黑體, sans-serif;
20+
font-family: system-ui, sans-serif;
2121
@media print {
2222
&,
2323
div {
@@ -35,7 +35,7 @@ export default styled(App)`
3535
margin: 18mm 14mm 22mm 14mm;
3636
@bottom-center {
3737
content: 'Generated with md2pdf.marcopontili.com · verify authenticity';
38-
font: 9px/1.2 sans-serif;
38+
font: 9px/1.2 system-ui, sans-serif;
3939
color: #999;
4040
}
4141
}

src/styles.css

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ html,
22
body,
33
#root {
44
height: 100%;
5+
font-family: system-ui, sans-serif;
56
}
67

78
/* Make space for toolbar icons */
@@ -31,16 +32,7 @@ header a {
3132
}
3233

3334
.preview.markdown-body {
34-
font-family:
35-
-apple-system,
36-
BlinkMacSystemFont,
37-
'Segoe UI',
38-
'Noto Sans',
39-
Helvetica,
40-
Arial,
41-
sans-serif,
42-
'Apple Color Emoji',
43-
'Segoe UI Emoji' !important;
35+
font-family: system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji' !important;
4436
font-size: 16px !important;
4537
line-height: 1.62 !important;
4638
overflow-wrap: anywhere !important;

0 commit comments

Comments
 (0)