1package gnocialview23import (4 "strconv"56 gnocial "gno.land/r/g1n4pl5uc4yt5r96m9w6fmdznx3x0jyg8l6arhmt/gnocial"7)89// Render is a read-only gnoweb page. Writes go to the fund realm from the website.10// This view is enabled only after that fund realm is already live.11func Render(path string) string {12 var b string13 b = "# Gnocial\n\nPhien ban " + gnocial.Version()14 if next := gnocial.Successor(); next != "" {15 b += "\n\nKe tiep: " + next16 }17 if gnocial.Paused() {18 b += "\n\nTam dung dang bat. Ban ve van mo."19 }20 b += "\n\nThanh vien: " + strconv.Itoa(gnocial.MemberCount()) + "\n\n"21 posts := gnocial.Feed(0, 8)22 if len(posts) == 0 {23 b += "Chua co bai.\n"24 return b25 }26 for _, p := range posts {27 h, name := namesOf(p.Author)28 b += "- #" + strconv.Itoa(p.ID) + " @" + h + " " + name + "\n"29 if !p.Gated && !p.Deleted {30 b += " " + preview(p.Body, 160) + "\n"31 }32 }33 return b34}35Render(path string) string
Sheet(kind string, a string, b string, c string) string
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.