Skip to content

Commit aea911b

Browse files
committed
Added '2' to margin top and bottom on Callouts
1 parent fd262c8 commit aea911b

3 files changed

Lines changed: 32 additions & 11 deletions

File tree

‎_TODO.md‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,6 @@ https://mermaid.js.org/config/directives.html
145145

146146
See comp images in Breadcrumbs component directory
147147

148-
## Code Block Problems
149-
150-
- Need to be able to highlight the title in a code block to copy it, or at least have a "copy" wrapper on it
151-
152-
## Callout Issues
153-
154-
- When adding backticks in a callout, it gets the standard grey background for a code block in light theme. But it should get an offset of the callout color, like "info-offset".
155-
156-
- There's too much space at the bottom of callouts, a full line of extra space in the colored background area.
157-
158148
## OL / UL Lists
159149

160150
- The spacing on unordered task lists nested in an ordered list is wrong, see "Questions to Ask Before Setting Targets" in `src/content/articles/availability-targets-five-nines-cost-benefit-analysis/index.mdx`
@@ -163,6 +153,8 @@ See comp images in Breadcrumbs component directory
163153

164154
## Checklist
165155

156+
- Text code blocks have weird formatting: `src/content/articles/cdn-edge-caching-cache-keys-vary-headers/index.mdx` that one seems like it should be some other kind of display, not a text code block.
157+
166158
- You can click the anchor link that shows on headers to get a copy of the link. It should be that you can click anywhere in the header and copy the link.
167159

168160
- Need to make tables responsive on mobile

‎src/components/Callout/index.astro‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ const iconColor = accentTextClasses.startsWith('text-') ? accentTextClasses.slic
8282
'flex',
8383
'flex-col',
8484
'gap-3',
85-
'mb-6',
85+
'mt-4',
86+
'mb-8',
8687
'p-4',
8788
'border-0',
8889
'border-l-[6px]',

‎src/content/articles/demo/index.mdx‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,34 @@ This is a note callout.
461461
This is a note callout.
462462
</Callout>
463463

464+
````markdown
465+
<Callout type="note">
466+
Codeblock in a Callout
467+
468+
```bash
469+
#!/bin/bash
470+
471+
ls
472+
```
473+
</Callout>
474+
````
475+
476+
<Callout type="success">
477+
Codeblock in a Callout
478+
479+
```typescript
480+
export async function getStaticPaths() {
481+
const articleEntries = await getCollection('articles', ({ data }) => {
482+
return isDev() || data.isDraft !== true
483+
})
484+
return articleEntries.map(article => ({
485+
params: { slug: article.id },
486+
props: { article },
487+
}))
488+
}
489+
```
490+
</Callout>
491+
464492
## Captions
465493

466494
By default it wraps the elements code, image, and table in a `<figure>` element, and adds a `<figcaption>` block as the last child. You can configure it to work on other elements by changing the keywords. Provided by teh `remark-captions` plugin.

0 commit comments

Comments
 (0)