mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 15:12:08 -05:00
chore: clean up server banner code
This commit is contained in:
parent
bad7458560
commit
b5789126f8
2 changed files with 20 additions and 19 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 0ac705b5599bf9ddf538f3ada1bffd67b2206b57
|
||||
Subproject commit 1d3e85e7f6d0ad7a590854e240d7c47291f3e2cf
|
|
@ -20,27 +20,31 @@ interface Props {
|
|||
}
|
||||
|
||||
const ServerBanner = styled.div<Omit<Props, "server">>`
|
||||
background-color: var(--secondary-header);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: end;
|
||||
|
||||
background-size: cover !important;
|
||||
background-position: center center !important;
|
||||
background-size: cover;
|
||||
background-repeat: norepeat;
|
||||
background-position: center center;
|
||||
|
||||
${(props) =>
|
||||
props.background &&
|
||||
css`
|
||||
height: 120px;
|
||||
.container {
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
var(--secondary-background),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
`}
|
||||
props.background
|
||||
? css`
|
||||
height: 120px;
|
||||
|
||||
.container {
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
var(--secondary-background),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
`
|
||||
: css`
|
||||
background-color: var(--secondary-header);
|
||||
`}
|
||||
|
||||
.container {
|
||||
height: var(--header-height);
|
||||
|
@ -70,10 +74,7 @@ export default observer(({ server }: Props) => {
|
|||
<ServerBanner
|
||||
background={typeof bannerURL !== "undefined"}
|
||||
style={{
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
backgroundRepeat: "no-repeat",
|
||||
background: bannerURL ? `url('${bannerURL}')` : undefined,
|
||||
backgroundImage: bannerURL ? `url('${bannerURL}')` : undefined,
|
||||
}}>
|
||||
<div className="container">
|
||||
{server.flags && server.flags & 1 ? (
|
||||
|
|
Loading…
Reference in a new issue