about summary refs log tree commit diff
path: root/src/components/NavBar.vue
blob: 24869338c2c6578f3c7a1dc647d74cd65bb06ed5 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<template>
  <nav class="navbar">
    <div class="title">
      <NavLink link="/" name="19 PDH Puszcza"></NavLink>
    </div>
    <div class="space"></div>
    <div class="links">
      <!-- Loop for generating links -->
      <NavLink v-for="route in routes" :key="route.path" :link="route.path" :name="route.name"></NavLink>
      <NavLink
        v-for="route in externalRoutes"
        :key="route.path"
        :link="route.path"
        :name="route.name"
        :external="true"
      ></NavLink>
    </div>
  </nav>
</template>

<script>
import NavLink from "./NavLink.vue";
import { routes, externalRoutes } from "../router/index";

export default {
  components: {
    NavLink
  },
  data: function() {
    return {
      routes,
      externalRoutes
    };
  }
};
</script>

<style scoped>
.navbar {
  width: 100vw;
  height: 80px;

  background: #ffffff;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);

  display: flex;
  align-items: center;
}

.space {
  flex: 1;
}

.title {
  font-size: 30px;
  margin-left: 200px;
  flex-shrink: 0;
}

.links {
  display: flex;
  margin-right: 200px;
}
</style>