primocms / primo

Primo is a visual CMS with a built-in code editor, Svelte blocks, and static site generator.
https://primocms.org
MIT License
1.92k stars 474 forks source link

Placing html outside the body #303

Open ErikSandquist opened 11 months ago

ErikSandquist commented 11 months ago

Is your feature request related to a problem? Please describe. I want to be able to place divs and images outside of the body tag. When editing in the "site" code everything you put automatically goes into the body.

Describe the solution you'd like I would like a way to choose or make an element opt-out of going into the body

Additional context As in the picture below i would like this static background image to be placed behind the body and this would be possible if we could place divs outside of the body. image

mateomorris commented 11 months ago

This should be an easy addition, assuming you mean putting an element within the body but outside all the Blocks. It's already set up under the hood to accept html that gets placed above the closing body tag, it just needs the UI in Page HTML for it.

At the moment, you could move an element outside its Block with JS. I could write an example if you'd like.