Commit de9b6905 authored by Alexandr Musikhin's avatar Alexandr Musikhin

fixing last incident day

+ Added rows
* Fixing last incident day
parent 16a7790d
{% assign dateago1 = 'now' | date: '%s' %}
{% assign dateago2 = site.posts[0].date | date: '%s' %}
{% assign dateago3 = dateago1 | minus: dateago2 %}
{% assign dateago4 = dateago3 | divided_by: 86400 %}
{% capture dateago5 %}
{% assign dateago2 = site.posts[0].date | date: '%F' %}
{% assign dateago3 = dateago2 | date: '%s' %}
{% assign dateago4 = dateago1 | minus: dateago3 %}
{% assign dateago5 = dateago4 | divided_by: 86400 %}
{% capture dateago6 %}
Last incident
{% case dateago4 %}
{% case dateago5 %}
{% when 0 %}today
{% when 1 %}{{ dateago4 }} day ago
{% else %}{{ dateago4 }} days ago
{% when 1 %}{{ dateago5 }} day ago
{% else %}{{ dateago5 }} days ago
{% endcase %}
{% endcapture %}
<div class="container">
<div class="row justify-content-center">
<nav class="navbar col-md-8">
<nav class="navbar col-md-{{ site.rows | default: 8 }}">
<a class="navbar-brand text-dark" href=" {{ '/' | absolute_url }}">{{ site.title }}</a>
{% if site.posts[0] %}
<br class="d-lg-none d-xl-none">
<strong class="text-muted text-uppercase d-lg-none d-xl-none" data-toggle="tooltip" title="{{ dateago2 | date_to_xmlschema }}" style="cursor: help;">{{ dateago5 }}</strong>
<strong class="navbar-text text-muted text-uppercase float-right d-none d-lg-block d-xl-block" data-toggle="tooltip" title="{{ dateago2 | date_to_xmlschema }}" style="cursor: help;">{{ dateago5 }}</strong>
<strong class="text-muted text-uppercase d-lg-none d-xl-none" data-toggle="tooltip" data-html="true" title="<small>{{ site.posts[0].date | date_to_xmlschema }}</small>" style="cursor: help;">{{ dateago6 }}</strong>
<strong class="navbar-text text-muted text-uppercase float-right d-none d-lg-block d-xl-block" data-toggle="tooltip" data-html="true" title="<small>{{ site.posts[0].date | date_to_xmlschema }}</small>" style="cursor: help;">{{ dateago6 }}</strong>
{% endif %}
</nav>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment