aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Navbar.vue20
-rw-r--r--src/components/Service.vue35
-rw-r--r--src/components/Subcard.vue12
3 files changed, 66 insertions, 1 deletions
diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
index d3ceaf8..fd57156 100644
--- a/src/components/Navbar.vue
+++ b/src/components/Navbar.vue
@@ -3,6 +3,12 @@
3 <nav class="navbar" role="navigation" aria-label="main navigation"> 3 <nav class="navbar" role="navigation" aria-label="main navigation">
4 <div class="container"> 4 <div class="container">
5 <div class="navbar-brand"> 5 <div class="navbar-brand">
6 <SearchInput
7 class="search-bar search-bar-mobile is-hidden-desktop"
8 @input="filterServices"
9 @search:open="navigateToFirstService"
10 @search:cancel="filterServices"
11 />
6 <a 12 <a
7 role="button" 13 role="button"
8 aria-label="menu" 14 aria-label="menu"
@@ -36,6 +42,13 @@
36 </div> 42 </div>
37 <div class="navbar-end"> 43 <div class="navbar-end">
38 <slot></slot> 44 <slot></slot>
45
46 <SearchInput
47 class="navbar-item is-inline-block-mobile is-hidden-touch"
48 @input="filterServices"
49 @search:open="navigateToFirstService"
50 @search:cancel="filterServices"
51 />
39 </div> 52 </div>
40 </div> 53 </div>
41 </div> 54 </div>
@@ -44,14 +57,21 @@
44</template> 57</template>
45 58
46<script> 59<script>
60import SearchInput from "./SearchInput.vue";
61
47export default { 62export default {
48 name: "Navbar", 63 name: "Navbar",
64 components: {
65 SearchInput,
66 },
49 props: { 67 props: {
50 open: { 68 open: {
51 type: Boolean, 69 type: Boolean,
52 default: false, 70 default: false,
53 }, 71 },
54 links: Array, 72 links: Array,
73 navigateToFirstService: { type: Function },
74 filterServices: { type: Function },
55 }, 75 },
56 computed: { 76 computed: {
57 showMenu: function () { 77 showMenu: function () {
diff --git a/src/components/Service.vue b/src/components/Service.vue
index a2448ca..80bf019 100644
--- a/src/components/Service.vue
+++ b/src/components/Service.vue
@@ -1,7 +1,10 @@
1<template> 1<template>
2 <div> 2 <div>
3 <div class="card"> 3 <div class="card">
4 <a :href="item.url" :target="item.target" rel="noreferrer"> 4 <a class="card-arrow" v-bind:class="subcardClass" v-on:click="subCardActive = !subCardActive" v-if="item.links && item.links.length > 0">
5 <i style="font-size: 20px" class="fa fa-arrow-circle-down" v-bind:class="arrowClass"></i>
6 </a>
7 <a style="background-color: gray" :href="item.url" :target="item.target" rel="noreferrer">
5 <div class="card-content"> 8 <div class="card-content">
6 <div class="media"> 9 <div class="media">
7 <div v-if="item.logo" class="media-left"> 10 <div v-if="item.logo" class="media-left">
@@ -24,16 +27,46 @@
24 </div> 27 </div>
25 </div> 28 </div>
26 </a> 29 </a>
30 <ul class="subcard" v-bind:class="subcardClass">
31 <Subcard
32 v-for="link in item.links"
33 v-bind:link="link"
34 :key="link.url"
35 />
36 </ul>
27 </div> 37 </div>
28 </div> 38 </div>
29</template> 39</template>
30 40
31<script> 41<script>
42import Subcard from "./Subcard.vue";
43
32export default { 44export default {
33 name: "Service", 45 name: "Service",
46 components: {
47 Subcard,
48 },
34 props: { 49 props: {
35 item: Object, 50 item: Object,
36 }, 51 },
52 data: function() {
53 return {
54 subCardActive: false,
55 }
56 },
57 computed: {
58 arrowClass: function() {
59 return {
60 "fa-arrow-circle-down": !this.subCardActive,
61 "fa-arrow-circle-up": this.subCardActive
62 }
63 },
64 subcardClass: function() {
65 return {
66 active: this.subCardActive
67 }
68 }
69 }
37}; 70};
38</script> 71</script>
39 72
diff --git a/src/components/Subcard.vue b/src/components/Subcard.vue
new file mode 100644
index 0000000..808cd48
--- /dev/null
+++ b/src/components/Subcard.vue
@@ -0,0 +1,12 @@
1<template v-for="link in item.links">
2 <li><a :href="link.url">{{ link.name }}</a></li>
3</template>
4
5<script>
6export default {
7 name: "Subcard",
8 props: {
9 link: Object,
10 },
11};
12</script>