processing / p5.js-website

New p5.js website!
http://p5js.org
MIT License
19 stars 89 forks source link

Add the ability to add content below the header on main pages #491

Closed davepagurek closed 3 months ago

davepagurek commented 3 months ago

This lets you make an mdx file in content/pages/en/your-page-slug.mdx (e.g. reference.mdx, examples.mdx) and it'll add it below the header on that page. This is to let us add extra translatable content but also include rich content like links.

image

There's an extra little hack to get this to work on the reference page: previously, the filter input was part of the rest of the page, not the header. This meant that if we just add post-header content, it would go between the main header and the filter content. To accommodate, the filter now uses position: absolute to stick itself to the top of the non-header content, and the reference content adds an extra 75px gap to give it room.