code wiki / (root) / nx_lib_page.nx

nx_lib_page.nx

buildroot/runtime/nx_lib_page.nx

7882 B171 linesdepth 5pulls 5 transitivereach 7 importersview sourcekind librarytopic lib
docsdependenciesstructsconstsfunctions

about

nx_lib_page.nx -- sovereign ZERO-JS HTML frontend for the nishi-library. Server-renders the search page + work detail straight from nx_lib_store -- no app.js, no leaflet, no client JS at all. HTML-escaped at render (the &amp; bug fixed RIGHT, in .nx). The daemon serves these as text/html routes: GET / -> search form + (with ?q=) results GET /work/<hk> -> work detail license_tier: ORIGINAL | genealogy_id: nishi_library_sovereign_page_2026_07_01

dependencies 2 imports · 2 importers

nx_lib_store.nx nx_lib_search.nx nx_lib_page.nx nx_lib_http.nx nx_lib_page_test.nx

imports: nx_lib_store.nxnx_lib_search.nx

imported by: nx_lib_http.nxnx_lib_page_test.nx

structs

none

consts

57const LP_HEAD: *u8 = "<!doctype html><meta charset=utf-8><meta name=viewport content=\"width=device-width,initial-scale=1\"><title>Nishi Library</title><style>body{font-family:-apple-system,Segoe UI,sans-serif;max-width:760px;margin:6vh auto;padding:0 20px;color:#1a1f2c}a{color:#1e40af;text-decoration:none}a:hover{text-decoration:underline}li{margin:.5em 0}input{padding:9px;width:70%}button{padding:9px}</style>" as *u8

functions

11func lp_puts(buf: *u8, off: i64, s: *u8) -> i64
18func lp_putdec(buf: *u8, off: i64, v: i64) -> i64
called by 1: lp_resp
31func lp_esc(buf: *u8, off: i64, src: *u8, srclen: i64) -> i64
called by 2: lhd_page_homelhd_page_work calls 1: lp_puts
47func lp_resp(out: *u8, body: *u8, bo: i64) -> i64
60func lhd_page_home(query: *u8, qn: i64, out: *u8) -> i64
126func lhd_page_work(hk_ptr: *u8, hk_n: i64, out: *u8) -> i64