Fix homepage reflow while images are loading

Apparently setting the image sizes in CSS wasn't enough, it was still
reflowing in Firefox.
This commit is contained in:
Yorhel 2021-12-14 11:40:12 +01:00
parent 7648603685
commit 6f7f59c6df

View file

@ -304,12 +304,12 @@ TUWF::get '/' => sub {
my $img = $sys->[0]{short} =~ s/^(.+)-.+$/$1/r; my $img = $sys->[0]{short} =~ s/^(.+)-.+$/$1/r;
if(@$sys == 1) { if(@$sys == 1) {
a_ href => "/pkg/$sys->[0]{short}", sub { a_ href => "/pkg/$sys->[0]{short}", sub {
img_ src => "images/$img.png"; img_ width => 50, height => 50, src => "images/$img.png";
b_ $sys->[0]{name}; b_ $sys->[0]{name};
}; };
return; return;
} }
img_ src => "images/$img.png"; img_ width => 50, height => 50, src => "images/$img.png";
div_ sub { div_ sub {
b_ $sys->[0]{name}; b_ $sys->[0]{name};
for(reverse @$sys) { for(reverse @$sys) {