/* embeddedTR — blog liste sayfası: 3 düzen + bootstrap (sadece blog.html) */
const { useEffect: useEffectL } = React;
/* ═══ DÜZEN A — Editöryel kartlar ═══ */
function CardsLayout({ posts }) {
return (
);
}
/* ═══ DÜZEN B — Magazin (1 büyük + 3 yan, kalanlar alt ızgarada) ═══ */
function MagazineLayout({ posts }) {
const lead = posts[0];
const side = posts.slice(1, 4);
const grid = posts.slice(4);
return (
{grid.length > 0 && (
<>
Daha fazla yazı
>
)}
);
}
/* ═══ DÜZEN C — Sade liste ═══ */
function ListLayout({ posts }) {
return (
);
}
const LAYOUTS = { cards: CardsLayout, magazine: MagazineLayout, list: ListLayout };
function BlogApp() {
const [t, setTweak] = useTweaks(BLOG_DEFAULTS);
const theme = t.dark ? "dark" : "light";
const ref = useReveal();
useEffectL(() => {
const r = document.documentElement;
r.setAttribute("data-theme", theme);
r.setAttribute("data-density", t.density);
r.style.setProperty("--accent", t.accent);
}, [theme, t.density, t.accent]);
const Layout = LAYOUTS[t.blogLayout] || CardsLayout;
return (
setTweak("dark", !t.dark)} />
~/ teknik blog
Gömülü sistemler üzerine yazılar.
Haberleşme protokollerinden çip üreticilerinin tarihine — uygulamalı, açık ve Türkçe teknik içerik.
setTweak("blogLayout", v)} />
setTweak("dark", v)} />
setTweak("accent", v)} />
setTweak("density", v)} />
);
}
ReactDOM.createRoot(document.getElementById("app")).render();