mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Tint title page accent colors to poster's vibrant color
Override CSS custom properties (--primary, --ring, --primary-foreground, --status-watching) on the title detail page wrapper using the vibrant color from the poster's node-vibrant palette. All Tailwind classes referencing these variables automatically pick up the new color. Also await lazy color extraction in getTitleWithChildren() so palettes are available on first visit to never-before-opened titles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import { titles } from "@/lib/db/schema";
|
||||
import { getTitleWithChildren, importTitle } from "@/lib/services/metadata";
|
||||
import { getUserTitleInfo } from "@/lib/services/tracking";
|
||||
import { tmdbImageUrl } from "@/lib/tmdb/image";
|
||||
import { getTitleThemeStyle } from "@/lib/utils/title-theme";
|
||||
import { TitleActions } from "./_components/title-actions";
|
||||
import { TitleAvailability } from "./_components/title-availability";
|
||||
import { TitleHero } from "./_components/title-hero";
|
||||
@@ -72,8 +73,10 @@ export default async function TitleDetailPage({
|
||||
|
||||
const { title, seasons, availability } = result;
|
||||
|
||||
const themeStyle = getTitleThemeStyle(title.colorPalette);
|
||||
|
||||
return (
|
||||
<div className="relative space-y-10">
|
||||
<div className="relative space-y-10" style={themeStyle}>
|
||||
<TitleInteractionProvider
|
||||
titleId={title.id}
|
||||
titleType={title.type}
|
||||
|
||||
Reference in New Issue
Block a user