Merge pull request #4613 from sbwalker/dev

further modifications for #4604 - support for site name in logo component
This commit is contained in:
Shaun Walker 2024-09-15 09:30:24 -04:00 committed by GitHub
commit e2d336d90b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 9 deletions

View File

@ -9,7 +9,7 @@
<div class="row flex-xl-nowrap gx-0">
<div class="sidebar">
<nav class="navbar">
<Logo ShowName="true" />
<Logo UseSiteNameAsFallback="true" />
<Menu Orientation="Vertical" />
</nav>
</div>

View File

@ -11,16 +11,16 @@
}
else
{
if (ShowName)
if (UseSiteNameAsFallback)
{
<span class="app-logo">
<a class="site-name" href="@PageState.Alias.Path">@PageState.Site.Name</a>
<a class="navbar-brand" href="@PageState.Alias.Path">@PageState.Site.Name</a>
</span>
}
}
@code {
[Parameter]
public bool ShowName { get; set; } = false;
public bool UseSiteNameAsFallback { get; set; } = false; // indicates if the site name should be displayed in scenarios where a site does not have a logo defined
}

View File

@ -4,7 +4,7 @@
<main role="main">
<nav class="navbar navbar-dark bg-primary fixed-top">
<Logo ShowName="true" /><Menu Orientation="Horizontal" />
<Logo UseSiteNameAsFallback="true" /><Menu Orientation="Horizontal" />
<div class="controls ms-auto">
<div class="controls-group">
<Search CssClass="me-3 text-center bg-primary" />

View File

@ -117,6 +117,10 @@
margin: .5rem;
}
.app-logo .navbar-brand {
color: white;
}
@media (max-width: 767.98px) {
.main .top-row {
display: none;

View File

@ -269,8 +269,6 @@ app {
min-height: 250px;
}
.app-logo .site-name {
padding: 0 20px 0 20px;
font-size: x-large;
color: white;
.app-logo .navbar-brand {
padding: 5px 20px 5px 20px;
}