Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions web/src/components/ChecklistContentView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ export default function ChecklistContentView({
const isCompleted = status === 'completed'

return (
<div style={{ padding: '24px 30px 32px' }}>
<div style={{ padding: '24px clamp(16px, 4vw, 30px) 40px' }}>
<div style={{ maxWidth: 720, margin: '0 auto' }}>
<button onClick={onBack} style={{ fontFamily: "'Outfit',sans-serif", fontSize: 13, fontWeight: 500, color: C.textMuted, background: 'none', border: 'none', cursor: 'pointer', padding: 0, marginBottom: 16, display: 'flex', alignItems: 'center', gap: 5 }}>
← {backLabel}
</button>

{/* The article sits on its own paper card, centered, off the module's tinted background. */}
<article style={{ background: C.white, border: `1px solid ${C.border}`, borderRadius: 16, boxShadow: C.shadow2, padding: 'clamp(20px, 5vw, 44px)' }}>
<div style={{ marginBottom: 20 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
<Tag label={badge.label} color={badge.color} bg={badge.bg} />
Expand All @@ -81,7 +84,7 @@ export default function ChecklistContentView({
</h1>
</div>

<div style={{ maxWidth: 600 }}>
<div>
{content.body.map((block, i) => (
<ContentBlockRenderer key={i} block={block} accentColor={accentColor} />
))}
Expand Down Expand Up @@ -125,6 +128,8 @@ export default function ChecklistContentView({
) : <span />}
</div>
</div>
</article>
</div>
</div>
)
}
10 changes: 6 additions & 4 deletions web/src/components/contentBlocks.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
* so contentBlocks.tsx can stay component-only (Vite Fast Refresh).
*/

export const CALLOUT_VARIANT: Record<string, { color: string; bg: string; icon: string }> = {
info: { color: '#1D7FC4', bg: '#E8F0F8', icon: 'i' },
tip: { color: '#2D9E72', bg: '#ECF6F0', icon: '*' },
warning: { color: '#C47A12', bg: '#FFF3E0', icon: '!' },
// No fixed light background: the callout tints itself from `color`, so it
// reads in dark mode too (a hex tint there left its light text unreadable).
export const CALLOUT_VARIANT: Record<string, { color: string; icon: string }> = {
info: { color: '#1D7FC4', icon: 'i' },
tip: { color: '#2D9E72', icon: '*' },
warning: { color: '#C47A12', icon: '!' },
}

export const TYPE_BADGE_META: Record<string, { label: string; color: string; bg: string }> = {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/contentBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export function ContentBlockRenderer({ block, accentColor }: { block: ContentBlo
case 'callout': {
const v = CALLOUT_VARIANT[block.variant] ?? CALLOUT_VARIANT.info
return (
<div style={{ padding: '12px 15px', borderRadius: 10, background: v.bg, border: `1px solid ${v.color}22`, display: 'flex', gap: 10, alignItems: 'flex-start', margin: '8px 0 14px' }}>
<div style={{ padding: '12px 15px', borderRadius: 10, background: `${v.color}14`, border: `1px solid ${v.color}33`, display: 'flex', gap: 10, alignItems: 'flex-start', margin: '8px 0 14px' }}>
<span style={{ width: 20, height: 20, borderRadius: '50%', background: `${v.color}18`, color: v.color, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 11, fontWeight: 700, flexShrink: 0, marginTop: 1, fontFamily: "'Outfit',sans-serif" }}>
{v.icon}
</span>
Expand Down
Loading