1
0
Fork 0
forked from wezm/wezm.net

Don't use resize_image on the in top post

The resized version is bigger then the original.
This commit is contained in:
Wesley Moore 2020-03-23 08:51:57 +11:00
parent 3b6941f5e9
commit 20e7c4e666
No known key found for this signature in database
GPG key ID: BF67766C0BC2D0EE
2 changed files with 7 additions and 3 deletions

View file

@ -3,14 +3,14 @@ title = "Comparing Alternatives to top Written in Rust"
date = 2020-03-21T10:45:00+11:00 date = 2020-03-21T10:45:00+11:00
[extra] [extra]
updated = 2020-03-22T12:52:23+11:00 updated = 2020-03-23T08:50:54+11:00
+++ +++
Recently I aliased `top` to [ytop]. Then I became aware of [bottom], and Recently I aliased `top` to [ytop]. Then I became aware of [bottom], and
[zenith]. These are all terminal based system monitoring tools that you might [zenith]. These are all terminal based system monitoring tools that you might
use instead of `top`. In this post I set out to compare them. use instead of `top`. In this post I set out to compare them.
{{ figure(image="posts/2020/rust-top-alternatives/ytop-btm-zenith-screenshot.png", link="ytop-btm-zenith-screenshot.png", width=1600, quality=60, alt="Screenshot of ytop, bottom, and zenith while building some Rust code", caption="Left to right: ytop, bottom, and zenith.") }} {{ figure(image="posts/2020/rust-top-alternatives/ytop-btm-zenith-screenshot.png", link="posts/2020/rust-top-alternatives/ytop-btm-zenith-screenshot.png", alt="Screenshot of ytop, bottom, and zenith while building some Rust code", caption="Left to right: ytop, bottom, and zenith.") }}
<!-- more --> <!-- more -->

View file

@ -1,4 +1,8 @@
<figure> <figure>
<a href="{{ link }}"><img src="{{ resize_image(path=image, width=width, op="fit_width", quality=quality | default(value=75)) }}" alt="{{ alt }}" /></a> {% if width %}
<a href="{{ config.base_url }}/{{ link }}"><img src="{{ resize_image(path=image, width=width, op="fit_width", quality=quality | default(value=75)) }}" alt="{{ alt }}" /></a>
{% else %}
<a href="{{ config.base_url }}/{{ link }}"><img src="{{ config.base_url }}/{{ image }}" alt="{{ alt }}" /></a>
{% endif %}
<figcaption>{{ caption }}</figcaption> <figcaption>{{ caption }}</figcaption>
</figure> </figure>