From 8bb702594095d935078a21abb019a29d035b5f33 Mon Sep 17 00:00:00 2001 From: xiaoxiyao Date: Mon, 23 Sep 2024 22:14:25 +0800 Subject: [PATCH] feat: responsive avatar image size --- layouts/partials/sidebar/left.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index 21e7d3e..b16cad4 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -16,9 +16,20 @@ {{ $avatar := resources.Get (.src) }} {{ if $avatar }} - {{ $avatarResized := $avatar.Resize "300x" }} - + {{ $avatarResized := $avatar.Resize "120x" }} + {{ $avatar1_5 := $avatar.Resize "180x" }} + {{ $avatar2 := $avatar.Resize "240x" }} + {{ else }} {{ errorf "Failed loading avatar from %q" . }} {{ end }}