mirror of
https://github.com/JuanCanham/fresh-themes.git
synced 2024-12-23 05:17:22 +00:00
feat: intro sample custom helpers in 'basis' theme
This commit is contained in:
parent
0fd6b593fa
commit
f8e0cb24dd
32
themes/basis/helpers/sample-helpers.js
Normal file
32
themes/basis/helpers/sample-helpers.js
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
/**
|
||||
Sample helper definitions for HackMyResume's "basis" example theme.
|
||||
@license MIT. See LICENSE.md for details.
|
||||
@module themes/basis/helpers/sample-helpers
|
||||
*/
|
||||
|
||||
(function() {
|
||||
|
||||
// Block helper function definitions.
|
||||
var SampleHelpers = module.exports = {
|
||||
|
||||
// A sample helper that returns the supplied value.
|
||||
helperA: function(someVal, options) {
|
||||
return someVal;
|
||||
},
|
||||
|
||||
// Another sample helper that returns the supplied value.
|
||||
helperB: function(title, options) {
|
||||
return title;
|
||||
},
|
||||
|
||||
// A sample block helper
|
||||
helperC: function(lhs, rhs, options) {
|
||||
if (lhs || rhs) {
|
||||
return options.fn(this);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}).call(this);
|
@ -3,5 +3,6 @@
|
||||
"description": "A theme that is a basis for other themes.",
|
||||
"author": "hacksalot <hacksalot@indevious.com> (https://github.com/hacksalot)",
|
||||
"engine": "handlebars",
|
||||
"message": "This theme contains default unstyled formats that can be used by other themes or as a starting point for a custom theme."
|
||||
"message": "This theme contains default unstyled formats that can be used by other themes or as a starting point for a custom theme.",
|
||||
"helpers": ["helpers/*.js"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user