PageSourceSearch

https://ru-digital.de/build/routes/widget/frame-EZSOX4M4.js

js ru-digital.de collected 2026-10-06 05:23:36 UTC 3,487 bytes, 88 lines download raw bytes

1import {
2  logomain_default
3} from "/build/_shared/chunk-XYPXCSVK.js";
4import {
5  RelatedMediaSection,
6  fallback_screen_default,
7  spinner_default
8} from "/build/_shared/chunk-Y6OIBGDA.js";
9import "/build/_shared/chunk-P4WFY3UR.js";
10import "/build/_shared/chunk-VIU3M2OR.js";
11import {
12  Link,
13  init_esm,
14  useLoaderData
15} from "/build/_shared/chunk-46RNFGVL.js";
16import {
17  React,
18  __toESM,
19  init_react,
20  require_react
21} from "/build/_shared/chunk-BNRLY3XL.js";
22
23// browser-route-module:routes/widget/frame.tsx?browser
24init_react();
25
26// app/routes/widget/frame.tsx
27init_react();
28init_esm();
29var import_react2 = __toESM(require_react());
30function WidgetFrame() {
31  const { data, title, subtitle, backgroundColor, search } = useLoaderData();
32  const containerRef = (0, import_react2.useRef)(null);
33  const [loading, setLoading] = (0, import_react2.useState)(true);
34  (0, import_react2.useEffect)(() => {
35    const sendHeight = () => {
36      if (containerRef.current) {
37        const height = containerRef.current.scrollHeight;
38        window.parent.postMessage({ type: "WIDGET_HEIGHT", height }, "*");
39      }
40    };
41    const timeout = setTimeout(() => {
42      setLoading(false);
43      sendHeight();
44    }, 1e3);
45    window.addEventListener("resize", sendHeight);
46    return () => {
47      clearTimeout(timeout);
48      window.removeEventListener("resize", sendHeight);
49    };
50  }, []);
51  return /* @__PURE__ */ React.createElement(React.Fragment, null, loading ? /* @__P
51URE__ */ React.createElement("div", {
52    className: "max-h-full p-4 text-center text-gray-500"
53  }, /* @__PURE__ */ React.createElement(spinner_default, null), " ") : data && !data.length || !data ? /* @__PURE__ */ React.createElement(fallback_screen_default, {
54    subtitle: "Versuche es mit einem anderen Suchbegriff oder verwende weniger Filter. Manchmal hilft auch die Suche in einem anderen Bundesland.",
55    title: "Leider konnten wir kein Medium finden."
56  }) : /* @__PURE__ */ React.createElement("div", {
57    className: `flex w-full flex-col  md:pb-20 md:pt-4 ${backgroundColor ? backgroundColor : "bg-transparent"}`,
58    ref: containerRef
59  }, /* @__PURE__ */ React.createElement(RelatedMediaSection, {
60    isExternlLink: true,
61    to: `/search/main${search}`,
62    masonry: true,
63    mediaCards: data,
64    title: /* @__PURE__ */ React.createElement("div", {
65      className: "flex flex-col items-start px-3 md:px-0"
66    }, /* @__PURE__ */ React.createElement("div", {
67      className: "mt-1  max-w-6xl flex-row  md:flex"
68    }, /* @__PURE__ */ React.createElement("p", {
69      className: "text-[16px] leading-[1.556] text-textColor-primary"
70    }, "Digitale Medien f\xFCr deinen Religionsunterricht - mit \u2764\uFE0F\uFE0F von", " ", /* @__PURE__ */ React.createElement(Link, {
71      to: "/media/home"
72    }, /* @__PURE__ */ React.createElement("span", {
73      className: "sr-only"
74    }, "RU-digital"), /* @__PURE__ */ React.createElement("img", {
75      className: "inline-block h-6 w-auto md:ml-2",
76      src: logomain_default,
77      alt: "RU-digital-logo"
78    })))), /* @__PURE__ */ React.createElement("h2", {
79      className: "mt-6 text-2xl font-bold leading-[1.625] text-textColor-primary lg:text-[40px]"
80    }, title), /* @__PURE__ */ React.createElement("p", {
81      className: "mt-2 max-w-6xl text-sm leading-[1.556] text-textColor-primary md:ml-0 md:text-[16px]"
82    }, subtitle))
83  })));
84}
85export {
86  WidgetFrame as default
87};
88//# sourceMappingURL=/build/routes/widget/frame-EZSOX4M4.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.