feat: raw HTML passthrough, details styling, accent headings

- Allow raw HTML in markdown (html.WithUnsafe) for <details> blocks
- Style <details>/<summary> with purple gradient, custom markers
- h2/h3 headings now accent purple to distinguish from body text
- Second blog post: "Transformers and Neural Networks"

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
This commit is contained in:
2026-06-25 04:53:50 +03:00
parent 361e3f331d
commit 91e0a579b4
3 changed files with 118 additions and 2 deletions

View File

@@ -78,8 +78,31 @@ const pageTpl = `<!DOCTYPE html>
border-left: 3px solid var(--accent); margin: 0; padding: 4px 16px;
color: var(--text-dim);
}
.article h1, .article h2, .article h3 { color: var(--text); }
.article h1 { color: var(--text); }
.article h2, .article h3 { color: var(--accent); }
.article ul, .article ol { color: var(--text-dim); line-height: 1.7; }
.article details {
border: 1px solid var(--border); border-radius: 12px;
background: rgba(0,0,0,0.4); margin: 20px 0;
overflow: hidden;
}
.article details summary {
cursor: pointer; padding: 14px 18px; font-size: 14px;
color: var(--accent); user-select: none; line-height: 1.5;
background: linear-gradient(135deg, rgba(181,116,255,0.06), rgba(0,0,0,0.5));
list-style: none;
}
.article details summary::-webkit-details-marker { display: none; }
.article details summary::before { content: '▸ '; font-size: 12px; }
.article details[open] summary::before { content: '▾ '; }
.article details summary:hover { color: var(--text); }
.article details[open] summary { border-bottom: 1px solid var(--border); }
.article details[open] {
color: var(--text-dim); line-height: 1.7; font-size: 14px;
}
.article details[open] > *:not(summary) {
display: block; padding: 14px 18px;
}
footer { margin-top: 30px; font-size: 11px; color: var(--text-dim); display: flex; justify-content: space-between; padding: 4px 2px; }
</style>
</head>

View File

@@ -16,7 +16,7 @@ import (
var md = goldmark.New(
goldmark.WithExtensions(extension.GFM),
goldmark.WithRendererOptions(html.WithHardWraps()),
goldmark.WithRendererOptions(html.WithHardWraps(), html.WithUnsafe()),
)
type Post struct {