mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-23 00:40:10 +00:00
Support CSS embedding vs. linking.
This commit is contained in:
parent
558a321fe8
commit
a280d8acb2
@ -118,8 +118,10 @@ Generic template helper definitions for HackMyResume / FluentCV.
|
|||||||
Conditional stylesheet link. Either display the link or embed the stylesheet
|
Conditional stylesheet link. Either display the link or embed the stylesheet
|
||||||
via <style></style> tag.
|
via <style></style> tag.
|
||||||
*/
|
*/
|
||||||
styleSheet: function( file ) {
|
styleSheet: function( file, options ) {
|
||||||
return '<link href="' + file + '" rel="stylesheet" type="text/css">';
|
return ( this.opts.css === 'link') ?
|
||||||
|
'<link href="' + file + '" rel="stylesheet" type="text/css">' :
|
||||||
|
'<style>' + this.cssInfo.data + '</style>';
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,6 +40,7 @@ Definition of the HandlebarsGenerator class.
|
|||||||
RAW: json,
|
RAW: json,
|
||||||
filt: opts.filters,
|
filt: opts.filters,
|
||||||
cssInfo: cssInfo,
|
cssInfo: cssInfo,
|
||||||
|
opts: opts,
|
||||||
headFragment: opts.headFragment || ''
|
headFragment: opts.headFragment || ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ function getOpts( args ) {
|
|||||||
theme: args.t || 'modern',
|
theme: args.t || 'modern',
|
||||||
format: args.f || 'FRESH',
|
format: args.f || 'FRESH',
|
||||||
prettify: !noPretty,
|
prettify: !noPretty,
|
||||||
silent: args.s || args.silent
|
silent: args.s || args.silent,
|
||||||
|
css: args.css || 'embed'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ Implementation of the 'generate' verb for HackMyResume.
|
|||||||
//_opts = extend( true, _opts, opts );
|
//_opts = extend( true, _opts, opts );
|
||||||
_opts.theme = (opts.theme && opts.theme.toLowerCase().trim())|| 'modern';
|
_opts.theme = (opts.theme && opts.theme.toLowerCase().trim())|| 'modern';
|
||||||
_opts.prettify = opts.prettify === true ? _opts.prettify : false;
|
_opts.prettify = opts.prettify === true ? _opts.prettify : false;
|
||||||
|
_opts.css = opts.css;
|
||||||
|
|
||||||
// Load the theme...
|
// Load the theme...
|
||||||
var tFolder = verify_theme( _opts.theme );
|
var tFolder = verify_theme( _opts.theme );
|
||||||
|
Loading…
Reference in New Issue
Block a user