jsonresume-theme-diagonal-accent-bar 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "jsonresume-theme-diagonal-accent-bar",
3
+ "version": "1.0.0",
4
+ "description": "Dynamic architectural design with bold diagonal accent and kinetic energy",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "jsonresume",
10
+ "theme",
11
+ "diagonal",
12
+ "bold",
13
+ "dynamic",
14
+ "architectural",
15
+ "marketing",
16
+ "creative",
17
+ "startup"
18
+ ],
19
+ "peerDependencies": {
20
+ "react": "^18.0.0 || ^19.0.0",
21
+ "react-dom": "^18.0.0 || ^19.0.0"
22
+ },
23
+ "dependencies": {
24
+ "@resume/core": "0.1.0",
25
+ "styled-components": "6.1.19"
26
+ }
27
+ }
package/src/Resume.jsx ADDED
@@ -0,0 +1,472 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { Section, SectionTitle, DateRange, ContactInfo } from '@resume/core';
4
+
5
+ const Layout = styled.div`
6
+ position: relative;
7
+ max-width: 850px;
8
+ margin: 0 auto;
9
+ padding: 60px 50px;
10
+ background: white;
11
+ font-family: 'Barlow Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI',
12
+ sans-serif;
13
+ color: #1f2937;
14
+ overflow: hidden;
15
+
16
+ /* Diagonal accent bar using pseudo-element */
17
+ &::before {
18
+ content: '';
19
+ position: fixed;
20
+ top: -10%;
21
+ left: -5%;
22
+ width: 10px;
23
+ height: 150%;
24
+ background: linear-gradient(180deg, #e11d48 0%, #be123c 50%, #9f1239 100%);
25
+ transform: rotate(-30deg);
26
+ transform-origin: top left;
27
+ z-index: 1;
28
+ box-shadow: 0 0 20px rgba(225, 29, 72, 0.3);
29
+ }
30
+
31
+ /* Content wrapper to sit above diagonal bar */
32
+ & > * {
33
+ position: relative;
34
+ z-index: 2;
35
+ }
36
+
37
+ @media print {
38
+ padding: 40px;
39
+
40
+ &::before {
41
+ position: absolute;
42
+ box-shadow: none;
43
+ }
44
+ }
45
+ `;
46
+
47
+ const Header = styled.header`
48
+ margin-bottom: 50px;
49
+ padding-bottom: 30px;
50
+ border-bottom: 1px solid #e5e7eb;
51
+ padding-left: 40px;
52
+ `;
53
+
54
+ const Name = styled.h1`
55
+ font-family: 'Barlow Expanded', -apple-system, BlinkMacSystemFont, 'Segoe UI',
56
+ sans-serif;
57
+ font-size: 48px;
58
+ font-weight: 700;
59
+ color: #111827;
60
+ margin: 0 0 8px 0;
61
+ letter-spacing: 2px;
62
+ text-transform: uppercase;
63
+ `;
64
+
65
+ const Label = styled.div`
66
+ font-family: 'Barlow Expanded', -apple-system, BlinkMacSystemFont, 'Segoe UI',
67
+ sans-serif;
68
+ font-size: 16px;
69
+ color: #e11d48;
70
+ margin-bottom: 20px;
71
+ font-weight: 600;
72
+ letter-spacing: 1.5px;
73
+ text-transform: uppercase;
74
+ `;
75
+
76
+ const StyledContactInfo = styled(ContactInfo)`
77
+ font-size: 14px;
78
+
79
+ a {
80
+ font-size: 14px;
81
+ color: #4b5563;
82
+ transition: color 0.2s ease;
83
+
84
+ &:hover {
85
+ color: #e11d48;
86
+ }
87
+ }
88
+ `;
89
+
90
+ const Summary = styled.p`
91
+ font-size: 16px;
92
+ line-height: 1.8;
93
+ color: #4b5563;
94
+ margin: 20px 0 0 0;
95
+ `;
96
+
97
+ const StyledSectionTitle = styled(SectionTitle)`
98
+ font-family: 'Barlow Expanded', -apple-system, BlinkMacSystemFont, 'Segoe UI',
99
+ sans-serif;
100
+ font-size: 22px;
101
+ font-weight: 700;
102
+ color: #111827;
103
+ margin: 40px 0 24px 0;
104
+ padding-bottom: 8px;
105
+ padding-left: 40px;
106
+ letter-spacing: 2px;
107
+ text-transform: uppercase;
108
+ border-bottom: 2px solid #e11d48;
109
+ position: relative;
110
+
111
+ &::before {
112
+ content: '';
113
+ position: absolute;
114
+ left: 0;
115
+ bottom: -2px;
116
+ width: 30px;
117
+ height: 2px;
118
+ background: #9f1239;
119
+ }
120
+ `;
121
+
122
+ const WorkItem = styled.div`
123
+ margin-bottom: 32px;
124
+ padding-left: 40px;
125
+
126
+ &:last-child {
127
+ margin-bottom: 0;
128
+ }
129
+ `;
130
+
131
+ const WorkHeader = styled.div`
132
+ display: flex;
133
+ justify-content: space-between;
134
+ align-items: baseline;
135
+ margin-bottom: 8px;
136
+ gap: 16px;
137
+
138
+ @media (max-width: 640px) {
139
+ flex-direction: column;
140
+ align-items: flex-start;
141
+ gap: 4px;
142
+ }
143
+ `;
144
+
145
+ const Position = styled.h3`
146
+ font-family: 'Barlow Expanded', -apple-system, BlinkMacSystemFont, 'Segoe UI',
147
+ sans-serif;
148
+ font-size: 19px;
149
+ font-weight: 600;
150
+ color: #111827;
151
+ margin: 0;
152
+ letter-spacing: 1px;
153
+ `;
154
+
155
+ const Company = styled.div`
156
+ font-size: 16px;
157
+ color: #e11d48;
158
+ font-weight: 500;
159
+ margin-top: 4px;
160
+ `;
161
+
162
+ const DateText = styled.div`
163
+ font-size: 14px;
164
+ color: #6b7280;
165
+ font-weight: 500;
166
+ white-space: nowrap;
167
+ `;
168
+
169
+ const WorkSummary = styled.p`
170
+ margin: 12px 0;
171
+ color: #4b5563;
172
+ line-height: 1.8;
173
+ font-size: 15px;
174
+ `;
175
+
176
+ const Highlights = styled.ul`
177
+ margin: 12px 0 0 0;
178
+ padding-left: 20px;
179
+ list-style-type: none;
180
+
181
+ li {
182
+ margin: 8px 0;
183
+ color: #4b5563;
184
+ line-height: 1.8;
185
+ padding-left: 4px;
186
+ position: relative;
187
+
188
+ &::before {
189
+ content: '▸';
190
+ position: absolute;
191
+ left: -16px;
192
+ color: #e11d48;
193
+ font-weight: bold;
194
+ }
195
+ }
196
+ `;
197
+
198
+ const EducationItem = styled.div`
199
+ margin-bottom: 24px;
200
+ padding-left: 40px;
201
+
202
+ &:last-child {
203
+ margin-bottom: 0;
204
+ }
205
+ `;
206
+
207
+ const Institution = styled.h3`
208
+ font-family: 'Barlow Expanded', -apple-system, BlinkMacSystemFont, 'Segoe UI',
209
+ sans-serif;
210
+ font-size: 18px;
211
+ font-weight: 600;
212
+ color: #111827;
213
+ margin: 0 0 6px 0;
214
+ letter-spacing: 1px;
215
+ `;
216
+
217
+ const Degree = styled.div`
218
+ font-size: 15px;
219
+ color: #4b5563;
220
+ margin-bottom: 4px;
221
+ `;
222
+
223
+ const EducationDate = styled.div`
224
+ font-size: 14px;
225
+ color: #6b7280;
226
+ `;
227
+
228
+ const SkillsGrid = styled.div`
229
+ display: grid;
230
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
231
+ gap: 20px;
232
+ padding-left: 40px;
233
+ `;
234
+
235
+ const SkillCategory = styled.div`
236
+ padding: 16px;
237
+ background: #fef2f2;
238
+ border-radius: 6px;
239
+ border-left: 3px solid #e11d48;
240
+ `;
241
+
242
+ const SkillName = styled.h4`
243
+ font-family: 'Barlow Expanded', -apple-system, BlinkMacSystemFont, 'Segoe UI',
244
+ sans-serif;
245
+ font-size: 15px;
246
+ font-weight: 600;
247
+ color: #111827;
248
+ margin: 0 0 8px 0;
249
+ letter-spacing: 1px;
250
+ text-transform: uppercase;
251
+ `;
252
+
253
+ const SkillTags = styled.div`
254
+ font-size: 14px;
255
+ color: #6b7280;
256
+ line-height: 1.6;
257
+ `;
258
+
259
+ function Resume({ resume }) {
260
+ const {
261
+ basics = {},
262
+ work = [],
263
+ education = [],
264
+ skills = [],
265
+ projects = [],
266
+ volunteer = [],
267
+ awards = [],
268
+ publications = [],
269
+ languages = [],
270
+ interests = [],
271
+ references = [],
272
+ } = resume;
273
+
274
+ return (
275
+ <Layout>
276
+ <Header>
277
+ <Name>{basics.name}</Name>
278
+ {basics.label && <Label>{basics.label}</Label>}
279
+ <StyledContactInfo basics={basics} />
280
+ {basics.summary && <Summary>{basics.summary}</Summary>}
281
+ </Header>
282
+
283
+ {work?.length > 0 && (
284
+ <Section>
285
+ <StyledSectionTitle>Experience</StyledSectionTitle>
286
+ {work.map((job, index) => (
287
+ <WorkItem key={index}>
288
+ <WorkHeader>
289
+ <div>
290
+ <Position>{job.position}</Position>
291
+ {job.name && <Company>{job.name}</Company>}
292
+ </div>
293
+ <DateText>
294
+ <DateRange startDate={job.startDate} endDate={job.endDate} />
295
+ </DateText>
296
+ </WorkHeader>
297
+ {job.summary && <WorkSummary>{job.summary}</WorkSummary>}
298
+ {job.highlights?.length > 0 && (
299
+ <Highlights>
300
+ {job.highlights.map((highlight, i) => (
301
+ <li key={i}>{highlight}</li>
302
+ ))}
303
+ </Highlights>
304
+ )}
305
+ </WorkItem>
306
+ ))}
307
+ </Section>
308
+ )}
309
+
310
+ {skills?.length > 0 && (
311
+ <Section>
312
+ <StyledSectionTitle>Skills</StyledSectionTitle>
313
+ <SkillsGrid>
314
+ {skills.map((skill, index) => (
315
+ <SkillCategory key={index}>
316
+ <SkillName>{skill.name}</SkillName>
317
+ {skill.keywords?.length > 0 && (
318
+ <SkillTags>{skill.keywords.join(', ')}</SkillTags>
319
+ )}
320
+ </SkillCategory>
321
+ ))}
322
+ </SkillsGrid>
323
+ </Section>
324
+ )}
325
+
326
+ {education?.length > 0 && (
327
+ <Section>
328
+ <StyledSectionTitle>Education</StyledSectionTitle>
329
+ {education.map((edu, index) => (
330
+ <EducationItem key={index}>
331
+ <Institution>{edu.institution}</Institution>
332
+ <Degree>
333
+ {edu.studyType} in {edu.area}
334
+ {edu.score && ` • ${edu.score}`}
335
+ </Degree>
336
+ <EducationDate>
337
+ <DateRange startDate={edu.startDate} endDate={edu.endDate} />
338
+ </EducationDate>
339
+ </EducationItem>
340
+ ))}
341
+ </Section>
342
+ )}
343
+
344
+ {projects?.length > 0 && (
345
+ <Section>
346
+ <StyledSectionTitle>Projects</StyledSectionTitle>
347
+ {projects.map((project, index) => (
348
+ <WorkItem key={index}>
349
+ <Position>{project.name}</Position>
350
+ {project.description && (
351
+ <WorkSummary>{project.description}</WorkSummary>
352
+ )}
353
+ {project.highlights?.length > 0 && (
354
+ <Highlights>
355
+ {project.highlights.map((highlight, i) => (
356
+ <li key={i}>{highlight}</li>
357
+ ))}
358
+ </Highlights>
359
+ )}
360
+ </WorkItem>
361
+ ))}
362
+ </Section>
363
+ )}
364
+
365
+ {volunteer?.length > 0 && (
366
+ <Section>
367
+ <StyledSectionTitle>Volunteer</StyledSectionTitle>
368
+ {volunteer.map((vol, index) => (
369
+ <WorkItem key={index}>
370
+ <WorkHeader>
371
+ <div>
372
+ <Position>{vol.position}</Position>
373
+ {vol.organization && <Company>{vol.organization}</Company>}
374
+ </div>
375
+ {(vol.startDate || vol.endDate) && (
376
+ <DateText>
377
+ <DateRange
378
+ startDate={vol.startDate}
379
+ endDate={vol.endDate}
380
+ />
381
+ </DateText>
382
+ )}
383
+ </WorkHeader>
384
+ {vol.summary && <WorkSummary>{vol.summary}</WorkSummary>}
385
+ {vol.highlights?.length > 0 && (
386
+ <Highlights>
387
+ {vol.highlights.map((highlight, i) => (
388
+ <li key={i}>{highlight}</li>
389
+ ))}
390
+ </Highlights>
391
+ )}
392
+ </WorkItem>
393
+ ))}
394
+ </Section>
395
+ )}
396
+
397
+ {awards?.length > 0 && (
398
+ <Section>
399
+ <StyledSectionTitle>Awards</StyledSectionTitle>
400
+ {awards.map((award, index) => (
401
+ <EducationItem key={index}>
402
+ <Institution>{award.title}</Institution>
403
+ {award.awarder && <Degree>Awarded by {award.awarder}</Degree>}
404
+ {award.date && <EducationDate>{award.date}</EducationDate>}
405
+ {award.summary && <WorkSummary>{award.summary}</WorkSummary>}
406
+ </EducationItem>
407
+ ))}
408
+ </Section>
409
+ )}
410
+
411
+ {publications?.length > 0 && (
412
+ <Section>
413
+ <StyledSectionTitle>Publications</StyledSectionTitle>
414
+ {publications.map((pub, index) => (
415
+ <EducationItem key={index}>
416
+ <Institution>{pub.name}</Institution>
417
+ {pub.publisher && <Degree>Published by {pub.publisher}</Degree>}
418
+ {pub.releaseDate && (
419
+ <EducationDate>{pub.releaseDate}</EducationDate>
420
+ )}
421
+ {pub.summary && <WorkSummary>{pub.summary}</WorkSummary>}
422
+ </EducationItem>
423
+ ))}
424
+ </Section>
425
+ )}
426
+
427
+ {languages?.length > 0 && (
428
+ <Section>
429
+ <StyledSectionTitle>Languages</StyledSectionTitle>
430
+ <SkillsGrid>
431
+ {languages.map((lang, index) => (
432
+ <SkillCategory key={index}>
433
+ <SkillName>{lang.language}</SkillName>
434
+ {lang.fluency && <SkillTags>{lang.fluency}</SkillTags>}
435
+ </SkillCategory>
436
+ ))}
437
+ </SkillsGrid>
438
+ </Section>
439
+ )}
440
+
441
+ {interests?.length > 0 && (
442
+ <Section>
443
+ <StyledSectionTitle>Interests</StyledSectionTitle>
444
+ <SkillsGrid>
445
+ {interests.map((interest, index) => (
446
+ <SkillCategory key={index}>
447
+ <SkillName>{interest.name}</SkillName>
448
+ {interest.keywords?.length > 0 && (
449
+ <SkillTags>{interest.keywords.join(', ')}</SkillTags>
450
+ )}
451
+ </SkillCategory>
452
+ ))}
453
+ </SkillsGrid>
454
+ </Section>
455
+ )}
456
+
457
+ {references?.length > 0 && (
458
+ <Section>
459
+ <StyledSectionTitle>References</StyledSectionTitle>
460
+ {references.map((ref, index) => (
461
+ <EducationItem key={index}>
462
+ <Institution>{ref.name}</Institution>
463
+ {ref.reference && <WorkSummary>{ref.reference}</WorkSummary>}
464
+ </EducationItem>
465
+ ))}
466
+ </Section>
467
+ )}
468
+ </Layout>
469
+ );
470
+ }
471
+
472
+ export default Resume;
package/src/index.js ADDED
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { renderToString } from 'react-dom/server';
3
+ import { ServerStyleSheet } from 'styled-components';
4
+ import Resume from './Resume.jsx';
5
+
6
+ export function render(resume) {
7
+ const sheet = new ServerStyleSheet();
8
+
9
+ try {
10
+ const html = renderToString(
11
+ sheet.collectStyles(<Resume resume={resume} />)
12
+ );
13
+ const styles = sheet.getStyleTags();
14
+
15
+ return `<!DOCTYPE html>
16
+ <html lang="en">
17
+ <head>
18
+ <meta charset="UTF-8">
19
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
20
+ <title>${resume.basics?.name || 'Resume'} - Resume</title>
21
+ <link rel="preconnect" href="https://fonts.googleapis.com">
22
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
23
+ <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600&family=Barlow+Expanded:wght@600;700&display=swap" rel="stylesheet">
24
+ ${styles}
25
+ <style>
26
+ * {
27
+ box-sizing: border-box;
28
+ margin: 0;
29
+ padding: 0;
30
+ }
31
+ body {
32
+ margin: 0;
33
+ padding: 0;
34
+ background: #f5f5f5;
35
+ }
36
+ @media print {
37
+ body {
38
+ background: white;
39
+ }
40
+ @page {
41
+ margin: 0.5in;
42
+ }
43
+ }
44
+ </style>
45
+ </head>
46
+ <body>
47
+ ${html}
48
+ </body>
49
+ </html>`;
50
+ } finally {
51
+ sheet.seal();
52
+ }
53
+ }