@asd20/ui 3.2.1011 → 3.2.1013
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/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
type="checkbox"
|
|
17
17
|
@change="toggle"
|
|
18
18
|
/>
|
|
19
|
-
<label :for="id" @click.prevent="$refs.checkbox.click()">
|
|
19
|
+
<label :class="id" :for="id" @click.prevent="$refs.checkbox.click()">
|
|
20
20
|
<span>{{ label }}</span>
|
|
21
21
|
<span v-if="description" class="asd20-checkbox__description">{{
|
|
22
22
|
description
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
<div v-if="shortDescription" class="lead short-description">
|
|
20
20
|
<span v-html="shortDescription"></span>
|
|
21
21
|
<a v-if="detailLink" :href="detailLink">{{ detailLinkLabel }}</a>
|
|
22
|
+
<span class="external-link" v-if="isAbsoluteUrl(detailLink)">
|
|
23
|
+
<asd20-icon name="external" size="sm" />
|
|
24
|
+
</span>
|
|
22
25
|
</div>
|
|
23
26
|
<p
|
|
24
27
|
v-if="longDescription"
|
|
@@ -48,9 +51,11 @@
|
|
|
48
51
|
|
|
49
52
|
<script>
|
|
50
53
|
import Asd20Button from '../Asd20Button'
|
|
54
|
+
import Asd20Icon from '../Asd20Icon'
|
|
55
|
+
|
|
51
56
|
export default {
|
|
52
57
|
name: 'Asd20Messaging',
|
|
53
|
-
components: { Asd20Button },
|
|
58
|
+
components: { Asd20Button, Asd20Icon },
|
|
54
59
|
props: {
|
|
55
60
|
images: { type: Array, default: () => [] },
|
|
56
61
|
heading: { type: String, default: '' },
|
|
@@ -67,10 +72,7 @@ export default {
|
|
|
67
72
|
|
|
68
73
|
computed: {
|
|
69
74
|
hash() {
|
|
70
|
-
return this.heading
|
|
71
|
-
.toLowerCase()
|
|
72
|
-
.split(' ')
|
|
73
|
-
.join('-')
|
|
75
|
+
return this.heading.toLowerCase().split(' ').join('-')
|
|
74
76
|
},
|
|
75
77
|
classes() {
|
|
76
78
|
return {
|
|
@@ -94,7 +96,11 @@ export default {
|
|
|
94
96
|
if (coverImage) {
|
|
95
97
|
const coverImageFiles = coverImage.files || []
|
|
96
98
|
const coverImageFull = coverImageFiles.find(f => f.name === 'full')
|
|
97
|
-
if (
|
|
99
|
+
if (
|
|
100
|
+
coverImageFull &&
|
|
101
|
+
coverImageFull.filename &&
|
|
102
|
+
coverImageFull.filename.includes('headerimage')
|
|
103
|
+
) {
|
|
98
104
|
messageImageUrl = ''
|
|
99
105
|
} else {
|
|
100
106
|
messageImageUrl = coverImageFull
|
|
@@ -112,6 +118,13 @@ export default {
|
|
|
112
118
|
return coverImage.metadata.alt
|
|
113
119
|
},
|
|
114
120
|
},
|
|
121
|
+
methods: {
|
|
122
|
+
isAbsoluteUrl(url) {
|
|
123
|
+
if (!url || typeof url !== 'string') return false
|
|
124
|
+
const s = url.trim()
|
|
125
|
+
return /^https?:\/\//i.test(s) || s.startsWith('//')
|
|
126
|
+
},
|
|
127
|
+
},
|
|
115
128
|
}
|
|
116
129
|
</script>
|
|
117
130
|
|
|
@@ -159,6 +172,11 @@ export default {
|
|
|
159
172
|
}
|
|
160
173
|
&__content {
|
|
161
174
|
align-self: stretch;
|
|
175
|
+
.external-link {
|
|
176
|
+
display: inline-block;
|
|
177
|
+
line-height: 0;
|
|
178
|
+
vertical-align: -0.3rem;
|
|
179
|
+
}
|
|
162
180
|
}
|
|
163
181
|
&__body-content {
|
|
164
182
|
margin-bottom: space(1);
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
:target="
|
|
109
109
|
!item.url || item.url.startsWith('/') ? undefined : '_blank'
|
|
110
110
|
"
|
|
111
|
-
>{{ item.title }}
|
|
111
|
+
>{{ item.title }} <asd20-icon v-if="isAbsoluteUrl(item.url)" name="external" size="sm" style="margin-left: 0.25rem" /></a
|
|
112
112
|
>
|
|
113
113
|
</div>
|
|
114
114
|
</div>
|
|
@@ -290,6 +290,11 @@ export default {
|
|
|
290
290
|
shiftKeyNotPressed() {
|
|
291
291
|
this.next()
|
|
292
292
|
},
|
|
293
|
+
isAbsoluteUrl(url) {
|
|
294
|
+
if (!url || typeof url !== 'string') return false
|
|
295
|
+
const s = url.trim()
|
|
296
|
+
return /^https?:\/\//i.test(s) || s.startsWith('//')
|
|
297
|
+
},
|
|
293
298
|
},
|
|
294
299
|
}
|
|
295
300
|
</script>
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
"id": "d7d84e8e-446e-11ea-9d5c-c35d5b2134f1",
|
|
511
511
|
"title": "Meals and nutrition details.",
|
|
512
512
|
"trackingCode": null,
|
|
513
|
-
"url": "/student-services/nutrition-and-food-services"
|
|
513
|
+
"url": "https://asd20.org/student-services/nutrition-and-food-services"
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
],
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
"parentMenuItemId": "de03c667-3742-11ea-a71e-a93d820ffeff",
|
|
831
831
|
"order": 1,
|
|
832
832
|
"title": "Alternative Education",
|
|
833
|
-
"url": "/academics/alternative-education",
|
|
833
|
+
"url": "https://asd20.org/academics/alternative-education",
|
|
834
834
|
"icon": ""
|
|
835
835
|
},
|
|
836
836
|
{
|