remoteinterview/zero

Possible to use a layoutsfile?

Open

#120 ouverte le 1 mars 2020

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)JavaScript (244 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (5 815 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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>

Guide contributeur