Skip to content

Commit

Permalink
Merge pull request #4612 from sbwalker/dev
Browse files Browse the repository at this point in the history
fix #4606 - allow logo to show site name as fallback (credit @JanOlsmar)
  • Loading branch information
sbwalker authored Sep 13, 2024
2 parents d954e3f + 1c1c269 commit b6d97dc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Oqtane.Client/Themes/BlazorTheme/Themes/Default.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="row flex-xl-nowrap gx-0">
<div class="sidebar">
<nav class="navbar">
<Logo />
<Logo ShowName="true" />
<Menu Orientation="Vertical" />
</nav>
</div>
Expand Down
17 changes: 16 additions & 1 deletion Oqtane.Client/Themes/Controls/Theme/Logo.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,19 @@
<img class="img-fluid" src="@Utilities.FileUrl(PageState.Alias, PageState.Site.LogoFileId.Value)" alt="@PageState.Site.Name" />
</a>
</span>
}
}
else
{
if (ShowName)
{
<span class="app-logo">
<a class="site-name" href="@PageState.Alias.Path">@PageState.Site.Name</a>
</span>
}
}

@code {
[Parameter]
public bool ShowName { get; set; } = false;
}

2 changes: 1 addition & 1 deletion Oqtane.Client/Themes/OqtaneTheme/Themes/Default.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<main role="main">
<nav class="navbar navbar-dark bg-primary fixed-top">
<Logo /><Menu Orientation="Horizontal" />
<Logo ShowName="true" /><Menu Orientation="Horizontal" />
<div class="controls ms-auto">
<div class="controls-group">
<Search CssClass="me-3 text-center bg-primary" />
Expand Down
6 changes: 6 additions & 0 deletions Oqtane.Server/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,10 @@ app {
.text-area-editor > textarea {
width: 100%;
min-height: 250px;
}

.app-logo .site-name {
padding: 0 20px 0 20px;
font-size: x-large;
color: white;
}

0 comments on commit b6d97dc

Please sign in to comment.