a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[frontend] Set theme-color meta tag to --background-color

authored by

Lilian and committed by
Laura Hausmann
bd6972a0 1a39b285

+12
+12
Iceshrimp.Frontend/App.razor
··· 1 1 @using Iceshrimp.Frontend.Components 2 2 @using Iceshrimp.Frontend.Core.Services 3 3 @using Microsoft.AspNetCore.Components.Authorization 4 + @inject IJSRuntime Js; 4 5 @* ReSharper disable once UnusedMember.Local *@ 5 6 @inject UpdateService UpdateSvc; 6 7 <ErrorBoundary> ··· 28 29 </ErrorContent> 29 30 </ErrorBoundary> 30 31 32 + <HeadContent> 33 + <meta name="theme-color" content="@_backgroundColor"/> 34 + </HeadContent> 35 + 31 36 @code { 37 + private string? _backgroundColor; 38 + 39 + protected override void OnInitialized() 40 + { 41 + _backgroundColor = ((IJSInProcessRuntime)Js).Invoke<string>("eval", 42 + "getComputedStyle(document.documentElement).getPropertyValue('--background-color')"); 43 + } 32 44 }