diff --git a/src/App.css b/src/App.css index 187227f..f39b177 100644 --- a/src/App.css +++ b/src/App.css @@ -1117,10 +1117,20 @@ background: #080808; border-top: 1px solid rgba(201, 168, 76, 0.18); border-bottom: 1px solid rgba(201, 168, 76, 0.18); - padding: 5rem 0; + padding: 4rem 0; text-align: center; } +.tfl-label-row { + text-align: center; + margin-bottom: 1.5rem; +} + +.tfl-label-row .section-heading { + text-align: center; + margin-bottom: 0.5rem; +} + .tfl-attribution { color: #8a7f5a; font-size: 0.9rem; diff --git a/src/App.tsx b/src/App.tsx index 4bcea6a..4360ce8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1059,36 +1059,53 @@ function HomepageNewsletterSection() { type TflWidgetType = 'audiodevo' | 'abdevotional' function TruthForLifeWidget({ type = 'audiodevo' }: { type?: TflWidgetType }) { - useEffect(() => { - // TFL's script looks for #tfl-syndicate-container synchronously when it loads. - // The div is already in the DOM by the time this effect runs, so we just - // inject the script and it will find and populate the container. - const existing = document.getElementById('tfl-syn-script') - if (existing) existing.remove() + // Use an iframe so TFL's script gets a fresh page context with its own + // DOMContentLoaded — required because this is a SPA and that event has + // already fired on the outer page before this component ever mounts. + const iframeHeight = type === 'audiodevo' ? '420' : '800' - const container = document.getElementById('tfl-syndicate-container') - if (container) container.innerHTML = '' - - const script = document.createElement('script') - script.id = 'tfl-syn-script' - script.src = `https://www.truthforlife.org/static/js/responsive/lib/syndicate.js?type=${type}&id=458890` - script.async = true - document.body.appendChild(script) - - return () => { script.remove() } - }, [type]) + const srcdoc = ` + + + + + + + +
+ +` return (
-

Daily Devotional

-

- Truth For Life -

-

- Teaching from Truth For Life with Alistair Begg -

-
+
+

+ Daily Devotional +

+

+ Truth For Life + {' '}with Alistair Begg +

+
+
+