mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2025-01-18 21:04:21 +01:00
Fanciefied UI
This commit is contained in:
parent
842c21c2b9
commit
8af1497695
|
@ -5,8 +5,9 @@
|
|||
<MudSnackbarProvider/>
|
||||
|
||||
|
||||
<MudLayout>
|
||||
<MudAppBar>
|
||||
<MudLayout style="background-image: url('http://s1.picswalls.com/wallpapers/2016/06/10/best-4k-wallpaper_065236736_309.jpg'); height: 100%; background-position: center; background-repeat: no-repeat; background-size: cover; background-attachment: fixed;">
|
||||
<!-- Glassmorphism(backdrop-filter: blur(16px) saturate(180%);) added -->
|
||||
<MudAppBar Color="Color.Transparent" Style="backdrop-filter: blur(16px) saturate(180%);">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
|
||||
<MudText Typo="Typo.h6">SharpRSS</MudText>
|
||||
</MudAppBar>
|
||||
|
|
|
@ -9,9 +9,20 @@ namespace WebSharpRSS.Models
|
|||
public FeedItemData()
|
||||
{
|
||||
if (Link == null) return;
|
||||
//FaviconUrl = new Uri(Link).AbsoluteUri;
|
||||
//FaviconUrl = string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), Link.Remove(Link.IndexOf("http", StringComparison.Ordinal), Link.IndexOf("://", StringComparison.Ordinal) + 3));
|
||||
}
|
||||
public static FeedItemData? FromModel(FeedItemModel model) => Utilities.ConvertFrom<FeedItemData, FeedItemModel>(model);
|
||||
public string FaviconUrl { get; set; } = string.Empty;
|
||||
public string? FaviconUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Link == null) return null;
|
||||
Uri uri = new Uri(Link);
|
||||
return string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), uri.Host);
|
||||
}
|
||||
}
|
||||
|
||||
public string? Icon { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,21 +23,23 @@
|
|||
{
|
||||
foreach (var feedItemData in items)
|
||||
{
|
||||
<MudItem>
|
||||
<MudCard>
|
||||
<MudItem Style="backdrop-filter: blur(16px) saturate(180%);">
|
||||
<MudCard Style=" background: rgba(0,0,0,0.5);">
|
||||
<MudCardContent>
|
||||
<div style="justify-self: start;" class="d-flex align-center">
|
||||
@*@if (feedItemData.Icon != null)
|
||||
{
|
||||
<MudIcon Icon="@feedItemData.Icon" Style="@($"color:{feedItemData.CategoryColorHex}")" />
|
||||
}
|
||||
@if (feedItemData.FaviconUrl != null)
|
||||
{
|
||||
<MudImage Src="@feedItemData" ObjectFit="ObjectFit.Contain" />
|
||||
}*@
|
||||
<MudText Class="d-inline pa-2 align-center">@feedItemData.Title</MudText>
|
||||
<MudImage Src="@feedItemData.FaviconUrl" ObjectFit="ObjectFit.Contain" />
|
||||
}
|
||||
<div class="d-inline pa-2 align-center" style="font-size: 16px;">
|
||||
@((MarkupString)feedItemData.Title)
|
||||
</div>
|
||||
<MudText Typo="Typo.body2">@feedItemData.Description</MudText>
|
||||
@*<MudText Class="d-inline pa-2 align-center">@feedItemData.Title</MudText>*@
|
||||
</div>
|
||||
<div>
|
||||
@((MarkupString)feedItemData.Description)
|
||||
</div>
|
||||
@*<MudText Typo="Typo.body2">@feedItemData.Description</MudText>*@
|
||||
<MudText Typo="Typo.overline">@feedItemData.PublishingDate.ToString()</MudText>
|
||||
</MudCardContent>
|
||||
</MudCard>
|
||||
|
|
Loading…
Reference in New Issue
Block a user