Skip to content

Commit

Permalink
Included custom sample handlebars helpers example
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodeleao committed Oct 6, 2016
1 parent f1d8902 commit d518695
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions app/views/helpers/copyrightYear.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Handlebars CopyrightYear Helper
----
Usage: {{copyrightYear}}
Name of the file define your block name
// Example file src/helpers/bold.js
module.exports = function(options) {
// options.fn(this) = Handelbars content between {{#bold}} HERE {{/bold}}
var bolder = '<strong>' + options.fn(this) + '</strong>';
return bolder;
}
* ==================================================== */

module.exports = function(options) {
var year = new Date().getFullYear();
return year;
}
4 changes: 2 additions & 2 deletions app/views/partials/application/_footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<footer>
<h1>App header</h1>
<footer class="o-app__footer c-footer u-text-center">
<small>Made with love by <strong>Whitesmith™</strong> {{{copyrightYear}}}</small>
</footer>

0 comments on commit d518695

Please sign in to comment.