summaryrefslogtreecommitdiff
path: root/src/components/Nav.astro
blob: 3c41d0d464da82f5032618ba8a7ca52c8ca5b8e9 (plain)
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
---
interface Props {
    path: string;
}

const { path } = Astro.props;

const directories = ["about", "works", "links"]

---
<nav>
  <span id="nav-path">/home/kyren/{path}</span>
  <span id="nav-links">
    <a href="/">home</a>
    {directories.map((dir) => (
    <a href={`/${dir}`}>{dir}</a>
    <span></span> /* For whitespace */
    ))}
  </span>
</nav>

<style>

nav {
  font-weight: 300;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px;
  border-style: solid;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
}
#nav-links a {
  margin-right: 0.15rem;
  margin-bottom: 0px;
  margin-left: 0.15rem;
  color: var(--primary);
  font-size: 1rem;

}
#nav-links a:hover {
  color: var(--accent);
}
#nav-path {
  margin-right: 2rem;
}

</style>