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/>
|
<MudSnackbarProvider/>
|
||||||
|
|
||||||
|
|
||||||
<MudLayout>
|
<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;">
|
||||||
<MudAppBar>
|
<!-- 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())" />
|
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
|
||||||
<MudText Typo="Typo.h6">SharpRSS</MudText>
|
<MudText Typo="Typo.h6">SharpRSS</MudText>
|
||||||
</MudAppBar>
|
</MudAppBar>
|
||||||
|
|
|
@ -9,9 +9,20 @@ namespace WebSharpRSS.Models
|
||||||
public FeedItemData()
|
public FeedItemData()
|
||||||
{
|
{
|
||||||
if (Link == null) return;
|
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));
|
//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 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)
|
foreach (var feedItemData in items)
|
||||||
{
|
{
|
||||||
<MudItem>
|
<MudItem Style="backdrop-filter: blur(16px) saturate(180%);">
|
||||||
<MudCard>
|
<MudCard Style=" background: rgba(0,0,0,0.5);">
|
||||||
<MudCardContent>
|
<MudCardContent>
|
||||||
<div style="justify-self: start;" class="d-flex align-center">
|
<div style="justify-self: start;" class="d-flex align-center">
|
||||||
@*@if (feedItemData.Icon != null)
|
@if (feedItemData.FaviconUrl != null)
|
||||||
{
|
{
|
||||||
<MudIcon Icon="@feedItemData.Icon" Style="@($"color:{feedItemData.CategoryColorHex}")" />
|
<MudImage Src="@feedItemData.FaviconUrl" ObjectFit="ObjectFit.Contain" />
|
||||||
}
|
}
|
||||||
@if (feedItemData.FaviconUrl != null)
|
<div class="d-inline pa-2 align-center" style="font-size: 16px;">
|
||||||
{
|
@((MarkupString)feedItemData.Title)
|
||||||
<MudImage Src="@feedItemData" ObjectFit="ObjectFit.Contain" />
|
</div>
|
||||||
}*@
|
@*<MudText Class="d-inline pa-2 align-center">@feedItemData.Title</MudText>*@
|
||||||
<MudText Class="d-inline pa-2 align-center">@feedItemData.Title</MudText>
|
|
||||||
</div>
|
</div>
|
||||||
<MudText Typo="Typo.body2">@feedItemData.Description</MudText>
|
<div>
|
||||||
|
@((MarkupString)feedItemData.Description)
|
||||||
|
</div>
|
||||||
|
@*<MudText Typo="Typo.body2">@feedItemData.Description</MudText>*@
|
||||||
<MudText Typo="Typo.overline">@feedItemData.PublishingDate.ToString()</MudText>
|
<MudText Typo="Typo.overline">@feedItemData.PublishingDate.ToString()</MudText>
|
||||||
</MudCardContent>
|
</MudCardContent>
|
||||||
</MudCard>
|
</MudCard>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user