jsonresume-theme-reference 0.1.0 → 0.2.1
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/CHANGELOG.md +35 -0
- package/LICENSE +21 -0
- package/README.md +3 -3
- package/dist/index.js +6539 -0
- package/dist/style.css +139 -0
- package/package.json +16 -6
- package/src/Resume.jsx +31 -4
- package/src/{index.js → index.jsx} +4 -4
- package/tests/theme.test.js +3 -3
- package/vite.config.js +33 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resume Core Design Tokens
|
|
3
|
+
* Framework-agnostic CSS variables for theming
|
|
4
|
+
* Based on 2025 resume best practices and ATS compatibility research
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
/* Typography - ATS-friendly fonts */
|
|
9
|
+
--resume-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
10
|
+
--resume-font-serif: Cambria, Georgia, "Times New Roman", serif;
|
|
11
|
+
--resume-font-mono: "Courier New", Courier, monospace;
|
|
12
|
+
|
|
13
|
+
/* Font Sizes - Optimal readability */
|
|
14
|
+
--resume-size-name: 36px; /* Large, prominent name */
|
|
15
|
+
--resume-size-heading: 16px; /* Section titles */
|
|
16
|
+
--resume-size-subheading: 14px; /* Job titles, degrees */
|
|
17
|
+
--resume-size-body: 11px; /* Body text, descriptions */
|
|
18
|
+
--resume-size-small: 10px; /* Dates, locations, metadata */
|
|
19
|
+
|
|
20
|
+
/* Font Weights */
|
|
21
|
+
--resume-weight-normal: 400;
|
|
22
|
+
--resume-weight-medium: 500;
|
|
23
|
+
--resume-weight-semibold: 600;
|
|
24
|
+
--resume-weight-bold: 700;
|
|
25
|
+
|
|
26
|
+
/* Line Heights */
|
|
27
|
+
--resume-line-height-tight: 1.2;
|
|
28
|
+
--resume-line-height-normal: 1.5;
|
|
29
|
+
--resume-line-height-relaxed: 1.75;
|
|
30
|
+
|
|
31
|
+
/* Colors - Professional Theme (default) */
|
|
32
|
+
--resume-color-primary: #1a1a1a;
|
|
33
|
+
--resume-color-secondary: #4a4a4a;
|
|
34
|
+
--resume-color-accent: #2563eb;
|
|
35
|
+
--resume-color-background: #ffffff;
|
|
36
|
+
--resume-color-border: #e5e7eb;
|
|
37
|
+
|
|
38
|
+
/* Spacing - Consistent rhythm */
|
|
39
|
+
--resume-space-section: 24px; /* Between major sections */
|
|
40
|
+
--resume-space-item: 16px; /* Between list items */
|
|
41
|
+
--resume-space-tight: 8px; /* Within items */
|
|
42
|
+
--resume-space-margin: 48px; /* Page margins */
|
|
43
|
+
|
|
44
|
+
/* Layout - Optimal line length */
|
|
45
|
+
--resume-max-width: 660px; /* ~80 chars at body size */
|
|
46
|
+
--resume-column-gap: 24px;
|
|
47
|
+
|
|
48
|
+
/* Border Radius */
|
|
49
|
+
--resume-radius-sm: 4px;
|
|
50
|
+
--resume-radius-md: 8px;
|
|
51
|
+
--resume-radius-lg: 12px;
|
|
52
|
+
|
|
53
|
+
/* Shadows - Subtle depth */
|
|
54
|
+
--resume-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
55
|
+
--resume-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Modern Theme Variant */
|
|
59
|
+
[data-theme="modern"] {
|
|
60
|
+
--resume-color-primary: #0f172a;
|
|
61
|
+
--resume-color-secondary: #475569;
|
|
62
|
+
--resume-color-accent: #8b5cf6;
|
|
63
|
+
--resume-font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Classic Theme Variant */
|
|
67
|
+
[data-theme="classic"] {
|
|
68
|
+
--resume-color-primary: #000000;
|
|
69
|
+
--resume-color-secondary: #333333;
|
|
70
|
+
--resume-color-accent: #0066cc;
|
|
71
|
+
--resume-font-sans: Georgia, "Times New Roman", serif;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Minimal Theme Variant */
|
|
75
|
+
[data-theme="minimal"] {
|
|
76
|
+
--resume-color-primary: #18181b;
|
|
77
|
+
--resume-color-secondary: #71717a;
|
|
78
|
+
--resume-color-accent: #000000;
|
|
79
|
+
--resume-space-section: 32px;
|
|
80
|
+
--resume-space-item: 20px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* High Contrast Variant (Accessibility) */
|
|
84
|
+
[data-theme="high-contrast"] {
|
|
85
|
+
--resume-color-primary: #000000;
|
|
86
|
+
--resume-color-secondary: #000000;
|
|
87
|
+
--resume-color-accent: #0000ff;
|
|
88
|
+
--resume-color-background: #ffffff;
|
|
89
|
+
--resume-color-border: #000000;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Print Styles - ATS-Friendly PDF Export */
|
|
93
|
+
@media print {
|
|
94
|
+
:root {
|
|
95
|
+
/* Optimize for print */
|
|
96
|
+
--resume-space-section: 18px;
|
|
97
|
+
--resume-space-item: 12px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@page {
|
|
101
|
+
size: A4;
|
|
102
|
+
margin: 0.5in;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Prevent awkward breaks */
|
|
106
|
+
.resume-section {
|
|
107
|
+
page-break-inside: avoid;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.resume-item {
|
|
111
|
+
break-inside: avoid;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Widows and orphans control */
|
|
115
|
+
p, li {
|
|
116
|
+
widows: 3;
|
|
117
|
+
orphans: 3;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Hyphenation for long words */
|
|
121
|
+
.resume-description {
|
|
122
|
+
hyphens: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Hide interactive elements */
|
|
126
|
+
.no-print {
|
|
127
|
+
display: none !important;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* RTL Support */
|
|
132
|
+
[dir="rtl"] {
|
|
133
|
+
text-align: right;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[dir="rtl"] .resume-item {
|
|
137
|
+
padding-left: 0;
|
|
138
|
+
padding-right: var(--resume-space-tight);
|
|
139
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonresume-theme-reference",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Reference theme demonstrating @resume/core best practices - ATS-friendly, framework-agnostic",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./src/index.jsx",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./dist": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
9
16
|
},
|
|
10
17
|
"keywords": [
|
|
11
18
|
"jsonresume",
|
|
@@ -19,10 +26,12 @@
|
|
|
19
26
|
"react": "^19.2.0",
|
|
20
27
|
"react-dom": "^19.2.0",
|
|
21
28
|
"styled-components": "^6.1.19",
|
|
22
|
-
"@
|
|
29
|
+
"@jsonresume/core": "0.2.0"
|
|
23
30
|
},
|
|
24
31
|
"devDependencies": {
|
|
25
|
-
"vitest": "^1.6.0"
|
|
32
|
+
"vitest": "^1.6.0",
|
|
33
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
34
|
+
"vite": "^5.4.21"
|
|
26
35
|
},
|
|
27
36
|
"peerDependencies": {
|
|
28
37
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -30,6 +39,7 @@
|
|
|
30
39
|
},
|
|
31
40
|
"scripts": {
|
|
32
41
|
"test": "vitest run",
|
|
33
|
-
"test:watch": "vitest"
|
|
42
|
+
"test:watch": "vitest",
|
|
43
|
+
"build": "vite build"
|
|
34
44
|
}
|
|
35
45
|
}
|
package/src/Resume.jsx
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
BadgeList,
|
|
8
8
|
safeUrl,
|
|
9
9
|
getLinkRel,
|
|
10
|
-
} from '@
|
|
10
|
+
} from '@jsonresume/core';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Resume Component
|
|
14
|
-
* THE PERFECT SHOWCASE of @
|
|
14
|
+
* THE PERFECT SHOWCASE of @jsonresume/core and resume design best practices
|
|
15
15
|
*
|
|
16
16
|
* This demonstrates:
|
|
17
|
-
* - All 5 @
|
|
17
|
+
* - All 5 @jsonresume/core primitives with JSX
|
|
18
18
|
* - All 11 JSON Resume schema sections
|
|
19
19
|
* - ATS-friendly patterns
|
|
20
20
|
* - Design token usage
|
|
@@ -94,6 +94,7 @@ function Resume({ resume }) {
|
|
|
94
94
|
skills = [],
|
|
95
95
|
volunteer = [],
|
|
96
96
|
awards = [],
|
|
97
|
+
certificates = [],
|
|
97
98
|
publications = [],
|
|
98
99
|
languages = [],
|
|
99
100
|
interests = [],
|
|
@@ -102,7 +103,7 @@ function Resume({ resume }) {
|
|
|
102
103
|
} = resume;
|
|
103
104
|
|
|
104
105
|
return (
|
|
105
|
-
<Layout>
|
|
106
|
+
<Layout as="main">
|
|
106
107
|
{/* Hero Section - Name, Title, Contact */}
|
|
107
108
|
{basics && (
|
|
108
109
|
<Header>
|
|
@@ -337,6 +338,32 @@ function Resume({ resume }) {
|
|
|
337
338
|
</Section>
|
|
338
339
|
)}
|
|
339
340
|
|
|
341
|
+
{/* Certificates Section */}
|
|
342
|
+
{certificates.length > 0 && (
|
|
343
|
+
<Section id="certificates">
|
|
344
|
+
<SectionTitle>Certificates</SectionTitle>
|
|
345
|
+
{certificates.map((cert, index) => (
|
|
346
|
+
<ListItem
|
|
347
|
+
key={index}
|
|
348
|
+
title={cert.name}
|
|
349
|
+
subtitle={cert.issuer}
|
|
350
|
+
dateRange={cert.date}
|
|
351
|
+
description={
|
|
352
|
+
cert.url && safeUrl(cert.url) ? (
|
|
353
|
+
<a
|
|
354
|
+
href={safeUrl(cert.url)}
|
|
355
|
+
target="_blank"
|
|
356
|
+
rel={getLinkRel(cert.url, true)}
|
|
357
|
+
>
|
|
358
|
+
{cert.url}
|
|
359
|
+
</a>
|
|
360
|
+
) : undefined
|
|
361
|
+
}
|
|
362
|
+
/>
|
|
363
|
+
))}
|
|
364
|
+
</Section>
|
|
365
|
+
)}
|
|
366
|
+
|
|
340
367
|
{/* Languages Section */}
|
|
341
368
|
{languages.length > 0 && (
|
|
342
369
|
<Section id="languages">
|
|
@@ -5,13 +5,13 @@ import Resume from './Resume.jsx';
|
|
|
5
5
|
/**
|
|
6
6
|
* JSON Resume Reference Theme (JSX Edition)
|
|
7
7
|
*
|
|
8
|
-
* THE PERFECT SHOWCASE of @
|
|
8
|
+
* THE PERFECT SHOWCASE of @jsonresume/core with beautiful React components.
|
|
9
9
|
*
|
|
10
10
|
* This is the NEW architecture that demonstrates:
|
|
11
11
|
* - Clean JSX syntax (no template strings)
|
|
12
12
|
* - React component composition
|
|
13
13
|
* - styled-components with design tokens
|
|
14
|
-
* - All @
|
|
14
|
+
* - All @jsonresume/core primitives as React components
|
|
15
15
|
* - Beautiful developer experience
|
|
16
16
|
*
|
|
17
17
|
* @param {Object} resume - JSON Resume object
|
|
@@ -64,7 +64,7 @@ export function render(resume, options = {}) {
|
|
|
64
64
|
const globalStyles = `
|
|
65
65
|
/*
|
|
66
66
|
* Global Styles
|
|
67
|
-
* Base styles that complement @
|
|
67
|
+
* Base styles that complement @jsonresume/core design tokens
|
|
68
68
|
*/
|
|
69
69
|
* {
|
|
70
70
|
margin: 0;
|
|
@@ -90,7 +90,7 @@ export function render(resume, options = {}) {
|
|
|
90
90
|
}
|
|
91
91
|
`;
|
|
92
92
|
|
|
93
|
-
// Design tokens CSS (inlined from @
|
|
93
|
+
// Design tokens CSS (inlined from @jsonresume/core)
|
|
94
94
|
const designTokens = `
|
|
95
95
|
:root {
|
|
96
96
|
--resume-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
package/tests/theme.test.js
CHANGED
|
@@ -139,14 +139,14 @@ describe('Reference Theme', () => {
|
|
|
139
139
|
expect(html).toContain('</html>');
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
-
it('includes @
|
|
142
|
+
it('includes @jsonresume/core stylesheet', () => {
|
|
143
143
|
const html = render(completeResume);
|
|
144
144
|
|
|
145
|
-
expect(html).toContain('@
|
|
145
|
+
expect(html).toContain('@jsonresume/core');
|
|
146
146
|
expect(html).toContain('tokens.css');
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
it('uses all @
|
|
149
|
+
it('uses all @jsonresume/core primitives', () => {
|
|
150
150
|
const html = render(completeResume);
|
|
151
151
|
|
|
152
152
|
// Section wrapper used
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
build: {
|
|
7
|
+
ssr: true,
|
|
8
|
+
target: 'node18',
|
|
9
|
+
outDir: './dist',
|
|
10
|
+
emptyOutDir: true,
|
|
11
|
+
minify: false,
|
|
12
|
+
lib: {
|
|
13
|
+
entry: './src/index.jsx',
|
|
14
|
+
formats: ['es'],
|
|
15
|
+
fileName: 'index',
|
|
16
|
+
},
|
|
17
|
+
rollupOptions: {
|
|
18
|
+
external: ['react', 'react-dom', 'react-dom/server', 'react/jsx-runtime'],
|
|
19
|
+
output: {
|
|
20
|
+
exports: 'named',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
ssr: {
|
|
25
|
+
// Force bundle these packages instead of externalizing
|
|
26
|
+
noExternal: [
|
|
27
|
+
'styled-components',
|
|
28
|
+
'@emotion/is-prop-valid',
|
|
29
|
+
'stylis',
|
|
30
|
+
'shallowequal',
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
});
|