Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonresume-theme-timeline

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonresume-theme-timeline - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

example/css/bootstrap.css

2

example/example.js
var schema = require('resume-schema');
var resume = schema.resumeJson;
var fs = require('fs');
resume = JSON.parse(fs.readFileSync(__dirname + '/resume.json'));
var theme = require('..');

@@ -6,0 +6,0 @@

@@ -7,2 +7,4 @@

var gravatar = require('gravatar');
function render (resume) {

@@ -13,2 +15,46 @@

var csscustom = fs.readFileSync(path.resolve(__dirname, 'css','custom.css'), 'utf8');
var files = {};
csscustom = csscustom.replace(/url\(["']?(\S*)\.(png|jpg|jpeg|gif)["']?\)/g, function(match, file, type)
{
var fileName = file + '.' + type;
var size = fs.statSync(fileName).size;
if (size > 4096) {
console.log('Skipping ' + fileName + ' (' + (Math.round(size/1024*100)/100) + 'k)');
return match;
}
else {
var base64 = fs.readFileSync(fileName).toString('base64');
if (typeof(files[fileName]) !== 'undefined') {
console.log('Warning: ' + fileName + ' has already been base64 encoded in the css');
}
files[fileName] = true;
return 'url("data:image/' + (type === 'jpg' ? 'jpeg' : type) + ';base64,' + base64 + '")';
}
});
cssbootstrap = cssbootstrap.replace(/url\(["']?(\S*)\.(png|jpg|jpeg|gif)["']?\)/g, function(match, file, type)
{
var fileName = file + '.' + type;
var size = fs.statSync(fileName).size;
if (size > 4096) {
console.log('Skipping ' + fileName + ' (' + (Math.round(size/1024*100)/100) + 'k)');
return match;
}
else {
var base64 = fs.readFileSync(fileName).toString('base64');
if (typeof(files[fileName]) !== 'undefined') {
console.log('Warning: ' + fileName + ' has already been base64 encoded in the css');
}
files[fileName] = true;
return 'url("data:image/' + (type === 'jpg' ? 'jpeg' : type) + ';base64,' + base64 + '")';
}
});
var cssdark = fs.readFileSync(path.resolve(__dirname, 'css','dark.css'), 'utf8');

@@ -18,3 +64,3 @@ var template = fs.readFileSync(path.resolve(__dirname, 'index.html'), 'utf8');

resume.bio.gravatar = gravatar.url(resume.bio.email.personal, {
s: '100',
s: '200',
r: 'pg',

@@ -21,0 +67,0 @@ d: 'mm'

{
"name": "jsonresume-theme-timeline",
"version": "0.0.3",
"version": "0.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc