VasilijeBursac commented on code in PR #34640:
URL: https://github.com/apache/superset/pull/34640#discussion_r2267798779
##########
superset-frontend/src/pages/Login/index.tsx:
##########
@@ -74,7 +74,62 @@ const StyledLabel = styled(Typography.Text)`
`}
`;
+const StyledBackground = styled.div`
+ ${({ theme }) => {
+ const bgImageUrl = theme.loginPageBackgroundImageUrl;
+ const overlayColor =
+ theme.loginPageBackgroundOverlayColor || 'rgba(0, 0, 0, 0.5)';
+ const blurAmount = theme.loginPageBackgroundBlur || '0px';
+ return bgImageUrl
+ ? css`
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100vw;
+ height: 100vh;
+ z-index: 0;
+ pointer-events: none;
+
+ &::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-image: url(${bgImageUrl});
+ background-size: cover;
+ background-position: center;
+ filter: blur(${blurAmount});
+ z-index: -1;
+ }
+
+ &::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: ${overlayColor};
+ z-index: 1;
+ }
+ `
+ : '';
+ }}
+`;
+
+const StyledBrandLogo = styled.img`
+ display: block;
+ max-width: 160px;
+ max-height: 64px;
+ margin: 0;
+ object-fit: contain;
+`;
Review Comment:
Thanks, that’s a great idea! I agree it would be useful to extract the logo
logic into a shared `BrandLogo `component used in both the main navigation bar
and the login form.
One small consideration: some organizations might prefer different logos in
each context (e.g., a simplified icon in the navbar and a full logo in the
login form), depending on available space or branding guidelines. That might be
nitpicking, but it could be worth hearing from someone on Superset’s
design/theme team about how much flexibility we want to support here.
If we go ahead with a unified approach, did you mean we’d keep a single
`brandLogoUrl` token and add something like `showBrandLogoInLoginForm` to
toggle visibility in the login form, instead of having two separate url tokens?
Either way, I think extracting the logo into a component is a solid move.
I’m happy to take that on once we’ve settled on the direction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]