@asd20/ui-next 2.0.14 → 2.0.16

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.16](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.15...ui-next-v2.0.16) (2026-04-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix secondary header image display ([8ed8d6f](https://github.com/academydistrict20/asd20-ui-next/commit/8ed8d6f0e2bedab9e108948963f65cd3daf20972))
9
+
10
+ ## [2.0.15](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.14...ui-next-v2.0.15) (2026-04-01)
11
+
3
12
  ## [2.0.14](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.13...ui-next-v2.0.14) (2026-03-31)
4
13
 
5
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -97,7 +97,7 @@
97
97
  <div class="white-accent-band">
98
98
  <section
99
99
  ref="header"
100
- class="asd20-secondary-header"
100
+ :class="headerClasses"
101
101
  aria-label="Secondary message"
102
102
  :style="secondaryHeaderStyle"
103
103
  >
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <asd20-messaging
119
- v-bind="secondaryMessage"
119
+ v-bind="secondaryMessageForDisplay"
120
120
  fullscreen
121
121
  ></asd20-messaging>
122
122
  </section>
@@ -151,33 +151,52 @@ export default {
151
151
  }
152
152
  },
153
153
  computed: {
154
+ headerClasses() {
155
+ return {
156
+ 'asd20-secondary-header': true,
157
+ 'asd20-secondary-header--hide-desktop-image':
158
+ !this.shouldShowDesktopInlineImage,
159
+ }
160
+ },
154
161
  secondaryMessage() {
155
162
  return Array.isArray(this.messages) ? this.messages[1] || {} : {}
156
163
  },
157
- secondaryHeaderImage() {
158
- const messageImages = Array.isArray(this.secondaryMessage.images)
164
+ secondaryMessageImages() {
165
+ return Array.isArray(this.secondaryMessage.images)
159
166
  ? this.secondaryMessage.images
160
167
  : []
161
- const coverImage = messageImages.find(image => image.isCover)
162
- if (!coverImage) return ''
163
-
164
- const coverImageFiles = Array.isArray(coverImage.files)
165
- ? coverImage.files
166
- : []
167
- const coverImageFull = coverImageFiles.find(file => file.name === 'full')
168
- if (
169
- coverImageFull &&
170
- coverImageFull.filename &&
171
- coverImageFull.filename.includes('headerimage')
172
- ) {
173
- return ''
174
- }
175
-
176
- return coverImageFull ? coverImageFull.url : coverImage.url || ''
168
+ },
169
+ secondaryHeaderImageObject() {
170
+ return (
171
+ this.secondaryMessageImages.find(image => image && image.isCover) ||
172
+ this.secondaryMessageImages[0] ||
173
+ null
174
+ )
175
+ },
176
+ secondaryHeaderImage() {
177
+ return this.resolveMessageImageUrl(this.secondaryHeaderImageObject)
177
178
  },
178
179
  hasSecondaryHeaderImage() {
179
180
  return Boolean(this.secondaryHeaderImage)
180
181
  },
182
+ shouldShowDesktopInlineImage() {
183
+ return Boolean(
184
+ this.secondaryHeaderImageObject && this.secondaryHeaderImageObject.isCover
185
+ )
186
+ },
187
+ secondaryMessageForDisplay() {
188
+ if (!this.secondaryHeaderImageObject) return this.secondaryMessage
189
+
190
+ return {
191
+ ...this.secondaryMessage,
192
+ images: [
193
+ {
194
+ ...this.secondaryHeaderImageObject,
195
+ isCover: true,
196
+ },
197
+ ],
198
+ }
199
+ },
181
200
  secondaryHeaderStyle() {
182
201
  if (!this.hasSecondaryHeaderImage) return {}
183
202
 
@@ -223,6 +242,13 @@ export default {
223
242
  this.teardownParallax()
224
243
  },
225
244
  methods: {
245
+ resolveMessageImageUrl(image) {
246
+ if (!image) return ''
247
+
248
+ const imageFiles = Array.isArray(image.files) ? image.files : []
249
+ const fullImage = imageFiles.find(file => file.name === 'full')
250
+ return fullImage ? fullImage.url : image.url || ''
251
+ },
226
252
  teardownParallax() {
227
253
  this.disableParallax()
228
254
  if (this.intersectionObserver) this.intersectionObserver.disconnect()
@@ -552,19 +578,6 @@ export default {
552
578
  }
553
579
  }
554
580
 
555
- & :deep(.message-image) {
556
- display: none;
557
- margin-top: 0;
558
- order: 2;
559
- max-height: 400px;
560
- img {
561
- height: auto !important;
562
- margin-left: space(1);
563
- max-height: 25vw;
564
- border-radius: var(--website-shape__radius-m);
565
- }
566
- }
567
-
568
581
  & :deep(.asd20-messaging__content) {
569
582
  order: 1;
570
583
  max-width: 60%;
@@ -629,6 +642,29 @@ export default {
629
642
  );
630
643
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,1) 70%);
631
644
  }
645
+
646
+ & :deep(.message-image) {
647
+ display: flex;
648
+ margin-top: 0;
649
+ order: 2;
650
+ max-height: 400px;
651
+ img {
652
+ height: auto !important;
653
+ margin-left: space(1);
654
+ max-height: 25vw;
655
+ border-radius: var(--website-shape__radius-m);
656
+ }
657
+ }
658
+ }
659
+
660
+ .asd20-secondary-header--hide-desktop-image {
661
+ & :deep(.message-image) {
662
+ display: none;
663
+ }
664
+
665
+ & :deep(.asd20-messaging__content) {
666
+ max-width: 60%;
667
+ }
632
668
  }
633
669
  }
634
670
  </style>
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div class="page-content-404">
3
- <h1><small>404</small>We're lost. But, we do have a map.</h1>
3
+ <!-- <h1><small>404</small>We're lost. But, we do have a map.</h1>
4
4
  <p class="lead">
5
5
  Let us humbly provide some directions to get you back on track:
6
- </p>
7
- <!-- <h1><small>404</small>"Not all who wander are lost."</h1>
8
- <span><i>~ J.R.R. Tolkien, The Fellowship of the Ring</i></span>
6
+ </p> -->
7
+ <h1><small>404</small>"Not all those who wander are lost."</h1>
8
+ <span><i>~ J. R. R. Tolkien, "The Riddle of Strider," The Fellowship of the Ring</i></span>
9
9
  <p class="lead">
10
10
  Well, at least in this case, we can't determine your journey's end. Let us
11
11
  humbly provide a few options to get you back on track:
12
- </p> -->
12
+ </p>
13
13
  <div class="options">
14
14
  <asd20-button
15
15
  class="option-button"