From b662eb5219d6bd44eb4b9939c57bd2e26cacabdd Mon Sep 17 00:00:00 2001 From: bouncepaw Date: Sun, 24 Jan 2021 17:52:40 +0500 Subject: [PATCH] Move some files around --- README.md | 2 +- .../{http_mutators.qtpl => mutators.qtpl} | 0 ...http_mutators.qtpl.go => mutators.qtpl.go} | 122 ++++----- templates/{http_readers.qtpl => readers.qtpl} | 0 .../{http_readers.qtpl.go => readers.qtpl.go} | 220 +++++++-------- templates/{http_stuff.qtpl => stuff.qtpl} | 2 +- .../{http_stuff.qtpl.go => stuff.qtpl.go} | 252 +++++++++--------- 7 files changed, 299 insertions(+), 299 deletions(-) rename templates/{http_mutators.qtpl => mutators.qtpl} (100%) rename templates/{http_mutators.qtpl.go => mutators.qtpl.go} (57%) rename templates/{http_readers.qtpl => readers.qtpl} (100%) rename templates/{http_readers.qtpl.go => readers.qtpl.go} (54%) rename templates/{http_stuff.qtpl => stuff.qtpl} (98%) rename templates/{http_stuff.qtpl.go => stuff.qtpl.go} (52%) diff --git a/README.md b/README.md index db4db81..d092c4c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 🍄 MycorrhizaWiki 0.12 +# 🍄 MycorrhizaWiki 0.13 A wiki engine. [Main wiki](https://mycorrhiza.lesarbr.es) diff --git a/templates/http_mutators.qtpl b/templates/mutators.qtpl similarity index 100% rename from templates/http_mutators.qtpl rename to templates/mutators.qtpl diff --git a/templates/http_mutators.qtpl.go b/templates/mutators.qtpl.go similarity index 57% rename from templates/http_mutators.qtpl.go rename to templates/mutators.qtpl.go index 8f25c90..7a4ec80 100644 --- a/templates/http_mutators.qtpl.go +++ b/templates/mutators.qtpl.go @@ -1,169 +1,169 @@ -// Code generated by qtc from "http_mutators.qtpl". DO NOT EDIT. +// Code generated by qtc from "mutators.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line templates/http_mutators.qtpl:1 +//line templates/mutators.qtpl:1 package templates -//line templates/http_mutators.qtpl:1 +//line templates/mutators.qtpl:1 import "net/http" -//line templates/http_mutators.qtpl:3 +//line templates/mutators.qtpl:3 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line templates/http_mutators.qtpl:3 +//line templates/mutators.qtpl:3 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line templates/http_mutators.qtpl:3 +//line templates/mutators.qtpl:3 func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { -//line templates/http_mutators.qtpl:3 +//line templates/mutators.qtpl:3 qw422016.N().S(` `) -//line templates/http_mutators.qtpl:4 +//line templates/mutators.qtpl:4 qw422016.N().S(navHTML(rq, hyphaName, "edit")) -//line templates/http_mutators.qtpl:4 +//line templates/mutators.qtpl:4 qw422016.N().S(`

Edit `) -//line templates/http_mutators.qtpl:6 +//line templates/mutators.qtpl:6 qw422016.E().S(hyphaName) -//line templates/http_mutators.qtpl:6 +//line templates/mutators.qtpl:6 qw422016.N().S(`

`) -//line templates/http_mutators.qtpl:7 +//line templates/mutators.qtpl:7 qw422016.N().S(warning) -//line templates/http_mutators.qtpl:7 +//line templates/mutators.qtpl:7 qw422016.N().S(`

Cancel
`) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 } -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 qt422016.ReleaseWriter(qw422016) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 } -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string { -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 qb422016 := qt422016.AcquireByteBuffer() -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 qs422016 := string(qb422016.B) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 qt422016.ReleaseByteBuffer(qb422016) -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 return qs422016 -//line templates/http_mutators.qtpl:17 +//line templates/mutators.qtpl:17 } -//line templates/http_mutators.qtpl:19 +//line templates/mutators.qtpl:19 func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { -//line templates/http_mutators.qtpl:19 +//line templates/mutators.qtpl:19 qw422016.N().S(` `) -//line templates/http_mutators.qtpl:20 +//line templates/mutators.qtpl:20 qw422016.N().S(navHTML(rq, hyphaName, "edit")) -//line templates/http_mutators.qtpl:20 +//line templates/mutators.qtpl:20 qw422016.N().S(`

Edit `) -//line templates/http_mutators.qtpl:22 +//line templates/mutators.qtpl:22 qw422016.E().S(hyphaName) -//line templates/http_mutators.qtpl:22 +//line templates/mutators.qtpl:22 qw422016.N().S(` (preview)

`) -//line templates/http_mutators.qtpl:23 +//line templates/mutators.qtpl:23 qw422016.N().S(warning) -//line templates/http_mutators.qtpl:23 +//line templates/mutators.qtpl:23 qw422016.N().S(`

Cancel

Note that the hypha is not saved yet. You can preview the changes ↓

`) -//line templates/http_mutators.qtpl:33 +//line templates/mutators.qtpl:33 qw422016.N().S(renderedPage) -//line templates/http_mutators.qtpl:33 +//line templates/mutators.qtpl:33 qw422016.N().S(`
`) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 } -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 qt422016.ReleaseWriter(qw422016) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 } -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string { -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 qb422016 := qt422016.AcquireByteBuffer() -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 qs422016 := string(qb422016.B) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 qt422016.ReleaseByteBuffer(qb422016) -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 return qs422016 -//line templates/http_mutators.qtpl:35 +//line templates/mutators.qtpl:35 } diff --git a/templates/http_readers.qtpl b/templates/readers.qtpl similarity index 100% rename from templates/http_readers.qtpl rename to templates/readers.qtpl diff --git a/templates/http_readers.qtpl.go b/templates/readers.qtpl.go similarity index 54% rename from templates/http_readers.qtpl.go rename to templates/readers.qtpl.go index d9000da..e93927b 100644 --- a/templates/http_readers.qtpl.go +++ b/templates/readers.qtpl.go @@ -1,256 +1,256 @@ -// Code generated by qtc from "http_readers.qtpl". DO NOT EDIT. +// Code generated by qtc from "readers.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line templates/http_readers.qtpl:1 +//line templates/readers.qtpl:1 package templates -//line templates/http_readers.qtpl:1 +//line templates/readers.qtpl:1 import "net/http" -//line templates/http_readers.qtpl:2 +//line templates/readers.qtpl:2 import "path" -//line templates/http_readers.qtpl:3 +//line templates/readers.qtpl:3 import "github.com/bouncepaw/mycorrhiza/user" -//line templates/http_readers.qtpl:5 +//line templates/readers.qtpl:5 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line templates/http_readers.qtpl:5 +//line templates/readers.qtpl:5 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line templates/http_readers.qtpl:5 +//line templates/readers.qtpl:5 func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) { -//line templates/http_readers.qtpl:5 +//line templates/readers.qtpl:5 qw422016.N().S(` `) -//line templates/http_readers.qtpl:6 +//line templates/readers.qtpl:6 streamnavHTML(qw422016, rq, hyphaName, "history") -//line templates/http_readers.qtpl:6 +//line templates/readers.qtpl:6 qw422016.N().S(`

History of `) -//line templates/http_readers.qtpl:9 +//line templates/readers.qtpl:9 qw422016.E().S(hyphaName) -//line templates/http_readers.qtpl:9 +//line templates/readers.qtpl:9 qw422016.N().S(`

`) -//line templates/http_readers.qtpl:10 +//line templates/readers.qtpl:10 qw422016.N().S(list) -//line templates/http_readers.qtpl:10 +//line templates/readers.qtpl:10 qw422016.N().S(`
`) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 } -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) { -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 StreamHistoryHTML(qw422016, rq, hyphaName, list) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 qt422016.ReleaseWriter(qw422016) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 } -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 func HistoryHTML(rq *http.Request, hyphaName, list string) string { -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 qb422016 := qt422016.AcquireByteBuffer() -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 WriteHistoryHTML(qb422016, rq, hyphaName, list) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 qs422016 := string(qb422016.B) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 qt422016.ReleaseByteBuffer(qb422016) -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 return qs422016 -//line templates/http_readers.qtpl:13 +//line templates/readers.qtpl:13 } -//line templates/http_readers.qtpl:15 +//line templates/readers.qtpl:15 func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) { -//line templates/http_readers.qtpl:15 +//line templates/readers.qtpl:15 qw422016.N().S(` `) -//line templates/http_readers.qtpl:16 +//line templates/readers.qtpl:16 streamnavHTML(qw422016, rq, hyphaName, "revision", revHash) -//line templates/http_readers.qtpl:16 +//line templates/readers.qtpl:16 qw422016.N().S(`

Please note that viewing binary parts of hyphae is not supported in history for now.

`) -//line templates/http_readers.qtpl:20 +//line templates/readers.qtpl:20 qw422016.N().S(naviTitle) -//line templates/http_readers.qtpl:20 +//line templates/readers.qtpl:20 qw422016.N().S(` `) -//line templates/http_readers.qtpl:21 +//line templates/readers.qtpl:21 qw422016.N().S(contents) -//line templates/http_readers.qtpl:21 +//line templates/readers.qtpl:21 qw422016.N().S(`

`) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 } -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) { -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 StreamRevisionHTML(qw422016, rq, hyphaName, naviTitle, contents, tree, revHash) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 qt422016.ReleaseWriter(qw422016) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 } -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) string { -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 qb422016 := qt422016.AcquireByteBuffer() -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 WriteRevisionHTML(qb422016, rq, hyphaName, naviTitle, contents, tree, revHash) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 qs422016 := string(qb422016.B) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 qt422016.ReleaseByteBuffer(qb422016) -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 return qs422016 -//line templates/http_readers.qtpl:28 +//line templates/readers.qtpl:28 } // If `contents` == "", a helpful message is shown instead. -//line templates/http_readers.qtpl:31 +//line templates/readers.qtpl:31 func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName string, hasAmnt bool) { -//line templates/http_readers.qtpl:31 +//line templates/readers.qtpl:31 qw422016.N().S(` `) -//line templates/http_readers.qtpl:32 +//line templates/readers.qtpl:32 streamnavHTML(qw422016, rq, hyphaName, "page") -//line templates/http_readers.qtpl:32 +//line templates/readers.qtpl:32 qw422016.N().S(`
`) -//line templates/http_readers.qtpl:35 +//line templates/readers.qtpl:35 qw422016.N().S(naviTitle) -//line templates/http_readers.qtpl:35 +//line templates/readers.qtpl:35 qw422016.N().S(` `) -//line templates/http_readers.qtpl:36 +//line templates/readers.qtpl:36 if contents == "" { -//line templates/http_readers.qtpl:36 +//line templates/readers.qtpl:36 qw422016.N().S(`

This hypha has no text. Why not create it?

`) -//line templates/http_readers.qtpl:38 +//line templates/readers.qtpl:38 } else { -//line templates/http_readers.qtpl:38 +//line templates/readers.qtpl:38 qw422016.N().S(` `) -//line templates/http_readers.qtpl:39 +//line templates/readers.qtpl:39 qw422016.N().S(contents) -//line templates/http_readers.qtpl:39 +//line templates/readers.qtpl:39 qw422016.N().S(` `) -//line templates/http_readers.qtpl:40 +//line templates/readers.qtpl:40 } -//line templates/http_readers.qtpl:40 +//line templates/readers.qtpl:40 qw422016.N().S(`
`) -//line templates/http_readers.qtpl:43 +//line templates/readers.qtpl:43 if prevHyphaName != "" { -//line templates/http_readers.qtpl:43 +//line templates/readers.qtpl:43 qw422016.N().S(` `) -//line templates/http_readers.qtpl:45 +//line templates/readers.qtpl:45 } -//line templates/http_readers.qtpl:45 +//line templates/readers.qtpl:45 qw422016.N().S(` `) -//line templates/http_readers.qtpl:46 +//line templates/readers.qtpl:46 if nextHyphaName != "" { -//line templates/http_readers.qtpl:46 +//line templates/readers.qtpl:46 qw422016.N().S(` `) -//line templates/http_readers.qtpl:48 +//line templates/readers.qtpl:48 } -//line templates/http_readers.qtpl:48 +//line templates/readers.qtpl:48 qw422016.N().S(`
`) -//line templates/http_readers.qtpl:50 +//line templates/readers.qtpl:50 if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" { -//line templates/http_readers.qtpl:50 +//line templates/readers.qtpl:50 qw422016.N().S(`
`) -//line templates/http_readers.qtpl:54 +//line templates/readers.qtpl:54 if hasAmnt { -//line templates/http_readers.qtpl:54 +//line templates/readers.qtpl:54 qw422016.N().S(` Unattach current attachment? `) -//line templates/http_readers.qtpl:56 +//line templates/readers.qtpl:56 } -//line templates/http_readers.qtpl:56 +//line templates/readers.qtpl:56 qw422016.N().S(`
@@ -258,44 +258,44 @@ func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, navi
`) -//line templates/http_readers.qtpl:62 +//line templates/readers.qtpl:62 } -//line templates/http_readers.qtpl:62 +//line templates/readers.qtpl:62 qw422016.N().S(`
`) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 } -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 func WritePageHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName string, hasAmnt bool) { -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 StreamPageHTML(qw422016, rq, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName, hasAmnt) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 qt422016.ReleaseWriter(qw422016) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 } -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName string, hasAmnt bool) string { -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 qb422016 := qt422016.AcquireByteBuffer() -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 WritePageHTML(qb422016, rq, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName, hasAmnt) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 qs422016 := string(qb422016.B) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 qt422016.ReleaseByteBuffer(qb422016) -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 return qs422016 -//line templates/http_readers.qtpl:67 +//line templates/readers.qtpl:67 } diff --git a/templates/http_stuff.qtpl b/templates/stuff.qtpl similarity index 98% rename from templates/http_stuff.qtpl rename to templates/stuff.qtpl index 8723860..adf7958 100644 --- a/templates/http_stuff.qtpl +++ b/templates/stuff.qtpl @@ -60,7 +60,7 @@

About {%s util.SiteName %}