Skip to content

Commit

Permalink
Favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigorii Bushmanov authored and Grigorii Bushmanov committed May 14, 2022
1 parent 9043874 commit 506329f
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 3 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function getMonth(startDateStr) {
}
}

function getMimeType(url) {
global.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
return require('check-url-type').get_type(url) ;
}

function render(resumeObject) {

resumeObject.basics.capitalName = resumeObject.basics.name.toUpperCase();
Expand All @@ -47,6 +52,7 @@ function render(resumeObject) {
}
if (resumeObject.basics.image || resumeObject.basics.gravatar) {
resumeObject.photo = resumeObject.basics.image ? resumeObject.basics.image : resumeObject.basics.gravatar;
resumeObject.photoType = getMimeType(resumeObject.photo) ;
}

_.each(resumeObject.basics.profiles, function(p){
Expand Down
349 changes: 347 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 506329f

Please sign in to comment.