{% extends 'image-resizer/_layouts' %} {% import "image-resizer/_macros" as imageResizerMacro %} {% set crumbs = [ { label: "Image Resizer" | t('image-resizer'), url: url('image-resizer') }, { label: "Logs" | t('image-resizer'), url: url('image-resizer/logs') } ] %} {% set selectedTab = 'logs' %} {% block blockContent %} {{ "Clear logs" | t('image-resizer') }} {% for entry in logEntries %} {% endfor %}
{{ "Filename" | t('image-resizer') }} {{ "Result" | t('image-resizer') }} {{ "Timestamp" | t('image-resizer') }}
{{ entry.filename }} {{ entry.result }} {{ entry.description }} {% if entry.handle == 'success' %} {% set prevSize = entry.data.prev.size %} {% set currSize = entry.data.curr.size %} {% set saved = prevSize - currSize %} {% set filesize = imageResizerMacro.filesize(saved) %} {% set percentage = ((saved / prevSize) * 100) | number_format %} {{ "Saved {perc}% ({num})." | t('image-resizer', { num: filesize, perc: percentage }) }} {% endif %} {% if entry.handle == 'error' %} {{ entry.data.message }} {% endif %} {{ entry.dateTime | date('short') ~ ' ' ~ entry.dateTime | time('short') }}
{% endblock %}