Skip to content

Commit cff41de

Browse files
committed
Restore title overlays from movie content
1 parent 402803a commit cff41de

1 file changed

Lines changed: 134 additions & 121 deletions

File tree

packages/shared-ui/src/screens/HomeScreen.tsx

Lines changed: 134 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ export default function HomeScreen() {
9999
source={headerImageSource}
100100
resizeMode="cover"
101101
/>
102+
{/* Linear gradient scrim for left overlay */}
103+
<PlatformLinearGradient
104+
colors={['rgba(0,0,0,0.9)', 'rgba(0,0,0,0.7)', 'rgba(0,0,0,0.3)', 'transparent']}
105+
start={{ x: 0, y: 0 }}
106+
end={{ x: 1, y: 0 }}
107+
style={gridStyles.gradientLeft}
108+
/>
109+
<View style={gridStyles.headerTextContainer}>
110+
<Text style={gridStyles.headerTitle}>{focusedItem.title}</Text>
111+
<Text style={gridStyles.headerDescription} numberOfLines={3}>
112+
{focusedItem.description}
113+
</Text>
114+
</View>
102115
</View>
103116
);
104117
},
@@ -191,125 +204,125 @@ export default function HomeScreen() {
191204
}
192205

193206
const gridStyles = StyleSheet.create({
194-
container: {
195-
flex: 1,
196-
backgroundColor: colors.background,
197-
},
198-
scrollContent: {
199-
flex: 1,
200-
marginBottom: scaledPixels(safeZones.actionSafe.vertical),
201-
},
202-
highlightsTitle: {
203-
color: colors.text,
204-
fontSize: scaledPixels(40),
205-
fontWeight: 'bold',
206-
marginBottom: scaledPixels(16),
207-
marginTop: scaledPixels(20),
208-
textShadowColor: 'rgba(0, 0, 0, 0.9)',
209-
textShadowOffset: { width: 0, height: 2 },
210-
textShadowRadius: 8,
211-
},
212-
headerTitle: {
213-
color: colors.text,
214-
fontSize: scaledPixels(56),
215-
fontWeight: 'bold',
216-
marginBottom: scaledPixels(16),
217-
textShadowColor: 'rgba(0, 0, 0, 0.9)',
218-
textShadowOffset: { width: 0, height: 2 },
219-
textShadowRadius: 12,
220-
},
221-
headerDescription: {
222-
color: colors.text,
223-
fontSize: scaledPixels(28),
224-
fontWeight: '500',
225-
lineHeight: scaledPixels(40),
226-
textShadowColor: 'rgba(0, 0, 0, 0.9)',
227-
textShadowOffset: { width: 0, height: 2 },
228-
textShadowRadius: 8,
229-
},
230-
thumbnailTextContainer: {
231-
position: 'absolute',
232-
bottom: 0,
233-
left: 0,
234-
right: 0,
235-
backgroundColor: colors.scrimDark,
236-
paddingHorizontal: scaledPixels(16),
237-
paddingVertical: scaledPixels(12),
238-
borderBottomLeftRadius: scaledPixels(8),
239-
borderBottomRightRadius: scaledPixels(8),
240-
},
241-
thumbnailText: {
242-
color: colors.text,
243-
fontSize: scaledPixels(24),
244-
fontWeight: '600',
245-
textAlign: 'center',
246-
lineHeight: scaledPixels(32),
247-
},
248-
highlightThumbnail: {
249-
width: scaledPixels(420),
250-
height: scaledPixels(260),
251-
marginRight: scaledPixels(20),
252-
backgroundColor: colors.card,
253-
borderRadius: scaledPixels(12),
254-
borderWidth: scaledPixels(5),
255-
borderColor: 'transparent',
256-
overflow: 'hidden',
257-
},
258-
highlightThumbnailFocused: {
259-
borderColor: colors.focusBorder,
260-
borderWidth: scaledPixels(6),
261-
transform: [{ scale: 1.1 }],
262-
shadowColor: colors.focus,
263-
shadowOffset: {
264-
width: 0,
265-
height: 0,
266-
},
267-
shadowOpacity: 0.9,
268-
shadowRadius: scaledPixels(20),
269-
elevation: 15,
270-
},
271-
highlightsContainer: {
272-
paddingHorizontal: scaledPixels(safeZones.actionSafe.horizontal),
273-
paddingVertical: scaledPixels(16),
274-
height: scaledPixels(400),
275-
},
276-
thumbnailPlaceholder: {
277-
backgroundColor: colors.cardElevated,
278-
width: '100%',
279-
height: '100%',
280-
borderRadius: scaledPixels(8),
281-
},
282-
header: {
283-
width: '100%',
284-
height: scaledPixels(700),
285-
position: 'relative',
286-
},
287-
headerImage: {
288-
width: '100%',
289-
height: '100%',
290-
resizeMode: 'cover',
291-
},
292-
gradientLeft: {
293-
position: 'absolute',
294-
left: 0,
295-
top: 0,
296-
bottom: 0,
297-
width: '65%',
298-
},
299-
headerTextContainer: {
300-
position: 'absolute',
301-
left: scaledPixels(safeZones.titleSafe.horizontal),
302-
top: scaledPixels(safeZones.titleSafe.vertical),
303-
bottom: scaledPixels(safeZones.titleSafe.vertical),
304-
justifyContent: 'center',
305-
width: '55%',
306-
},
307-
highlightsList: {
308-
paddingLeft: scaledPixels(20),
309-
},
310-
cardImage: {
311-
width: '100%',
312-
height: '100%',
313-
borderRadius: scaledPixels(8),
207+
container: {
208+
flex: 1,
209+
backgroundColor: colors.background,
210+
},
211+
scrollContent: {
212+
flex: 1,
213+
marginBottom: scaledPixels(safeZones.actionSafe.vertical),
214+
},
215+
highlightsTitle: {
216+
color: colors.text,
217+
fontSize: scaledPixels(40),
218+
fontWeight: 'bold',
219+
marginBottom: scaledPixels(16),
220+
marginTop: scaledPixels(20),
221+
textShadowColor: 'rgba(0, 0, 0, 0.9)',
222+
textShadowOffset: { width: 0, height: 2 },
223+
textShadowRadius: 8,
224+
},
225+
headerTitle: {
226+
color: colors.text,
227+
fontSize: scaledPixels(56),
228+
fontWeight: 'bold',
229+
marginBottom: scaledPixels(16),
230+
textShadowColor: 'rgba(0, 0, 0, 0.9)',
231+
textShadowOffset: { width: 0, height: 2 },
232+
textShadowRadius: 12,
233+
},
234+
headerDescription: {
235+
color: colors.text,
236+
fontSize: scaledPixels(28),
237+
fontWeight: '500',
238+
lineHeight: scaledPixels(40),
239+
textShadowColor: 'rgba(0, 0, 0, 0.9)',
240+
textShadowOffset: { width: 0, height: 2 },
241+
textShadowRadius: 8,
242+
},
243+
thumbnailTextContainer: {
244+
position: 'absolute',
245+
bottom: 0,
246+
left: 0,
247+
right: 0,
248+
backgroundColor: colors.scrimDark,
249+
paddingHorizontal: scaledPixels(16),
250+
paddingVertical: scaledPixels(12),
251+
borderBottomLeftRadius: scaledPixels(8),
252+
borderBottomRightRadius: scaledPixels(8),
253+
},
254+
thumbnailText: {
255+
color: colors.text,
256+
fontSize: scaledPixels(24),
257+
fontWeight: '600',
258+
textAlign: 'center',
259+
lineHeight: scaledPixels(32),
260+
},
261+
highlightThumbnail: {
262+
width: scaledPixels(420),
263+
height: scaledPixels(260),
264+
marginRight: scaledPixels(20),
265+
backgroundColor: colors.card,
266+
borderRadius: scaledPixels(12),
267+
borderWidth: scaledPixels(5),
268+
borderColor: 'transparent',
269+
overflow: 'hidden',
270+
},
271+
highlightThumbnailFocused: {
272+
borderColor: colors.focusBorder,
273+
borderWidth: scaledPixels(6),
274+
transform: [{ scale: 1.1 }],
275+
shadowColor: colors.focus,
276+
shadowOffset: {
277+
width: 0,
278+
height: 0,
314279
},
315-
});
280+
shadowOpacity: 0.9,
281+
shadowRadius: scaledPixels(20),
282+
elevation: 15,
283+
},
284+
highlightsContainer: {
285+
paddingHorizontal: scaledPixels(safeZones.actionSafe.horizontal),
286+
paddingVertical: scaledPixels(16),
287+
height: scaledPixels(400),
288+
},
289+
thumbnailPlaceholder: {
290+
backgroundColor: colors.cardElevated,
291+
width: '100%',
292+
height: '100%',
293+
borderRadius: scaledPixels(8),
294+
},
295+
header: {
296+
width: '100%',
297+
height: scaledPixels(700),
298+
position: 'relative',
299+
},
300+
headerImage: {
301+
width: '100%',
302+
height: '100%',
303+
resizeMode: 'cover',
304+
},
305+
gradientLeft: {
306+
position: 'absolute',
307+
left: 0,
308+
top: 0,
309+
bottom: 0,
310+
width: '65%',
311+
},
312+
headerTextContainer: {
313+
position: 'absolute',
314+
left: scaledPixels(safeZones.titleSafe.horizontal),
315+
top: scaledPixels(safeZones.titleSafe.vertical),
316+
bottom: scaledPixels(safeZones.titleSafe.vertical),
317+
justifyContent: 'center',
318+
width: '55%',
319+
},
320+
highlightsList: {
321+
paddingLeft: scaledPixels(20),
322+
},
323+
cardImage: {
324+
width: '100%',
325+
height: '100%',
326+
borderRadius: scaledPixels(8),
327+
},
328+
});

0 commit comments

Comments
 (0)