@asd20/ui 3.4.3 → 3.4.5
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/.eslintrc.js +1 -0
- package/package.json +1 -1
- package/src/components/organisms/Asd20AppHeader/index.vue +11 -2
- package/src/components/organisms/Asd20VideoHeaderContent/index.vue +0 -1
- package/src/components/templates/Asd20SchoolHomeTemplate/index.vue +40 -36
- package/src/components/templates/Asd20SchoolHomeVideoTemplate/index.vue +43 -38
package/.eslintrc.js
CHANGED
package/package.json
CHANGED
|
@@ -61,9 +61,10 @@ export default {
|
|
|
61
61
|
align-items: center;
|
|
62
62
|
flex-shrink: 0;
|
|
63
63
|
padding-bottom: 0.5rem;
|
|
64
|
+
padding-right: 0.5rem;
|
|
64
65
|
h1 {
|
|
65
66
|
margin: 0;
|
|
66
|
-
font-size: 1.
|
|
67
|
+
font-size: 1.2rem;
|
|
67
68
|
color: var(--color__on-primary);
|
|
68
69
|
flex-grow: 1;
|
|
69
70
|
width: 100%;
|
|
@@ -80,10 +81,12 @@ export default {
|
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
.asd20-district-logo {
|
|
84
|
+
position: absolute;
|
|
85
|
+
right: 0;
|
|
83
86
|
margin-left: auto;
|
|
84
87
|
margin-right: space(1);
|
|
85
88
|
height: 1.5rem;
|
|
86
|
-
|
|
89
|
+
padding: 0.75rem 0 0 0;
|
|
87
90
|
&::v-deep svg {
|
|
88
91
|
fill: #fff;
|
|
89
92
|
.district {
|
|
@@ -125,7 +128,13 @@ export default {
|
|
|
125
128
|
@media (min-width: 768px) {
|
|
126
129
|
.asd20-app-header {
|
|
127
130
|
align-items: flex-end;
|
|
131
|
+
&__title {
|
|
132
|
+
.icon-and-title h1 {
|
|
133
|
+
font-size: 1.5rem;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
128
136
|
.asd20-district-logo {
|
|
137
|
+
position:block;
|
|
129
138
|
padding: 0 0 0.25rem 0;
|
|
130
139
|
height: space(1.5);
|
|
131
140
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="asd20-school-home-template">
|
|
3
3
|
<!-- Skip Nav -->
|
|
4
|
-
<asd20-skip-to
|
|
4
|
+
<asd20-skip-to/>
|
|
5
5
|
|
|
6
6
|
<!-- Site Navigation -->
|
|
7
7
|
<asd20-site-navigation
|
|
8
8
|
:navigation="navigation"
|
|
9
9
|
:action-items="actionItems"
|
|
10
|
-
@update:menuOpen="$emit('update:menuOpen', $event)"
|
|
11
10
|
:menu-open="menuOpen"
|
|
12
|
-
@update:searchOpen="$emit('update:searchOpen', $event)"
|
|
13
11
|
:search-open="searchOpen"
|
|
14
|
-
:organization="organization"
|
|
15
12
|
:organization-options="organizationOptions"
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
:organization="organization"
|
|
14
|
+
@update:menuOpen="$emit('update:menuOpen', $event)"
|
|
15
|
+
@update:searchOpen="$emit('update:searchOpen', $event)"
|
|
16
|
+
/>
|
|
18
17
|
|
|
19
18
|
<!-- Banner Notifications -->
|
|
20
19
|
<client-only>
|
|
@@ -23,13 +22,13 @@
|
|
|
23
22
|
group-type="banner"
|
|
24
23
|
@dismiss="$emit('dismiss-notification', $event)"
|
|
25
24
|
@toggle-all="$emit('toggle-all')"
|
|
26
|
-
|
|
25
|
+
/>
|
|
27
26
|
</client-only>
|
|
28
27
|
|
|
29
28
|
<!-- Page Header -->
|
|
30
29
|
<asd20-school-homepage-header
|
|
31
|
-
id="page-header"
|
|
32
30
|
v-if="pageHeaderContent"
|
|
31
|
+
id="page-header"
|
|
33
32
|
v-bind="pageHeaderContent"
|
|
34
33
|
fullscreen
|
|
35
34
|
>
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
:organization-options="organizationOptions"
|
|
42
41
|
:organization="organization"
|
|
43
42
|
logo-size="lg"
|
|
44
|
-
|
|
43
|
+
/>
|
|
45
44
|
<a
|
|
46
45
|
v-if="websiteLogoProps && showLogo"
|
|
47
46
|
:href="websiteLogoProps.logoLink ? websiteLogoProps.logoLink : ''"
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
:aria-label="
|
|
58
57
|
websiteLogoProps.logoAlt ? websiteLogoProps.logoAlt : ''
|
|
59
58
|
"
|
|
60
|
-
|
|
59
|
+
>
|
|
61
60
|
</a>
|
|
62
61
|
<a
|
|
63
62
|
v-if="websiteLogoProps2 && showLogo"
|
|
@@ -75,7 +74,7 @@
|
|
|
75
74
|
:alt="
|
|
76
75
|
websiteLogoProps2.logoAlt ? websiteLogoProps2.logoAlt : ''
|
|
77
76
|
"
|
|
78
|
-
|
|
77
|
+
>
|
|
79
78
|
</a>
|
|
80
79
|
</div>
|
|
81
80
|
</client-only>
|
|
@@ -128,7 +127,7 @@
|
|
|
128
127
|
group-type="floating"
|
|
129
128
|
@dismiss="$emit('dismiss-notification', $event)"
|
|
130
129
|
@toggle-all="$emit('toggle-all')"
|
|
131
|
-
|
|
130
|
+
/>
|
|
132
131
|
</client-only>
|
|
133
132
|
</div>
|
|
134
133
|
</template>
|
|
@@ -140,30 +139,29 @@
|
|
|
140
139
|
</asd20-quicklinks-menu>
|
|
141
140
|
|
|
142
141
|
<!-- Page Content -->
|
|
143
|
-
<asd20-page-content> </asd20-page-content>
|
|
144
142
|
|
|
145
143
|
<!-- Feeds -->
|
|
146
144
|
<asd20-feeds-section
|
|
147
145
|
:announcements="announcements"
|
|
148
146
|
:announcements-feed-props="announcementsFeedProps"
|
|
149
|
-
@announcements-in-view="$emit('announcements-in-view')"
|
|
150
147
|
:stories="stories"
|
|
151
148
|
:stories-feed-props="storiesFeedProps"
|
|
152
|
-
@stories-in-view="$emit('stories-in-view')"
|
|
153
|
-
:events="events"
|
|
154
|
-
:events-feed-props="eventsFeedProps"
|
|
155
|
-
@events-in-view="$emit('events-in-view')"
|
|
156
149
|
:organization="organization"
|
|
150
|
+
:events-feed-props="eventsFeedProps"
|
|
151
|
+
:events="events"
|
|
157
152
|
:organization-options="organizationOptions"
|
|
158
|
-
|
|
153
|
+
@announcements-in-view="$emit('announcements-in-view')"
|
|
154
|
+
@stories-in-view="$emit('stories-in-view')"
|
|
155
|
+
@events-in-view="$emit('events-in-view')"
|
|
156
|
+
/>
|
|
159
157
|
|
|
160
158
|
<!-- Footer -->
|
|
161
159
|
<asd20-page-footer
|
|
162
160
|
:organization="organization"
|
|
163
|
-
:
|
|
164
|
-
:
|
|
165
|
-
:
|
|
166
|
-
:
|
|
161
|
+
:social-links="socialLinks"
|
|
162
|
+
:disclosure-links="disclosureLinks"
|
|
163
|
+
:website-logo-props="websiteLogoProps"
|
|
164
|
+
:website-logo-props2="websiteLogoProps2"
|
|
167
165
|
>
|
|
168
166
|
<slot name="page-footer" />
|
|
169
167
|
</asd20-page-footer>
|
|
@@ -183,7 +181,7 @@ import Asd20SchoolHomepageHeader from '../../../components/organisms/Asd20School
|
|
|
183
181
|
import Asd20PageFooter from '../../../components/organisms/Asd20PageFooter'
|
|
184
182
|
import Asd20SiteNavigation from '../../../components/organisms/Asd20SiteNavigation'
|
|
185
183
|
import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMenu'
|
|
186
|
-
import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
|
|
184
|
+
// import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
|
|
187
185
|
import Asd20NotificationGroup from '../../../components/organisms/Asd20NotificationGroup'
|
|
188
186
|
import Asd20FeedsSection from '../../../components/organisms/Asd20FeedsSection'
|
|
189
187
|
import Asd20OrganizationPicker from '../../../components/organisms/Asd20OrganizationPicker'
|
|
@@ -196,14 +194,9 @@ import _get from 'lodash/get'
|
|
|
196
194
|
export default {
|
|
197
195
|
name: 'Asd20SchoolHomeTemplate',
|
|
198
196
|
|
|
199
|
-
mixins: [pageTemplateMixin],
|
|
200
|
-
|
|
201
|
-
directives: { scrollTrack },
|
|
202
|
-
|
|
203
197
|
components: {
|
|
204
198
|
Asd20SkipTo,
|
|
205
199
|
Asd20SchoolHomepageHeader,
|
|
206
|
-
Asd20PageContent,
|
|
207
200
|
Asd20PageFooter,
|
|
208
201
|
Asd20SiteNavigation,
|
|
209
202
|
Asd20QuicklinksMenu,
|
|
@@ -213,6 +206,8 @@ export default {
|
|
|
213
206
|
Asd20LanguageTranslation,
|
|
214
207
|
Asd20BlockSchedule,
|
|
215
208
|
},
|
|
209
|
+
directives: { scrollTrack },
|
|
210
|
+
mixins: [pageTemplateMixin],
|
|
216
211
|
props: {
|
|
217
212
|
languageCode: { type: String, default: 'en' },
|
|
218
213
|
},
|
|
@@ -257,15 +252,30 @@ export default {
|
|
|
257
252
|
},
|
|
258
253
|
blockEvent() {
|
|
259
254
|
if (!this.events || this.events.length === 0) return null
|
|
255
|
+
|
|
256
|
+
const isSameLocalDay = (a, b) =>
|
|
257
|
+
a.getFullYear() === b.getFullYear() &&
|
|
258
|
+
a.getMonth() === b.getMonth() &&
|
|
259
|
+
a.getDate() === b.getDate()
|
|
260
|
+
|
|
261
|
+
const today = new Date()
|
|
262
|
+
|
|
260
263
|
return (
|
|
261
264
|
this.events.find(
|
|
262
265
|
e =>
|
|
263
266
|
Array.isArray(e.calendarKeywords) &&
|
|
264
|
-
e.calendarKeywords.includes('Block Schedule')
|
|
267
|
+
e.calendarKeywords.includes('Block Schedule') &&
|
|
268
|
+
isSameLocalDay(new Date(e.start), today)
|
|
265
269
|
) || null
|
|
266
270
|
)
|
|
267
271
|
},
|
|
268
272
|
},
|
|
273
|
+
watch: {
|
|
274
|
+
// If the organization changes (picker, route change, etc.), refetch.
|
|
275
|
+
'organization.id': function () {
|
|
276
|
+
this.$emit('events-in-view')
|
|
277
|
+
},
|
|
278
|
+
},
|
|
269
279
|
mounted() {
|
|
270
280
|
this.showLogo = window.innerWidth >= 1350
|
|
271
281
|
window.addEventListener('resize', this.handleResize)
|
|
@@ -274,12 +284,6 @@ export default {
|
|
|
274
284
|
this.$emit('events-in-view')
|
|
275
285
|
}
|
|
276
286
|
},
|
|
277
|
-
watch: {
|
|
278
|
-
// If the organization changes (picker, route change, etc.), refetch.
|
|
279
|
-
'organization.id': function () {
|
|
280
|
-
this.$emit('events-in-view')
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
287
|
methods: {
|
|
284
288
|
handleResize() {
|
|
285
289
|
this.showLogo = window.innerWidth >= 1350
|
|
@@ -7,14 +7,13 @@
|
|
|
7
7
|
<asd20-site-navigation
|
|
8
8
|
:navigation="navigation"
|
|
9
9
|
:action-items="actionItems"
|
|
10
|
-
@update:menuOpen="$emit('update:menuOpen', $event)"
|
|
11
10
|
:menu-open="menuOpen"
|
|
12
|
-
@update:searchOpen="$emit('update:searchOpen', $event)"
|
|
13
11
|
:search-open="searchOpen"
|
|
14
12
|
:organization="organization"
|
|
15
13
|
:organization-options="organizationOptions"
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
@update:menuOpen="$emit('update:menuOpen', $event)"
|
|
15
|
+
@update:searchOpen="$emit('update:searchOpen', $event)"
|
|
16
|
+
/>
|
|
18
17
|
|
|
19
18
|
<!-- Banner Notifications -->
|
|
20
19
|
<client-only>
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
group-type="banner"
|
|
24
23
|
@dismiss="$emit('dismiss-notification', $event)"
|
|
25
24
|
@toggle-all="$emit('toggle-all')"
|
|
26
|
-
|
|
25
|
+
/>
|
|
27
26
|
</client-only>
|
|
28
27
|
|
|
29
28
|
<!-- Page Header -->
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
:organization-options="organizationOptions"
|
|
42
41
|
:organization="organization"
|
|
43
42
|
logo-size="lg"
|
|
44
|
-
|
|
43
|
+
/>
|
|
45
44
|
<a
|
|
46
45
|
v-if="websiteLogoProps"
|
|
47
46
|
:href="websiteLogoProps.logoLink ? websiteLogoProps.logoLink : ''"
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
: ''
|
|
55
54
|
"
|
|
56
55
|
:alt="websiteLogoProps.logoAlt ? websiteLogoProps.logoAlt : ''"
|
|
57
|
-
|
|
56
|
+
>
|
|
58
57
|
</a>
|
|
59
58
|
<a
|
|
60
59
|
v-if="websiteLogoProps2"
|
|
@@ -72,7 +71,7 @@
|
|
|
72
71
|
:alt="
|
|
73
72
|
websiteLogoProps2.logoAlt ? websiteLogoProps2.logoAlt : ''
|
|
74
73
|
"
|
|
75
|
-
|
|
74
|
+
>
|
|
76
75
|
</a>
|
|
77
76
|
</div>
|
|
78
77
|
</client-only>
|
|
@@ -128,7 +127,7 @@
|
|
|
128
127
|
group-type="floating"
|
|
129
128
|
@dismiss="$emit('dismiss-notification', $event)"
|
|
130
129
|
@toggle-all="$emit('toggle-all')"
|
|
131
|
-
|
|
130
|
+
/>
|
|
132
131
|
</client-only>
|
|
133
132
|
</div>
|
|
134
133
|
</template>
|
|
@@ -140,30 +139,29 @@
|
|
|
140
139
|
</asd20-quicklinks-menu>
|
|
141
140
|
|
|
142
141
|
<!-- Page Content -->
|
|
143
|
-
<asd20-page-content> </asd20-page-content>
|
|
144
142
|
|
|
145
143
|
<!-- Feeds -->
|
|
146
144
|
<asd20-feeds-section
|
|
147
145
|
:announcements="announcements"
|
|
148
146
|
:announcements-feed-props="announcementsFeedProps"
|
|
149
|
-
@announcements-in-view="$emit('announcements-in-view')"
|
|
150
147
|
:stories="stories"
|
|
151
148
|
:stories-feed-props="storiesFeedProps"
|
|
152
|
-
@stories-in-view="$emit('stories-in-view')"
|
|
153
149
|
:events="events"
|
|
154
150
|
:events-feed-props="eventsFeedProps"
|
|
155
|
-
@events-in-view="$emit('events-in-view')"
|
|
156
151
|
:organization="organization"
|
|
157
152
|
:organization-options="organizationOptions"
|
|
158
|
-
|
|
153
|
+
@announcements-in-view="$emit('announcements-in-view')"
|
|
154
|
+
@stories-in-view="$emit('stories-in-view')"
|
|
155
|
+
@events-in-view="$emit('events-in-view')"
|
|
156
|
+
/>
|
|
159
157
|
|
|
160
158
|
<!-- Footer -->
|
|
161
159
|
<asd20-page-footer
|
|
162
160
|
:organization="organization"
|
|
163
|
-
:
|
|
164
|
-
:
|
|
165
|
-
:
|
|
166
|
-
:
|
|
161
|
+
:social-links="socialLinks"
|
|
162
|
+
:disclosure-links="disclosureLinks"
|
|
163
|
+
:website-logo-props="websiteLogoProps"
|
|
164
|
+
:website-logo-props2="websiteLogoProps2"
|
|
167
165
|
>
|
|
168
166
|
<slot name="page-footer" />
|
|
169
167
|
</asd20-page-footer>
|
|
@@ -183,7 +181,7 @@ import Asd20SchoolHomepageVideoHeader from '../../../components/organisms/Asd20S
|
|
|
183
181
|
import Asd20PageFooter from '../../../components/organisms/Asd20PageFooter'
|
|
184
182
|
import Asd20SiteNavigation from '../../../components/organisms/Asd20SiteNavigation'
|
|
185
183
|
import Asd20QuicklinksMenu from '../../../components/organisms/Asd20QuicklinksMenu'
|
|
186
|
-
import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
|
|
184
|
+
// import Asd20PageContent from '../../../components/organisms/Asd20PageContent'
|
|
187
185
|
import Asd20NotificationGroup from '../../../components/organisms/Asd20NotificationGroup'
|
|
188
186
|
import Asd20FeedsSection from '../../../components/organisms/Asd20FeedsSection'
|
|
189
187
|
import Asd20OrganizationPicker from '../../../components/organisms/Asd20OrganizationPicker'
|
|
@@ -191,19 +189,13 @@ import Asd20LanguageTranslation from '../../molecules/Asd20LanguageTranslation'
|
|
|
191
189
|
import Asd20BlockSchedule from '../../molecules/Asd20BlockSchedule'
|
|
192
190
|
|
|
193
191
|
// Helpers
|
|
194
|
-
import _get from 'lodash/get'
|
|
195
192
|
|
|
196
193
|
export default {
|
|
197
194
|
name: 'Asd20SchoolHomeVideoTemplate',
|
|
198
195
|
|
|
199
|
-
mixins: [pageTemplateMixin],
|
|
200
|
-
|
|
201
|
-
directives: { scrollTrack },
|
|
202
|
-
|
|
203
196
|
components: {
|
|
204
197
|
Asd20SkipTo,
|
|
205
198
|
Asd20SchoolHomepageVideoHeader,
|
|
206
|
-
Asd20PageContent,
|
|
207
199
|
Asd20PageFooter,
|
|
208
200
|
Asd20SiteNavigation,
|
|
209
201
|
Asd20QuicklinksMenu,
|
|
@@ -213,33 +205,46 @@ export default {
|
|
|
213
205
|
Asd20LanguageTranslation,
|
|
214
206
|
Asd20BlockSchedule,
|
|
215
207
|
},
|
|
208
|
+
|
|
209
|
+
mixins: [pageTemplateMixin],
|
|
210
|
+
|
|
211
|
+
directives: { scrollTrack },
|
|
216
212
|
props: {
|
|
217
213
|
languageCode: { type: String, default: 'en' },
|
|
218
214
|
},
|
|
219
|
-
mounted() {
|
|
220
|
-
// If nothing is loaded yet, ask parent to load events now.
|
|
221
|
-
if (!this.events || this.events.length === 0) {
|
|
222
|
-
this.$emit('events-in-view')
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
watch: {
|
|
226
|
-
// If the organization changes (picker, route change, etc.), refetch.
|
|
227
|
-
'organization.id': function () {
|
|
228
|
-
this.$emit('events-in-view')
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
215
|
computed: {
|
|
232
216
|
blockEvent() {
|
|
233
217
|
if (!this.events || this.events.length === 0) return null
|
|
218
|
+
|
|
219
|
+
const isSameLocalDay = (a, b) =>
|
|
220
|
+
a.getFullYear() === b.getFullYear() &&
|
|
221
|
+
a.getMonth() === b.getMonth() &&
|
|
222
|
+
a.getDate() === b.getDate()
|
|
223
|
+
|
|
224
|
+
const today = new Date()
|
|
225
|
+
|
|
234
226
|
return (
|
|
235
227
|
this.events.find(
|
|
236
228
|
e =>
|
|
237
229
|
Array.isArray(e.calendarKeywords) &&
|
|
238
|
-
e.calendarKeywords.includes('Block Schedule')
|
|
230
|
+
e.calendarKeywords.includes('Block Schedule') &&
|
|
231
|
+
isSameLocalDay(new Date(e.start), today)
|
|
239
232
|
) || null
|
|
240
233
|
)
|
|
241
234
|
},
|
|
242
235
|
},
|
|
236
|
+
watch: {
|
|
237
|
+
// If the organization changes (picker, route change, etc.), refetch.
|
|
238
|
+
'organization.id': function () {
|
|
239
|
+
this.$emit('events-in-view')
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
mounted() {
|
|
243
|
+
// If nothing is loaded yet, ask parent to load events now.
|
|
244
|
+
if (!this.events || this.events.length === 0) {
|
|
245
|
+
this.$emit('events-in-view')
|
|
246
|
+
}
|
|
247
|
+
},
|
|
243
248
|
}
|
|
244
249
|
</script>
|
|
245
250
|
|