more updates to match new code, new entry for testing

This commit is contained in:
Don Harper 2018-12-19 22:11:49 +00:00
parent 46751d66ca
commit 008d2d760c
140 changed files with 17228 additions and 12 deletions

View file

@ -0,0 +1,26 @@
<%doc>
Mako defs which generate formatted output or HTML components.
This can be used as a namespace in other templates.
</%doc>
<%! from uuid import uuid4 %>
<%def name="fancy_date(date_value)">
<%doc>
Show the date in plain language as relative to now. Eg "1 year ago".
This requires the moment.js library.
</%doc>
<% id_ = uuid4() %>
<span id="${id_}">
</span>
<script>
(function(){
var el = document.getElementById("${id_}");
var fromNow = moment("${date_value.isoformat()}").fromNow();
el.innerHTML = fromNow;
})();
</script>
</%def>