Commit 741e1bb7 by Torkel Ödegaard Committed by GitHub

Login: Better auto sizing of login logo (#21645)

parent 5dddc91b
...@@ -7,9 +7,13 @@ export interface BrandComponentProps { ...@@ -7,9 +7,13 @@ export interface BrandComponentProps {
} }
export const LoginLogo: FC<BrandComponentProps> = ({ className }) => { export const LoginLogo: FC<BrandComponentProps> = ({ className }) => {
const maxSize = css`
max-width: 150px;
`;
return ( return (
<> <>
<img className={className} src="public/img/grafana_icon.svg" alt="Grafana" /> <img className={cx(className, maxSize)} src="public/img/grafana_icon.svg" alt="Grafana" />
<div className="logo-wordmark" /> <div className="logo-wordmark" />
</> </>
); );
......
...@@ -15,7 +15,7 @@ export const LoginPage: FC = () => { ...@@ -15,7 +15,7 @@ export const LoginPage: FC = () => {
<Branding.LoginBackground className="login container"> <Branding.LoginBackground className="login container">
<div className="login-content"> <div className="login-content">
<div className="login-branding"> <div className="login-branding">
<Branding.LoginLogo className="logo-icon" /> <Branding.LoginLogo className="login-logo" />
</div> </div>
<LoginCtrl> <LoginCtrl>
{({ {({
......
...@@ -57,7 +57,6 @@ export const LicenseChrome: React.FC<Props> = ({ header, editionNotice, subheade ...@@ -57,7 +57,6 @@ export const LicenseChrome: React.FC<Props> = ({ header, editionNotice, subheade
}} }}
> >
<img <img
className="logo-icon"
src="/public/img/grafana_icon.svg" src="/public/img/grafana_icon.svg"
alt="Grafana" alt="Grafana"
width="80px" width="80px"
......
...@@ -115,12 +115,13 @@ select:-webkit-autofill:focus { ...@@ -115,12 +115,13 @@ select:-webkit-autofill:focus {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-grow: 0; flex-grow: 0;
padding-top: $space-xl; padding: $space-xl;
}
.logo-icon { .login-logo {
width: 70px; width: 100%;
margin-bottom: 15px; max-width: 250px;
} margin-bottom: 15px;
} }
.app-grafana { .app-grafana {
...@@ -285,10 +286,6 @@ select:-webkit-autofill:focus { ...@@ -285,10 +286,6 @@ select:-webkit-autofill:focus {
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
.login-branding { .login-branding {
padding: $space-md; padding: $space-md;
.logo-icon {
width: 80px;
}
} }
} }
...@@ -309,10 +306,6 @@ select:-webkit-autofill:focus { ...@@ -309,10 +306,6 @@ select:-webkit-autofill:focus {
padding: $space-xl; padding: $space-xl;
flex-grow: 1; flex-grow: 1;
border-right: 1px solid $login-border; border-right: 1px solid $login-border;
.logo-icon {
width: 130px;
}
} }
.login-button-group { .login-button-group {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment