Skip to content

Commit

Permalink
expand banner to the edge in profile pane
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Dec 14, 2024
1 parent caa5a6f commit b42e38b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/components/profile-pane/ProfilePane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,23 @@ export default function ProfilePane() {
<>
<MetaTitle>{!user() ? "Profile" : user()?.username}</MetaTitle>
<Show when={user()}>
<Banner
maxHeight={320}
animate
margin={0}
hexColor={user()?.hexColor}
url={bannerUrl(user()!)}
class={css`
z-index: 111;
margin: 4px;
`}
style={isVisible() ? { "margin-right": "10px" } : {}}
/>
<div
class={styles.profilePane}
style={isVisible() ? { "margin-right": "10px" } : {}}
>
<div class={classNames(styles.topArea)}>
<Banner
maxHeight={250}
animate
margin={0}
hexColor={user()?.hexColor}
url={bannerUrl(user()!)}
class={css`
z-index: 111;
`}
/>
<FlexColumn class={styles.topAreaContent}>
<FlexRow>
<Avatar
Expand Down
2 changes: 2 additions & 0 deletions src/components/ui/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function Banner(props: {
maxHeight?: number;
animate?: boolean;
children?: JSXElement;
style?: JSX.CSSProperties;
}) {
const { hasFocus } = useWindowProperties();

Expand All @@ -76,6 +77,7 @@ export function Banner(props: {
const getStyles = () => {
const styles: JSX.CSSProperties = {
flex: "1",
...props.style,
};

if (props.maxHeight !== undefined) {
Expand Down

0 comments on commit b42e38b

Please sign in to comment.