mirror of
https://github.com/eosswedenorg/apt
synced 2026-06-16 04:34:56 +02:00
Adding _includes/size.html
This commit is contained in:
parent
7f34dd84f3
commit
ca1a1ba2a1
1 changed files with 12 additions and 0 deletions
12
_includes/size.html
Normal file
12
_includes/size.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% assign map = "B,KB,MB,GB" | split: "," %}
|
||||
|
||||
{% assign v = include.input | to_integer %}
|
||||
{% for suffix in map %}
|
||||
|
||||
{% if v < 1000.0 %}
|
||||
{{ v | round: 2 }} {{ suffix }}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
|
||||
{% assign v = v | divided_by: 1000.0 %}
|
||||
{% endfor %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue