Skip to content

Commit 25b3ba0

Browse files
committed
release: v2.9.7 header toolbar layout + button typography
GitHub anchor last, icon-only; toolbar buttons inherit app font and use font-weight 500.
1 parent a743928 commit 25b3ba0

3 files changed

Lines changed: 31 additions & 8 deletions

File tree

CHANGELOG.md

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

3+
## 2.9.7
4+
5+
- fix(ui): GitHub toolbar control is icon-only and placed after Export
6+
- style(ui): header actions use inherited app font-family and font-weight 500 on labels
7+
38
## 2.9.6
49

510
- feat(ui): GitHub icon in header linking to repository source (`target=_blank`)

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.6",
3+
"version": "2.9.7",
44
"description": "In-browser Markdown to PDF: GFM preview, syntax-highlighted code, Mermaid, PWA/offline. Derived from realdennis/md2pdf (MIT).",
55
"keywords": [
66
"markdown",

src/App/Components/Header/index.js

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ const Header = ({ className }) => {
3939

4040
<div className="menu">
4141
<UploadButton className="button upload" />
42+
<p className="button download primary" onClick={onTransform} tabIndex={0}>
43+
<FileEarmarkPdfFill size={18} aria-label="Export to PDF" />
44+
<span>Export to .pdf</span>
45+
</p>
4246
<a
43-
className="button github-link"
47+
className="button github-link icon-only"
4448
href={SOURCE_REPO_URL}
4549
target="_blank"
4650
rel="noopener noreferrer"
4751
aria-label="View source on GitHub"
4852
>
4953
<Github size={18} aria-hidden />
50-
<span>GitHub</span>
5154
</a>
52-
<p className="button download primary" onClick={onTransform} tabIndex={0}>
53-
<FileEarmarkPdfFill size={18} aria-label="Export to PDF" />
54-
<span>Export to .pdf</span>
55-
</p>
5655
</div>
5756
</header>
5857
</>
@@ -69,6 +68,7 @@ export default styled(Header)`
6968
-webkit-overflow-scrolling: touch;
7069
user-select: none;
7170
padding: 0 12px;
71+
font-family: inherit;
7272
color: #1f2328;
7373
background-color: #f6f8fa;
7474
border-bottom: 1px solid #d0d7de;
@@ -113,10 +113,12 @@ export default styled(Header)`
113113
min-width: 60px;
114114
display: flex;
115115
align-items: center;
116+
justify-content: center;
116117
margin-left: 8px;
117118
padding: 0 12px;
118119
font-size: 14px;
119-
font-weight: 400;
120+
font-family: inherit;
121+
font-weight: 500;
120122
border: 1px solid #d0d7de;
121123
border-radius: 6px;
122124
cursor: pointer;
@@ -149,10 +151,26 @@ export default styled(Header)`
149151
color: rgb(53, 123, 253);
150152
}
151153
154+
&:not(.icon-only) {
155+
justify-content: flex-start;
156+
}
157+
152158
svg {
153159
margin-right: 6px;
154160
flex-shrink: 0;
155161
}
162+
163+
&.icon-only {
164+
min-width: 34px;
165+
width: 34px;
166+
padding: 0;
167+
margin-left: 8px;
168+
}
169+
170+
&.icon-only svg {
171+
margin-right: 0;
172+
margin-left: 0;
173+
}
156174
}
157175
}
158176
`;

0 commit comments

Comments
 (0)