@ecored-sena/base-kit 0.0.1

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.
Files changed (67) hide show
  1. package/README.md +1 -0
  2. package/package.json +49 -0
  3. package/plugin/components/AccordionRED.vue +78 -0
  4. package/plugin/components/AcordionA.vue +78 -0
  5. package/plugin/components/Audio.vue +20 -0
  6. package/plugin/components/BannerHero.vue +104 -0
  7. package/plugin/components/CarouselCard.vue +70 -0
  8. package/plugin/components/CarouselRED.vue +65 -0
  9. package/plugin/components/Complementario.vue +81 -0
  10. package/plugin/components/Creditos.vue +101 -0
  11. package/plugin/components/Dialogo.vue +30 -0
  12. package/plugin/components/DialogoActividad.vue +274 -0
  13. package/plugin/components/DialogoBurbuja.vue +46 -0
  14. package/plugin/components/DialogoChat.vue +88 -0
  15. package/plugin/components/Footer.vue +42 -0
  16. package/plugin/components/GlobalComponents.js +39 -0
  17. package/plugin/components/Glosario.vue +100 -0
  18. package/plugin/components/ImagenInfografica.vue +100 -0
  19. package/plugin/components/ImagenInfograficaB.vue +68 -0
  20. package/plugin/components/Inicio.vue +128 -0
  21. package/plugin/components/LineaTiempoA.vue +30 -0
  22. package/plugin/components/LineaTiempoB.vue +36 -0
  23. package/plugin/components/LineaTiempoC.vue +95 -0
  24. package/plugin/components/LineaTiempoD.vue +51 -0
  25. package/plugin/components/LineaTiempoE.vue +25 -0
  26. package/plugin/components/ModalA.vue +22 -0
  27. package/plugin/components/PasosA.vue +59 -0
  28. package/plugin/components/PasosB.vue +90 -0
  29. package/plugin/components/Referencias.vue +45 -0
  30. package/plugin/components/ScrollHorizontal.vue +105 -0
  31. package/plugin/components/Separador.vue +12 -0
  32. package/plugin/components/SlyderA.vue +65 -0
  33. package/plugin/components/SlyderB.vue +48 -0
  34. package/plugin/components/SlyderC.vue +53 -0
  35. package/plugin/components/SlyderD.vue +50 -0
  36. package/plugin/components/SlyderE.vue +58 -0
  37. package/plugin/components/SlyderF.vue +141 -0
  38. package/plugin/components/TabsA.vue +44 -0
  39. package/plugin/components/TabsB.vue +40 -0
  40. package/plugin/components/TabsC.vue +39 -0
  41. package/plugin/components/TarjetaAudio.vue +65 -0
  42. package/plugin/components/TimeLineRED.vue +51 -0
  43. package/plugin/components/actividad/ActividadController.vue +34 -0
  44. package/plugin/components/actividad/actividadCompletar/ActividadCompletar.vue +283 -0
  45. package/plugin/components/actividad/actividadCompletar/ActividadCompletarFooter.vue +63 -0
  46. package/plugin/components/actividad/actividadCompletar/ActividadParrafo.vue +218 -0
  47. package/plugin/components/actividad/actividadCompletar/ActividadResultados.vue +215 -0
  48. package/plugin/components/actividad/actividadCuestionario/Actividad.vue +222 -0
  49. package/plugin/components/actividad/actividadCuestionario/ActividadBarraAvance.vue +116 -0
  50. package/plugin/components/actividad/actividadCuestionario/ActividadPregunta.vue +146 -0
  51. package/plugin/components/actividad/actividadCuestionario/ActividadResultados.vue +215 -0
  52. package/plugin/components/audioMixins.js +73 -0
  53. package/plugin/components/componentSlotMixins.js +87 -0
  54. package/plugin/components/dialogoMixins.js +28 -0
  55. package/plugin/components/globalMixins.js +11 -0
  56. package/plugin/components/plantilla/Accesibilidad.vue +101 -0
  57. package/plugin/components/plantilla/AsideMenu.vue +242 -0
  58. package/plugin/components/plantilla/BannerInterno.vue +66 -0
  59. package/plugin/components/plantilla/BannerPrincipal.vue +104 -0
  60. package/plugin/components/plantilla/BarraAvance.vue +379 -0
  61. package/plugin/components/plantilla/Curso.vue +12 -0
  62. package/plugin/components/plantilla/Footer.vue +42 -0
  63. package/plugin/components/plantilla/Header.vue +152 -0
  64. package/plugin/components/plantilla/ScrollHorizontal.vue +105 -0
  65. package/plugin/components/plantillaMixins.js +34 -0
  66. package/plugin/components/slyderMixins.js +18 -0
  67. package/plugin/plugin.js +49 -0
@@ -0,0 +1,101 @@
1
+ <template lang="pug">
2
+ .accesibilidad
3
+ .accesibilidad__menu
4
+ .accesibilidad__menu__header
5
+ .accesibilidad__menu__item
6
+ i(class="fas fa-universal-access")
7
+ span.h5.mb-0 Accesibilidad
8
+ .accesibilidad__menu__content
9
+ .accesibilidad__menu__item(
10
+ @click="contraste()"
11
+ )
12
+ i(class="fas fa-adjust")
13
+ span Contraste
14
+ .accesibilidad__menu__item(
15
+ @click="aumentarLetra()"
16
+ )
17
+ img(src="@/assets/bullets/aumentar.svg")
18
+ span Aumentar letra
19
+ .accesibilidad__menu__item(
20
+ @click="reducirLetra()"
21
+ )
22
+ img(src="@/assets/bullets/reducir.svg")
23
+ span Reducir letra
24
+
25
+ </template>
26
+
27
+ <script>
28
+ export default {
29
+ name: 'Accesibilidad',
30
+ data: () => ({
31
+ fontSize: 16,
32
+ }),
33
+ methods: {
34
+ contraste() {
35
+ const htmlElement = document.querySelector('html')
36
+ const clase = 'html-constraste-activo'
37
+ if (htmlElement.classList.contains(clase)) {
38
+ htmlElement.classList.remove(clase)
39
+ } else {
40
+ htmlElement.classList.add(clase)
41
+ }
42
+ },
43
+ aumentarLetra() {
44
+ const bodyElement = document.querySelector('body')
45
+ if (this.fontSize >= 22) return
46
+ this.fontSize += 2
47
+ bodyElement.style.fontSize = this.fontSize + 'px'
48
+ },
49
+ reducirLetra() {
50
+ const bodyElement = document.querySelector('body')
51
+ if (this.fontSize <= 16) return
52
+ this.fontSize -= 2
53
+ bodyElement.style.fontSize = this.fontSize + 'px'
54
+ },
55
+ },
56
+ }
57
+ </script>
58
+
59
+ <style lang="sass" scoped>
60
+ .accesibilidad
61
+ position: fixed
62
+ right: 0
63
+ top: 50vh
64
+ height: 50px
65
+ background-color: #111E61
66
+ border-top-left-radius: 15px
67
+ border-bottom-left-radius: 15px
68
+ transform: translateY(-50%) translateX(100%) translateX(-50px)
69
+ overflow: hidden
70
+ transition: transform 0.3s ease-in-out, height 0.3s ease-in-out
71
+ &:hover
72
+ transform: translateY(-50%) translateX(0)
73
+ height: 12.75rem
74
+
75
+ *
76
+ color: $white
77
+ &__menu
78
+ &__header
79
+ &__content
80
+ .accesibilidad__menu__item
81
+ cursor: pointer
82
+ &:hover
83
+ background-color: #273685
84
+ &:last-child
85
+ border: none
86
+ &__item
87
+ display: flex
88
+ align-items: center
89
+ padding: 10px
90
+ border-bottom: 1px solid #273685
91
+ line-height: 1em
92
+ user-select: none
93
+ i
94
+ font-size: 30px
95
+ font-style: normal
96
+ margin-right: 10px
97
+ line-height: 1em
98
+ img
99
+ width: 30px
100
+ margin-right: 10px
101
+ </style>
@@ -0,0 +1,242 @@
1
+ <template lang="pug">
2
+ aside
3
+ transition(name="main-menu" duration="295")
4
+ .aside-menu(v-if="menuOpen")
5
+ .aside-menu__black-background(@click="toggleMenu(false)")
6
+ nav.aside-menu__content
7
+ .aside-menu__header
8
+ h4 Desarrollo de contenidos
9
+ ul.aside-menu__menu
10
+ template(v-for="(item,index) of menuData")
11
+ li.aside-menu__menu__item(
12
+ :key="`menu-item-${index}`"
13
+ :class="{'aside-menu__menu__item--active' : $route.name == item.nombreRuta}"
14
+ )
15
+ router-link.aside-menu__menu__item__lnk(
16
+ :to="{name: item.nombreRuta}"
17
+ @click.native="toggleMenu(false)"
18
+ )
19
+ span(v-if="item.hasOwnProperty('numero')" v-html="item.numero")
20
+ i(v-if="item.icono" :class="item.icono")
21
+ span(v-html="item.titulo")
22
+
23
+ template(
24
+ v-if="item.hasOwnProperty('subMenu') && item.subMenu.length"
25
+ )
26
+ li.aside-menu__menu__item--sub-menu(
27
+ v-for="(subItem, subItemIndex) of item.subMenu"
28
+ :key="`submenu-item-${index}-${subItemIndex}`"
29
+ :class="{'aside-menu__menu__item--sub-menu--active': $route.hash == `#${subItem.hash}`}"
30
+ )
31
+ router-link.aside-menu__menu__item__lnk(
32
+ :to="{ name: item.nombreRuta , hash: `#${subItem.hash}` }"
33
+ @click.native="toggleMenu(false)"
34
+ )
35
+ i(v-if="subItem.icono" :class="subItem.icono")
36
+ span(v-if="subItem.numero" v-html="subItem.numero")
37
+ span(v-html="subItem.titulo")
38
+
39
+ ul.aside-menu__sec-menu
40
+ template(
41
+ v-for="(secMenuItem, secMenuIndex) of subMenuData",
42
+ )
43
+ li.aside-menu__sec-menu__item(
44
+ :key="`secMenu-item-${secMenuIndex}`"
45
+ :class="{'d-none':secMenuItem.titulo.includes('material') && isLocal()}"
46
+ )
47
+ a.aside-menu__sec-menu__item__lnk(
48
+ v-if="secMenuItem.hasOwnProperty('download')"
49
+ :href="obtenerLink(secMenuItem.download)"
50
+ target="_blank"
51
+ )
52
+ i(v-if="secMenuItem.icono" :class="secMenuItem.icono")
53
+ span(v-html="secMenuItem.titulo")
54
+
55
+ router-link.aside-menu__sec-menu__item__lnk(
56
+ v-else
57
+ :to="{name: secMenuItem.nombreRuta}"
58
+ @click.native="toggleMenu(false)"
59
+ )
60
+ i(v-if="secMenuItem.icono" :class="secMenuItem.icono")
61
+ span(v-html="secMenuItem.titulo")
62
+
63
+ </template>
64
+
65
+ <script>
66
+ export default {
67
+ name: 'AsideMenu',
68
+ computed: {
69
+ menuData() {
70
+ return this.$config.menuPrincipal.menu
71
+ },
72
+ subMenuData() {
73
+ return this.$config.menuPrincipal.subMenu
74
+ },
75
+ menuOpen() {
76
+ return this.$store.getters.isMenuOpen
77
+ },
78
+ },
79
+ watch: {
80
+ $route(to) {
81
+ if (to.name === 'inicio' || window.innerWidth <= 991) {
82
+ this.toggleMenu(false)
83
+ }
84
+ },
85
+ },
86
+ methods: {
87
+ toggleMenu(newVal) {
88
+ this.$store.dispatch('toggleMenu', newVal)
89
+ },
90
+ isLocal() {
91
+ return window.location.protocol === 'file:'
92
+ },
93
+ },
94
+ }
95
+ </script>
96
+
97
+ <style lang="sass">
98
+ .aside-menu
99
+ position: fixed
100
+ top: 70px
101
+ min-height: calc(100vh - 70px)
102
+ max-height: calc(100vh - 70px)
103
+ background-color: $color-sistema-g
104
+ transition: flex 0.5s ease-in-out, width 0.5s ease-in-out
105
+ overflow-x: hidden
106
+ z-index: 100001
107
+ width: 300px
108
+
109
+ &__black-background
110
+ position: fixed
111
+ inset: 0
112
+ top: 70px
113
+ background: transparentize($black, 0.2)
114
+ cursor: pointer
115
+
116
+ a
117
+ color: $color-sistema-a
118
+
119
+ &__content
120
+ width: 300px
121
+ display: flex
122
+ flex-direction: column
123
+ justify-content: space-between
124
+ min-height: calc(100vh - 70px)
125
+ max-height: calc(100vh - 70px)
126
+ border-right: 1px solid $color-sistema-e
127
+ position: absolute
128
+ background: $white
129
+
130
+ @media (max-height: 800px)
131
+ min-height: 800px
132
+ max-height: 800px
133
+ overflow-y: auto
134
+
135
+ &__header
136
+ padding: 10px
137
+ text-align: center
138
+ background-color: $color-sistema-e
139
+ h4
140
+ margin: 0
141
+
142
+ &__menu
143
+ overflow-y: auto
144
+ flex-grow: 1
145
+ list-style: none
146
+ padding-left: 0
147
+ margin-bottom: 0
148
+
149
+ &__item
150
+ &--active
151
+ .aside-menu__menu__item__lnk
152
+ background-color: $color-sistema-e
153
+ font-weight: $base-bold-font-weight
154
+
155
+ &:hover
156
+ background-color: $color-sistema-e
157
+
158
+ &--sub-menu
159
+ @extend .aside-menu__menu__item
160
+ padding-left: 10px
161
+ &--active
162
+ .aside-menu__menu__item__lnk
163
+ background-color: $color-sistema-e
164
+ font-weight: $base-bold-font-weight
165
+ position: relative
166
+ &::before
167
+ content: ''
168
+ display: block
169
+ position: absolute
170
+ left: 0
171
+ bottom: 0
172
+ top: 0
173
+ width: 4px
174
+ border-radius: 2px
175
+ background-color: $color-acento-contenido
176
+
177
+ &__lnk
178
+ display: flex
179
+ align-items: center
180
+ padding: 10px 15px
181
+ line-height: 1.1em
182
+
183
+
184
+ span, i
185
+ margin-right: 10px
186
+ &:last-child
187
+ margin-right: 0
188
+
189
+ &__sec-menu
190
+ background-color: $color-sistema-e
191
+ padding: 10px 0
192
+ flex-shrink: 0
193
+ margin-bottom: 0
194
+
195
+ &__item
196
+ @extend .aside-menu__menu__item
197
+ padding: 10px 15px
198
+
199
+ &__lnk
200
+ @extend .aside-menu__menu__item__lnk
201
+ padding: 0
202
+ border-radius: 1em
203
+ i
204
+ display: block
205
+ width: 2em
206
+ height: 2em
207
+ padding: 0.5em 0
208
+ text-align: center
209
+ background-color: $white
210
+ border-radius: 50%
211
+ &:hover
212
+ background-color: $white
213
+
214
+ @media (max-width: $bp-max-xs)
215
+ &__sec-menu
216
+ padding-bottom: 110px
217
+
218
+ .main-menu-enter-active
219
+ animation: main-menu-open-animation .3s;
220
+ .aside-menu__black-background
221
+ animation: main-menu-background-animation .3s
222
+
223
+
224
+ .main-menu-leave-active
225
+ animation: main-menu-open-animation .3s reverse
226
+ .aside-menu__black-background
227
+ animation: main-menu-background-animation .3s reverse
228
+
229
+ @keyframes main-menu-open-animation
230
+ 0%
231
+ width: 0
232
+
233
+ 100%
234
+ width: 300px
235
+
236
+ @keyframes main-menu-background-animation
237
+ 0%
238
+ opacity: 0
239
+
240
+ 100%
241
+ opacity: 1
242
+ </style>
@@ -0,0 +1,66 @@
1
+ <template lang="pug">
2
+ .container-fluid.banner-interno
3
+ .banner-interno__fondo(:style="{'background-image': `url(${globalData.fondoBannerPrincipal})`}")
4
+ .container
5
+ .banner-interno__titulo.py-5
6
+ .banner-interno__titulo__icono.me-3(v-if="icono.length")
7
+ i(:class="icono")
8
+ h2.mb-0(v-html="titulo")
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'BannerInterno',
14
+ props: {
15
+ icono: {
16
+ type: String,
17
+ default: '',
18
+ },
19
+ titulo: {
20
+ type: String,
21
+ default: '',
22
+ },
23
+ },
24
+ data: () => ({}),
25
+ computed: {
26
+ globalData() {
27
+ return this.$config.global
28
+ },
29
+ },
30
+ }
31
+ </script>
32
+
33
+ <style lang="sass">
34
+ .banner-interno
35
+ position: relative
36
+
37
+ &__fondo
38
+ position: absolute
39
+ top: 0
40
+ bottom: -50px
41
+ left: 0
42
+ right: 0
43
+ background-color: $color-banner-fondo
44
+ background-size: cover
45
+ background-position: center
46
+
47
+ &__titulo
48
+ display: flex
49
+ align-items: center
50
+ &__icono
51
+ display: block
52
+ width: 32px
53
+ height: 32px
54
+ border-radius: 50%
55
+ background-color: $color-banner-text
56
+ position: relative
57
+ i
58
+ color: $color-banner-fondo
59
+ position: absolute
60
+ left: 50%
61
+ top: 50%
62
+ transform: translate(-50%,-50%)
63
+ h1, h2, h3, h4, h5, h6
64
+ color: $color-banner-text
65
+ line-height: 1.1em
66
+ </style>
@@ -0,0 +1,104 @@
1
+ <template lang="pug">
2
+ .banner-principal
3
+ .container.tarjeta(
4
+ :style="{'background-image': globalData.fondoBannerPrincipal ? `url(${globalData.fondoBannerPrincipal})` : 'none'}"
5
+ )
6
+ .row.banner-principal__row
7
+ .col-lg-7.col-xxl-5.ps-4.ps-sm-5.py-4.py-sm-5.banner-principal__info
8
+ .banner-principal__componente
9
+ h1.mb-0(v-html="globalData.Name")
10
+ .banner-principal__descripcion
11
+ p.mb-0(v-html="globalData.Description")
12
+ .banner-principal__accion
13
+ router-link.boton(:to="{name: iniciarLnk.nombreRuta }")
14
+ span.me-1 Ver más
15
+ i.fas.fa-angle-right
16
+
17
+ .d-none.d-lg-block.col-lg-5.px-0.banner-principal__img
18
+ img(:src="globalData.imagenBannerPrincipal")
19
+ div(v-for="img in extraImgs" :class="img.clases")
20
+ img(:src="img.imagen")
21
+ </template>
22
+
23
+ <script>
24
+ import mixins from '../plantillaMixins'
25
+ export default {
26
+ name: 'BannerPrincipal',
27
+ mixins: [mixins],
28
+ computed: {
29
+ globalData() {
30
+ return this.$config.global
31
+ },
32
+ extraImgs() {
33
+ return this.$config.global.imagenesDecorativasBanner
34
+ },
35
+ },
36
+ }
37
+ </script>
38
+
39
+ <style lang="sass">
40
+ .banner-principal
41
+ p, h1, h2, h3, h4, h5, h6
42
+ color: $color-banner-text
43
+
44
+ .tarjeta
45
+ background-color: $color-banner-fondo
46
+ background-size: cover
47
+ background-position: center
48
+
49
+ &__img
50
+ position: relative
51
+ &>div
52
+ position: absolute
53
+
54
+ &__info
55
+ display: flex
56
+ flex-direction: column
57
+ justify-content: center
58
+
59
+ &__programa
60
+ display: flex
61
+ align-items: center
62
+ margin-bottom: 20px
63
+
64
+ &__componente
65
+ margin-bottom: 20px
66
+ h1
67
+ line-height: 1.1em
68
+
69
+ @media (max-width: $bp-max-xs)
70
+ font-size: 2em
71
+
72
+ &__descripcion
73
+ margin-bottom: 20px
74
+
75
+ &__row
76
+ @if $banner-principal-img-x == 'derecha'
77
+ justify-content: space-between
78
+ @else
79
+ justify-content: space-around
80
+ .banner-principal__img
81
+ padding-right: 1.5rem!important
82
+ @media (min-width: $bp-min-sm)
83
+ .banner-principal__img
84
+ padding-right: 3rem!important
85
+
86
+ &__img
87
+ @if $banner-principal-img-y == 'arriba'
88
+ align-self: flex-start
89
+ padding-bottom: 1.5rem
90
+ @media (min-width: $bp-min-sm)
91
+ padding-bottom: 3rem!important
92
+ @else if $banner-principal-img-y == 'abajo'
93
+ align-self: flex-end
94
+ padding-top: 1.5rem
95
+ @media (min-width: $bp-min-sm)
96
+ padding-top: 3rem!important
97
+ @else
98
+ align-self: center
99
+ padding-top: 1.5rem
100
+ padding-bottom: 1.5rem
101
+ @media (min-width: $bp-min-sm)
102
+ padding-top: 3rem!important
103
+ padding-bottom: 3rem!important
104
+ </style>