E3R

ini _root.txt

E3R
Jul 23rd, 2026
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.60 KB | None | 0 0
  1. import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
  2. import {
  3. Outlet,
  4. Link,
  5. createRootRouteWithContext,
  6. useRouter,
  7. HeadContent,
  8. Scripts,
  9. } from "@tanstack/react-router";
  10. import { useEffect, type ReactNode } from "react";
  11.  
  12. import appCss from "../styles.css?url";
  13. import { reportLovableError } from "../lib/lovable-error-reporting";
  14.  
  15. const SITE_NAME = "KINO EDITORIAL DEUTSCHLAND";
  16.  
  17. function NotFoundComponent() {
  18. return (
  19. <div className="flex min-h-screen items-center justify-center bg-background px-4">
  20. <div className="max-w-md text-center">
  21. <h1 className="text-7xl font-bold">404</h1>
  22. <p className="mt-4 text-muted-foreground">Seite nicht gefunden.</p>
  23. <Link to="/" className="mt-6 inline-block underline">Zurück zur Startseite</Link>
  24. </div>
  25. </div>
  26. );
  27. }
  28.  
  29. function ErrorComponent({ error, reset }: { error: Error; reset: () => void }) {
  30. const router = useRouter();
  31. useEffect(() => {
  32. reportLovableError(error, { boundary: "tanstack_root_error_component" });
  33. }, [error]);
  34. return (
  35. <div className="flex min-h-screen items-center justify-center px-4">
  36. <div className="max-w-md text-center">
  37. <h1 className="text-xl font-semibold">Ein Fehler ist aufgetreten</h1>
  38. <button
  39. onClick={() => { router.invalidate(); reset(); }}
  40. className="mt-6 underline"
  41. >Erneut versuchen</button>
  42. </div>
  43. </div>
  44. );
  45. }
  46. function Histats() {
  47. useEffect(() => {
  48. (window as any)._Hasync = (window as any)._Hasync || [];
  49. (window as any)._Hasync.push([
  50. "Histats.start",
  51. "1,5014113,0,0,0,0,00000000",
  52. ]);
  53. (window as any)._Hasync.push(["Histats.fasi", "1"]);
  54. (window as any)._Hasync.push(["Histats.track_hits", ""]);
  55.  
  56. const script = document.createElement("script");
  57. script.src = "https://s10.histats.com/js15_as.js";
  58. script.async = true;
  59.  
  60. document.body.appendChild(script);
  61.  
  62. return () => {
  63. script.remove();
  64. };
  65. }, []);
  66.  
  67. return (
  68. <div style={{ display: "none" }}>
  69. <div id="histats_counter"></div>
  70. <noscript>
  71. <a href="/">
  72. <img
  73. src="https://sstatic1.histats.com/0.gif?5014113&101"
  74. alt="Histats"
  75. border={0}
  76. />
  77. </a>
  78. </noscript>
  79. </div>
  80. );
  81. }
  82.  
  83. export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()({
  84. head: () => ({
  85. meta: [
  86. { charSet: "utf-8" },
  87. { name: "viewport", content: "width=device-width, initial-scale=1" },
  88. { property: "og:type", content: "article" },
  89. { property: "og:site_name", content: SITE_NAME },
  90. { name: "twitter:card", content: "summary_large_image" },
  91. { name: "google-site-verification", content: "f9QvvK0LCyE7g6jlpe2HFnbch6-eF3FLIhKuPM9g59M" },
  92. { title: "Spider-Man: Brand New Day (2026) – Exklusive Details, Besetzung & News" },
  93. { property: "og:title", content: "Spider-Man: Brand New Day (2026) – Der neue Marvel-Blockbuster" },
  94. { name: "twitter:title", content: "Spider-Man: Brand New Day (2026) – Exklusive Film-News" },
  95. { name: "description", content: "Erfahren Sie alles über Spider-Man: Brand New Day (2026). Exklusive Einblicke in die Besetzung mit Tom Holland, Produktionsdetails, Budget und offizielle Kinostart-Gerüchte in Deutschland." },
  96. { property: "og:description", content: "Detaillierte Analyse und neueste Informationen zum kommenden Spider-Man 4. Besetzung, Handlung und Hintergründe zum Marvel-Highlight 2026." },
  97. { name: "twitter:description", content: "Aktuelle News zu Spider-Man: Brand New Day (2026). Alles, was Sie über den neuen Marvel-Blockbuster wissen müssen." },
  98. { name: "keywords", content: "Spider-Man 4, Brand New Day 2026, Marvel Deutschland, Tom Holland, Zendaya, Filmkritik, MCU Phase 6, Kinostart 2026" },
  99. { property: "og:image", content: "https://images.tmdb.org/t/p/original/mBa33S596pBuhC9otMTZpS3C1oA.jpg" },
  100. { name: "twitter:image", content: "https://images.tmdb.org/t/p/original/mBa33S596pBuhC9otMTZpS3C1oA.jpg" },
  101. ],
  102. links: [
  103. { rel: "stylesheet", href: appCss },
  104. { rel: "icon", href: "/favicon.ico", type: "image/x-icon" },
  105. { rel: "preconnect", href: "https://fonts.googleapis.com" },
  106. { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" },
  107. { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap" },
  108. ],
  109. scripts: [
  110. {
  111. type: "application/ld+json",
  112. children: JSON.stringify({
  113. "@context": "https://schema.org",
  114. "@type": "NewsArticle",
  115. "headline": "Spider-Man: Brand New Day (2026) – Exklusive Details und Besetzung",
  116. "image": ["https://images.tmdb.org/t/p/original/mBa33S596pBuhC9otMTZpS3C1oA.jpg"],
  117. "datePublished": "2024-05-14T08:00:00+08:00",
  118. "author": [{
  119. "@type": "Person",
  120. "name": "Redaktion",
  121. "url": "https://kinonews24de.up.railway.app"
  122. }]
  123. }),
  124. },
  125. ],
  126. }),
  127. shellComponent: RootShell,
  128. component: RootComponent,
  129. notFoundComponent: NotFoundComponent,
  130. errorComponent: ErrorComponent,
  131. });
  132.  
  133. function RootShell({ children }: { children: ReactNode }) {
  134. return (
  135. <html lang="de">
  136. <head><HeadContent /></head>
  137. <body>
  138. {children}
  139.  
  140. <Histats />
  141.  
  142. <Scripts />
  143. </body>
  144.  
  145. </html>
  146. );
  147. }
  148.  
  149. function RootComponent() {
  150. const { queryClient } = Route.useRouteContext();
  151.  
  152. useEffect(() => {
  153. // Histats
  154. (window as any)._Hasync = (window as any)._Hasync || [];
  155. (window as any)._Hasync.push(["Histats.start", "1,4925760,4,0,0,0,00010000"]);
  156. const hs = document.createElement("script");
  157. hs.type = "text/javascript";
  158. hs.async = true;
  159. hs.src = "https://s10.histats.com/js15_as.js";
  160. document.body.appendChild(hs);
  161.  
  162. // Adsterra global (social bar / popunder)
  163. const globalAds = [
  164. "https://pl30414546.effectivecpmnetwork.com/32/8e/48/328e48a141a04d4779bf7ce01917f31f.js",
  165. "https://pl30414547.effectivecpmnetwork.com/85/fe/e9/85fee95a99292ac49c9255203f17ecc6.js",
  166. ];
  167. globalAds.forEach((src) => {
  168. const s = document.createElement("script");
  169. s.type = "text/javascript";
  170. s.src = src;
  171. s.async = true;
  172. document.body.appendChild(s);
  173. });
  174. }, []);
  175.  
  176. return (
  177. <QueryClientProvider client={queryClient}>
  178. <div className="min-h-screen flex flex-col bg-background text-foreground">
  179. <header className="border-b border-border bg-paper">
  180. <div className="max-w-5xl mx-auto px-6 py-8 text-center">
  181. <div className="text-[0.65rem] tracking-[0.35em] text-muted-foreground uppercase mb-3">
  182. Ausgabe · Kino &amp; Kultur · {new Date().toLocaleDateString("de-DE", { day: "2-digit", month: "long", year: "numeric" })}
  183. </div>
  184. <Link to="/" className="block">
  185. <h1 className="font-serif text-4xl md:text-6xl font-black tracking-tight text-ink">
  186. {SITE_NAME}
  187. </h1>
  188. </Link>
  189. <div className="mt-3 flex items-center justify-center gap-3 text-[0.6rem] tracking-[0.3em] uppercase text-muted-foreground">
  190. <span className="h-px w-12 bg-border" />
  191. <span>Premium Filmjournalismus</span>
  192. <span className="h-px w-12 bg-border" />
  193. </div>
  194. </div>
  195. </header>
  196.  
  197. <main className="flex-1">
  198. <Outlet />
  199. </main>
  200.  
  201. <footer className="border-t border-border bg-paper mt-16">
  202. <div className="max-w-5xl mx-auto px-6 py-10">
  203. <div className="flex flex-wrap items-center justify-center gap-6 text-sm mb-6">
  204. <Link to="/about" className="text-ink hover:text-accent underline-offset-4 hover:underline">Über uns</Link>
  205. <span className="text-border">·</span>
  206. <Link to="/disclaimer" className="text-ink hover:text-accent underline-offset-4 hover:underline">Haftungsausschluss</Link>
  207. <span className="text-border">·</span>
  208. <Link to="/privacy" className="text-ink hover:text-accent underline-offset-4 hover:underline">Datenschutz</Link>
  209. </div>
  210. <p className="text-center text-xs text-muted-foreground tracking-wide">
  211. © {new Date().getFullYear()} {SITE_NAME}. Alle Rechte vorbehalten.
  212. </p>
  213. </div>
  214. </footer>
  215. </div>
  216. </QueryClientProvider>
  217. );
  218. }
Advertisement
Add Comment
Please, Sign In to add comment