First off: This is my first post in this community, so please don’t kill me if I’m doing someting wrong but please feel free to tell me!
So - I’ve discovered Cockpit about a week ago and I’m absolutely in love with it because it enables me to hand craft websites while still allowing moderators and editors to edit the contents without having to touch code and possibly breaking my repo. Nice!
I’m currently in the process of building a VueJS frontend boilerplate for Cockpit, which I might even make public once I’m happy with the result, and all is working great so far.
But now I’m at a point where I’m creating Vue Components which represent the Cockpit Layout components, like headings, images and so on.
My problem is, that I can’t find a good way to “translate” the grid Object to HTML in a recursive way.
Sure, when I’d only take care of one layer, everything would be easy. But because you can nest grids inside grids, which is a common thing to do, I need to find a recursive solution.
I’m pretty sure the solution is actually quite simple, but my brain really hurts atm and I just can’t find a good way.
Any help would be appreciated! Let me know if I forgot to describe some aspects in greater detail.
Best regards from Germany