/* Shared demo data + tiny icon set for the Nashville PBS website UI kit. */ const ICONS = { search:'', play:'', plus:'', chevL:'', chevR:'', arrowL:'', user:'', }; const Icon = ({name, style}) => ; /* Program art. Nothing here may be fetched from the network, so posters are drawn on the fly in the brand blues with one quiet circle each (the signature shape). Swap img() for real artwork. */ const POSTER_FILLS = [['#2638C4','#0F1E8C'],['#0A145A','#2638C4'],['#0F1E8C','#0A145A'],['#2638C4','#0A145A']]; const img = (seed) => { let h = 7; for (const ch of String(seed)) h = (h * 31 + ch.charCodeAt(0)) >>> 0; const pair = POSTER_FILLS[h % POSTER_FILLS.length]; const cx = 160 + (h % 320), cy = 40 + ((h >> 4) % 280), r = 150 + (h % 90); const svg = '' + '' + ''; return 'data:image/svg+xml;utf8,' + encodeURIComponent(svg); }; /* Brand assets. Hosted beside a copy of assets/, the default paths work; the design-system preview sets window.__NPBS_ASSETS to inlined data: URIs first, because its frame may not fetch files. */ const ASSETS = window.__NPBS_ASSETS || { logoHWhite: 'assets/logos/NashvillePBS_Logo_Horizontal_White.svg', logoVWhite: 'assets/logos/NashvillePBS_Logo_Vertical_White.svg', community: 'assets/patterns/Community_Pattern_RGB_1920x1920.svg', hero: 'assets/photos/nashville-neon-guitar.jpg', }; const OVERLAY_BRAND = 'linear-gradient(160deg,rgba(38,56,196,.72),rgba(10,20,90,.82))'; const patternBg = (uri, overlay) => (overlay ? overlay + ', ' : '') + 'url(' + uri + ')'; const SHOWS = [ { id:'crossroads', title:'Tennessee Crossroads', meta:'S37 · E12 · Local', seed:'nashville1', badge:'New', duration:'27:30', progress:40, cat:'Local', desc:'Explore the people, places, food and craft that make Middle Tennessee one of a kind, a viewer favorite for more than three decades.' }, { id:'nature', title:'Nature: Sky Migrations', meta:'Documentary · 54 min', seed:'birds2', duration:'54:00', progress:0, cat:'Nature', desc:'Follow the epic seasonal journeys of North America\u2019s migratory birds across breathtaking landscapes.' }, { id:'gardener', title:'Volunteer Gardener', meta:'S31 · E4 · Local', seed:'garden3', duration:'26:15', progress:0, cat:'Local', desc:'Tennessee\u2019s gardening experts share hands-on tips for the home grower, season after season.' }, { id:'newshour', title:'PBS News Hour', meta:'Tonight · News', seed:'news4', badge:'Live', duration:'56:40', progress:0, cat:'News', desc:'In-depth reporting and analysis of the day\u2019s national and world headlines.' }, { id:'antiques', title:'Antiques Roadshow', meta:'S29 · E7', seed:'antique5', duration:'52:10', progress:70, cat:'Arts', desc:'Appraisers reveal the hidden stories \u2014 and surprising values \u2014 behind treasured heirlooms.' }, { id:'frontline', title:'Frontline', meta:'Documentary · 84 min', seed:'doc6', duration:'1:24:00', progress:0, cat:'News', desc:'Investigative journalism that gives voice to those affected by the day\u2019s biggest stories.' }, { id:'nova', title:'NOVA: Rivers of Life', meta:'Science · 53 min', seed:'river7', duration:'53:00', progress:0, cat:'Nature', desc:'Journey down the world\u2019s greatest rivers and the ecosystems and cultures they sustain.' }, { id:'masterpiece', title:'Masterpiece: Riverside', meta:'S3 · E1 · Drama', seed:'drama8', badge:'Premieres Sun', duration:'58:20', progress:0, cat:'Arts', desc:'A sweeping new period drama returns for its most dramatic season yet.' }, { id:'kids-cat', title:'Curious Creatures', meta:'PBS KIDS · Ages 4-8', seed:'kids9', duration:'24:00', progress:0, cat:'Kids', desc:'Playful science adventures that spark curiosity in young minds.' }, { id:'kids-read', title:'Story Time Studio', meta:'PBS KIDS · Ages 3-6', seed:'kids10', duration:'22:30', progress:0, cat:'Kids', desc:'Beloved stories come to life to build a lifelong love of reading.' }, { id:'music', title:'Bluegrass Underground', meta:'Music · 55 min', seed:'music11', duration:'55:00', progress:0, cat:'Arts', desc:'Live performances from the heart of Tennessee\u2019s roots-music scene.' }, { id:'history', title:'Tennessee: The Story', meta:'History · 3 parts', seed:'history12', duration:'1:02:00', progress:15, cat:'Local', desc:'A landmark local production tracing the people and events that shaped our state.' }, ]; const byCat = (c) => SHOWS.filter(s => s.cat === c); const findShow = (id) => SHOWS.find(s => s.id === id); Object.assign(window, { ICONS, Icon, img, SHOWS, byCat, findShow, ASSETS, OVERLAY_BRAND, patternBg });