From 20e7c4e66644fd1ebc7545b0744c6a5430a44615 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Mon, 23 Mar 2020 08:51:57 +1100 Subject: [PATCH] Don't use resize_image on the in top post The resized version is bigger then the original. --- v2/content/posts/2020/rust-top-alternatives/index.md | 4 ++-- v2/templates/shortcodes/figure.html | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/v2/content/posts/2020/rust-top-alternatives/index.md b/v2/content/posts/2020/rust-top-alternatives/index.md index 6b75678..88ac64a 100644 --- a/v2/content/posts/2020/rust-top-alternatives/index.md +++ b/v2/content/posts/2020/rust-top-alternatives/index.md @@ -3,14 +3,14 @@ title = "Comparing Alternatives to top Written in Rust" date = 2020-03-21T10:45:00+11:00 [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 [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. -{{ 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.") }} diff --git a/v2/templates/shortcodes/figure.html b/v2/templates/shortcodes/figure.html index c165fd1..086c662 100644 --- a/v2/templates/shortcodes/figure.html +++ b/v2/templates/shortcodes/figure.html @@ -1,4 +1,8 @@
- {{ alt }} + {% if width %} + {{ alt }} + {% else %} + {{ alt }} + {% endif %}
{{ caption }}