From f61188784d4f340204a2eeb8c396587811c31f4f Mon Sep 17 00:00:00 2001 From: Mia Winter Date: Wed, 18 Sep 2024 13:49:29 +0200 Subject: [PATCH] Added Open Graph to Category Pages --- Wave/Components/OpenGraph.razor | 17 ++++++++++++++++- Wave/Components/Pages/CategoryView.razor | 11 +++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Wave/Components/OpenGraph.razor b/Wave/Components/OpenGraph.razor index 80751ea..ac33bc4 100644 --- a/Wave/Components/OpenGraph.razor +++ b/Wave/Components/OpenGraph.razor @@ -1,4 +1,5 @@ -@using Microsoft.Extensions.Options +@using System.Net +@using Microsoft.Extensions.Options @using Wave.Data @using Wave.Utilities @@ -53,6 +54,20 @@ } +} else if (Subject is Category category) { + + + + @if (!string.IsNullOrWhiteSpace(Customizations.Value.LogoLink)) { + + } else { + + } + + @if (Features.Value.Rss) { + + + } } @code { diff --git a/Wave/Components/Pages/CategoryView.razor b/Wave/Components/Pages/CategoryView.razor index bf0794a..3a48a41 100644 --- a/Wave/Components/Pages/CategoryView.razor +++ b/Wave/Components/Pages/CategoryView.razor @@ -2,19 +2,14 @@ @using Microsoft.EntityFrameworkCore @using Wave.Data @using System.Net -@using Microsoft.Extensions.Options @inject IDbContextFactory ContextFactory -@inject IOptions Customizations -@inject IOptions Features @inject IStringLocalizer Localizer - @if (Features.Value.Rss && Category is not null) { - - - } - @if (Category is null) { + @if (Category is not null) { + + } else { }