|
|
@@ -1,112 +1,113 @@
|
|
1
|
|
-<template lang="pug">
|
|
2
|
|
-section.w-flex.column.pb5
|
|
3
|
|
- nav.fill-width.w-flex.column.justify-space-between
|
|
4
|
|
- // Tabbed Layout
|
|
5
|
|
- w-tabs(
|
|
6
|
|
- :items='Object.keys(tabContent)'
|
|
7
|
|
- @input='onTabChanged'
|
|
8
|
|
- center
|
|
9
|
|
- fill-bar
|
|
10
|
|
- v-if='isTab'
|
|
11
|
|
- )
|
|
12
|
|
- template(#item-title='{ item }')
|
|
13
|
|
- .w-flex.column.justify-start
|
|
14
|
|
- p(v-if='tabContent[item].matchPerc') {{ tabContent[item].matchPerc }}%
|
|
15
|
|
- p(v-else)
|
|
16
|
|
- p {{ item }}
|
|
17
|
|
- // About Tab
|
|
18
|
|
- template(#item-content.1='{ item }')
|
|
19
|
|
- .tab--about
|
|
20
|
|
- p {{ tabContent[item].tab }}
|
|
21
|
|
- br
|
|
22
|
|
- p {{ tabContent[item].tab }}
|
|
23
|
|
- br
|
|
24
|
|
- hr
|
|
25
|
|
-
|
|
26
|
|
- // Passion Tab
|
|
27
|
|
- template(#item-content.2='{ item }')
|
|
28
|
|
- .tab--passion
|
|
29
|
|
- p {{ tabContent[item].tab }}
|
|
30
|
|
- SpiderChart(
|
|
31
|
|
- :labels='aspects.map(label => label.name)'
|
|
32
|
|
- :profile-data='profileScore'
|
|
33
|
|
- :target-data='targetScore'
|
|
34
|
|
- profile-name='lucy'
|
|
35
|
|
- v-if='isTab'
|
|
36
|
|
- )
|
|
37
|
|
-
|
|
38
|
|
- // Aspirations Tab
|
|
39
|
|
- template(#item-content.3='{ item }')
|
|
40
|
|
- .tab--aspirations
|
|
41
|
|
- p {{ tabContent[item].tab }}
|
|
42
|
|
-
|
|
43
|
|
- // Skills Tab
|
|
44
|
|
- template(#item-content.4='{ item }')
|
|
45
|
|
- .tab--skills
|
|
46
|
|
- p {{ tabContent[item].tab }}
|
|
47
|
|
-
|
|
48
|
|
- // Untabbed Layout
|
|
49
|
|
- ul.w-flex.row.justify-space-between(v-else)
|
|
50
|
|
- template(
|
|
51
|
|
- :key='index'
|
|
52
|
|
- v-for='(item, index) in Object.keys(tabContent)'
|
|
53
|
|
- )
|
|
54
|
|
- li.w-flex.row(v-if='item !== "about"')
|
|
55
|
|
- w-icon.mr1.icon-compass(xl)
|
|
56
|
|
- .w-flex.column.justify-start
|
|
57
|
|
- p
|
|
58
|
|
- span {{ tabContent[item].matchPerc }}%
|
|
59
|
|
- p.text-capitalize {{ item }}
|
|
60
|
|
-</template>
|
|
61
|
|
-
|
|
62
|
|
-<script>
|
|
63
|
|
-import SpiderChart from './SpiderChart.vue'
|
|
64
|
|
-
|
|
65
|
|
-export default {
|
|
66
|
|
- components: { SpiderChart },
|
|
67
|
|
- props: {
|
|
68
|
|
- aspects: {
|
|
69
|
|
- required: true,
|
|
70
|
|
- type: Array,
|
|
71
|
|
- },
|
|
72
|
|
- tabContent: {
|
|
73
|
|
- required: true,
|
|
74
|
|
- type: Object,
|
|
75
|
|
- },
|
|
76
|
|
- isTab: {
|
|
77
|
|
- required: false,
|
|
78
|
|
- type: Boolean,
|
|
79
|
|
- default: false,
|
|
80
|
|
- },
|
|
81
|
|
- showIcon: {
|
|
82
|
|
- required: false,
|
|
83
|
|
- type: Boolean,
|
|
84
|
|
- default: true,
|
|
85
|
|
- },
|
|
86
|
|
- },
|
|
87
|
|
- emits: ['tab-change'],
|
|
88
|
|
- data: () => ({
|
|
89
|
|
- profileScore: [5.7, 5.2, 4.8, 5.2, 4.9, 4.9],
|
|
90
|
|
- targetScore: [5.3, 4.8, 5.7, 4.8, 5.6, 4.8],
|
|
91
|
|
- }),
|
|
92
|
|
- methods: {
|
|
93
|
|
- onTabChanged(tabs) {
|
|
94
|
|
- this.$emit('tab-change', tabs)
|
|
95
|
|
- },
|
|
96
|
|
- },
|
|
97
|
|
-}
|
|
98
|
|
-</script>
|
|
99
|
|
-<style lang="sass">
|
|
100
|
|
- section
|
|
101
|
|
- font-family: Century Gothic, CenturyGothic, AppleGothic, sans-serif
|
|
102
|
|
- ul
|
|
103
|
|
- margin: 11px 0
|
|
104
|
|
- li
|
|
105
|
|
- margin: 0 7px
|
|
106
|
|
- font-size: .8em
|
|
107
|
|
- p > span
|
|
108
|
|
- font-weight: bold
|
|
109
|
|
- font-size: 1em
|
|
110
|
|
- li:not(:last-child)
|
|
111
|
|
- border-right: 1px solid #fff
|
|
112
|
|
-</style>
|
|
|
1
|
+<template lang="pug">
|
|
|
2
|
+section.w-flex.column.pb5
|
|
|
3
|
+ nav.fill-width.w-flex.column.justify-space-between
|
|
|
4
|
+ // Tabbed Layout
|
|
|
5
|
+ w-tabs(
|
|
|
6
|
+ :items='Object.keys(tabContent)'
|
|
|
7
|
+ @input='onTabChanged'
|
|
|
8
|
+ center
|
|
|
9
|
+ fill-bar
|
|
|
10
|
+ v-if='isTab'
|
|
|
11
|
+ )
|
|
|
12
|
+ template(#item-title='{ item }')
|
|
|
13
|
+ .w-flex.column.justify-start
|
|
|
14
|
+ p(v-if='tabContent[item].matchPerc') {{ tabContent[item].matchPerc }}%
|
|
|
15
|
+ p(v-else)
|
|
|
16
|
+ p {{ item }}
|
|
|
17
|
+
|
|
|
18
|
+ // About Tab
|
|
|
19
|
+ template(#item-content.1='{ item }')
|
|
|
20
|
+ .tab--about
|
|
|
21
|
+ p {{ tabContent[item].tab }}
|
|
|
22
|
+ br
|
|
|
23
|
+ p {{ tabContent[item].tab }}
|
|
|
24
|
+ br
|
|
|
25
|
+ hr
|
|
|
26
|
+
|
|
|
27
|
+ // Passion Tab
|
|
|
28
|
+ template(#item-content.2='{ item }')
|
|
|
29
|
+ .tab--passion
|
|
|
30
|
+ p {{ tabContent[item].tab }}
|
|
|
31
|
+ SpiderChart(
|
|
|
32
|
+ :labels='aspects.map(label => label.name)'
|
|
|
33
|
+ :profile-data='profileScore'
|
|
|
34
|
+ :target-data='targetScore'
|
|
|
35
|
+ profile-name='lucy'
|
|
|
36
|
+ v-if='isTab'
|
|
|
37
|
+ )
|
|
|
38
|
+
|
|
|
39
|
+ // Aspirations Tab
|
|
|
40
|
+ template(#item-content.3='{ item }')
|
|
|
41
|
+ .tab--aspirations
|
|
|
42
|
+ p {{ tabContent[item].tab }}
|
|
|
43
|
+
|
|
|
44
|
+ // Skills Tab
|
|
|
45
|
+ template(#item-content.4='{ item }')
|
|
|
46
|
+ .tab--skills
|
|
|
47
|
+ p {{ tabContent[item].tab }}
|
|
|
48
|
+
|
|
|
49
|
+ // Untabbed Layout
|
|
|
50
|
+ ul.w-flex.row.justify-space-between(v-else)
|
|
|
51
|
+ template(
|
|
|
52
|
+ :key='index'
|
|
|
53
|
+ v-for='(item, index) in Object.keys(tabContent)'
|
|
|
54
|
+ )
|
|
|
55
|
+ li.w-flex.row(v-if='item !== "about"')
|
|
|
56
|
+ w-icon.mr1.icon-compass(xl)
|
|
|
57
|
+ .w-flex.column.justify-start
|
|
|
58
|
+ p
|
|
|
59
|
+ span {{ tabContent[item].matchPerc }}%
|
|
|
60
|
+ p.text-capitalize {{ item }}
|
|
|
61
|
+</template>
|
|
|
62
|
+
|
|
|
63
|
+<script>
|
|
|
64
|
+import SpiderChart from './SpiderChart.vue'
|
|
|
65
|
+
|
|
|
66
|
+export default {
|
|
|
67
|
+ components: { SpiderChart },
|
|
|
68
|
+ props: {
|
|
|
69
|
+ aspects: {
|
|
|
70
|
+ required: true,
|
|
|
71
|
+ type: Array,
|
|
|
72
|
+ },
|
|
|
73
|
+ tabContent: {
|
|
|
74
|
+ required: true,
|
|
|
75
|
+ type: Object,
|
|
|
76
|
+ },
|
|
|
77
|
+ isTab: {
|
|
|
78
|
+ required: false,
|
|
|
79
|
+ type: Boolean,
|
|
|
80
|
+ default: false,
|
|
|
81
|
+ },
|
|
|
82
|
+ showIcon: {
|
|
|
83
|
+ required: false,
|
|
|
84
|
+ type: Boolean,
|
|
|
85
|
+ default: true,
|
|
|
86
|
+ },
|
|
|
87
|
+ },
|
|
|
88
|
+ emits: ['tab-change'],
|
|
|
89
|
+ data: () => ({
|
|
|
90
|
+ profileScore: [5.7, 5.2, 4.8, 5.2, 4.9, 4.9],
|
|
|
91
|
+ targetScore: [5.3, 4.8, 5.7, 4.8, 5.6, 4.8],
|
|
|
92
|
+ }),
|
|
|
93
|
+ methods: {
|
|
|
94
|
+ onTabChanged(tabs) {
|
|
|
95
|
+ this.$emit('tab-change', tabs)
|
|
|
96
|
+ },
|
|
|
97
|
+ },
|
|
|
98
|
+}
|
|
|
99
|
+</script>
|
|
|
100
|
+<style lang="sass">
|
|
|
101
|
+section
|
|
|
102
|
+ font-family: Century Gothic, CenturyGothic, AppleGothic, sans-serif
|
|
|
103
|
+ ul
|
|
|
104
|
+ margin: 11px 0
|
|
|
105
|
+ li
|
|
|
106
|
+ margin: 0 7px
|
|
|
107
|
+ font-size: .8em
|
|
|
108
|
+ p > span
|
|
|
109
|
+ font-weight: bold
|
|
|
110
|
+ font-size: 1em
|
|
|
111
|
+ li:not(:last-child)
|
|
|
112
|
+ border-right: 1px solid #fff
|
|
|
113
|
+</style>
|