Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TheTheme #3204

Merged
merged 7 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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%;
}