╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ ui.zig ───────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
3231 3232 // native and server-side sessions choose from the embedded collection. WASM 3233 // keeps the art serialized by the server instead. 3234 fn chooseAnsiArtForNavigation(session: *Session) void { 3235 if (comptime ansi_art.art.len == 0) return; 3236 if (session.data.current_page == .not_found) { 3237 session.data.ansi_art = ansi_art.not_found; 3238 return; 3239 } 3240 const io = session.io orelse return; 3241 var random: usize = undefined; 3242 io.random(std.mem.asBytes(&random)); 3243 session.data.ansi_art = ansi_art.art[random % ansi_art.art.len]; 3244 } 3245