Added general content blocks
This commit is contained in:
22
src/components/markdoc/blocks/general/Quote.astro
Normal file
22
src/components/markdoc/blocks/general/Quote.astro
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
type Props = {
|
||||
cite?: string
|
||||
source?: string
|
||||
href?: string
|
||||
}
|
||||
|
||||
const { cite, source, href } = Astro.props
|
||||
const label = source || href
|
||||
---
|
||||
|
||||
<figure class="quote">
|
||||
<blockquote cite={href}>
|
||||
<slot />
|
||||
</blockquote>
|
||||
{(cite || label) && (
|
||||
<figcaption class="quote__citation">
|
||||
{cite && <span class="quote__who">{cite}</span>}
|
||||
{label && <cite class="quote__source">{href ? <a href={href}>{label}</a> : label}</cite>}
|
||||
</figcaption>
|
||||
)}
|
||||
</figure>
|
||||
Reference in New Issue
Block a user