@playpilot/tpi 8.12.0 → 8.12.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "8.12.0",
3
+ "version": "8.12.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -166,7 +166,7 @@ export const translations = {
166
166
  [Language.Swedish]: 'Streaming Guide',
167
167
  [Language.Danish]: 'Streaming Guide',
168
168
  },
169
- 'Streaming Guide Heading': {
169
+ 'Streaming Guide Subheading': {
170
170
  [Language.English]: 'Discover and search all movies and tv-shows',
171
171
  [Language.Swedish]: 'Upptäck och sök bland alla filmer och tv-serier',
172
172
  [Language.Danish]: 'Opdag og søg i alle film og tv-serier',
@@ -45,7 +45,11 @@
45
45
  <div class="divider"></div>
46
46
 
47
47
  <div class="heading" use:heading>
48
- {t('Streaming Guide Heading')}
48
+ {t('Streaming Guide')}
49
+ </div>
50
+
51
+ <div class="subheading" use:heading={2}>
52
+ {t('Streaming Guide Subheading')}
49
53
  </div>
50
54
 
51
55
  {#if !useExploreRouter()}
@@ -101,11 +105,6 @@
101
105
  gap: margin(0.5);
102
106
  margin: theme(explore-header-margin, 0 0 margin(1));
103
107
  width: 100%;
104
- max-width: margin(12);
105
-
106
- @include desktop {
107
- max-width: margin(20);
108
- }
109
108
  }
110
109
 
111
110
  .divider {
@@ -115,15 +114,25 @@
115
114
  background: theme(explore-divider-background, text-color);
116
115
  }
117
116
 
118
- .heading {
119
- margin: theme(explore-heading-margin, margin(0.25) 0);
117
+ .heading,
118
+ .subheading {
120
119
  color: theme(text-color);
121
- font-size: theme(explore-heading-size, clamp(margin(1), 2.5vw, margin(1.5)));
120
+ font-size: theme(explore-heading-size, clamp(margin(1.5), 5vw, margin(2)));
122
121
  font-weight: theme(explore-heading-font-weight, font-bold);
123
122
  text-transform: theme(explore-heading-text-transform, normal);
124
123
  line-height: theme(explore-heading-line-height, 1.5);
125
124
  }
126
125
 
126
+ .subheading {
127
+ margin-top: margin(0.5);
128
+ max-width: margin(15);
129
+ font-size: theme(explore-subheading-size, clamp(margin(1), 2.5vw, margin(1.25)));
130
+
131
+ @include desktop {
132
+ max-width: 100%;
133
+ }
134
+ }
135
+
127
136
  .description {
128
137
  max-width: theme(explore-header-max-width, 600px);
129
138
  margin: 0;
@@ -4,7 +4,7 @@
4
4
  import type { TitleData } from '$lib/types/title'
5
5
  import { getFirstAdOfType } from '$lib/api/ads'
6
6
  import { exploreParentSelector } from '$lib/explore'
7
- import { onMount } from 'svelte'
7
+ import { onMount, setContext } from 'svelte'
8
8
  import { isPixelAllowed } from '$lib/pixel'
9
9
  import { trackViaPixel } from '@playpilot/retargeting-tracking'
10
10
  import Modal from './Modal.svelte'
@@ -20,6 +20,8 @@
20
20
 
21
21
  const { title, initialScrollPosition = 0, ...restProps }: Props = $props()
22
22
 
23
+ setContext('modal', 'title')
24
+
23
25
  const topScrollAd = getFirstAdOfType('top_scroll')
24
26
  const displayAd = getFirstAdOfType('card')
25
27
  const insertExploreCta = window.PlayPilotLinkInjections?.config?.explore_insert_cta_in_tpi
@@ -14,7 +14,7 @@
14
14
  import { heading } from '$lib/actions/heading'
15
15
  import { removeImageUrlPrefix } from '$lib/image'
16
16
  import { titleUrl } from '$lib/routes'
17
- import { setContext } from 'svelte'
17
+ import { getContext, setContext } from 'svelte'
18
18
  import { track } from '$lib/tracking'
19
19
  import { TrackingEvent } from '$lib/enums/TrackingEvent'
20
20
  import { isYouTubeVideoAvailableInRegion } from '$lib/api/youtubeAvailability'
@@ -32,6 +32,7 @@
32
32
 
33
33
  setContext('title', title)
34
34
 
35
+ const modal = getContext('modal')
35
36
  const showDescription = $derived((!small || noAffiliate) && title.description)
36
37
 
37
38
  let posterLoaded = $state(false)
@@ -96,7 +97,7 @@
96
97
  </div>
97
98
  </div>
98
99
 
99
- <div class="background" class:small>
100
+ <div class="background" class:small class:offset-mute={modal === 'title'}>
100
101
  {#if useVideoBackground && hasYouTubeVideoAvailable}
101
102
  <YouTubeEmbedBackground embeddable_url={title.embeddable_url!} />
102
103
  {:else}
@@ -116,6 +117,8 @@
116
117
  $poster-width: margin(4.5);
117
118
 
118
119
  .heading {
120
+ z-index: 1;
121
+ position: relative;
119
122
  grid-area: heading;
120
123
  margin: margin(0.5) 0;
121
124
  color: theme(detail-title-text-color, text-color);
@@ -131,7 +134,6 @@
131
134
  }
132
135
 
133
136
  .content {
134
- z-index: 1;
135
137
  position: relative;
136
138
  padding: margin(1);
137
139
  color: theme(detail-text-color, text-color);
@@ -179,6 +181,8 @@
179
181
  }
180
182
 
181
183
  .poster {
184
+ z-index: 1;
185
+ position: relative;
182
186
  grid-area: poster;
183
187
  display: block;
184
188
  width: $poster-width;
@@ -196,6 +200,8 @@
196
200
  }
197
201
 
198
202
  .info {
203
+ z-index: 1;
204
+ position: relative;
199
205
  grid-area: info;
200
206
  display: flex;
201
207
  flex-wrap: wrap;
@@ -244,7 +250,6 @@
244
250
  overflow: hidden;
245
251
  background: theme(detail-background, lighter);
246
252
  mask-image: linear-gradient(to bottom, black 40%, transparent);
247
- z-index: 0;
248
253
 
249
254
  @include desktop() {
250
255
  height: margin(12);
@@ -263,6 +268,11 @@
263
268
  }
264
269
  }
265
270
 
271
+ &.offset-mute {
272
+ --mute-top: #{margin(3)};
273
+ --mute-right: #{margin(0.25)};
274
+ }
275
+
266
276
  img {
267
277
  width: 100%;
268
278
  height: 100%;
@@ -74,8 +74,8 @@
74
74
  align-items: center;
75
75
  justify-content: center;
76
76
  position: absolute;
77
- top: margin(0.5);
78
- right: margin(0.5);
77
+ top: calc(margin(0.5) + var(--mute-top, 0px));
78
+ right: calc(margin(0.5) + var(--mute-right, 0px));
79
79
  padding: margin(0.25);
80
80
  border: 0;
81
81
  border-radius: 50%;
@@ -14,15 +14,11 @@
14
14
  </script>
15
15
 
16
16
  <div class="video-background" style="--height: {height}px; --width: {clientWidth}px;" bind:clientWidth bind:clientHeight data-testid="video-background">
17
- <YouTubeEmbed {embeddable_url} muted loop />
17
+ <YouTubeEmbed {embeddable_url} muted loop showMuteControls />
18
18
  </div>
19
19
 
20
20
  <style lang="scss">
21
21
  .video-background {
22
- width: 100%;
23
- height: 100%;
24
- margin-left: 50%;
25
- transform: translateX(-50%);
26
22
  background: black;
27
23
 
28
24
  :global(iframe) {