summaryrefslogtreecommitdiff
path: root/examples/blog-multiple-authors/src/components/Nav.astro
blob: 04a537f8716b7de93cc0c0c45f6b2b19f0c50faf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
export interface Props {
  title: string;
}
const { title } = Astro.props;
---

<style lang="scss">
.header {
  text-align: center;

  @media (min-width: 600px) {
    display: flex;
    align-items: center;
    padding: 2rem;
  }
}

.title {
  margin: 0;
  font-size: 1.2em;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-right: 1em;
}

.nav {
  text-align: center;

  @media (min-width: 600px) {
    display: flex;
  }
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  margin: 0;
}

a {
  display: block;
  font-size: 1.2em;
  letter-spacing: -0.02em;
  margin-left: 0.75em;
  margin-right: 0.75em;
}
</style>

<nav class="header">
  <h1 class="title">Don’s 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>