remoteinterview/zero

Possible to use a layoutsfile?

开放

#120 创建于 2020年3月1日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (244 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (5,815 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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>

贡献者指南