mirror of
https://github.com/JuanCanham/jsonresume-theme-modern.git
synced 2024-12-21 20:37:23 +00:00
will this work
This commit is contained in:
parent
4f1bd93c59
commit
b5175e395a
165
container.template
Normal file
165
container.template
Normal file
File diff suppressed because one or more lines are too long
35
index.js
35
index.js
@ -1,6 +1,39 @@
|
||||
var fs = require('fs');
|
||||
var gravatar = require('gravatar');
|
||||
var lodash = require('lodash');
|
||||
|
||||
function render(resumeObject) {
|
||||
return JSON.stringify(resumeObject);
|
||||
|
||||
|
||||
_.each(resumeObject.work, function(w){
|
||||
w.startDateYear = w.startDate.substr(0,4);
|
||||
if(w.endDate) {
|
||||
w.endDateYear = w.endDate.substr(0,4);
|
||||
} else {
|
||||
w.endDateYear = 'Present'
|
||||
}
|
||||
});
|
||||
_.each(resumeObject.education, function(e){
|
||||
e.startDateYear = e.startDate.substr(0,4);
|
||||
if(e.endDate) {
|
||||
e.endDateYear = e.endDate.substr(0,4);
|
||||
} else {
|
||||
e.endDateYear = 'Present'
|
||||
}
|
||||
});
|
||||
if(resumeObject.bio && resumeObject.bio.email && resumeObject.bio.email.personal) {
|
||||
resumeObject.bio.gravatar = gravatar.url(resumeObject.bio.email.personal, {
|
||||
s: '100',
|
||||
r: 'pg',
|
||||
d: 'mm'
|
||||
});
|
||||
}
|
||||
|
||||
var theme = fs.readFileSync('resume.template', 'utf8');
|
||||
var resumeHTML = Mustache.render(theme, resumeObject);
|
||||
|
||||
|
||||
return JSON.stringify(resumeHTML);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jsonresume-theme-modern",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.6",
|
||||
"description": "jsonresume-theme-modern =======================",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@ -17,6 +17,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/jsonresume/jsonresume-theme-modern",
|
||||
"dependencies": {
|
||||
"gravatar": "^1.0.6",
|
||||
"lodash": "^2.4.1",
|
||||
"tarball-extract": "0.0.3"
|
||||
}
|
||||
}
|
||||
|
18
resume.css
Normal file
18
resume.css
Normal file
File diff suppressed because one or more lines are too long
165
resume.template
Normal file
165
resume.template
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user