// ─── オンラインクリニック 結 お知らせ 共通コンポーネント ─── // データは news/news.js(window.NEWS_ITEMS)が単一ソース。 // // TOPページ(index.html): news.js → shared.jsx の順に読み込み、 を置く。 // Icon は index.html 側の定義を使う。 // 詳細ページ(news/.html): news.js → ../lp/shared.jsx → ../doctors/shared.jsx → shared.jsx // の順に読み込み、 するだけ。 // ヘッダは医師ページと同じ DoctorNav(TOPの Nav の移植)、Icon / OnkriLogo は ../lp/shared.jsx を使う。 // // 文言はすべて React の子要素として描画する(HTML文字列は使わない)。 const NEWS_EXTERNAL_LINK = { target: '_blank', rel: 'noopener noreferrer' }; const getNewsItems = () => (typeof window !== 'undefined' && window.NEWS_ITEMS) || []; // ─── TOP:お知らせカード(ヒーロー直後) ─── const NewsTopSection = () => { const items = getNewsItems().filter((n) => n.status === 'published' && n.topVisible === true); if (items.length === 0) return null; return (
NEWS

お知らせ

{items.map((n) =>
{n.category} {n.eventDate && 開催日 {n.eventDate} }

{/* カード全体のクリック領域は CSS(.news-card__link::after)で広げる。リンクはこの1つだけ */} {n.title}

{n.excerpt}

)}
); }; // ─── 詳細ページ:本文 ─── const NewsArticle = ({ item: n }) => (
{n.category} {n.eventDate && 開催日 {n.eventDate} }

{n.title}

{(n.body || []).map((t, i) =>

{t}

)}
{n.booth && n.booth.length > 0 &&

{n.boothTitle}

    {n.booth.map((b) =>
  • {b.label} {b.text}
  • )}
} {n.closing &&

{n.closing}

} {n.guide && n.guide.length > 0 &&

{n.guide.map((g, i) => g.href ? {g.text} : {g.text} )}

} {n.overview && n.overview.length > 0 &&

{n.overviewTitle}

{n.overview.map((o) =>
{o.label}
{o.text}
)} {n.registration &&
{n.registration.title || '来場登録'}
{n.registration.label} {n.registration.note &&

{n.registration.note}

}
}
}
); // ─── 詳細ページ:フッター ─── // 医師ページの DoctorFooter と同じ内容・見た目。DOCTOR_FOOTER_MENU の医師リンクは // doctors/ 配下からの相対('nakagami.html' 等)なので、news/ 配下から辿れるよう '../doctors/' を補う。 const NEWS_FOOTER_MENU = (typeof DOCTOR_FOOTER_MENU !== 'undefined' ? DOCTOR_FOOTER_MENU : []).map((g) => ({ ...g, links: g.links.map((l) => l.external || /^(\.\.\/|https?:)/.test(l.href) ? l : { ...l, href: '../doctors/' + l.href }) })); const NewsFooter = () => (
オンラインクリニック 結

患者様のライフスタイルに寄り添う、 新時代のオンライン診療を提供します。

{NEWS_FOOTER_MENU.map((group) => )}
© 2026 オンラインクリニック 結. All rights reserved.
); // ─── 詳細ページ本体 ─── const NewsDetailApp = ({ id }) => { const item = getNewsItems().find((n) => n.id === id && n.status === 'published'); return ( <>
{item ? :

お知らせが見つかりませんでした(ID: {id})。

掲載が終了したか、URLが変わった可能性があります。

}
); }; Object.assign(window, { NewsTopSection, NewsArticle, NewsDetailApp });