How could I render a page that has a different layout depending on the content?
Unanswered
Mrigal carp posted this in #help-forum
Mrigal carpOP
Hey, I'm making a NextJS project based of on something like this: https://history-maps.com/, using PostgreSQL as a database and Prisma as an ORM (trying it out for the first time, I'll see how it goes).
My question is: How can I make it so that an event has multiple images that display in certain parts of the text, basically where I want it to show? I know I can store them all in the database, however my problem is choosing where to display them dynamically, as one event would be totally different from another.
I thought about using something like https://editorjs.io/ but I don't know how I could pass the JSON provided into a HTML / JSX "document" that could be rendered by the website.
According to an extension I have, that website uses React as their framework, so I assume my goal isn't impossible
My question is: How can I make it so that an event has multiple images that display in certain parts of the text, basically where I want it to show? I know I can store them all in the database, however my problem is choosing where to display them dynamically, as one event would be totally different from another.
I thought about using something like https://editorjs.io/ but I don't know how I could pass the JSON provided into a HTML / JSX "document" that could be rendered by the website.
According to an extension I have, that website uses React as their framework, so I assume my goal isn't impossible