Fixed recorder pages
This commit is contained in:
parent
804cd4cbb2
commit
a0e7d97967
|
@ -22,27 +22,34 @@ default slot
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
reducedAsideWidth?: boolean;
|
reducedAsideWidth?: boolean;
|
||||||
withAside?: boolean | undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { reducedAsideWidth = false, withAside = true } = Astro.props;
|
const { reducedAsideWidth = false } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id="layout" class:list={{ "reduced-width": reducedAsideWidth }}>
|
<div id="layout" class:list={{ "reduced-width": reducedAsideWidth }}>
|
||||||
<div id="left">
|
<div id="left">
|
||||||
<slot name="header" />
|
<slot name="header" />
|
||||||
|
{
|
||||||
|
(Astro.slots.has("header-aside") || Astro.slots.has("meta") || Astro.slots.has("aside")) && (
|
||||||
<div class="when-not-large">
|
<div class="when-not-large">
|
||||||
<slot name="header-aside" />
|
<slot name="header-aside" />
|
||||||
<slot name="meta" />
|
<slot name="meta" />
|
||||||
<slot name="aside" />
|
<slot name="aside" />
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Astro.slots.has("meta") && (
|
||||||
<div class="when-large">
|
<div class="when-large">
|
||||||
<slot name="meta" />
|
<slot name="meta" />
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
withAside && (
|
(Astro.slots.has("header-aside") || Astro.slots.has("aside")) && (
|
||||||
<Card class="when-large right">
|
<Card class="when-large right">
|
||||||
<slot name="header-aside" />
|
<slot name="header-aside" />
|
||||||
<slot name="aside" />
|
<slot name="aside" />
|
||||||
|
|
|
@ -40,15 +40,15 @@ if (languages.length > 0) {
|
||||||
|
|
||||||
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
||||||
|
|
||||||
<AppLayout>
|
<AppLayout backgroundImage={avatar}>
|
||||||
<AsideLayout withAside={avatar !== undefined && additionalAttributes.length > 0}>
|
<AsideLayout>
|
||||||
<Fragment slot="header">
|
<Fragment slot="header">
|
||||||
<AppLayoutTitle pretitle={`Recorder#${id.substring(0, 5)}`} title={username} />
|
<AppLayoutTitle pretitle={`Recorder#${id.substring(id.length - 5)}`} title={username} />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
||||||
{
|
{
|
||||||
avatar && (
|
avatar && (
|
||||||
<Fragment slot="header-aside">
|
<Fragment slot={avatar && "header-aside"}>
|
||||||
<a
|
<a
|
||||||
href={getLocalizedUrl(`/images/${avatar.id}`)}
|
href={getLocalizedUrl(`/images/${avatar.id}`)}
|
||||||
style={`aspect-ratio: ${avatar.width}/${avatar.height};`}>
|
style={`aspect-ratio: ${avatar.width}/${avatar.height};`}>
|
||||||
|
@ -66,20 +66,14 @@ if (languages.length > 0) {
|
||||||
|
|
||||||
{
|
{
|
||||||
avatar && additionalAttributes.length > 0 && (
|
avatar && additionalAttributes.length > 0 && (
|
||||||
<Fragment slot="aside">
|
<Fragment slot={avatar && additionalAttributes.length > 0 && "aside"}>
|
||||||
<Attributes attributes={additionalAttributes} />
|
<Attributes attributes={additionalAttributes} />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
<div id="info">
|
{!avatar && additionalAttributes.length > 0 && <Attributes attributes={additionalAttributes} />}
|
||||||
{
|
|
||||||
!avatar && additionalAttributes.length > 0 && (
|
|
||||||
<Attributes attributes={additionalAttributes} />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
{biography && <RichText content={biography} context={{ lang: language }} />}
|
{biography && <RichText content={biography} context={{ lang: language }} />}
|
||||||
</div>
|
|
||||||
</AsideLayout>
|
</AsideLayout>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue