Skip to content

Commit 06f68b8

Browse files
authored
Sync theme changeset (#8)
* bring jsonresume theme straightforward into sync from current work in progress * update license etc * rm css * put in private for the moment * npm reinstall * add prefix message
1 parent cd8f8d0 commit 06f68b8

10 files changed

+1938
-78
lines changed

.github/dependabot.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
version: 2
33
updates:
4-
- package-ecosystem: npm
4+
- package-ecosystem: github-actions
55
directory: /
66
schedule:
77
interval: daily
8+
commit-message:
9+
prefix: "chore(ci)"
810

9-
- package-ecosystem: github-actions
11+
- package-ecosystem: npm
1012
directory: /
1113
schedule:
1214
interval: daily
15+
commit-message:
16+
prefix: "chore(ci)"

index.js

+125-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fs.readdirSync(partialsDir)
1818
Handlebars.registerHelper('MONTH_YEAR', dateString =>
1919
// https://dockyard.com/blog/2020/02/14/you-probably-don-t-need-moment-js-anymore
2020
new Date(dateString).toLocaleDateString('en', {
21-
month: 'long',
21+
month: 'short',
2222
year: 'numeric',
2323
})
2424
);
@@ -34,6 +34,130 @@ Handlebars.registerHelper('IF_DATES_HAVE_SAME_MONTH_AND_YEAR', function (arg1, a
3434
Handlebars.registerHelper('join', (arr, separator) =>
3535
arr.join(typeof separator === 'string' ? separator : ', '),
3636
)
37+
Handlebars.registerHelper('STATE_ABBREVIATION_TO_FULL_NAME', (state) => {
38+
const stateList = {
39+
AZ: 'Arizona',
40+
AL: 'Alabama',
41+
AK: 'Alaska',
42+
AR: 'Arkansas',
43+
CA: 'California',
44+
CO: 'Colorado',
45+
CT: 'Connecticut',
46+
DC: 'District of Columbia',
47+
DE: 'Delaware',
48+
FL: 'Florida',
49+
GA: 'Georgia',
50+
HI: 'Hawaii',
51+
ID: 'Idaho',
52+
IL: 'Illinois',
53+
IN: 'Indiana',
54+
IA: 'Iowa',
55+
KS: 'Kansas',
56+
KY: 'Kentucky',
57+
LA: 'Louisiana',
58+
ME: 'Maine',
59+
MD: 'Maryland',
60+
MA: 'Massachusetts',
61+
MI: 'Michigan',
62+
MN: 'Minnesota',
63+
MS: 'Mississippi',
64+
MO: 'Missouri',
65+
MT: 'Montana',
66+
NE: 'Nebraska',
67+
NV: 'Nevada',
68+
NH: 'New Hampshire',
69+
NJ: 'New Jersey',
70+
NM: 'New Mexico',
71+
NY: 'New York',
72+
NC: 'North Carolina',
73+
ND: 'North Dakota',
74+
OH: 'Ohio',
75+
OK: 'Oklahoma',
76+
OR: 'Oregon',
77+
PA: 'Pennsylvania',
78+
RI: 'Rhode Island',
79+
SC: 'South Carolina',
80+
SD: 'South Dakota',
81+
TN: 'Tennessee',
82+
TX: 'Texas',
83+
UT: 'Utah',
84+
VT: 'Vermont',
85+
VA: 'Virginia',
86+
WA: 'Washington',
87+
WV: 'West Virginia',
88+
WI: 'Wisconsin',
89+
WY: 'Wyoming',
90+
AS: "American Samoa",
91+
GU: "Guam",
92+
MP: "Northern Mariana Islands",
93+
PR: "Puerto Rico",
94+
VI: "U.S. Virgin Islands",
95+
UM: "U.S. Minor Outlying Islands"
96+
}
97+
if (stateList[state] != null) {
98+
return stateList[state];
99+
}
100+
return state;
101+
})
102+
103+
Handlebars.registerHelper('STATE_NAME_TO_ABBREVIATION', (state) => {
104+
const stateList = {
105+
'Arizona': 'AZ',
106+
'Alabama': 'AL',
107+
'Alaska': 'AK',
108+
'Arkansas': 'AR',
109+
'California': 'CA',
110+
'Colorado': 'CO',
111+
'Connecticut': 'CT',
112+
'Delaware': 'DE',
113+
'Florida': 'FL',
114+
'Georgia': 'GA',
115+
'Hawaii': 'HI',
116+
'Idaho': 'ID',
117+
'Illinois': 'IL',
118+
'Indiana': 'IN',
119+
'Iowa': 'IA',
120+
'Kansas': 'KS',
121+
'Kentucky': 'KY',
122+
'Louisiana': 'LA',
123+
'Maine': 'ME',
124+
'Maryland': 'MD',
125+
'Massachusetts': 'MA',
126+
'Michigan': 'MI',
127+
'Minnesota': 'MN',
128+
'Mississippi': 'MS',
129+
'Missouri': 'MO',
130+
'Montana': 'MT',
131+
'Nebraska': 'NE',
132+
'Nevada': 'NV',
133+
'New Hampshire': 'NH',
134+
'New Jersey': 'NJ',
135+
'New Mexico': 'NM',
136+
'New York': 'NY',
137+
'North Carolina': 'NC',
138+
'North Dakota': 'ND',
139+
'Ohio': 'OH',
140+
'Oklahoma': 'OK',
141+
'Oregon': 'OR',
142+
'Pennsylvania': 'PA',
143+
'Rhode Island': 'RI',
144+
'South Carolina': 'SC',
145+
'South Dakota': 'SD',
146+
'Tennessee': 'TN',
147+
'Texas': 'TX',
148+
'Utah': 'UT',
149+
'Vermont': 'VT',
150+
'Virginia': 'VA',
151+
'Washington': 'WA',
152+
'West Virginia': 'WV',
153+
'Wisconsin': 'WI',
154+
'Wyoming': 'WY'
155+
}
156+
if (stateList[state] != null) {
157+
return stateList[state];
158+
}
159+
return state;
160+
})
37161

38162
exports.render = resume => {
39163
const css = fs.readFileSync(path.join(__dirname, 'style.css'), 'utf-8')

0 commit comments

Comments
 (0)