SharpRSS/WebSharpRSS/Shared/ItemView.razor

29 lines
1009 B
Plaintext
Raw Normal View History

2023-05-26 21:54:12 +02:00
@using WebSharpRSS.Models
@using ToolQit.Extensions
@if (FeedItem != null)
{
<div style="justify-self: start;" class="d-flex align-center">
2023-06-17 14:34:49 +02:00
@if (FeedItem.SyndicationParent.ImageUrl != null)
2023-05-26 21:54:12 +02:00
{
2023-06-17 14:34:49 +02:00
<MudImage Src="@FeedItem.SyndicationParent.ImageUrl" ObjectFit="ObjectFit.Contain" Width="32" Height="32"/>
2023-05-26 21:54:12 +02:00
}
<div class="d-inline px-3 align-center" style="font-size: 30px;">
@((MarkupString)(FeedItem?.Title ?? "This item doesn't contains a title!"))
</div>
</div>
<MudDivider DividerType="DividerType.FullWidth" Light="false" Class="my-2"/>
<div>
@((MarkupString)((FeedItem?.Content == null || FeedItem.Content.IsNullEmptyWhiteSpace() ? FeedItem?.Description : FeedItem.Content) ?? "This item doesn't contain any content!"))
</div>
}
else
{
<MudAlert Severity="Severity.Error" Variant="Variant.Filled">Could not load data!</MudAlert>
}
@code {
[Parameter]
2023-06-16 22:53:26 +02:00
public SyndicationItemData? FeedItem { get; set; }
2023-05-26 21:54:12 +02:00
}