-
Notifications
You must be signed in to change notification settings - Fork 12
/
Layout.cshtml
98 lines (90 loc) · 4.48 KB
/
Layout.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@inject DarkModeService DarkModeService
@inject OrchardCore.Environment.Shell.Descriptor.Models.ShellDescriptor shellDescriptor
@inject IOptions<AdminOptions> AdminOptions
@{
var adminSettings = Site.As<AdminSettings>();
var darkMode = await DarkModeService.IsDarkModeAsync();
// Branding is pre-rendered to allow resource injection
var brandingHtml = await DisplayAsync(await New.AdminBranding());
}
<!DOCTYPE html>
<html lang="@Orchard.CultureName()" dir="@Orchard.CultureDir()" data-tenant="@DarkModeService.CurrentTenant" data-theme="@DarkModeService.CurrentTheme" data-darkmode="@adminSettings.DisplayDarkMode">
<head>
<title>@RenderTitleSegments(Site.SiteName, "before")</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Bootstrap CSS -->
<style media="all" asp-name="admin" version="1"></style>
<style media="all" asp-src="~/DigitalAdmin/overrides.css"></style>
<style asp-name="material-icons" version="0.7.2"></style>
<script asp-name="font-awesome" at="Head" version="5"></script>
<script asp-name="font-awesome-v4-shims" at="Head" version="5"></script>
<script asp-name="js-cookie" at="Foot" version="2"></script>
<script asp-name="admin" version="1" depends-on="jQuery" at="Foot"></script>
<resources type="Header" />
<!-- This script can't wait till the footer -->
<script asp-name="admin-head" version="1"></script>
@await RenderSectionAsync("HeadMeta", required: false)
</head>
<body class="preload">
<div class="ta-wrapper">
<div class="ta-navbar-top navbar-expand-lg bg-primary">
<div class="d-flex w-100">
@brandingHtml
<div class="flex-grow-1">
@if (adminSettings.DisplayTitlesInTopbar)
{
@await RenderSectionAsync("Title", required: false)
}
</div>
<div class="d-flex align-items-center">
@await RenderSectionAsync("NavbarTop", required: false)
@if (adminSettings.DisplayDarkMode)
{
<a id="btn-darkmode" class="ml-3" data-toggle="tooltip" title="@(darkMode ? T["Light mode"] : T["Dark mode"])" role="button">
@if (darkMode)
{
<i class="fas fa-sun"></i>
}
else
{
<i class="fas fa-moon"></i>
}
</a>
}
<a href="@Url.Content("~/")" class="ml-3" target="_blank" data-toggle="tooltip" title="@T["Visit Site"]" role="button">
<i class="fa fa-fw fa-external-link"></i>
</a>
@await DisplayAsync(await New.UserMenu())
@if (shellDescriptor.Features.Any(x => x.Id == "OrchardCore.ContentLocalization.ContentCulturePicker"))
{
<div class="ml-2">
<shape type="ContentCulturePicker"></shape>
</div>
}
</div>
</div>
</div>
<div id="ta-left-sidebar" class="d-flex flex-column justify-content-between align-items-stretch">
@await RenderSectionAsync("Navigation", required: false)
<div class="footer">
<button class="leftbar-compactor" type="button" title="@T["Collapse / expand menu"]"></button>
</div>
</div>
<div class="ta-content">
@await RenderSectionAsync("Header", required: false)
@await RenderSectionAsync("Messages", required: false)
@await RenderSectionAsync("Breadcrumbs", required: false)
@if (!adminSettings.DisplayTitlesInTopbar)
{
@await RenderSectionAsync("Title", required: false)
}
@await RenderBodyAsync()
</div>
@await RenderSectionAsync("Footer", required: false)
</div>
<div id="confirmRemoveModalMetadata" data-title="@T["Delete"]" data-message="@T["Are you sure you want to remove this element?"]" data-ok-text="@T["Ok"]" data-cancel-text="@T["Cancel"]" data-ok-class="btn-danger" data-cancel-class="btn-secondary"></div>
<resources type="Footer" />
</body>
</html>