Molbap's picture
Molbap HF Staff
push a bunch of updates
e903a32
raw
history blame
928 Bytes
---
interface Props {
/** Unique ID for the reference */
id: string;
/** HTML caption for the reference */
caption: string;
}
const { id, caption } = Astro.props as Props;
---
<div class="reference-wrapper" id={id}>
<figure class="reference">
<div class="reference__content">
<slot />
</div>
<figcaption class="reference__caption" set:html={caption} />
</figure>
</div>
<style>
.reference-wrapper {
margin: var(--block-spacing-y) 0;
}
.reference {
margin: 0;
}
.reference__content {
/* Content can be anything */
}
.reference__caption {
text-align: left;
font-size: 0.9rem;
color: var(--muted-color);
margin-top: 6px;
background: var(--page-bg);
position: relative;
z-index: var(--z-elevated);
display: block;
width: 100%;
}
</style>