@playpilot/tpi 8.0.1 → 8.1.0
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/dist/editorial.mount.js +7 -7
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +6 -6
- package/package.json +1 -1
- package/src/routes/components/Modals/Modal.svelte +2 -2
- package/src/routes/components/Title.svelte +14 -15
- package/src/routes/components/YouTubeEmbedBackground.svelte +2 -0
- package/src/tests/routes/components/Modals/Modal.test.js +2 -2
package/package.json
CHANGED
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
class="modal"
|
|
121
121
|
class:wide
|
|
122
122
|
class:tall
|
|
123
|
-
class:blur
|
|
123
|
+
class:background-blur={blur}
|
|
124
124
|
class:has-bubble={!!bubble}
|
|
125
125
|
class:has-prepend={!!prepend}
|
|
126
126
|
style:--dialog-offset="{dialogOffset}px"
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
--playpilot-detail-background-border-radius: 0;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
&.blur {
|
|
212
|
+
&.background-blur {
|
|
213
213
|
backdrop-filter: blur(1.5rem);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
useVideoBackground?: boolean
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const { title, small = false, useVideoBackground =
|
|
29
|
+
const { title, small = false, useVideoBackground = true }: Props = $props()
|
|
30
30
|
|
|
31
31
|
const noAffiliate = !!window.PlayPilotLinkInjections?.no_affiliate
|
|
32
32
|
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
</div>
|
|
97
97
|
</div>
|
|
98
98
|
|
|
99
|
-
<div class="background">
|
|
99
|
+
<div class="background" class:small>
|
|
100
100
|
{#if useVideoBackground && hasYouTubeVideoAvailable}
|
|
101
101
|
<YouTubeEmbedBackground embeddable_url={title.embeddable_url!} />
|
|
102
102
|
{:else}
|
|
@@ -248,10 +248,21 @@
|
|
|
248
248
|
|
|
249
249
|
@include desktop() {
|
|
250
250
|
height: margin(12);
|
|
251
|
-
aspect-ratio: unset;
|
|
252
251
|
mask-image: linear-gradient(to bottom, black 60%, transparent);
|
|
253
252
|
}
|
|
254
253
|
|
|
254
|
+
@include mobile {
|
|
255
|
+
:global(.video-background) {
|
|
256
|
+
width: 225%;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&.small {
|
|
261
|
+
:global(.video-background) {
|
|
262
|
+
width: 150%;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
255
266
|
img {
|
|
256
267
|
width: 100%;
|
|
257
268
|
height: 100%;
|
|
@@ -271,18 +282,6 @@
|
|
|
271
282
|
filter: blur(0.75rem);
|
|
272
283
|
}
|
|
273
284
|
}
|
|
274
|
-
|
|
275
|
-
@include mobile {
|
|
276
|
-
:global(.video-background) {
|
|
277
|
-
width: 225%;
|
|
278
|
-
margin-left: 50%;
|
|
279
|
-
transform: translateX(-50%);
|
|
280
|
-
|
|
281
|
-
:global(> iframe) {
|
|
282
|
-
transform: translateX(-50%) translateY(-50%);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
285
|
}
|
|
287
286
|
|
|
288
287
|
.capitalize {
|
|
@@ -124,13 +124,13 @@ describe('Modal.svelte', () => {
|
|
|
124
124
|
it('Should not have blur class by default', () => {
|
|
125
125
|
const { getByTestId } = render(Modal, { children })
|
|
126
126
|
|
|
127
|
-
expect(getByTestId('modal').classList).not.toContain('blur')
|
|
127
|
+
expect(getByTestId('modal').classList).not.toContain('background-blur')
|
|
128
128
|
})
|
|
129
129
|
|
|
130
130
|
it('Should have blur class when prop is given', () => {
|
|
131
131
|
const { getByTestId } = render(Modal, { children, blur: true })
|
|
132
132
|
|
|
133
|
-
expect(getByTestId('modal').classList).toContain('blur')
|
|
133
|
+
expect(getByTestId('modal').classList).toContain('background-blur')
|
|
134
134
|
})
|
|
135
135
|
|
|
136
136
|
it('Should not show back button by default', () => {
|