Skip to content

Commit cf2062f

Browse files
committed
➕ adds pdf build script and style
1 parent 9043613 commit cf2062f

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

build_cv.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const path = require('path')
2+
const markdownpdf = require('markdown-pdf')
3+
4+
const rawFsPath = path.join(__dirname, (process.argv[2] || 'cv.md'))
5+
const pdfTargetFsPath = path.join(__dirname, (process.argv[3] || 'cv.pdf'))
6+
7+
markdownpdf({
8+
cssPath: './style.css',
9+
paperBorder: '1.2cm'
10+
}).from(rawFsPath).to(pdfTargetFsPath, () => { console.log("Done") })

style.css

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
* {
2+
/*padding: 0;
3+
margin: 0;*/
4+
}
5+
6+
html, body, table, tr, td {
7+
margin: 0;
8+
padding: 0;
9+
}
10+
11+
ul {
12+
line-height: 1.2;
13+
margin: 0;
14+
}
15+
16+
h1, h2, h3, h4, h5, h6{
17+
line-height: 1.5;
18+
padding: 0;
19+
margin: 0;
20+
border: 0;
21+
}
22+
23+
p {
24+
margin: .4em 0 .4em 0;
25+
}
26+
27+
body {
28+
font-size: 12px;
29+
}
30+
31+
h1 {
32+
font-size: 18px
33+
}
34+
35+
h2 {
36+
font-size: 15px;
37+
margin-top: 1em;
38+
}
39+
40+
h3 {
41+
margin-top: .5em;
42+
font-size: 14px
43+
}
44+
45+
h4 {
46+
font-size: 13px
47+
}
48+
49+
h5 {
50+
font-size: 12px
51+
}
52+
53+
h6 {
54+
font-size: 12px
55+
}
56+
57+
h3:nth-child(1) {
58+
display: block;
59+
page-break-before: always;
60+
break-before: always;
61+
}

0 commit comments

Comments
 (0)