astro/examples/blog-multiple-authors/src/components/Nav.astro

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
955 B
Text
Raw Normal View History

2021-05-17 22:45:41 +00:00
---
export interface Props {
title: string;
}
const { title } = Astro.props;
2021-05-17 22:45:41 +00:00
---
<nav class="header">
2021-05-17 22:45:41 +00:00
<h1 class="title">Dons Blog</h1>
<ul class="nav">
<li><a href="/">Home</a></li>
<li><a href="/posts">All Posts</a></li>
<li><a href="/authors/don">Author: Don</a></li>
<li><a href="/authors/sancho">Author: Sancho</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
2021-12-22 21:11:05 +00:00
<style lang="scss">
.header {
text-align: center;
2021-12-22 21:11:05 +00:00
@media (min-width: 600px) {
display: flex;
align-items: center;
padding: 2rem;
2021-12-22 21:11:05 +00:00
}
}
.title {
margin: 0;
2021-05-17 22:45:41 +00:00
font-size: 1.2em;
letter-spacing: -0.03em;
font-weight: 400;
margin-right: 1em;
2021-12-22 21:11:05 +00:00
}
.nav {
text-align: center;
2021-12-22 21:11:05 +00:00
@media (min-width: 600px) {
display: flex;
2021-12-22 21:11:05 +00:00
}
}
ul {
list-style: none;
margin: 0;
padding: 0;
2021-12-22 21:11:05 +00:00
}
li {
margin: 0;
2021-12-22 21:11:05 +00:00
}
a {
display: block;
2021-05-17 22:45:41 +00:00
font-size: 1.2em;
letter-spacing: -0.02em;
margin-left: 0.75em;
margin-right: 0.75em;
2021-12-22 21:11:05 +00:00
}
</style>