Skip to content

Commit 28a1365

Browse files
committed
refact: revamp from custom css to bootstrap
1 parent 49c8247 commit 28a1365

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/LinkDotNet.Blog.Web/Features/Components/PreviewImage.razor

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
@using Microsoft.AspNetCore.StaticFiles
22
@if (string.IsNullOrEmpty(PreviewImageUrlFallback))
33
{
4-
<img class="preview-img" src="@PreviewImageUrl" alt="Preview image blogpost" loading="@LazyLoadTag" decoding="@DecodingTag" />
4+
<img class="position-absolute top-0 start-0 w-100 h-100"
5+
style="object-fit: cover;"
6+
src="@PreviewImageUrl"
7+
alt="Preview image blogpost"
8+
loading="@LazyLoadTag"
9+
decoding="@DecodingTag" />
510
}
611
else
712
{
8-
<picture>
9-
<source srcset="@PreviewImageUrl" type="@GetMimeType()"/>
10-
<img class="preview-img" src="@PreviewImageUrlFallback" alt="Preview image blogpost" loading="@LazyLoadTag" decoding="@DecodingTag" />
11-
</picture>
13+
<picture>
14+
<source srcset="@PreviewImageUrl" type="@GetMimeType()" />
15+
<img class="position-absolute top-0 start-0 w-100 h-100"
16+
style="object-fit: cover;"
17+
src="@PreviewImageUrlFallback"
18+
alt="Preview image blogpost"
19+
loading="@LazyLoadTag"
20+
decoding="@DecodingTag" />
21+
</picture>
1222
}
1323

1424
@code {

0 commit comments

Comments
 (0)