@explorer-1/vue 0.2.94 → 0.2.96
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.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/components/HeroLarge/HeroLarge.vue +10 -3
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +18 -15
- package/src/components/NavJumpMenu/NavJumpMenu.vue +3 -0
- package/src/components/NavSecondary/NavSecondary.vue +2 -1
- package/src/templates/edu/PageEduLesson/PageEduLessonSection.vue +0 -1
- package/src/utils/mixins.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @explorer-1/vue
|
|
2
2
|
|
|
3
|
+
## 0.2.96
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2735223: Fixing link logic in HomepageTeaserBlock
|
|
8
|
+
|
|
9
|
+
## 0.2.95
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c06cf28: Adding srcset to HeroLarge component
|
|
14
|
+
- 4bcdacd: Hides Jump Menu when overscrolling
|
|
15
|
+
- f750419: Fixing anchor link positioning on EDU Lesson pages.
|
|
16
|
+
|
|
3
17
|
## 0.2.94
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<picture v-if="image && image.src">
|
|
5
5
|
<source
|
|
6
6
|
media="(min-width: 768px)"
|
|
7
|
-
:srcset="
|
|
7
|
+
:srcset="theSrcSet"
|
|
8
8
|
/>
|
|
9
9
|
<source
|
|
10
10
|
media="(min-width: 420px)"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
</template>
|
|
72
72
|
<script lang="ts">
|
|
73
73
|
import { defineComponent } from 'vue'
|
|
74
|
-
import { mixinTransparentHeader } from './../../utils/mixins'
|
|
74
|
+
import { mixinTransparentHeader, mixinGetSrcSet } from './../../utils/mixins'
|
|
75
75
|
import { mapStores } from 'pinia'
|
|
76
76
|
import { useThemeStore } from '../../store/theme'
|
|
77
77
|
import BasePill from './../BasePill/BasePill.vue'
|
|
@@ -119,7 +119,14 @@ export default defineComponent({
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
computed: {
|
|
122
|
-
...mapStores(useThemeStore)
|
|
122
|
+
...mapStores(useThemeStore),
|
|
123
|
+
theSrcSet() {
|
|
124
|
+
return this.image
|
|
125
|
+
? mixinGetSrcSet(this.image)
|
|
126
|
+
? mixinGetSrcSet(this.image)
|
|
127
|
+
: this.image.srcSet
|
|
128
|
+
: undefined
|
|
129
|
+
}
|
|
123
130
|
},
|
|
124
131
|
mounted() {
|
|
125
132
|
mixinTransparentHeader()
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
class="lg:pr-14"
|
|
34
34
|
:text="data.paragraph"
|
|
35
35
|
/>
|
|
36
|
-
<template v-if="data.link
|
|
36
|
+
<template v-if="data.link || theExternalLink">
|
|
37
37
|
<BaseLink
|
|
38
38
|
variant="primary"
|
|
39
39
|
class="mt-5"
|
|
40
40
|
link-class="inline-block"
|
|
41
41
|
caret-wrapper-class="py-2"
|
|
42
|
-
:href="
|
|
43
|
-
:to="data.link.page ? data.link.page.url :
|
|
42
|
+
:href="theExternalLink"
|
|
43
|
+
:to="data.link.page ? data.link.page.url : undefined"
|
|
44
44
|
external-target-blank
|
|
45
45
|
>
|
|
46
46
|
{{ data.link.text }}
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
v-if="theCard.image"
|
|
61
61
|
class="relative h-auto"
|
|
62
62
|
>
|
|
63
|
-
<template v-if="theCard.link
|
|
63
|
+
<template v-if="theCard.link || theCardExternalLink">
|
|
64
64
|
<BaseLink
|
|
65
65
|
variant="none"
|
|
66
66
|
link-class="block"
|
|
67
67
|
:aria-label="theCard.link.text || 'Learn more'"
|
|
68
|
-
:href="
|
|
69
|
-
:to="theCard.link.page
|
|
68
|
+
:href="theCardExternalLink"
|
|
69
|
+
:to="theCard.link.page?.url || undefined"
|
|
70
70
|
external-target-blank
|
|
71
71
|
>
|
|
72
72
|
<HomepageTeaserBlockCardImage :data="theCard" />
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
{{ theCard.description }}
|
|
88
88
|
</p>
|
|
89
89
|
|
|
90
|
-
<template v-if="theCard.link
|
|
90
|
+
<template v-if="theCard.link || theCardExternalLink">
|
|
91
91
|
<BaseLink
|
|
92
92
|
variant="primary"
|
|
93
93
|
class="mt-3"
|
|
94
94
|
link-class="inline-block"
|
|
95
95
|
caret-wrapper-class="py-2"
|
|
96
|
-
:href="
|
|
97
|
-
:to="theCard.link.page ? theCard.link.page.url :
|
|
96
|
+
:href="theCardExternalLink"
|
|
97
|
+
:to="theCard.link.page ? theCard.link.page.url : undefined"
|
|
98
98
|
external-target-blank
|
|
99
99
|
>
|
|
100
100
|
{{ theCard.link.text }}
|
|
@@ -135,11 +135,11 @@ export default defineComponent({
|
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
137
|
computed: {
|
|
138
|
-
theCard(): object |
|
|
139
|
-
if (this.data
|
|
140
|
-
return this.data
|
|
138
|
+
theCard(): object | undefined {
|
|
139
|
+
if (this.data?.card && this.data.card.length > 0) {
|
|
140
|
+
return this.data?.card[0]
|
|
141
141
|
}
|
|
142
|
-
return
|
|
142
|
+
return undefined
|
|
143
143
|
},
|
|
144
144
|
hasCoverImage(): boolean {
|
|
145
145
|
if (this.data.coverImage && this.data.coverImage.src) {
|
|
@@ -147,8 +147,11 @@ export default defineComponent({
|
|
|
147
147
|
}
|
|
148
148
|
return false
|
|
149
149
|
},
|
|
150
|
-
|
|
151
|
-
return mixinGetExternalLink(this.data
|
|
150
|
+
theExternalLink() {
|
|
151
|
+
return mixinGetExternalLink(this.data?.link) || undefined
|
|
152
|
+
},
|
|
153
|
+
theCardExternalLink() {
|
|
154
|
+
return mixinGetExternalLink(this.theCard?.link) || undefined
|
|
152
155
|
},
|
|
153
156
|
theSrcSet() {
|
|
154
157
|
return this.data.coverImage
|
|
@@ -124,7 +124,6 @@ const { heading, blocks, image, procedures, text } = reactive(props)
|
|
|
124
124
|
@return math.div($pxValue, 16) * 1rem;
|
|
125
125
|
}
|
|
126
126
|
.PageEduLessonSection {
|
|
127
|
-
@apply overflow-x-hidden;
|
|
128
127
|
.PageEduProcedureSection {
|
|
129
128
|
.PageEduProcedureSectionSteps {
|
|
130
129
|
counter-reset: step;
|
package/src/utils/mixins.ts
CHANGED
|
@@ -217,9 +217,9 @@ export const mixinGetSrcSet = (srcSetObject: Partial<ImageObject>): string => {
|
|
|
217
217
|
}
|
|
218
218
|
// Use with RelatedLinkBlock to retrieve the external link to use with an href prop
|
|
219
219
|
export const mixinGetExternalLink = (link: RelatedLinkObject): string | undefined => {
|
|
220
|
-
if (link
|
|
220
|
+
if (link?.externalLink) {
|
|
221
221
|
return link.externalLink
|
|
222
|
-
} else if (link
|
|
222
|
+
} else if (link?.document) {
|
|
223
223
|
return link.document.url
|
|
224
224
|
}
|
|
225
225
|
return undefined
|