mirror of
https://github.com/JuanCanham/fresh-themes.git
synced 2025-05-03 04:17:07 +01:00
feat: intro sample custom helpers in 'basis' theme
This commit is contained in:
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);
|
Reference in New Issue
Block a user