mirror of
https://github.com/kbenestad/mdcms.git
synced 2026-06-18 15:24:32 +00:00
- Extend renderer.code to match `mdcms <type>` fence syntax (e.g. ```mdcms callout-info) - Extend parseMdcmsTag to capture body lines after the key-value block - Add renderCalloutTag: icon + title row, markdown body, colour CSS vars - Add hexToRgba helper for low-opacity background colour - Make themeConfig module-level so callout renderer can read callout defaults - Add callout CSS: left border, title row flex layout, icon fill - Add reusable message: key support with category-aware language resolution - Add aitranslation callout message to config.yml for test - Update home.md with full Phase 4 test cases https://claude.ai/code/session_01UP8Wo2CKPNhvvTkzX48CWF
77 lines
1.3 KiB
Markdown
77 lines
1.3 KiB
Markdown
---
|
|
title: Home
|
|
sort: 100
|
|
---
|
|
|
|
# Phase 4 — Callout Tags
|
|
|
|
Check each callout below. Each should show a coloured left border, an icon, a bold title in the accent colour, and a rendered body.
|
|
|
|
---
|
|
|
|
## Basic types
|
|
|
|
```mdcms callout-info
|
|
title: Information
|
|
This is an **info** callout. Supports *italic*, `code`, and lists:
|
|
|
|
- Item one
|
|
- Item two
|
|
```
|
|
|
|
```mdcms callout-warning
|
|
title: Warning
|
|
Something needs your attention. This is a **warning** callout.
|
|
```
|
|
|
|
```mdcms callout-success
|
|
title: Success
|
|
The operation completed successfully. This is a **success** callout.
|
|
```
|
|
|
|
```mdcms callout-error
|
|
title: Error
|
|
Something went wrong. This is an **error** callout.
|
|
```
|
|
|
|
---
|
|
|
|
## No title
|
|
|
|
```mdcms callout-info
|
|
No title key here. The title row should not appear at all — just the body.
|
|
```
|
|
|
|
---
|
|
|
|
## Markdown body
|
|
|
|
```mdcms callout-warning
|
|
title: Rich body
|
|
- List item one
|
|
- List item two
|
|
|
|
A paragraph with `inline code` and a [link](https://example.com).
|
|
```
|
|
|
|
---
|
|
|
|
## Custom icon override
|
|
|
|
```mdcms callout-info
|
|
title: Info with warning icon
|
|
icon: warning
|
|
This info callout uses the warning icon instead of the default info icon.
|
|
```
|
|
|
|
---
|
|
|
|
## Config-defined message (message: key)
|
|
|
|
```mdcms callout-warning
|
|
message: aitranslation
|
|
```
|
|
|
|
---
|
|
|
|
Toggle dark mode and check all four callout types still look correct.
|