1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-08-05 05:13:50 +00:00

Display beautiful names in <title> on /hypha/ and /rev/

This commit is contained in:
bouncepaw 2021-02-02 21:47:34 +05:00
parent 9fbcab210a
commit 1604278819

View File

@ -53,7 +53,7 @@ func handlerRevision(w http.ResponseWriter, rq *http.Request) {
) )
w.Header().Set("Content-Type", "text/html;charset=utf-8") w.Header().Set("Content-Type", "text/html;charset=utf-8")
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
w.Write([]byte(base(hyphaName, page, u))) w.Write([]byte(base(util.BeautifulName(hyphaName), page, u)))
} }
// handlerText serves raw source text of the hypha. // handlerText serves raw source text of the hypha.
@ -104,7 +104,7 @@ func handlerHypha(w http.ResponseWriter, rq *http.Request) {
treeHTML, prevHypha, nextHypha := tree.Tree(hyphaName, IterateHyphaNamesWith) treeHTML, prevHypha, nextHypha := tree.Tree(hyphaName, IterateHyphaNamesWith)
util.HTTP200Page(w, util.HTTP200Page(w,
templates.BaseHTML( templates.BaseHTML(
hyphaName, util.BeautifulName(hyphaName),
templates.PageHTML(rq, hyphaName, templates.PageHTML(rq, hyphaName,
naviTitle(hyphaName), naviTitle(hyphaName),
contents, contents,