This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
/
_Root.Head.cshtml
50 lines (50 loc) · 1.95 KB
/
_Root.Head.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@inject CommonSettings commonSettings
@inject SeoSettings seoSettings
@inject Grand.Core.Configuration.GrandConfig config
@{
var displayMiniProfiler = config.DisplayMiniProfilerInPublicStore;
//X-UA-Compatible tag
if (commonSettings.RenderXuaCompatible)
{
Html.AppendHeadCustomParts(string.Format("<meta http-equiv=\"X-UA-Compatible\" content=\"{0}\">", commonSettings.XuaCompatibleValue));
}
//custom tag(s);
if (!string.IsNullOrEmpty(seoSettings.CustomHeadTags))
{
Html.AppendHeadCustomParts(seoSettings.CustomHeadTags);
}
}
<!DOCTYPE html>
<html lang="@(this.WorkingLanguage())" @(this.ShouldUseRtlTheme() ? Html.Raw("dir=\"rtl\"") : null)>
<head>
<title>@Html.GrandTitle(true)</title>
<meta charset="utf-8">
<meta name="description" content="@(Html.GrandMetaDescription())">
<meta name="keywords" content="@(Html.GrandMetaKeywords())">
<meta name="generator" content="grandnode">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
@*<link rel="manifest" href="/manifest.webmanifest" />*@
@Html.GrandHeadCustom()
@*This is used so that themes can inject content into the header*@
<partial name="Head" />
@await Component.InvokeAsync("Widget", new { widgetZone = "head_html_tag" })
@Html.GrandCssFiles(this.Url, ResourceLocation.Head)
@Html.GrandCanonicalUrls()
@await Component.InvokeAsync("NewsRssHeaderLink")
@await Component.InvokeAsync("BlogRssHeaderLink")
@*Favicon - upload favicon.ico file to the root directory*@
@await Component.InvokeAsync("Favicon")
@if (displayMiniProfiler)
{
<mini-profiler />
}
@Html.GrandScripts(this.Url, ResourceLocation.Head)
</head>
<body>
<resources asp-type="ScriptHeader" />
@RenderBody()
@Html.GrandCssFiles(this.Url, ResourceLocation.Footer)
@Html.GrandScripts(this.Url, ResourceLocation.Footer)
<resources asp-type="ScriptFooter" />
</body>
</html>