mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-08 01:45:28 +00:00
chore: clean up server banner code
This commit is contained in:
2
external/lang
vendored
2
external/lang
vendored
Submodule external/lang updated: 0ac705b559...1d3e85e7f6
@@ -20,27 +20,31 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ServerBanner = styled.div<Omit<Props, "server">>`
|
const ServerBanner = styled.div<Omit<Props, "server">>`
|
||||||
background-color: var(--secondary-header);
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
|
||||||
background-size: cover !important;
|
background-size: cover;
|
||||||
background-position: center center !important;
|
background-repeat: norepeat;
|
||||||
|
background-position: center center;
|
||||||
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.background &&
|
props.background
|
||||||
css`
|
? css`
|
||||||
height: 120px;
|
height: 120px;
|
||||||
.container {
|
|
||||||
background: linear-gradient(
|
.container {
|
||||||
0deg,
|
background: linear-gradient(
|
||||||
var(--secondary-background),
|
0deg,
|
||||||
transparent
|
var(--secondary-background),
|
||||||
);
|
transparent
|
||||||
}
|
);
|
||||||
`}
|
}
|
||||||
|
`
|
||||||
|
: css`
|
||||||
|
background-color: var(--secondary-header);
|
||||||
|
`}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
height: var(--header-height);
|
height: var(--header-height);
|
||||||
@@ -70,10 +74,7 @@ export default observer(({ server }: Props) => {
|
|||||||
<ServerBanner
|
<ServerBanner
|
||||||
background={typeof bannerURL !== "undefined"}
|
background={typeof bannerURL !== "undefined"}
|
||||||
style={{
|
style={{
|
||||||
backgroundSize: "cover",
|
backgroundImage: bannerURL ? `url('${bannerURL}')` : undefined,
|
||||||
backgroundPosition: "center",
|
|
||||||
backgroundRepeat: "no-repeat",
|
|
||||||
background: bannerURL ? `url('${bannerURL}')` : undefined,
|
|
||||||
}}>
|
}}>
|
||||||
<div className="container">
|
<div className="container">
|
||||||
{server.flags && server.flags & 1 ? (
|
{server.flags && server.flags & 1 ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user