From a8921593398f8b600e09b82a69a2c4a077785510 Mon Sep 17 00:00:00 2001 From: la-ninpre Date: Thu, 27 Apr 2023 01:02:53 +0300 Subject: www/inks: add 0.9.2pre20230325 this is not a real version, but since there were no releases for some time, i packaged the latest tip of mercurial repository and put it on my webserver. --- www/inks/patches/patch-inks_go | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 www/inks/patches/patch-inks_go (limited to 'www/inks/patches/patch-inks_go') diff --git a/www/inks/patches/patch-inks_go b/www/inks/patches/patch-inks_go new file mode 100644 index 0000000..216ed18 --- /dev/null +++ b/www/inks/patches/patch-inks_go @@ -0,0 +1,44 @@ +Index: inks.go +--- inks.go.orig ++++ inks.go +@@ -44,7 +44,7 @@ var tagName = "inks,2019" + + func getInfo(r *http.Request) map[string]interface{} { + templinfo := make(map[string]interface{}) +- templinfo["StyleParam"] = getstyleparam("views/style.css") ++ templinfo["StyleParam"] = getstyleparam("${TRUEPREFIX}/share/${PKGSTEM}/views/style.css") + templinfo["UserInfo"] = login.GetUserInfo(r) + templinfo["LogoutCSRF"] = login.GetCSRF("logout", r) + templinfo["ServerName"] = serverName +@@ -474,7 +474,7 @@ func showrandomrss(w http.ResponseWriter, r *http.Requ + + func servecss(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=7776000") +- http.ServeFile(w, r, "views"+r.URL.Path) ++ http.ServeFile(w, r, "${TRUEPREFIX}/share/${PKGSTEM}/views"+r.URL.Path) + } + func servehtml(w http.ResponseWriter, r *http.Request) { + templinfo := getInfo(r) +@@ -569,15 +569,15 @@ func serve() { + getconfig("debug", &debug) + + readviews = templates.Load(debug, +- "views/header.html", +- "views/inks.html", +- "views/tags.html", +- "views/addlink.html", +- "views/sources.html", +- "views/login.html", ++ "${TRUEPREFIX}/share/${PKGSTEM}/views/header.html", ++ "${TRUEPREFIX}/share/${PKGSTEM}/views/inks.html", ++ "${TRUEPREFIX}/share/${PKGSTEM}/views/tags.html", ++ "${TRUEPREFIX}/share/${PKGSTEM}/views/addlink.html", ++ "${TRUEPREFIX}/share/${PKGSTEM}/views/sources.html", ++ "${TRUEPREFIX}/share/${PKGSTEM}/views/login.html", + ) + if !debug { +- s := "views/style.css" ++ s := "${TRUEPREFIX}/share/${PKGSTEM}/views/style.css" + savedstyleparams[s] = getstyleparam(s) + + } -- cgit v1.2.3