diff --git a/web/app.js b/web/app.js
index 9d63a27..dfaa3bb 100644
--- a/web/app.js
+++ b/web/app.js
@@ -664,12 +664,65 @@
actions += ``;
}
if (e.card_type) {
+ actions += ``;
actions += ``;
} else {
actions += ``;
}
+
+ let content = '';
+ if (e.card_type) {
+ const data = e.card_data ? (() => { try { return JSON.parse(e.card_data); } catch { return {}; } })() : {};
+ const hasDecision = data.chose != null;
+ const hasSteps = data.steps && data.steps.length;
+ const hasLink = !!data.url;
+ const hasFill = /\$\{[^}]+\}/.test(e.body || '');
+
+ if (hasDecision) {
+ const rejected = (data.rejected || []).map(r => `${escHtml(r)}`).join('');
+ content += `
+
decision${data.status || 'decided'}
+
+
${escHtml(data.chose)}
+
why${escHtml(data.why || '')}
+ ${rejected ? `
` : ''}
+
+
`;
+ }
+ if (hasLink && !hasDecision) {
+ content += ``;
+ }
+ if (hasSteps) {
+ const steps = data.steps.map(s => `○${escHtml(s.text || s)}
`).join('');
+ content += `
+
steps · ${data.steps.length}
+
+
`;
+ actions += ``;
+ }
+ if (hasFill) {
+ actions += ``;
+ }
+ if (!hasDecision && e.body) {
+ const lang = data.lang || '';
+ const isCode = lang || e.card_type === 'snippet';
+ const bodyHtml = isCode
+ ? ``
+ : `${renderMd(e.body)}
`;
+ content += `
+
content${lang ? `${lang}` : ''}
+
${bodyHtml}
+
`;
+ }
+ } else {
+ content = `${renderMd(e.body || '')}
`;
+ }
+
return `
-
${renderMd(e.body || '')}
+ ${content}
${tags ? `
${tags}
` : ''}
${actions}
diff --git a/web/style.css b/web/style.css
index 4618915..55df904 100644
--- a/web/style.css
+++ b/web/style.css
@@ -414,7 +414,8 @@ main.focus-peek .resize-handle { visibility: hidden; }
overflow: hidden;
}
-.entity-item.exp-full .exp-body {
+.entity-item.exp-full .exp-body,
+.card-row.exp-full .exp-body {
-webkit-line-clamp: unset;
overflow: visible;
}