--- a/templates/base.html Wed Jun 15 15:48:54 2016 +0800
+++ b/templates/base.html Wed Jun 15 15:55:13 2016 +0800
<link rel="stylesheet" href="/static/main.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" integrity="sha384-rY/jv8mMhqDabXSo+UCggqKtdmBfd3qC2/KvyTDNQ6PcUJXaxK1tMepoQda4g5vB" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.26.3/js/uikit.min.js" integrity="sha384-6OYggLGXv4OPaVsh9O/0baGeEYFu1r1FE3+sNtPeDk6JofnNNZb2sHKzUa7wum04" crossorigin="anonymous"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js" integrity="sha384-MV8AwEgYXLMw5ZPj4763CSPk+tYGoUZGdwr/+EfkAZ1Dl2rGHxOMpQ1IW7VtyUPn" crossorigin="anonymous"></script>
<nav class="uk-navbar uk-navbar-attached">
{% block content %}{% end %}
+ var humanizeTimestamps = function() {
+ $('time[datetime]').each(function() {
+ $this.text(moment($this.attr('datetime')).fromNow());
+ window.setInterval(humanizeTimestamps, 15 * 1000);