Show the Homelab Manager logo on the sign-in page and in the sidebar
The logo replaces the plain-text title on the sign-in card and in the sidebar (and the top bar on phones). The picture's empty margin is trimmed with CSS so the logo fills the space; an environment badge, when set, sits beside or under it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e196be56d
commit
aab2f8cb4a
4 files changed
+43
-4
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
@@ -233,7 +233,11 @@ export default function AppShell({ user, children }: { user: CurrentUser; childr
|
||||
<IconMenu2 size={20} />
|
||||
</button>
|
||||
<h1 className="navbar-brand navbar-brand-autodark">
|
||||
<NavLink to="/">Homelab Manager</NavLink>
|
||||
<NavLink to="/" aria-label="Homelab Manager">
|
||||
<span className="logo-frame">
|
||||
<img src="/logo.webp" alt="Homelab Manager" width={901} height={460} />
|
||||
</span>
|
||||
</NavLink>
|
||||
{environment?.name && <span className="badge ms-2 env-badge">{environment.name}</span>}
|
||||
</h1>
|
||||
<div className={`navbar-collapse collapse ${sidebarOpen ? "show" : ""}`}>
|
||||
|
||||
@@ -5,9 +5,11 @@ export default function Login() {
|
||||
return (
|
||||
<div className="login-screen">
|
||||
<div className={`login-card ${environment ? "login-card-env" : ""}`}>
|
||||
<h1>
|
||||
Homelab Manager
|
||||
{environment?.name && <span className="badge ms-2 env-badge">{environment.name}</span>}
|
||||
<h1 className="login-logo">
|
||||
<span className="logo-frame">
|
||||
<img src="/logo.webp" alt="Homelab Manager" width={901} height={460} />
|
||||
</span>
|
||||
{environment?.name && <span className="badge env-badge">{environment.name}</span>}
|
||||
</h1>
|
||||
<p>Sign in with your homelab identity provider to continue.</p>
|
||||
<a className="btn btn-primary w-100" href="/auth/login">
|
||||
|
||||
@@ -29,11 +29,44 @@
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* The logo stands in for the heading; an environment badge, when there is one, sits under it. */
|
||||
.login-logo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
margin: -0.5rem 0 0.75rem;
|
||||
}
|
||||
|
||||
/* The picture has empty margin around the logo itself; this trims it so the logo fills the card. */
|
||||
.logo-frame {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.logo-frame img {
|
||||
display: block;
|
||||
width: 122%;
|
||||
max-width: none;
|
||||
height: auto;
|
||||
margin: -16% -11%;
|
||||
}
|
||||
|
||||
.login-card p {
|
||||
color: var(--tblr-secondary);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
/* The logo in the sidebar, in place of the name. */
|
||||
.navbar-brand .logo-frame {
|
||||
width: 11rem;
|
||||
}
|
||||
|
||||
.navbar-brand a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* An installation told to look different (ENVIRONMENT_NAME / ENVIRONMENT_COLOR on the server), so a dev copy can't be taken for production. */
|
||||
html[data-env] .navbar-vertical {
|
||||
background-color: var(--hlm-env-color) !important;
|
||||
|
||||
Reference in new issue
Block a user