ability to add arbitrary content to head and body during client and server rendering
This commit is contained in:
@ -7,8 +7,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@Model.Title</title>
|
||||
@Html.Raw(@Model.Meta)
|
||||
<component type="typeof(Oqtane.Head)" render-mode="@((RenderMode)Enum.Parse(typeof(RenderMode), Model.RenderMode, true))" />
|
||||
<base href="~/" />
|
||||
<link id="app-favicon" rel="shortcut icon" type="image/x-icon" href="@Model.FavIcon" />
|
||||
@if (!string.IsNullOrEmpty(Model.PWAScript))
|
||||
@ -59,7 +58,8 @@
|
||||
@Html.Raw(Model.PWAScript)
|
||||
}
|
||||
@Html.Raw(Model.BodyResources)
|
||||
}
|
||||
<component type="typeof(Oqtane.Body)" render-mode="@((RenderMode)Enum.Parse(typeof(RenderMode), Model.RenderMode, true))" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="app-alert">@Model.Message</div>
|
||||
|
@ -65,8 +65,6 @@ namespace Oqtane.Pages
|
||||
public string RemoteIPAddress = "";
|
||||
public string HeadResources = "";
|
||||
public string BodyResources = "";
|
||||
public string Title = "";
|
||||
public string Meta = "";
|
||||
public string FavIcon = "favicon.ico";
|
||||
public string PWAScript = "";
|
||||
public string ReconnectScript = "";
|
||||
@ -137,7 +135,6 @@ namespace Oqtane.Pages
|
||||
{
|
||||
PWAScript = CreatePWAScript(alias, site, route);
|
||||
}
|
||||
Title = site.Name;
|
||||
var ThemeType = site.DefaultThemeType;
|
||||
|
||||
// get jwt token for downstream APIs
|
||||
@ -163,17 +160,6 @@ namespace Oqtane.Pages
|
||||
}
|
||||
if (page != null && !page.IsDeleted)
|
||||
{
|
||||
// set page title
|
||||
if (!string.IsNullOrEmpty(page.Title))
|
||||
{
|
||||
Title = page.Title;
|
||||
}
|
||||
else
|
||||
{
|
||||
Title = Title + " - " + page.Name;
|
||||
}
|
||||
Meta = page.Meta;
|
||||
|
||||
// include theme resources
|
||||
if (!string.IsNullOrEmpty(page.ThemeType))
|
||||
{
|
||||
|
Reference in New Issue
Block a user