diff --git a/Components/ExternalPageComponent.razor b/Components/ExternalPageComponent.razor new file mode 100644 index 0000000..65b3f1b --- /dev/null +++ b/Components/ExternalPageComponent.razor @@ -0,0 +1,33 @@ +@inject IJSRuntime JS +@if(Html != null) { + +} + + + + +@code { + [Parameter] + public string Url { get; set; } + [Parameter] + public string id { get; set; } + public MarkupString? Html { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) { + if(firstRender){ + await Reload(); + } + } + + public async Task Reload() { + if (Html == null){ + RestService api = new RestService(); + Html = await api.GetHtml(Url); + string? HtmlString = Html?.ToString(); + HtmlString = HtmlString?.Replace("", ""); + HtmlString = HtmlString?.Replace("", ""); + Html = (MarkupString)HtmlString; + } + await InvokeAsync(StateHasChanged); + } +} diff --git a/Components/Layout/NavMenu.razor b/Components/Layout/NavMenu.razor index 8e705e9..1fc9cd4 100644 --- a/Components/Layout/NavMenu.razor +++ b/Components/Layout/NavMenu.razor @@ -55,6 +55,10 @@
Eph.emer.al
+ + +
Now.garden
+