Fix aside on Recorders without avatar

This commit is contained in:
DrMint 2024-06-15 20:21:43 +02:00
parent 73dfc452cc
commit 47668e3b29
2 changed files with 11 additions and 6 deletions

View File

@ -22,9 +22,10 @@ default slot
interface Props {
reducedAsideWidth?: boolean;
withAside?: boolean | undefined;
}
const { reducedAsideWidth = false } = Astro.props;
const { reducedAsideWidth = false, withAside = true } = Astro.props;
---
<div id="layout" class:list={{ "reduced-width": reducedAsideWidth }}>
@ -40,10 +41,14 @@ const { reducedAsideWidth = false } = Astro.props;
</div>
<slot />
</div>
{
withAside && (
<Card class="when-large right">
<slot name="header-aside" />
<slot name="aside" />
</Card>
)
}
</div>
{/* ------------------------------------------- CSS -------------------------------------------- */}

View File

@ -41,7 +41,7 @@ if (languages.length > 0) {
{/* ------------------------------------------- HTML ------------------------------------------- */}
<AppLayout>
<AsideLayout>
<AsideLayout withAside={avatar !== undefined && additionalAttributes.length > 0}>
<Fragment slot="header">
<AppLayoutTitle pretitle={`Recorder#${id.substring(0, 5)}`} title={username} />
</Fragment>