remoteinterview / zero

Zero is a web server to simplify web development.
https://zeroserver.io/
Apache License 2.0
5.83k stars 243 forks source link

Possible to use a layoutsfile? #120

Open mrwidde opened 4 years ago

mrwidde commented 4 years ago

Hi,

Thanks for a great framework. I'm using this framework with svelte on CapRover and it all works great.

Does this framework support a "layouts-file"? Like many of my components (navigation, footer etc) should be visible on every page. It would be great if i could have one index file where i declare a header and a footer. In between the header and the footer i could inject my routes. Maybe this is already possible?

Sapper has something like this:

<!-- src/routes/_layout.html -->
<nav>
    <a href=".">Home</a>
    <a href="about">About</a>
    <a href="settings">Settings</a>
</nav>
<svelte:component this={child.component} {...child.props}/>
<footer></footer>
asadm commented 4 years ago

This is probably the most requested feature right now. Zero doesn't support it right now but it's in the plans for near future.