diff --git a/init.lua b/init.lua index f44b726..93c9ef0 100644 --- a/init.lua +++ b/init.lua @@ -268,6 +268,25 @@ function init(ctx) ctx_panels.carousel_state[entry.id] = carousel.new_state(entry.id, paths, interval) end + -- L.6: load + parse news.md once. The detail-panel's news branch + -- reads ctx.news_body_blocks; nil-safe so a missing file still + -- shows the "News" entry with an empty body. + do + local news_path = MODULE_DIR .. "/news.md" + local f = io.open(news_path, "rb") + if f then + local content = f:read("*a") + f:close() + local fm = dofile(MODULE_DIR .. "/frontmatter.lua") + local md = dofile(MODULE_DIR .. "/markdown.lua") + local meta, body = fm.parse(content) + if meta then + ctx_panels.news_entry.title = meta.title or "News" + ctx_panels.news_body_blocks = md.parse(body) + end + end + end + local wy, hy = engine.render.measure_text(YES_LABEL, FONT_BUTTON) local wn, hn = engine.render.measure_text(NO_LABEL, FONT_BUTTON) local qbtn_w = math.max(wy, wn) + 2 * PAD_X diff --git a/news.md b/news.md new file mode 100644 index 0000000..81d2e63 --- /dev/null +++ b/news.md @@ -0,0 +1,22 @@ +--- +{"title":"News","published":"2026-06-11"} +--- + +# Sporel News + +## Coming soon + +Live news will eventually appear here — release notes, mod-of-the-week, +known-issue advisories. For now this is a static stub. + +## What works today + +- Master-detail launcher with per-module description + dep-status +- Hero carousel with auto-rotate +- Dep-conflict ambient-tint + launch-modal + +## What we are working on next + +- Live news source (Gitea-API or RSS-feed) +- Module-categories filter (Game / Tool / Test) +- Last-played persistence