Layout
<div>
<header>
<h3>Title</h3>
</header>
<nav>
<ul>
<li><a routerLink="grid">Grid Page</a></li>
<li><a routerLink="tasks">Tasks Page</a></li>
</ul>
</nav>
<main>
<router-outlet></router-outlet>
</main>
</div>
layout.scss
div {
display: grid;
height: 100vh;
grid-template-columns: 220px 1fr;
grid-template-rows: auto 1fr;
grid-template-areas:
"header header header"
"nav content content";
header {
grid-area: header;
background-color: #3E51B5;
color: white;
padding: 1em;
box-shadow: 1px 2px 4px 0 rgb(21 99 157 / 16%);
border-bottom: 1px solid rgba(21,99,157,0.16);
}
nav {
grid-area: nav;
border-right: 1px solid rgba(21,99,157,0.16);
background-color: #fff;
a {
margin: 0;
padding: 0;
padding: 1em;
cursor: pointer;
position: relative;
display: block;
text-decoration: none;
color: #000;
}
}
main {
grid-area: content;
background-color: #f3f8fb;
padding: 1em;
}
}```
¿Quieres ver más aportes, preguntas y respuestas de la comunidad?