@burh/nuxt-core 1.0.240 → 1.0.242

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,134 +1,231 @@
1
- <template>
2
- <el-dialog
3
- :visible.sync="isActive"
4
- width="80%"
5
- custom-class="position-relative"
6
- @close="$emit('close')"
7
- class="test-radius"
8
- >
9
- <template>
10
- <div class="row d-flex justify-content-between mx-0 user-pdf">
11
- <img v-show="coverPhoto" :src="coverPhoto" alt="" />
12
- <div v-show="!coverPhoto" class="no-cover-photo"></div>
13
- <slot name="content"></slot>
14
- </div>
15
- <slot></slot>
16
- <!-- <el-tooltip placement="top" :content="!showTools ? 'Exibir Ferramentas' : 'Esconder Ferramentas'">
17
- <span class="tool tool-show--tools">
18
- <font-awesome-icon :icon="['fas', !showTools ? 'expand-alt' : 'compress-alt']" class="h3 text-primary"
19
- @click="showTools = !showTools"/>
20
- </span>
21
- </el-tooltip> -->
22
- <span class="tool tool-close" @click="$emit('close')">
23
- Fechar
24
- <font-awesome-icon
25
- :icon="['fas', 'times']"
26
- class="text-white ml-1"
27
- />
28
- </span>
29
- </template>
30
- </el-dialog>
31
- </template>
32
-
33
- <script>
34
- import { Dialog } from 'element-ui';
35
-
36
- export default {
37
- name: 'user-curriculum',
38
- components: {
39
- [Dialog.name]: Dialog
40
- },
41
- props: {
42
- show: {
43
- type: Boolean,
44
- default: false
45
- },
46
- tools: {
47
- type: Array,
48
- default: () => []
49
- },
50
- cover: String
51
- },
52
- data() {
53
- return {
54
- isActive: this.show,
55
- showTools: false,
56
- coverPhoto: this.cover
57
- };
58
- },
59
- watch: {
60
- show(value) {
61
- this.isActive = value;
62
- },
63
- cover(value) {
64
- this.coverPhoto = value;
65
- }
66
- }
67
- };
68
- </script>
69
-
70
- <style lang="scss" scoped>
71
- @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
72
-
73
- /deep/ .el-dialog__body {
74
- padding: 0;
75
- }
76
-
77
- /deep/ .el-dialog__header {
78
- display: none;
79
- }
80
-
81
- /deep/ .el-dialog {
82
- overflow: hidden;
83
- border-radius: 10px;
84
- padding-bottom: 50px;
85
- max-width: 1360px;
86
- margin-top: 5vh!important;
87
- }
88
-
89
- .test-radius {
90
- border-radius: 10px;
91
- }
92
-
93
- .tool {
94
- position: absolute;
95
- top: 1rem;
96
- z-index: 10;
97
- color: $primary;
98
- cursor: pointer;
99
-
100
- &-show--tools {
101
- right: 1.5rem;
102
- }
103
-
104
- &-close {
105
- position: absolute;
106
- width: 104.93px;
107
- height: 28px;
108
- right: 1.5rem;
109
- display: flex;
110
- justify-content: center;
111
- align-items: center;
112
-
113
- font-weight: 600;
114
- background: rgba(0, 0, 0, 0.2);
115
- border-radius: 17.5px;
116
- color: #fff;
117
- }
118
- }
119
-
120
- .user-pdf {
121
- background-color: #fff;
122
- img {
123
- width: 100%;
124
- height: 150px;
125
- object-fit: cover;
126
- }
127
-
128
- .no-cover-photo {
129
- background: $primary;
130
- width: 100%;
131
- height: 150px;
132
- }
133
- }
134
- </style>
1
+ <template>
2
+ <el-dialog
3
+ :visible.sync="isActive"
4
+ width="80%"
5
+ custom-class="position-relative"
6
+ @close="$emit('close')"
7
+ class="test-radius"
8
+ >
9
+ <template>
10
+ <div class="row d-flex justify-content-between mx-0 user-pdf">
11
+ <img v-show="coverPhoto" :src="coverPhoto" alt="" />
12
+ <div v-show="!coverPhoto" class="no-cover-photo"></div>
13
+ <slot name="content"></slot>
14
+ </div>
15
+ <slot></slot>
16
+ <!-- <el-tooltip placement="top" :content="!showTools ? 'Exibir Ferramentas' : 'Esconder Ferramentas'">
17
+ <span class="tool tool-show--tools">
18
+ <font-awesome-icon :icon="['fas', !showTools ? 'expand-alt' : 'compress-alt']" class="h3 text-primary"
19
+ @click="showTools = !showTools"/>
20
+ </span>
21
+ </el-tooltip> -->
22
+ <span class="tool tool-close" @click="$emit('close')">
23
+ Fechar
24
+ <font-awesome-icon
25
+ :icon="['fas', 'times']"
26
+ class="text-white ml-1"
27
+ />
28
+ </span>
29
+
30
+ <div class="user__cv__arrows">
31
+ <button v-if="hasPrevUser" @click="preUser()">
32
+ <i class="fas fa-chevron-left"></i>
33
+ </button>
34
+ <span v-else></span>
35
+
36
+ <button v-if="hasNextUser" @click="nextUser()">
37
+ <i class="fas fa-chevron-right"></i>
38
+ </button>
39
+ <span v-else></span>
40
+ </div>
41
+ </template>
42
+ </el-dialog>
43
+ </template>
44
+
45
+ <script>
46
+ import { Dialog } from 'element-ui';
47
+
48
+ export default {
49
+ name: 'user-curriculum',
50
+ components: {
51
+ [Dialog.name]: Dialog
52
+ },
53
+ props: {
54
+ show: {
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+ tools: {
59
+ type: Array,
60
+ default: () => []
61
+ },
62
+ maxUsers: {
63
+ type: Number,
64
+ default: 16
65
+ },
66
+ currentUserIndex: Number,
67
+ cover: String,
68
+ },
69
+ data() {
70
+ return {
71
+ isActive: this.show,
72
+ showTools: false,
73
+ coverPhoto: this.cover,
74
+ hasPrevUser: false,
75
+ hasNextUser: false
76
+ };
77
+ },
78
+ watch: {
79
+ currentUserIndex() {
80
+ this.handleArrowsActive();
81
+ },
82
+ show(value) {
83
+ this.isActive = value;
84
+ },
85
+ cover(value) {
86
+ this.coverPhoto = value;
87
+ }
88
+ },
89
+ mounted() {
90
+ this.handleArrowsActive();
91
+ },
92
+ methods: {
93
+ preUser() {
94
+ if (this.currentUserIndex <= 0) return;
95
+
96
+ this.$emit('prev-user');
97
+ },
98
+ nextUser() {
99
+ if (this.currentUserIndex >= (this.maxUsers - 1)) return;
100
+
101
+ this.$emit('next-user');
102
+ },
103
+ handleKeyPress({ keyCode }) {
104
+ switch (keyCode) {
105
+ case 37:
106
+ this.preUser();
107
+ break;
108
+
109
+ case 39:
110
+ this.nextUser();
111
+ break;
112
+ }
113
+ },
114
+ handleArrowsActive() {
115
+ if (this.currentUserIndex <= 0) {
116
+ this.hasPrevUser = false;
117
+ this.hasNextUser = true;
118
+ } else {
119
+ this.hasPrevUser = true;
120
+ }
121
+
122
+ if (this.currentUserIndex <= (this.maxUsers - 2)) {
123
+ this.hasNextUser = true;
124
+ }
125
+ if (this.currentUserIndex === (this.maxUsers - 1)) {
126
+ this.hasNextUser = false;
127
+ }
128
+ }
129
+ },
130
+ beforeMount() {
131
+ if (process.client) {
132
+ window.addEventListener('keydown', this.handleKeyPress);
133
+ }
134
+ },
135
+ beforeDestroy() {
136
+ if (process.client) {
137
+ window.removeEventListener('keydown', this.handleKeyPress);
138
+ }
139
+ }
140
+ };
141
+ </script>
142
+
143
+ <style lang="scss" scoped>
144
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
145
+
146
+ /deep/ .el-dialog__body {
147
+ padding: 0;
148
+ }
149
+
150
+ /deep/ .el-dialog__header {
151
+ display: none;
152
+ }
153
+
154
+ /deep/ .el-dialog {
155
+ overflow: hidden;
156
+ border-radius: 10px;
157
+ padding-bottom: 50px;
158
+ max-width: 1360px;
159
+ margin-top: 5vh!important;
160
+ }
161
+
162
+ .user__cv__arrows {
163
+ position: fixed;
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: space-between;
167
+ padding: 0 40px;
168
+ top: 0;
169
+ left: 0;
170
+ width: 100%;
171
+ height: 100vh;
172
+ z-index: -1;
173
+ > button {
174
+ width: 42px;
175
+ height: 42px;
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ border: none;
180
+ background: transparent;
181
+ font-size: 2rem;
182
+ color: $primary;
183
+ }
184
+ }
185
+
186
+ .test-radius {
187
+ border-radius: 10px;
188
+ }
189
+
190
+ .tool {
191
+ position: absolute;
192
+ top: 1rem;
193
+ z-index: 10;
194
+ color: $primary;
195
+ cursor: pointer;
196
+
197
+ &-show--tools {
198
+ right: 1.5rem;
199
+ }
200
+
201
+ &-close {
202
+ position: absolute;
203
+ width: 104.93px;
204
+ height: 28px;
205
+ right: 1.5rem;
206
+ display: flex;
207
+ justify-content: center;
208
+ align-items: center;
209
+
210
+ font-weight: 600;
211
+ background: rgba(0, 0, 0, 0.2);
212
+ border-radius: 17.5px;
213
+ color: #fff;
214
+ }
215
+ }
216
+
217
+ .user-pdf {
218
+ background-color: #fff;
219
+ img {
220
+ width: 100%;
221
+ height: 150px;
222
+ object-fit: cover;
223
+ }
224
+
225
+ .no-cover-photo {
226
+ background: $primary;
227
+ width: 100%;
228
+ height: 150px;
229
+ }
230
+ }
231
+ </style>
@@ -1,138 +1,138 @@
1
- <template>
2
- <base-header class="app-header" :type="'white'">
3
- <div class="row justify-content-center">
4
- <div
5
- :class="{ 'images__container': images.length }"
6
- class="col-6 my-auto header__container"
7
- >
8
- <slot name="header-top" />
9
-
10
- <div class="header__content">
11
- <h2 class="font-weight-bold display-3">{{name}}</h2>
12
- <div class="images" v-if="images.length">
13
- <el-tooltip
14
- v-for="(image, index) in images"
15
- :key="index"
16
- placement="top"
17
- :content="image.name"
18
- >
19
- <img
20
- :src="image.src"
21
- :alt="image.name"
22
- >
23
- </el-tooltip>
24
- </div>
25
- </div>
26
-
27
- <span id="credits-amount" v-if="subheader">
28
- {{ subheader }} Créditos
29
- </span>
30
-
31
- <slot name="header-bottom" />
32
- </div>
33
-
34
- <div class="col-6 d-flex justify-content-end align-items-center">
35
- <el-tooltip v-for="(item, index) in icons" :key="index"
36
- v-show="!item.disabled"
37
- class="item" effect="dark" :content="item.title" placement="top">
38
- <base-button size="md" type="link" class="text-primary px-2 w-auto"
39
- @click="$emit(item.event, item)">
40
- <font-awesome-icon :icon="item.icon" class="mr-2" />
41
- </base-button>
42
- </el-tooltip>
43
-
44
- <slot name="buttons" />
45
- </div>
46
-
47
- <slot/>
48
- </div>
49
- </base-header>
50
- </template>
51
- <script>
52
- export default {
53
- data(){
54
- return{
55
- default: ''
56
- };
57
- },
58
- props:{
59
- icons:{
60
- type: Array,
61
- default: () =>[{ event: 'view', icon: ['fas', 'eye'], disabled: false, title: 'Visualizar' }, { event: 'config', icon: ['fas', 'cog'], disabled: false, title: 'Editar' } ]
62
- },
63
- name: {
64
- type: String,
65
- default: 'Teste de matematica'
66
- },
67
- subheader: {
68
- type: Number,
69
- default: null
70
- },
71
- images: {
72
- type: Array,
73
- default: () => []
74
- }
75
- },
76
- };
77
- </script>
78
- <style lang="scss" scoped>
79
- #credits-amount {
80
- margin: 0!important;
81
- min-width: 8em;
82
- margin: 1rem 1rem 1rem 0;
83
- padding: 0.25em 1em;
84
- font-size: 0.85rem;
85
- line-height: 1.4em;
86
- border-radius: 23rem;
87
- font-weight: 400;
88
- text-align: center;
89
- background-color: rgba(29, 161, 241, 0.1);
90
- color: #1da1f1;
91
- }
92
- </style>
93
- <style lang="scss">
94
-
95
- .app-header {
96
- width: 100%;
97
- padding-top: 1.25rem;
98
- box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
99
- }
100
-
101
- .header__container {
102
- display: flex;
103
- flex-direction: column;
104
- justify-content: center;
105
- align-items: flex-start;
106
- }
107
-
108
- .images__container {
109
- display: flex;
110
- align-items: flex-start;
111
- justify-content: center;
112
- .header__content {
113
- display: flex;
114
- flex-direction: row;
115
- h2 {
116
- margin-bottom: 0;
117
- }
118
- .images {
119
- margin-left: 10px;
120
- display: flex;
121
- align-items: center;
122
- user-select: none;
123
- img {
124
- $size: 32px;
125
- display: block;
126
- width: $size;
127
- height: $size;
128
- object-fit: cover;
129
- border-radius: 100px;
130
- border: 2px solid #fff;
131
- &:not(:first-child) {
132
- margin-left: -10px;
133
- }
134
- }
135
- }
136
- }
137
- }
138
- </style>
1
+ <template>
2
+ <base-header class="app-header" :type="'white'">
3
+ <div class="row justify-content-center">
4
+ <div
5
+ :class="{ 'images__container': images.length }"
6
+ class="col-6 my-auto header__container"
7
+ >
8
+ <slot name="header-top" />
9
+
10
+ <div class="header__content">
11
+ <h2 class="font-weight-bold display-3">{{name}}</h2>
12
+ <div class="images" v-if="images.length">
13
+ <el-tooltip
14
+ v-for="(image, index) in images"
15
+ :key="index"
16
+ placement="top"
17
+ :content="image.name"
18
+ >
19
+ <img
20
+ :src="image.src"
21
+ :alt="image.name"
22
+ >
23
+ </el-tooltip>
24
+ </div>
25
+ </div>
26
+
27
+ <span id="credits-amount" v-if="subheader">
28
+ {{ subheader }} Créditos
29
+ </span>
30
+
31
+ <slot name="header-bottom" />
32
+ </div>
33
+
34
+ <div class="col-6 d-flex justify-content-end align-items-center">
35
+ <el-tooltip v-for="(item, index) in icons" :key="index"
36
+ v-show="!item.disabled"
37
+ class="item" effect="dark" :content="item.title" placement="top">
38
+ <base-button size="md" type="link" class="text-primary px-2 w-auto"
39
+ @click="$emit(item.event, item)">
40
+ <font-awesome-icon :icon="item.icon" class="mr-2" />
41
+ </base-button>
42
+ </el-tooltip>
43
+
44
+ <slot name="buttons" />
45
+ </div>
46
+
47
+ <slot/>
48
+ </div>
49
+ </base-header>
50
+ </template>
51
+ <script>
52
+ export default {
53
+ data(){
54
+ return{
55
+ default: ''
56
+ };
57
+ },
58
+ props:{
59
+ icons:{
60
+ type: Array,
61
+ default: () =>[{ event: 'view', icon: ['fas', 'eye'], disabled: false, title: 'Visualizar' }, { event: 'config', icon: ['fas', 'cog'], disabled: false, title: 'Editar' } ]
62
+ },
63
+ name: {
64
+ type: String,
65
+ default: 'Teste de matematica'
66
+ },
67
+ subheader: {
68
+ type: Number,
69
+ default: null
70
+ },
71
+ images: {
72
+ type: Array,
73
+ default: () => []
74
+ }
75
+ },
76
+ };
77
+ </script>
78
+ <style lang="scss" scoped>
79
+ #credits-amount {
80
+ margin: 0!important;
81
+ min-width: 8em;
82
+ margin: 1rem 1rem 1rem 0;
83
+ padding: 0.25em 1em;
84
+ font-size: 0.85rem;
85
+ line-height: 1.4em;
86
+ border-radius: 23rem;
87
+ font-weight: 400;
88
+ text-align: center;
89
+ background-color: rgba(29, 161, 241, 0.1);
90
+ color: #1da1f1;
91
+ }
92
+ </style>
93
+ <style lang="scss">
94
+
95
+ .app-header {
96
+ width: 100%;
97
+ padding-top: 1.25rem;
98
+ box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
99
+ }
100
+
101
+ .header__container {
102
+ display: flex;
103
+ flex-direction: column;
104
+ justify-content: center;
105
+ align-items: flex-start;
106
+ }
107
+
108
+ .images__container {
109
+ display: flex;
110
+ align-items: flex-start;
111
+ justify-content: center;
112
+ .header__content {
113
+ display: flex;
114
+ flex-direction: row;
115
+ h2 {
116
+ margin-bottom: 0;
117
+ }
118
+ .images {
119
+ margin-left: 10px;
120
+ display: flex;
121
+ align-items: center;
122
+ user-select: none;
123
+ img {
124
+ $size: 32px;
125
+ display: block;
126
+ width: $size;
127
+ height: $size;
128
+ object-fit: cover;
129
+ border-radius: 100px;
130
+ border: 2px solid #fff;
131
+ &:not(:first-child) {
132
+ margin-left: -10px;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ </style>