Fix lists in posts and pages, and style images inside the text
Every list in a post rendered its bullet alone on one line and the item's text on the next. The panel's editor wraps each item's text in a <p>, and @pi/ui's reset puts the bullet inside the line: a block after an inline marker falls below it, paragraph margins and all. Bullets now sit outside, with the paragraph inside an item unspaced. Images in the text — attached in the panel or written in by URL through the API — are never wider than the column and sit apart from the prose, with a caption under a figure. Inline code and code blocks get a tinted surface; quotes keep the library's own quotation marks. The mock's posts carry such a body, so the typography can be reviewed without writing one in the panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,8 +64,20 @@ const page = (id, title, slug, featured) => ({
|
||||
alternates: { es: `/${slug}`, en: `/en/${slug}-en`, ca: `/ca/${slug}-ca` }, path: `/${slug}`,
|
||||
});
|
||||
|
||||
// A body with everything the editor can produce, images included, so the
|
||||
// post's typography can be reviewed without writing one in the panel.
|
||||
const richBody =
|
||||
'<p>Volvimos a renderizar en el servidor por tres motivos.</p>' +
|
||||
'<ul><li><p><strong>Rendimiento</strong> en móviles modestos.</p></li><li><p><strong>SEO</strong> sin trucos.</p></li></ul>' +
|
||||
'<img src="/logo.png" alt="El logo de Pireon">' +
|
||||
'<h2>Cómo lo hicimos</h2><p>Con <code>injectLoad</code> y un loader por página:</p>' +
|
||||
'<pre><code>export const load = async () => fetchPage();</code></pre>' +
|
||||
'<figure><img src="/logo.png" alt="Otra vez el logo"><figcaption>Una imagen con pie de foto.</figcaption></figure>' +
|
||||
'<blockquote><p>Lo que no se mide en un móvil de gama baja, no está medido.</p></blockquote>';
|
||||
|
||||
const post = (id, title, slug, published_at) => ({
|
||||
...page(id, title, slug, false),
|
||||
body: richBody,
|
||||
published_at,
|
||||
excerpt: 'Lo que hemos aprendido este mes, contado sin prisa y con ejemplos de código.',
|
||||
category: { id: 9, name: 'Blog', slug: 'blog', position: 3 },
|
||||
|
||||
Reference in New Issue
Block a user