Skip to content

Commit

Permalink
Update TheTheme (#3204)
Browse files Browse the repository at this point in the history
  • Loading branch information
TFleury authored Dec 17, 2020
1 parent 9457d1b commit 0607ee8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 46 deletions.
1 change: 1 addition & 0 deletions src/OrchardCore.Themes/TheTheme/Views/Branding.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a class="navbar-brand" href="~/#">@Site.SiteName</a>
32 changes: 0 additions & 32 deletions src/OrchardCore.Themes/TheTheme/Views/Content.cshtml

This file was deleted.

10 changes: 8 additions & 2 deletions src/OrchardCore.Themes/TheTheme/Views/Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body dir="@Orchard.CultureDir()">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="~/#">@Site.SiteName</a>
<shape type="Branding" />
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand All @@ -33,7 +33,13 @@
@await RenderSectionAsync("Messages", required: false)
@await RenderBodyAsync()
</main>
@await RenderSectionAsync("Footer", required: false)
@if (ThemeLayout["Footer"] != null) {
<footer>
<div class="container">
@await RenderSectionAsync("Footer", required: false)
</div>
</footer>
}
<resources type="FootScript" />
</body>
</html>
6 changes: 4 additions & 2 deletions src/OrchardCore.Themes/TheTheme/Views/Shared/LoginMenu.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@using OrchardCore.Users.Models
@inject ISiteService SiteService
@inject SignInManager<IUser> SignInManager
@inject IOptions<AdminOptions> AdminOptions

@{
var allowChangeEmail = (await SiteService.GetSiteSettingsAsync()).As<ChangeEmailSettings>().AllowChangeEmail;
Expand All @@ -19,7 +18,10 @@
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user fa-fw"></i> @User.Identity.Name<b class="caret"></b></a>
<div class="dropdown-menu">
<a class="dropdown-item" asp-route-area="OrchardCore.Admin" asp-controller="Admin" asp-action="Index"><i class="fa fa-desktop fa-fw"></i> @T["Dashboard"]</a>
@if (User.HasClaim("Permission", "AccessAdminPanel"))
{
<a class="dropdown-item" asp-route-area="OrchardCore.Admin" asp-controller="Admin" asp-action="Index"><i class="fa fa-desktop fa-fw"></i> @T["Dashboard"]</a>
}
@if (allowChangeEmail)
{
<a class="dropdown-item" asp-route-area="OrchardCore.Users" asp-controller="ChangeEmail" asp-action="Index"><i class="fa fa-envelope fa-fw"></i> @T["Change Email"]</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body {
margin-bottom: 60px;
}

footer {
body > footer {
position: absolute;
bottom: 0;
width: 100%;
Expand All @@ -28,12 +28,3 @@ footer {
body > .container {
padding: 60px 15px 0;
}

footer > .container {
padding-right: 15px;
padding-left: 15px;
}

code {
font-size: 80%;
}

0 comments on commit 0607ee8

Please sign in to comment.