Sha256: c0bf8342a3fbb56afffb1a17ce96d412a2141d045b8a55b9c14ea3edc724a2c2

Contents?: true

Size: 898 Bytes

Versions: 3

Compression:

Stored size: 898 Bytes

Contents

{% if site.data.site.lang == null or site.data.site.lang == "" %}
{% assign lang = site.data.lang.en-US %}
{% else %}
{% assign lang = site.data.lang[site.data.site.lang] %}
{% endif %}
<style>
.k-lastupdate{
    color: #000000;
    background: #ffffc0;
    border-left: 5px solid #fff000;
    cursor: default;
    text-transform: none;
    text-overflow: ellipsis;
}
.k-lastupdate:hover{
    background: #ffffc0;
}
.k-lastupdate:active{
    background: #ffffc0 !important;
}
</style>

<a class="mdui-btn mdui-btn-block k-lastupdate" id="k-difference"  href="javascript:;"></a>
<script>
var date1=Date.parse($('.k-page-date').attr('date'));
var date2=new Date();
var date3=date2.getTime()-date1;

var days=Math.floor(date3/(24*3600*1000));

if (days>= 100){
    $('#k-difference').html("{{lang.lastupdate.one}} "+ days +" {{lang.lastupdate.two}}");
}else{
    $('#k-difference').hide();
}
</script>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-theme-mdui-0.5.5 _includes/content/component/lastupdate.html
jekyll-theme-mdui-0.5.4 _includes/content/component/lastupdate.html
jekyll-theme-mdui-0.5.3 _includes/content/component/lastupdate.html