diff --git a/shroom/shroom.go b/shroom/shroom.go index 74a5234..6269694 100644 --- a/shroom/shroom.go +++ b/shroom/shroom.go @@ -30,7 +30,7 @@ func init() { rawText, err = FetchTextFile(h) case *hyphae.MediaHypha: rawText, err = FetchTextFile(h) - binaryBlock = views.MediaHTMLRaw(h) + binaryBlock = views.MediaRaw(h) } return } diff --git a/views/admin.qtpl b/views/admin.qtpl index ef68b8e..25156b5 100644 --- a/views/admin.qtpl +++ b/views/admin.qtpl @@ -4,7 +4,7 @@ {% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} -{% func AdminPanelHTML(lc *l18n.Localizer) %} +{% func AdminPanel(lc *l18n.Localizer) %}

{%s lc.Get("admin.panel_title") %}

@@ -36,7 +36,7 @@
{% endfunc %} -{% func AdminUsersPanelHTML(userList []*user.User, lc *l18n.Localizer) %} +{% func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) %}

{%s lc.Get("admin.users_title") %}

@@ -82,7 +82,7 @@
{% endfunc %} -{% func AdminUserNewHTML(f util.FormData, lc *l18n.Localizer) %} +{% func AdminUserNew(f util.FormData, lc *l18n.Localizer) %}

{%s lc.Get("admin.newuser_title") %}

@@ -127,7 +127,7 @@
{% endfunc %} -{% func AdminUserEditHTML(u *user.User, f util.FormData, lc *l18n.Localizer) %} +{% func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) %}

@@ -167,7 +167,7 @@

{% endfunc %} -{% func AdminUserDeleteHTML(u *user.User, f util.FormData, lc *l18n.Localizer) %} +{% func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) %}

{%s lc.Get("admin.user_delete_heading") %}

diff --git a/views/admin.qtpl.go b/views/admin.qtpl.go index 64de23e..783ad1d 100644 --- a/views/admin.qtpl.go +++ b/views/admin.qtpl.go @@ -33,7 +33,7 @@ var ( ) //line views/admin.qtpl:7 -func StreamAdminPanelHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func StreamAdminPanel(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/admin.qtpl:7 qw422016.N().S(`
@@ -106,22 +106,22 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/admin.qtpl:37 -func WriteAdminPanelHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func WriteAdminPanel(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/admin.qtpl:37 qw422016 := qt422016.AcquireWriter(qq422016) //line views/admin.qtpl:37 - StreamAdminPanelHTML(qw422016, lc) + StreamAdminPanel(qw422016, lc) //line views/admin.qtpl:37 qt422016.ReleaseWriter(qw422016) //line views/admin.qtpl:37 } //line views/admin.qtpl:37 -func AdminPanelHTML(lc *l18n.Localizer) string { +func AdminPanel(lc *l18n.Localizer) string { //line views/admin.qtpl:37 qb422016 := qt422016.AcquireByteBuffer() //line views/admin.qtpl:37 - WriteAdminPanelHTML(qb422016, lc) + WriteAdminPanel(qb422016, lc) //line views/admin.qtpl:37 qs422016 := string(qb422016.B) //line views/admin.qtpl:37 @@ -132,7 +132,7 @@ func AdminPanelHTML(lc *l18n.Localizer) string { } //line views/admin.qtpl:39 -func StreamAdminUsersPanelHTML(qw422016 *qt422016.Writer, userList []*user.User, lc *l18n.Localizer) { +func StreamAdminUsersPanel(qw422016 *qt422016.Writer, userList []*user.User, lc *l18n.Localizer) { //line views/admin.qtpl:39 qw422016.N().S(`
@@ -263,22 +263,22 @@ func StreamAdminUsersPanelHTML(qw422016 *qt422016.Writer, userList []*user.User, } //line views/admin.qtpl:83 -func WriteAdminUsersPanelHTML(qq422016 qtio422016.Writer, userList []*user.User, lc *l18n.Localizer) { +func WriteAdminUsersPanel(qq422016 qtio422016.Writer, userList []*user.User, lc *l18n.Localizer) { //line views/admin.qtpl:83 qw422016 := qt422016.AcquireWriter(qq422016) //line views/admin.qtpl:83 - StreamAdminUsersPanelHTML(qw422016, userList, lc) + StreamAdminUsersPanel(qw422016, userList, lc) //line views/admin.qtpl:83 qt422016.ReleaseWriter(qw422016) //line views/admin.qtpl:83 } //line views/admin.qtpl:83 -func AdminUsersPanelHTML(userList []*user.User, lc *l18n.Localizer) string { +func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) string { //line views/admin.qtpl:83 qb422016 := qt422016.AcquireByteBuffer() //line views/admin.qtpl:83 - WriteAdminUsersPanelHTML(qb422016, userList, lc) + WriteAdminUsersPanel(qb422016, userList, lc) //line views/admin.qtpl:83 qs422016 := string(qb422016.B) //line views/admin.qtpl:83 @@ -289,7 +289,7 @@ func AdminUsersPanelHTML(userList []*user.User, lc *l18n.Localizer) string { } //line views/admin.qtpl:85 -func StreamAdminUserNewHTML(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Localizer) { +func StreamAdminUserNew(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Localizer) { //line views/admin.qtpl:85 qw422016.N().S(`
@@ -427,22 +427,22 @@ func StreamAdminUserNewHTML(qw422016 *qt422016.Writer, f util.FormData, lc *l18n } //line views/admin.qtpl:128 -func WriteAdminUserNewHTML(qq422016 qtio422016.Writer, f util.FormData, lc *l18n.Localizer) { +func WriteAdminUserNew(qq422016 qtio422016.Writer, f util.FormData, lc *l18n.Localizer) { //line views/admin.qtpl:128 qw422016 := qt422016.AcquireWriter(qq422016) //line views/admin.qtpl:128 - StreamAdminUserNewHTML(qw422016, f, lc) + StreamAdminUserNew(qw422016, f, lc) //line views/admin.qtpl:128 qt422016.ReleaseWriter(qw422016) //line views/admin.qtpl:128 } //line views/admin.qtpl:128 -func AdminUserNewHTML(f util.FormData, lc *l18n.Localizer) string { +func AdminUserNew(f util.FormData, lc *l18n.Localizer) string { //line views/admin.qtpl:128 qb422016 := qt422016.AcquireByteBuffer() //line views/admin.qtpl:128 - WriteAdminUserNewHTML(qb422016, f, lc) + WriteAdminUserNew(qb422016, f, lc) //line views/admin.qtpl:128 qs422016 := string(qb422016.B) //line views/admin.qtpl:128 @@ -453,7 +453,7 @@ func AdminUserNewHTML(f util.FormData, lc *l18n.Localizer) string { } //line views/admin.qtpl:130 -func StreamAdminUserEditHTML(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { +func StreamAdminUserEdit(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { //line views/admin.qtpl:130 qw422016.N().S(`
@@ -586,22 +586,22 @@ func StreamAdminUserEditHTML(qw422016 *qt422016.Writer, u *user.User, f util.For } //line views/admin.qtpl:168 -func WriteAdminUserEditHTML(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { +func WriteAdminUserEdit(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { //line views/admin.qtpl:168 qw422016 := qt422016.AcquireWriter(qq422016) //line views/admin.qtpl:168 - StreamAdminUserEditHTML(qw422016, u, f, lc) + StreamAdminUserEdit(qw422016, u, f, lc) //line views/admin.qtpl:168 qt422016.ReleaseWriter(qw422016) //line views/admin.qtpl:168 } //line views/admin.qtpl:168 -func AdminUserEditHTML(u *user.User, f util.FormData, lc *l18n.Localizer) string { +func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) string { //line views/admin.qtpl:168 qb422016 := qt422016.AcquireByteBuffer() //line views/admin.qtpl:168 - WriteAdminUserEditHTML(qb422016, u, f, lc) + WriteAdminUserEdit(qb422016, u, f, lc) //line views/admin.qtpl:168 qs422016 := string(qb422016.B) //line views/admin.qtpl:168 @@ -612,7 +612,7 @@ func AdminUserEditHTML(u *user.User, f util.FormData, lc *l18n.Localizer) string } //line views/admin.qtpl:170 -func StreamAdminUserDeleteHTML(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { +func StreamAdminUserDelete(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { //line views/admin.qtpl:170 qw422016.N().S(`
@@ -675,22 +675,22 @@ func StreamAdminUserDeleteHTML(qw422016 *qt422016.Writer, u *user.User, f util.F } //line views/admin.qtpl:190 -func WriteAdminUserDeleteHTML(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { +func WriteAdminUserDelete(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { //line views/admin.qtpl:190 qw422016 := qt422016.AcquireWriter(qq422016) //line views/admin.qtpl:190 - StreamAdminUserDeleteHTML(qw422016, u, f, lc) + StreamAdminUserDelete(qw422016, u, f, lc) //line views/admin.qtpl:190 qt422016.ReleaseWriter(qw422016) //line views/admin.qtpl:190 } //line views/admin.qtpl:190 -func AdminUserDeleteHTML(u *user.User, f util.FormData, lc *l18n.Localizer) string { +func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) string { //line views/admin.qtpl:190 qb422016 := qt422016.AcquireByteBuffer() //line views/admin.qtpl:190 - WriteAdminUserDeleteHTML(qb422016, u, f, lc) + WriteAdminUserDelete(qb422016, u, f, lc) //line views/admin.qtpl:190 qs422016 := string(qb422016.B) //line views/admin.qtpl:190 diff --git a/views/auth.qtpl b/views/auth.qtpl index ff1270b..619d2fd 100644 --- a/views/auth.qtpl +++ b/views/auth.qtpl @@ -2,7 +2,7 @@ {% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/l18n" %} -{% func RegisterHTML(rq *http.Request) %} +{% func Register(rq *http.Request) %} {% code lc := l18n.FromRequest(rq) %} @@ -27,7 +27,7 @@ {%s lc.Get("ui.cancel") %} - {%= telegramWidgetHTML(lc) %} + {%= telegramWidget(lc) %} {% elseif cfg.UseAuth %}

{%s lc.Get("auth.noregister") %}

← {%s lc.Get("auth.go_back") %}

@@ -40,7 +40,7 @@
{% endfunc %} -{% func LoginHTML(lc *l18n.Localizer) %} +{% func Login(lc *l18n.Localizer) %}
@@ -60,7 +60,7 @@ {%s lc.Get("ui.cancel") %} - {%= telegramWidgetHTML(lc) %} + {%= telegramWidget(lc) %} {% else %}

{%s lc.Get("auth.noauth") %}

← {%s lc.Get("auth.go_home") %}

@@ -71,14 +71,14 @@ {% endfunc %} Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't. -{% func telegramWidgetHTML(lc *l18n.Localizer) %} +{% func telegramWidget(lc *l18n.Localizer) %} {% if cfg.TelegramEnabled %}

{%s lc.Get("auth.telegram_tip") %}

{% endif %} {% endfunc %} -{% func LoginErrorHTML(err string, lc *l18n.Localizer) %} +{% func LoginError(err string, lc *l18n.Localizer) %}
@@ -96,7 +96,7 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
{% endfunc %} -{% func LogoutHTML(can bool, lc *l18n.Localizer) %} +{% func Logout(can bool, lc *l18n.Localizer) %}
@@ -116,7 +116,7 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
{% endfunc %} -{% func LockHTML(lc *l18n.Localizer) %} +{% func Lock(lc *l18n.Localizer) %} @@ -142,7 +142,7 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
- {%= telegramWidgetHTML(lc) %} + {%= telegramWidget(lc) %}
diff --git a/views/auth.qtpl.go b/views/auth.qtpl.go index 5a754c1..8018252 100644 --- a/views/auth.qtpl.go +++ b/views/auth.qtpl.go @@ -27,7 +27,7 @@ var ( ) //line views/auth.qtpl:5 -func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) { +func StreamRegister(qw422016 *qt422016.Writer, rq *http.Request) { //line views/auth.qtpl:5 qw422016.N().S(` `) @@ -99,7 +99,7 @@ func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) { `) //line views/auth.qtpl:30 - streamtelegramWidgetHTML(qw422016, lc) + streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:30 qw422016.N().S(` `) @@ -153,22 +153,22 @@ func StreamRegisterHTML(qw422016 *qt422016.Writer, rq *http.Request) { } //line views/auth.qtpl:41 -func WriteRegisterHTML(qq422016 qtio422016.Writer, rq *http.Request) { +func WriteRegister(qq422016 qtio422016.Writer, rq *http.Request) { //line views/auth.qtpl:41 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:41 - StreamRegisterHTML(qw422016, rq) + StreamRegister(qw422016, rq) //line views/auth.qtpl:41 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:41 } //line views/auth.qtpl:41 -func RegisterHTML(rq *http.Request) string { +func Register(rq *http.Request) string { //line views/auth.qtpl:41 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:41 - WriteRegisterHTML(qb422016, rq) + WriteRegister(qb422016, rq) //line views/auth.qtpl:41 qs422016 := string(qb422016.B) //line views/auth.qtpl:41 @@ -179,7 +179,7 @@ func RegisterHTML(rq *http.Request) string { } //line views/auth.qtpl:43 -func StreamLoginHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func StreamLogin(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:43 qw422016.N().S(`
@@ -231,7 +231,7 @@ func StreamLoginHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { `) //line views/auth.qtpl:63 - streamtelegramWidgetHTML(qw422016, lc) + streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:63 qw422016.N().S(` `) @@ -262,22 +262,22 @@ func StreamLoginHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/auth.qtpl:71 -func WriteLoginHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func WriteLogin(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:71 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:71 - StreamLoginHTML(qw422016, lc) + StreamLogin(qw422016, lc) //line views/auth.qtpl:71 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:71 } //line views/auth.qtpl:71 -func LoginHTML(lc *l18n.Localizer) string { +func Login(lc *l18n.Localizer) string { //line views/auth.qtpl:71 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:71 - WriteLoginHTML(qb422016, lc) + WriteLogin(qb422016, lc) //line views/auth.qtpl:71 qs422016 := string(qb422016.B) //line views/auth.qtpl:71 @@ -290,7 +290,7 @@ func LoginHTML(lc *l18n.Localizer) string { // Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't. //line views/auth.qtpl:74 -func streamtelegramWidgetHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func streamtelegramWidget(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:74 qw422016.N().S(` `) @@ -322,22 +322,22 @@ func streamtelegramWidgetHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/auth.qtpl:79 -func writetelegramWidgetHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func writetelegramWidget(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:79 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:79 - streamtelegramWidgetHTML(qw422016, lc) + streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:79 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:79 } //line views/auth.qtpl:79 -func telegramWidgetHTML(lc *l18n.Localizer) string { +func telegramWidget(lc *l18n.Localizer) string { //line views/auth.qtpl:79 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:79 - writetelegramWidgetHTML(qb422016, lc) + writetelegramWidget(qb422016, lc) //line views/auth.qtpl:79 qs422016 := string(qb422016.B) //line views/auth.qtpl:79 @@ -348,7 +348,7 @@ func telegramWidgetHTML(lc *l18n.Localizer) string { } //line views/auth.qtpl:81 -func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string, lc *l18n.Localizer) { +func StreamLoginError(qw422016 *qt422016.Writer, err string, lc *l18n.Localizer) { //line views/auth.qtpl:81 qw422016.N().S(`
@@ -404,22 +404,22 @@ func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string, lc *l18n.Locali } //line views/auth.qtpl:97 -func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string, lc *l18n.Localizer) { +func WriteLoginError(qq422016 qtio422016.Writer, err string, lc *l18n.Localizer) { //line views/auth.qtpl:97 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:97 - StreamLoginErrorHTML(qw422016, err, lc) + StreamLoginError(qw422016, err, lc) //line views/auth.qtpl:97 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:97 } //line views/auth.qtpl:97 -func LoginErrorHTML(err string, lc *l18n.Localizer) string { +func LoginError(err string, lc *l18n.Localizer) string { //line views/auth.qtpl:97 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:97 - WriteLoginErrorHTML(qb422016, err, lc) + WriteLoginError(qb422016, err, lc) //line views/auth.qtpl:97 qs422016 := string(qb422016.B) //line views/auth.qtpl:97 @@ -430,7 +430,7 @@ func LoginErrorHTML(err string, lc *l18n.Localizer) string { } //line views/auth.qtpl:99 -func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) { +func StreamLogout(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) { //line views/auth.qtpl:99 qw422016.N().S(`
@@ -491,22 +491,22 @@ func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) { } //line views/auth.qtpl:117 -func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool, lc *l18n.Localizer) { +func WriteLogout(qq422016 qtio422016.Writer, can bool, lc *l18n.Localizer) { //line views/auth.qtpl:117 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:117 - StreamLogoutHTML(qw422016, can, lc) + StreamLogout(qw422016, can, lc) //line views/auth.qtpl:117 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:117 } //line views/auth.qtpl:117 -func LogoutHTML(can bool, lc *l18n.Localizer) string { +func Logout(can bool, lc *l18n.Localizer) string { //line views/auth.qtpl:117 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:117 - WriteLogoutHTML(qb422016, can, lc) + WriteLogout(qb422016, can, lc) //line views/auth.qtpl:117 qs422016 := string(qb422016.B) //line views/auth.qtpl:117 @@ -517,7 +517,7 @@ func LogoutHTML(can bool, lc *l18n.Localizer) string { } //line views/auth.qtpl:119 -func StreamLockHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:119 qw422016.N().S(` @@ -567,7 +567,7 @@ func StreamLockHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { `) //line views/auth.qtpl:145 - streamtelegramWidgetHTML(qw422016, lc) + streamtelegramWidget(qw422016, lc) //line views/auth.qtpl:145 qw422016.N().S(` @@ -579,22 +579,22 @@ func StreamLockHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/auth.qtpl:150 -func WriteLockHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func WriteLock(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/auth.qtpl:150 qw422016 := qt422016.AcquireWriter(qq422016) //line views/auth.qtpl:150 - StreamLockHTML(qw422016, lc) + StreamLock(qw422016, lc) //line views/auth.qtpl:150 qt422016.ReleaseWriter(qw422016) //line views/auth.qtpl:150 } //line views/auth.qtpl:150 -func LockHTML(lc *l18n.Localizer) string { +func Lock(lc *l18n.Localizer) string { //line views/auth.qtpl:150 qb422016 := qt422016.AcquireByteBuffer() //line views/auth.qtpl:150 - WriteLockHTML(qb422016, lc) + WriteLock(qb422016, lc) //line views/auth.qtpl:150 qs422016 := string(qb422016.B) //line views/auth.qtpl:150 diff --git a/views/categories.go b/views/categories.go index 54cf349..ec79639 100644 --- a/views/categories.go +++ b/views/categories.go @@ -34,7 +34,7 @@ func init() { ParseFS(fs, "*")) } -func categoryCardHTML(hyphaName string) string { +func categoryCard(hyphaName string) string { var buf strings.Builder err := categoryT.ExecuteTemplate(&buf, "category card", struct { HyphaName string @@ -49,7 +49,7 @@ func categoryCardHTML(hyphaName string) string { return buf.String() } -func CategoryPageHTML(meta Meta, catName string) { +func CategoryPage(meta Meta, catName string) { var buf strings.Builder var t, _ = categoryT.Clone() if meta.Lc.Locale == "ru" { @@ -65,7 +65,7 @@ func CategoryPageHTML(meta Meta, catName string) { if err != nil { log.Println(err) } - _, err = io.WriteString(meta.W, BaseHTML( + _, err = io.WriteString(meta.W, Base( "Category "+util.BeautifulName(catName), buf.String(), meta.Lc, @@ -76,7 +76,7 @@ func CategoryPageHTML(meta Meta, catName string) { } } -func CategoryListHTML(meta Meta) { +func CategoryList(meta Meta) { var buf strings.Builder err := categoryT.ExecuteTemplate(&buf, "category list", struct { Categories []string @@ -86,7 +86,7 @@ func CategoryListHTML(meta Meta) { if err != nil { log.Println(err) } - _, err = io.WriteString(meta.W, BaseHTML( + _, err = io.WriteString(meta.W, Base( "Category list", buf.String(), meta.Lc, diff --git a/views/help.go b/views/help.go index b74ad12..deda45a 100644 --- a/views/help.go +++ b/views/help.go @@ -79,7 +79,7 @@ func helpTopicsLocalizedTopic(lang string) func(string) string { } } -func helpTopicsHTML(lang string, lc *l18n.Localizer) string { +func helpTopics(lang string, lc *l18n.Localizer) string { temp, err := template. New("help topics"). Funcs(template.FuncMap{ diff --git a/views/history.qtpl b/views/history.qtpl index 2f53493..cf36bf3 100644 --- a/views/history.qtpl +++ b/views/history.qtpl @@ -9,7 +9,7 @@ {% import "github.com/bouncepaw/mycorrhiza/history" %} -{% func PrimitiveDiffHTML(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) %} +{% func PrimitiveDiff(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) %} {% code lc := l18n.FromRequest(rq) text, err := history.PrimitiveDiffAtRevision(h.TextFilePath(), hash) @@ -27,7 +27,7 @@ if err != nil {
{% endfunc %} -{% func RecentChangesHTML(n int, lc *l18n.Localizer) %} +{% func RecentChanges(n int, lc *l18n.Localizer) %}

{%s lc.Get("ui.recent_heading") %}

@@ -77,7 +77,7 @@ if err != nil {
- {%s= recentChangesEntry(entry) %} + {%s= recentChanges(entry) %}
{% endfor %} @@ -87,7 +87,7 @@ if err != nil {
{% endfunc %} -{% func recentChangesEntry(rev history.Revision) %} +{% func recentChanges(rev history.Revision) %}
{% endfunc %} -{% func HistoryHTML(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) %} +{% func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) %}
diff --git a/views/history.qtpl.go b/views/history.qtpl.go index 0ffbbee..d0d276a 100644 --- a/views/history.qtpl.go +++ b/views/history.qtpl.go @@ -42,7 +42,7 @@ var ( ) //line views/history.qtpl:12 -func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) { +func StreamPrimitiveDiff(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) { //line views/history.qtpl:12 qw422016.N().S(` `) @@ -76,22 +76,22 @@ func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h hyph } //line views/history.qtpl:28 -func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) { +func WritePrimitiveDiff(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) { //line views/history.qtpl:28 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:28 - StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash) + StreamPrimitiveDiff(qw422016, rq, h, u, hash) //line views/history.qtpl:28 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:28 } //line views/history.qtpl:28 -func PrimitiveDiffHTML(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) string { +func PrimitiveDiff(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) string { //line views/history.qtpl:28 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:28 - WritePrimitiveDiffHTML(qb422016, rq, h, u, hash) + WritePrimitiveDiff(qb422016, rq, h, u, hash) //line views/history.qtpl:28 qs422016 := string(qb422016.B) //line views/history.qtpl:28 @@ -102,7 +102,7 @@ func PrimitiveDiffHTML(rq *http.Request, h hyphae.ExistingHypha, u *user.User, h } //line views/history.qtpl:30 -func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int, lc *l18n.Localizer) { +func StreamRecentChanges(qw422016 *qt422016.Writer, n int, lc *l18n.Localizer) { //line views/history.qtpl:30 qw422016.N().S(`
@@ -258,7 +258,7 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int, lc *l18n.Localize qw422016.N().S(`"> `) //line views/history.qtpl:80 - qw422016.N().S(recentChangesEntry(entry)) + qw422016.N().S(recentChanges(entry)) //line views/history.qtpl:80 qw422016.N().S(`
@@ -281,22 +281,22 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int, lc *l18n.Localize } //line views/history.qtpl:88 -func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int, lc *l18n.Localizer) { +func WriteRecentChanges(qq422016 qtio422016.Writer, n int, lc *l18n.Localizer) { //line views/history.qtpl:88 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:88 - StreamRecentChangesHTML(qw422016, n, lc) + StreamRecentChanges(qw422016, n, lc) //line views/history.qtpl:88 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:88 } //line views/history.qtpl:88 -func RecentChangesHTML(n int, lc *l18n.Localizer) string { +func RecentChanges(n int, lc *l18n.Localizer) string { //line views/history.qtpl:88 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:88 - WriteRecentChangesHTML(qb422016, n, lc) + WriteRecentChanges(qb422016, n, lc) //line views/history.qtpl:88 qs422016 := string(qb422016.B) //line views/history.qtpl:88 @@ -307,7 +307,7 @@ func RecentChangesHTML(n int, lc *l18n.Localizer) string { } //line views/history.qtpl:90 -func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) { +func streamrecentChanges(qw422016 *qt422016.Writer, rev history.Revision) { //line views/history.qtpl:90 qw422016.N().S(`
@@ -371,22 +371,22 @@ func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) { } //line views/history.qtpl:111 -func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) { +func writerecentChanges(qq422016 qtio422016.Writer, rev history.Revision) { //line views/history.qtpl:111 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:111 - streamrecentChangesEntry(qw422016, rev) + streamrecentChanges(qw422016, rev) //line views/history.qtpl:111 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:111 } //line views/history.qtpl:111 -func recentChangesEntry(rev history.Revision) string { +func recentChanges(rev history.Revision) string { //line views/history.qtpl:111 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:111 - writerecentChangesEntry(qb422016, rev) + writerecentChanges(qb422016, rev) //line views/history.qtpl:111 qs422016 := string(qb422016.B) //line views/history.qtpl:111 @@ -397,7 +397,7 @@ func recentChangesEntry(rev history.Revision) string { } //line views/history.qtpl:113 -func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) { +func StreamHistory(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) { //line views/history.qtpl:113 qw422016.N().S(`
@@ -421,22 +421,22 @@ func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, l } //line views/history.qtpl:122 -func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) { +func WriteHistory(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) { //line views/history.qtpl:122 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:122 - StreamHistoryHTML(qw422016, rq, hyphaName, list, lc) + StreamHistory(qw422016, rq, hyphaName, list, lc) //line views/history.qtpl:122 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:122 } //line views/history.qtpl:122 -func HistoryHTML(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) string { +func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) string { //line views/history.qtpl:122 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:122 - WriteHistoryHTML(qb422016, rq, hyphaName, list, lc) + WriteHistory(qb422016, rq, hyphaName, list, lc) //line views/history.qtpl:122 qs422016 := string(qb422016.B) //line views/history.qtpl:122 diff --git a/views/hypha.qtpl b/views/hypha.qtpl index 8c4f075..924cff3 100644 --- a/views/hypha.qtpl +++ b/views/hypha.qtpl @@ -47,7 +47,7 @@ {% endfunc %} -{% func NaviTitleHTML(h hyphae.Hypha) %} +{% func NaviTitle(h hyphae.Hypha) %} {% code var ( prevAcc = "/hypha/" @@ -75,9 +75,9 @@ {% endfunc %} -{% func MediaHTMLRaw(h *hyphae.MediaHypha) %}{%= MediaHTML(h, l18n.New("en", "en")) %}{% endfunc %} +{% func MediaRaw(h *hyphae.MediaHypha) %}{%= Media(h, l18n.New("en", "en")) %}{% endfunc %} -{% func MediaHTML(h *hyphae.MediaHypha, lc *l18n.Localizer) %} +{% func Media(h *hyphae.MediaHypha, lc *l18n.Localizer) %} {% switch filepath.Ext(h.MediaFilePath()) %} {% case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico" %} diff --git a/views/hypha.qtpl.go b/views/hypha.qtpl.go index 29c68c3..b5882d8 100644 --- a/views/hypha.qtpl.go +++ b/views/hypha.qtpl.go @@ -256,7 +256,7 @@ func nonExistentHyphaNotice(h hyphae.Hypha, u *user.User, lc *l18n.Localizer) st } //line views/hypha.qtpl:50 -func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h hyphae.Hypha) { +func StreamNaviTitle(qw422016 *qt422016.Writer, h hyphae.Hypha) { //line views/hypha.qtpl:50 qw422016.N().S(` `) @@ -323,22 +323,22 @@ func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h hyphae.Hypha) { } //line views/hypha.qtpl:76 -func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h hyphae.Hypha) { +func WriteNaviTitle(qq422016 qtio422016.Writer, h hyphae.Hypha) { //line views/hypha.qtpl:76 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:76 - StreamNaviTitleHTML(qw422016, h) + StreamNaviTitle(qw422016, h) //line views/hypha.qtpl:76 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:76 } //line views/hypha.qtpl:76 -func NaviTitleHTML(h hyphae.Hypha) string { +func NaviTitle(h hyphae.Hypha) string { //line views/hypha.qtpl:76 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:76 - WriteNaviTitleHTML(qb422016, h) + WriteNaviTitle(qb422016, h) //line views/hypha.qtpl:76 qs422016 := string(qb422016.B) //line views/hypha.qtpl:76 @@ -349,29 +349,29 @@ func NaviTitleHTML(h hyphae.Hypha) string { } //line views/hypha.qtpl:78 -func StreamMediaHTMLRaw(qw422016 *qt422016.Writer, h *hyphae.MediaHypha) { +func StreamMediaRaw(qw422016 *qt422016.Writer, h *hyphae.MediaHypha) { //line views/hypha.qtpl:78 - StreamMediaHTML(qw422016, h, l18n.New("en", "en")) + StreamMedia(qw422016, h, l18n.New("en", "en")) //line views/hypha.qtpl:78 } //line views/hypha.qtpl:78 -func WriteMediaHTMLRaw(qq422016 qtio422016.Writer, h *hyphae.MediaHypha) { +func WriteMediaRaw(qq422016 qtio422016.Writer, h *hyphae.MediaHypha) { //line views/hypha.qtpl:78 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:78 - StreamMediaHTMLRaw(qw422016, h) + StreamMediaRaw(qw422016, h) //line views/hypha.qtpl:78 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:78 } //line views/hypha.qtpl:78 -func MediaHTMLRaw(h *hyphae.MediaHypha) string { +func MediaRaw(h *hyphae.MediaHypha) string { //line views/hypha.qtpl:78 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:78 - WriteMediaHTMLRaw(qb422016, h) + WriteMediaRaw(qb422016, h) //line views/hypha.qtpl:78 qs422016 := string(qb422016.B) //line views/hypha.qtpl:78 @@ -382,7 +382,7 @@ func MediaHTMLRaw(h *hyphae.MediaHypha) string { } //line views/hypha.qtpl:80 -func StreamMediaHTML(qw422016 *qt422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { +func StreamMedia(qw422016 *qt422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { //line views/hypha.qtpl:80 qw422016.N().S(` `) @@ -486,22 +486,22 @@ func StreamMediaHTML(qw422016 *qt422016.Writer, h *hyphae.MediaHypha, lc *l18n.L } //line views/hypha.qtpl:109 -func WriteMediaHTML(qq422016 qtio422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { +func WriteMedia(qq422016 qtio422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { //line views/hypha.qtpl:109 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:109 - StreamMediaHTML(qw422016, h, lc) + StreamMedia(qw422016, h, lc) //line views/hypha.qtpl:109 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:109 } //line views/hypha.qtpl:109 -func MediaHTML(h *hyphae.MediaHypha, lc *l18n.Localizer) string { +func Media(h *hyphae.MediaHypha, lc *l18n.Localizer) string { //line views/hypha.qtpl:109 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:109 - WriteMediaHTML(qb422016, h, lc) + WriteMedia(qb422016, h, lc) //line views/hypha.qtpl:109 qs422016 := string(qb422016.B) //line views/hypha.qtpl:109 diff --git a/views/modal.qtpl b/views/modal.qtpl index e53d734..71a8f55 100644 --- a/views/modal.qtpl +++ b/views/modal.qtpl @@ -2,7 +2,7 @@ {% import "net/http" %} {% import "github.com/bouncepaw/mycorrhiza/l18n" %} -{% func DeleteAskHTML(rq *http.Request, hyphaName string) %} +{% func DeleteAsk(rq *http.Request, hyphaName string) %} {% code lc := l18n.FromRequest(rq) %} @@ -16,7 +16,7 @@ {%= modalEnd(hyphaName, true, lc) %} {% endfunc %} -{% func RemoveMediaAskHTML(rq *http.Request, hyphaName string) %} +{% func RemoveMediaAsk(rq *http.Request, hyphaName string) %} {% code lc := l18n.FromRequest(rq) %} @@ -31,7 +31,7 @@ bloody hell !! -{% func RenameAskHTML(rq *http.Request, hyphaName string) %} +{% func RenameAsk(rq *http.Request, hyphaName string) %} {% code lc := l18n.FromRequest(rq) %} diff --git a/views/modal.qtpl.go b/views/modal.qtpl.go index a471e5a..88c1a60 100644 --- a/views/modal.qtpl.go +++ b/views/modal.qtpl.go @@ -27,7 +27,7 @@ var ( ) //line views/modal.qtpl:5 -func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) { +func StreamDeleteAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) { //line views/modal.qtpl:5 qw422016.N().S(` `) @@ -65,22 +65,22 @@ func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName } //line views/modal.qtpl:17 -func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) { +func WriteDeleteAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) { //line views/modal.qtpl:17 qw422016 := qt422016.AcquireWriter(qq422016) //line views/modal.qtpl:17 - StreamDeleteAskHTML(qw422016, rq, hyphaName) + StreamDeleteAsk(qw422016, rq, hyphaName) //line views/modal.qtpl:17 qt422016.ReleaseWriter(qw422016) //line views/modal.qtpl:17 } //line views/modal.qtpl:17 -func DeleteAskHTML(rq *http.Request, hyphaName string) string { +func DeleteAsk(rq *http.Request, hyphaName string) string { //line views/modal.qtpl:17 qb422016 := qt422016.AcquireByteBuffer() //line views/modal.qtpl:17 - WriteDeleteAskHTML(qb422016, rq, hyphaName) + WriteDeleteAsk(qb422016, rq, hyphaName) //line views/modal.qtpl:17 qs422016 := string(qb422016.B) //line views/modal.qtpl:17 @@ -91,7 +91,7 @@ func DeleteAskHTML(rq *http.Request, hyphaName string) string { } //line views/modal.qtpl:19 -func StreamRemoveMediaAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) { +func StreamRemoveMediaAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) { //line views/modal.qtpl:19 qw422016.N().S(` `) @@ -124,22 +124,22 @@ func StreamRemoveMediaAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hypha } //line views/modal.qtpl:30 -func WriteRemoveMediaAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) { +func WriteRemoveMediaAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) { //line views/modal.qtpl:30 qw422016 := qt422016.AcquireWriter(qq422016) //line views/modal.qtpl:30 - StreamRemoveMediaAskHTML(qw422016, rq, hyphaName) + StreamRemoveMediaAsk(qw422016, rq, hyphaName) //line views/modal.qtpl:30 qt422016.ReleaseWriter(qw422016) //line views/modal.qtpl:30 } //line views/modal.qtpl:30 -func RemoveMediaAskHTML(rq *http.Request, hyphaName string) string { +func RemoveMediaAsk(rq *http.Request, hyphaName string) string { //line views/modal.qtpl:30 qb422016 := qt422016.AcquireByteBuffer() //line views/modal.qtpl:30 - WriteRemoveMediaAskHTML(qb422016, rq, hyphaName) + WriteRemoveMediaAsk(qb422016, rq, hyphaName) //line views/modal.qtpl:30 qs422016 := string(qb422016.B) //line views/modal.qtpl:30 @@ -153,7 +153,7 @@ func RemoveMediaAskHTML(rq *http.Request, hyphaName string) string { // //line views/modal.qtpl:34 -func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) { +func StreamRenameAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) { //line views/modal.qtpl:34 qw422016.N().S(` `) @@ -204,22 +204,22 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName } //line views/modal.qtpl:51 -func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) { +func WriteRenameAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) { //line views/modal.qtpl:51 qw422016 := qt422016.AcquireWriter(qq422016) //line views/modal.qtpl:51 - StreamRenameAskHTML(qw422016, rq, hyphaName) + StreamRenameAsk(qw422016, rq, hyphaName) //line views/modal.qtpl:51 qt422016.ReleaseWriter(qw422016) //line views/modal.qtpl:51 } //line views/modal.qtpl:51 -func RenameAskHTML(rq *http.Request, hyphaName string) string { +func RenameAsk(rq *http.Request, hyphaName string) string { //line views/modal.qtpl:51 qb422016 := qt422016.AcquireByteBuffer() //line views/modal.qtpl:51 - WriteRenameAskHTML(qb422016, rq, hyphaName) + WriteRenameAsk(qb422016, rq, hyphaName) //line views/modal.qtpl:51 qs422016 := string(qb422016.B) //line views/modal.qtpl:51 diff --git a/views/mutators.qtpl b/views/mutators.qtpl index 25c7a15..dd33d51 100644 --- a/views/mutators.qtpl +++ b/views/mutators.qtpl @@ -65,7 +65,7 @@ {% endfunc %} -{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %} +{% func Editor(rq *http.Request, hyphaName, textAreaFill, warning string) %} {% code lc := l18n.FromRequest(rq) %} @@ -90,7 +90,7 @@ {%= editScripts() %} {% endfunc %} -{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %} +{% func Preview(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %} {% code lc := l18n.FromRequest(rq) %} diff --git a/views/mutators.qtpl.go b/views/mutators.qtpl.go index a6b28f0..7e13704 100644 --- a/views/mutators.qtpl.go +++ b/views/mutators.qtpl.go @@ -180,7 +180,7 @@ func Toolbar(u *user.User, lc *l18n.Localizer) string { } //line views/mutators.qtpl:68 -func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { +func StreamEditor(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { //line views/mutators.qtpl:68 qw422016.N().S(` `) @@ -257,22 +257,22 @@ func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, text } //line views/mutators.qtpl:91 -func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { +func WriteEditor(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { //line views/mutators.qtpl:91 qw422016 := qt422016.AcquireWriter(qq422016) //line views/mutators.qtpl:91 - StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning) + StreamEditor(qw422016, rq, hyphaName, textAreaFill, warning) //line views/mutators.qtpl:91 qt422016.ReleaseWriter(qw422016) //line views/mutators.qtpl:91 } //line views/mutators.qtpl:91 -func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string { +func Editor(rq *http.Request, hyphaName, textAreaFill, warning string) string { //line views/mutators.qtpl:91 qb422016 := qt422016.AcquireByteBuffer() //line views/mutators.qtpl:91 - WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning) + WriteEditor(qb422016, rq, hyphaName, textAreaFill, warning) //line views/mutators.qtpl:91 qs422016 := string(qb422016.B) //line views/mutators.qtpl:91 @@ -283,7 +283,7 @@ func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string } //line views/mutators.qtpl:93 -func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) { +func StreamPreview(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) { //line views/mutators.qtpl:93 qw422016.N().S(` `) @@ -374,22 +374,22 @@ func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, t } //line views/mutators.qtpl:118 -func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) { +func WritePreview(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) { //line views/mutators.qtpl:118 qw422016 := qt422016.AcquireWriter(qq422016) //line views/mutators.qtpl:118 - StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) + StreamPreview(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) //line views/mutators.qtpl:118 qt422016.ReleaseWriter(qw422016) //line views/mutators.qtpl:118 } //line views/mutators.qtpl:118 -func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string { +func Preview(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string { //line views/mutators.qtpl:118 qb422016 := qt422016.AcquireByteBuffer() //line views/mutators.qtpl:118 - WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) + WritePreview(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) //line views/mutators.qtpl:118 qs422016 := string(qb422016.B) //line views/mutators.qtpl:118 diff --git a/views/nav.qtpl b/views/nav.qtpl index 39c6115..d63af93 100644 --- a/views/nav.qtpl +++ b/views/nav.qtpl @@ -32,7 +32,7 @@ {% endfunc %} -{% func siblingHyphaeHTML(siblings string, lc *l18n.Localizer) %} +{% func siblingHyphae(siblings string, lc *l18n.Localizer) %} {% if cfg.UseSiblingHyphaeSidebar %}
-{%s= categoryCardHTML(h.CanonicalName()) %} -{%= siblingHyphaeHTML(siblings, lc) %} +{%s= categoryCard(h.CanonicalName()) %} +{%= siblingHyphae(siblings, lc) %}
{%= viewScripts() %} {% endfunc %} -{% func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %} +{% func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %}

{%s lc.Get("ui.revision_warning") %} {%s lc.Get("ui.revision_link") %}

- {%s= NaviTitleHTML(h) %} + {%s= NaviTitle(h) %} {%s= contents %}
diff --git a/views/readers.qtpl.go b/views/readers.qtpl.go index 9d4c6e4..1cdef88 100644 --- a/views/readers.qtpl.go +++ b/views/readers.qtpl.go @@ -51,7 +51,7 @@ var ( ) //line views/readers.qtpl:14 -func StreamMediaMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) { +func StreamMediaMenu(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) { //line views/readers.qtpl:14 qw422016.N().S(` `) @@ -281,22 +281,22 @@ func StreamMediaMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.H } //line views/readers.qtpl:83 -func WriteMediaMenuHTML(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) { +func WriteMediaMenu(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) { //line views/readers.qtpl:83 qw422016 := qt422016.AcquireWriter(qq422016) //line views/readers.qtpl:83 - StreamMediaMenuHTML(qw422016, rq, h, u) + StreamMediaMenu(qw422016, rq, h, u) //line views/readers.qtpl:83 qt422016.ReleaseWriter(qw422016) //line views/readers.qtpl:83 } //line views/readers.qtpl:83 -func MediaMenuHTML(rq *http.Request, h hyphae.Hypha, u *user.User) string { +func MediaMenu(rq *http.Request, h hyphae.Hypha, u *user.User) string { //line views/readers.qtpl:83 qb422016 := qt422016.AcquireByteBuffer() //line views/readers.qtpl:83 - WriteMediaMenuHTML(qb422016, rq, h, u) + WriteMediaMenu(qb422016, rq, h, u) //line views/readers.qtpl:83 qs422016 := string(qb422016.B) //line views/readers.qtpl:83 @@ -311,7 +311,7 @@ func MediaMenuHTML(rq *http.Request, h hyphae.Hypha, u *user.User) string { // If you rename .prevnext, change the docs too. //line views/readers.qtpl:88 -func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents string) { +func StreamHypha(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents string) { //line views/readers.qtpl:88 qw422016.N().S(` `) @@ -383,7 +383,7 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Local `) //line views/readers.qtpl:113 - qw422016.N().S(NaviTitleHTML(h)) + qw422016.N().S(NaviTitle(h)) //line views/readers.qtpl:113 qw422016.N().S(` `) @@ -456,7 +456,7 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Local `) //line views/readers.qtpl:129 - StreamSubhyphaeHTML(qw422016, subhyphae, lc) + StreamSubhyphae(qw422016, subhyphae, lc) //line views/readers.qtpl:129 qw422016.N().S(`
@@ -469,12 +469,12 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Local
`) //line views/readers.qtpl:134 - qw422016.N().S(categoryCardHTML(h.CanonicalName())) + qw422016.N().S(categoryCard(h.CanonicalName())) //line views/readers.qtpl:134 qw422016.N().S(` `) //line views/readers.qtpl:135 - streamsiblingHyphaeHTML(qw422016, siblings, lc) + streamsiblingHyphae(qw422016, siblings, lc) //line views/readers.qtpl:135 qw422016.N().S(`
@@ -488,22 +488,22 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Local } //line views/readers.qtpl:138 -func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents string) { +func WriteHypha(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents string) { //line views/readers.qtpl:138 qw422016 := qt422016.AcquireWriter(qq422016) //line views/readers.qtpl:138 - StreamHyphaHTML(qw422016, rq, lc, h, contents) + StreamHypha(qw422016, rq, lc, h, contents) //line views/readers.qtpl:138 qt422016.ReleaseWriter(qw422016) //line views/readers.qtpl:138 } //line views/readers.qtpl:138 -func HyphaHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents string) string { +func Hypha(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents string) string { //line views/readers.qtpl:138 qb422016 := qt422016.AcquireByteBuffer() //line views/readers.qtpl:138 - WriteHyphaHTML(qb422016, rq, lc, h, contents) + WriteHypha(qb422016, rq, lc, h, contents) //line views/readers.qtpl:138 qs422016 := string(qb422016.B) //line views/readers.qtpl:138 @@ -514,7 +514,7 @@ func HyphaHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents st } //line views/readers.qtpl:140 -func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { +func StreamRevision(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { //line views/readers.qtpl:140 qw422016.N().S(`
@@ -539,7 +539,7 @@ func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Lo qw422016.N().S(`

`) //line views/readers.qtpl:145 - qw422016.N().S(NaviTitleHTML(h)) + qw422016.N().S(NaviTitle(h)) //line views/readers.qtpl:145 qw422016.N().S(` `) @@ -560,22 +560,22 @@ func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Lo } //line views/readers.qtpl:151 -func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { +func WriteRevision(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { //line views/readers.qtpl:151 qw422016 := qt422016.AcquireWriter(qq422016) //line views/readers.qtpl:151 - StreamRevisionHTML(qw422016, rq, lc, h, contents, revHash) + StreamRevision(qw422016, rq, lc, h, contents, revHash) //line views/readers.qtpl:151 qt422016.ReleaseWriter(qw422016) //line views/readers.qtpl:151 } //line views/readers.qtpl:151 -func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string { +func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string { //line views/readers.qtpl:151 qb422016 := qt422016.AcquireByteBuffer() //line views/readers.qtpl:151 - WriteRevisionHTML(qb422016, rq, lc, h, contents, revHash) + WriteRevision(qb422016, rq, lc, h, contents, revHash) //line views/readers.qtpl:151 qs422016 := string(qb422016.B) //line views/readers.qtpl:151 diff --git a/views/stuff.qtpl b/views/stuff.qtpl index 8053acf..79fba7a 100644 --- a/views/stuff.qtpl +++ b/views/stuff.qtpl @@ -7,7 +7,7 @@ {% import "github.com/bouncepaw/mycorrhiza/util" %} {% import "github.com/bouncepaw/mycorrhiza/l18n" %} -{% func BaseHTML(title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) %} +{% func Base(title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) %} @@ -83,7 +83,7 @@ {% endfunc %} -{% func TitleSearchHTML(query string, generator func(string) <-chan string, lc *l18n.Localizer) %} +{% func TitleSearch(query string, generator func(string) <-chan string, lc *l18n.Localizer) %}

{%s lc.Get("ui.search_results_query", &l18n.Replacements{"query": query})%}

@@ -98,7 +98,7 @@
{% endfunc %} -{% func BacklinksHTML(hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) %} +{% func Backlinks(hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) %}

{%s= lc.Get( @@ -123,24 +123,24 @@

{% endfunc %} -{% func HelpHTML(content, lang string, lc *l18n.Localizer) %} +{% func Help(content, lang string, lc *l18n.Localizer) %}
{%s= content %}
-{%s= helpTopicsHTML(lang, lc) %} +{%s= helpTopics(lang, lc) %}
{% endfunc %} -{% func HelpEmptyErrorHTML(lc *l18n.Localizer) %} +{% func HelpEmptyError(lc *l18n.Localizer) %}

{%s lc.Get("help.empty_error_title") %}

{%s lc.Get("help.empty_error_line_1") %}

{%s lc.Get("help.empty_error_line_2a") %} {%s lc.Get("help.empty_error_link") %} {%s lc.Get("help.empty_error_line_2b") %}

{% endfunc %} -{% func HyphaListHTML(lc *l18n.Localizer) %} +{% func HyphaList(lc *l18n.Localizer) %}

{%s lc.Get("ui.list_heading") %}

diff --git a/views/stuff.qtpl.go b/views/stuff.qtpl.go index efc004e..8c53fd2 100644 --- a/views/stuff.qtpl.go +++ b/views/stuff.qtpl.go @@ -39,7 +39,7 @@ var ( ) //line views/stuff.qtpl:10 -func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) { +func StreamBase(qw422016 *qt422016.Writer, title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) { //line views/stuff.qtpl:10 qw422016.N().S(` @@ -226,22 +226,22 @@ func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, lc *l18n.Loca } //line views/stuff.qtpl:84 -func WriteBaseHTML(qq422016 qtio422016.Writer, title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) { +func WriteBase(qq422016 qtio422016.Writer, title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) { //line views/stuff.qtpl:84 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:84 - StreamBaseHTML(qw422016, title, body, lc, u, headElements...) + StreamBase(qw422016, title, body, lc, u, headElements...) //line views/stuff.qtpl:84 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:84 } //line views/stuff.qtpl:84 -func BaseHTML(title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) string { +func Base(title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) string { //line views/stuff.qtpl:84 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:84 - WriteBaseHTML(qb422016, title, body, lc, u, headElements...) + WriteBase(qb422016, title, body, lc, u, headElements...) //line views/stuff.qtpl:84 qs422016 := string(qb422016.B) //line views/stuff.qtpl:84 @@ -252,7 +252,7 @@ func BaseHTML(title, body string, lc *l18n.Localizer, u *user.User, headElements } //line views/stuff.qtpl:86 -func StreamTitleSearchHTML(qw422016 *qt422016.Writer, query string, generator func(string) <-chan string, lc *l18n.Localizer) { +func StreamTitleSearch(qw422016 *qt422016.Writer, query string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:86 qw422016.N().S(`
@@ -296,22 +296,22 @@ func StreamTitleSearchHTML(qw422016 *qt422016.Writer, query string, generator fu } //line views/stuff.qtpl:99 -func WriteTitleSearchHTML(qq422016 qtio422016.Writer, query string, generator func(string) <-chan string, lc *l18n.Localizer) { +func WriteTitleSearch(qq422016 qtio422016.Writer, query string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:99 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:99 - StreamTitleSearchHTML(qw422016, query, generator, lc) + StreamTitleSearch(qw422016, query, generator, lc) //line views/stuff.qtpl:99 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:99 } //line views/stuff.qtpl:99 -func TitleSearchHTML(query string, generator func(string) <-chan string, lc *l18n.Localizer) string { +func TitleSearch(query string, generator func(string) <-chan string, lc *l18n.Localizer) string { //line views/stuff.qtpl:99 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:99 - WriteTitleSearchHTML(qb422016, query, generator, lc) + WriteTitleSearch(qb422016, query, generator, lc) //line views/stuff.qtpl:99 qs422016 := string(qb422016.B) //line views/stuff.qtpl:99 @@ -322,7 +322,7 @@ func TitleSearchHTML(query string, generator func(string) <-chan string, lc *l18 } //line views/stuff.qtpl:101 -func StreamBacklinksHTML(qw422016 *qt422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) { +func StreamBacklinks(qw422016 *qt422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:101 qw422016.N().S(`
@@ -376,22 +376,22 @@ func StreamBacklinksHTML(qw422016 *qt422016.Writer, hyphaName string, generator } //line views/stuff.qtpl:124 -func WriteBacklinksHTML(qq422016 qtio422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) { +func WriteBacklinks(qq422016 qtio422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:124 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:124 - StreamBacklinksHTML(qw422016, hyphaName, generator, lc) + StreamBacklinks(qw422016, hyphaName, generator, lc) //line views/stuff.qtpl:124 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:124 } //line views/stuff.qtpl:124 -func BacklinksHTML(hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) string { +func Backlinks(hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) string { //line views/stuff.qtpl:124 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:124 - WriteBacklinksHTML(qb422016, hyphaName, generator, lc) + WriteBacklinks(qb422016, hyphaName, generator, lc) //line views/stuff.qtpl:124 qs422016 := string(qb422016.B) //line views/stuff.qtpl:124 @@ -402,7 +402,7 @@ func BacklinksHTML(hyphaName string, generator func(string) <-chan string, lc *l } //line views/stuff.qtpl:126 -func StreamHelpHTML(qw422016 *qt422016.Writer, content, lang string, lc *l18n.Localizer) { +func StreamHelp(qw422016 *qt422016.Writer, content, lang string, lc *l18n.Localizer) { //line views/stuff.qtpl:126 qw422016.N().S(`
@@ -417,7 +417,7 @@ func StreamHelpHTML(qw422016 *qt422016.Writer, content, lang string, lc *l18n.Lo
`) //line views/stuff.qtpl:133 - qw422016.N().S(helpTopicsHTML(lang, lc)) + qw422016.N().S(helpTopics(lang, lc)) //line views/stuff.qtpl:133 qw422016.N().S(`
@@ -426,22 +426,22 @@ func StreamHelpHTML(qw422016 *qt422016.Writer, content, lang string, lc *l18n.Lo } //line views/stuff.qtpl:135 -func WriteHelpHTML(qq422016 qtio422016.Writer, content, lang string, lc *l18n.Localizer) { +func WriteHelp(qq422016 qtio422016.Writer, content, lang string, lc *l18n.Localizer) { //line views/stuff.qtpl:135 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:135 - StreamHelpHTML(qw422016, content, lang, lc) + StreamHelp(qw422016, content, lang, lc) //line views/stuff.qtpl:135 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:135 } //line views/stuff.qtpl:135 -func HelpHTML(content, lang string, lc *l18n.Localizer) string { +func Help(content, lang string, lc *l18n.Localizer) string { //line views/stuff.qtpl:135 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:135 - WriteHelpHTML(qb422016, content, lang, lc) + WriteHelp(qb422016, content, lang, lc) //line views/stuff.qtpl:135 qs422016 := string(qb422016.B) //line views/stuff.qtpl:135 @@ -452,7 +452,7 @@ func HelpHTML(content, lang string, lc *l18n.Localizer) string { } //line views/stuff.qtpl:137 -func StreamHelpEmptyErrorHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func StreamHelpEmptyError(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:137 qw422016.N().S(`

`) @@ -483,22 +483,22 @@ func StreamHelpEmptyErrorHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/stuff.qtpl:141 -func WriteHelpEmptyErrorHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func WriteHelpEmptyError(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:141 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:141 - StreamHelpEmptyErrorHTML(qw422016, lc) + StreamHelpEmptyError(qw422016, lc) //line views/stuff.qtpl:141 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:141 } //line views/stuff.qtpl:141 -func HelpEmptyErrorHTML(lc *l18n.Localizer) string { +func HelpEmptyError(lc *l18n.Localizer) string { //line views/stuff.qtpl:141 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:141 - WriteHelpEmptyErrorHTML(qb422016, lc) + WriteHelpEmptyError(qb422016, lc) //line views/stuff.qtpl:141 qs422016 := string(qb422016.B) //line views/stuff.qtpl:141 @@ -509,7 +509,7 @@ func HelpEmptyErrorHTML(lc *l18n.Localizer) string { } //line views/stuff.qtpl:143 -func StreamHyphaListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func StreamHyphaList(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:143 qw422016.N().S(`
@@ -592,22 +592,22 @@ func StreamHyphaListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/stuff.qtpl:174 -func WriteHyphaListHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func WriteHyphaList(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:174 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:174 - StreamHyphaListHTML(qw422016, lc) + StreamHyphaList(qw422016, lc) //line views/stuff.qtpl:174 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:174 } //line views/stuff.qtpl:174 -func HyphaListHTML(lc *l18n.Localizer) string { +func HyphaList(lc *l18n.Localizer) string { //line views/stuff.qtpl:174 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:174 - WriteHyphaListHTML(qb422016, lc) + WriteHyphaList(qb422016, lc) //line views/stuff.qtpl:174 qs422016 := string(qb422016.B) //line views/stuff.qtpl:174 diff --git a/views/user_list.qtpl b/views/user_list.qtpl index 77f4ad3..2d647d2 100644 --- a/views/user_list.qtpl +++ b/views/user_list.qtpl @@ -12,7 +12,7 @@ var hyphaListL10n = map[string]l10nEntry{ } %} -{% func UserListHTML(lc *l18n.Localizer) %} +{% func UserList(lc *l18n.Localizer) %}
{% code diff --git a/views/user_list.qtpl.go b/views/user_list.qtpl.go index 811912f..31cdd88 100644 --- a/views/user_list.qtpl.go +++ b/views/user_list.qtpl.go @@ -38,7 +38,7 @@ var hyphaListL10n = map[string]l10nEntry{ } //line views/user_list.qtpl:15 -func StreamUserListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { +func StreamUserList(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/user_list.qtpl:15 qw422016.N().S(`
@@ -173,22 +173,22 @@ func StreamUserListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { } //line views/user_list.qtpl:64 -func WriteUserListHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { +func WriteUserList(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/user_list.qtpl:64 qw422016 := qt422016.AcquireWriter(qq422016) //line views/user_list.qtpl:64 - StreamUserListHTML(qw422016, lc) + StreamUserList(qw422016, lc) //line views/user_list.qtpl:64 qt422016.ReleaseWriter(qw422016) //line views/user_list.qtpl:64 } //line views/user_list.qtpl:64 -func UserListHTML(lc *l18n.Localizer) string { +func UserList(lc *l18n.Localizer) string { //line views/user_list.qtpl:64 qb422016 := qt422016.AcquireByteBuffer() //line views/user_list.qtpl:64 - WriteUserListHTML(qb422016, lc) + WriteUserList(qb422016, lc) //line views/user_list.qtpl:64 qs422016 := string(qb422016.B) //line views/user_list.qtpl:64 diff --git a/web/admin.go b/web/admin.go index 09d517f..d808514 100644 --- a/web/admin.go +++ b/web/admin.go @@ -36,7 +36,7 @@ func handlerAdmin(w http.ResponseWriter, rq *http.Request) { var lc = l18n.FromRequest(rq) w.Header().Set("Content-Type", "text/html;charset=utf-8") w.WriteHeader(http.StatusOK) - io.WriteString(w, views.BaseHTML(lc.Get("admin.panel_title"), views.AdminPanelHTML(lc), lc, user.FromRequest(rq))) + io.WriteString(w, views.Base(lc.Get("admin.panel_title"), views.AdminPanel(lc), lc, user.FromRequest(rq))) } // handlerAdminShutdown kills the wiki. @@ -70,8 +70,8 @@ func handlerAdminUsers(w http.ResponseWriter, rq *http.Request) { }) var lc = l18n.FromRequest(rq) - html := views.AdminUsersPanelHTML(userList, lc) - html = views.BaseHTML(lc.Get("admin.users_title"), html, lc, user.FromRequest(rq)) + html := views.AdminUsersPanel(userList, lc) + html = views.Base(lc.Get("admin.users_title"), html, lc, user.FromRequest(rq)) w.Header().Set("Content-Type", mime.TypeByExtension(".html")) io.WriteString(w, html) @@ -109,8 +109,8 @@ func handlerAdminUserEdit(w http.ResponseWriter, rq *http.Request) { f.Put("group", u.Group) var lc = l18n.FromRequest(rq) - html := views.AdminUserEditHTML(u, f, lc) - html = views.BaseHTML(fmt.Sprintf(lc.Get("admin.user_title"), u.Name), html, lc, user.FromRequest(rq)) + html := views.AdminUserEdit(u, f, lc) + html = views.Base(fmt.Sprintf(lc.Get("admin.user_title"), u.Name), html, lc, user.FromRequest(rq)) if f.HasError() { w.WriteHeader(http.StatusBadRequest) @@ -139,8 +139,8 @@ func handlerAdminUserDelete(w http.ResponseWriter, rq *http.Request) { } var lc = l18n.FromRequest(rq) - html := views.AdminUserDeleteHTML(u, util.NewFormData(), lc) - html = views.BaseHTML(fmt.Sprintf(lc.Get("admin.user_title"), u.Name), html, l18n.FromRequest(rq), user.FromRequest(rq)) + html := views.AdminUserDelete(u, util.NewFormData(), lc) + html = views.Base(fmt.Sprintf(lc.Get("admin.user_title"), u.Name), html, l18n.FromRequest(rq), user.FromRequest(rq)) if f.HasError() { w.WriteHeader(http.StatusBadRequest) @@ -153,8 +153,8 @@ func handlerAdminUserNew(w http.ResponseWriter, rq *http.Request) { var lc = l18n.FromRequest(rq) if rq.Method == http.MethodGet { // New user form - html := views.AdminUserNewHTML(util.NewFormData(), lc) - html = views.BaseHTML(lc.Get("admin.newuser_title"), html, lc, user.FromRequest(rq)) + html := views.AdminUserNew(util.NewFormData(), lc) + html = views.Base(lc.Get("admin.newuser_title"), html, lc, user.FromRequest(rq)) w.Header().Set("Content-Type", mime.TypeByExtension(".html")) io.WriteString(w, html) @@ -165,8 +165,8 @@ func handlerAdminUserNew(w http.ResponseWriter, rq *http.Request) { err := user.Register(f.Get("name"), f.Get("password"), f.Get("group"), "local", true) if err != nil { - html := views.AdminUserNewHTML(f.WithError(err), lc) - html = views.BaseHTML(lc.Get("admin.newuser_title"), html, lc, user.FromRequest(rq)) + html := views.AdminUserNew(f.WithError(err), lc) + html = views.Base(lc.Get("admin.newuser_title"), html, lc, user.FromRequest(rq)) w.WriteHeader(http.StatusBadRequest) w.Header().Set("Content-Type", mime.TypeByExtension(".html")) diff --git a/web/auth.go b/web/auth.go index 627a4a7..fc47510 100644 --- a/web/auth.go +++ b/web/auth.go @@ -35,7 +35,7 @@ func initAuth(r *mux.Router) { } func handlerLock(w http.ResponseWriter, rq *http.Request) { - _, _ = io.WriteString(w, views.LockHTML(l18n.FromRequest(rq))) + _, _ = io.WriteString(w, views.Lock(l18n.FromRequest(rq))) } // handlerRegister displays the register form (GET) or registers the user (POST). @@ -45,9 +45,9 @@ func handlerRegister(w http.ResponseWriter, rq *http.Request) { if rq.Method == http.MethodGet { _, _ = io.WriteString( w, - views.BaseHTML( + views.Base( lc.Get("auth.register_title"), - views.RegisterHTML(rq), + views.Register(rq), lc, user.FromRequest(rq), ), @@ -64,7 +64,7 @@ func handlerRegister(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusBadRequest) _, _ = io.WriteString( w, - views.BaseHTML( + views.Base( lc.Get("auth.register_title"), fmt.Sprintf( `

%s

%s

`, @@ -101,7 +101,7 @@ func handlerLogout(w http.ResponseWriter, rq *http.Request) { } _, _ = io.WriteString( w, - views.BaseHTML(lc.Get("auth.logout_title"), views.LogoutHTML(can, lc), lc, u), + views.Base(lc.Get("auth.logout_title"), views.Logout(can, lc), lc, u), ) } else if rq.Method == http.MethodPost { user.LogoutFromRequest(w, rq) @@ -117,9 +117,9 @@ func handlerLogin(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusOK) _, _ = io.WriteString( w, - views.BaseHTML( + views.Base( lc.Get("auth.login_title"), - views.LoginHTML(lc), + views.Login(lc), lc, user.EmptyUser(), ), @@ -133,7 +133,7 @@ func handlerLogin(w http.ResponseWriter, rq *http.Request) { if err != "" { w.Header().Set("Content-Type", "text/html;charset=utf-8") w.WriteHeader(http.StatusInternalServerError) - _, _ = io.WriteString(w, views.BaseHTML(err, views.LoginErrorHTML(err, lc), lc, user.EmptyUser())) + _, _ = io.WriteString(w, views.Base(err, views.LoginError(err, lc), lc, user.EmptyUser())) return } http.Redirect(w, rq, "/", http.StatusSeeOther) @@ -171,7 +171,7 @@ func handlerTelegramLogin(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusBadRequest) _, _ = io.WriteString( w, - views.BaseHTML( + views.Base( lc.Get("ui.error"), fmt.Sprintf( `

%s

%s

%s

`, @@ -192,7 +192,7 @@ func handlerTelegramLogin(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusBadRequest) _, _ = io.WriteString( w, - views.BaseHTML( + views.Base( "Error", fmt.Sprintf( `

%s

%s

%s

`, diff --git a/web/backlinks.go b/web/backlinks.go index d727c74..f7747ae 100644 --- a/web/backlinks.go +++ b/web/backlinks.go @@ -22,9 +22,9 @@ func handlerBacklinks(w http.ResponseWriter, rq *http.Request) { hyphaName = util.HyphaNameFromRq(rq, "backlinks") lc = l18n.FromRequest(rq) ) - util.HTTP200Page(w, views.BaseHTML( + util.HTTP200Page(w, views.Base( lc.Get("ui.backlinks_title", &l18n.Replacements{"query": util.BeautifulName(hyphaName)}), - views.BacklinksHTML(hyphaName, backlinks.YieldHyphaBacklinks, lc), + views.Backlinks(hyphaName, backlinks.YieldHyphaBacklinks, lc), lc, user.FromRequest(rq))) } diff --git a/web/categories.go b/web/categories.go index aa792f2..c8c5327 100644 --- a/web/categories.go +++ b/web/categories.go @@ -16,7 +16,7 @@ func initCategories(r *mux.Router) { } func handlerListCategory(w http.ResponseWriter, rq *http.Request) { - views.CategoryListHTML(views.MetaFrom(w, rq)) + views.CategoryList(views.MetaFrom(w, rq)) } func handlerCategory(w http.ResponseWriter, rq *http.Request) { @@ -24,7 +24,7 @@ func handlerCategory(w http.ResponseWriter, rq *http.Request) { var ( catName = util.HyphaNameFromRq(rq, "category") ) - views.CategoryPageHTML(views.MetaFrom(w, rq), catName) + views.CategoryPage(views.MetaFrom(w, rq), catName) } func handlerRemoveFromCategory(w http.ResponseWriter, rq *http.Request) { diff --git a/web/history.go b/web/history.go index 6023a64..8b3a245 100644 --- a/web/history.go +++ b/web/history.go @@ -41,9 +41,9 @@ func handlerHistory(w http.ResponseWriter, rq *http.Request) { log.Println("Found", len(revs), "revisions for", hyphaName) var lc = l18n.FromRequest(rq) - util.HTTP200Page(w, views.BaseHTML( + util.HTTP200Page(w, views.Base( fmt.Sprintf(lc.Get("ui.history_title"), util.BeautifulName(hyphaName)), - views.HistoryHTML(rq, hyphaName, list, lc), + views.History(rq, hyphaName, list, lc), lc, user.FromRequest(rq))) } @@ -56,9 +56,9 @@ func handlerRecentChanges(w http.ResponseWriter, rq *http.Request) { return } var lc = l18n.FromRequest(rq) - util.HTTP200Page(w, views.BaseHTML( + util.HTTP200Page(w, views.Base( lc.GetPlural("ui.recent_title", n), - views.RecentChangesHTML(n, lc), + views.RecentChanges(n, lc), lc, user.FromRequest(rq))) } diff --git a/web/mutators.go b/web/mutators.go index e05dbb0..2d97c24 100644 --- a/web/mutators.go +++ b/web/mutators.go @@ -43,9 +43,9 @@ func handlerRemoveMedia(w http.ResponseWriter, rq *http.Request) { if rq.Method == "GET" { util.HTTP200Page( w, - views.BaseHTML( + views.Base( fmt.Sprintf(lc.Get("ui.ask_remove_media"), util.BeautifulName(h.CanonicalName())), - views.RemoveMediaAskHTML(rq, h.CanonicalName()), + views.RemoveMediaAsk(rq, h.CanonicalName()), lc, u)) return @@ -87,9 +87,9 @@ func handlerDelete(w http.ResponseWriter, rq *http.Request) { if rq.Method == "GET" { util.HTTP200Page( w, - views.BaseHTML( + views.Base( fmt.Sprintf(lc.Get("ui.ask_delete"), util.BeautifulName(h.CanonicalName())), - views.DeleteAskHTML(rq, h.CanonicalName()), + views.DeleteAsk(rq, h.CanonicalName()), lc, u)) return @@ -133,9 +133,9 @@ func handlerRename(w http.ResponseWriter, rq *http.Request) { if rq.Method == "GET" { util.HTTP200Page( w, - views.BaseHTML( + views.Base( fmt.Sprintf(lc.Get("ui.ask_rename"), util.BeautifulName(oldHypha.CanonicalName())), - views.RenameAskHTML(rq, oldHypha.CanonicalName()), + views.RenameAsk(rq, oldHypha.CanonicalName()), lc, u)) return @@ -180,9 +180,9 @@ func handlerEdit(w http.ResponseWriter, rq *http.Request) { } util.HTTP200Page( w, - views.BaseHTML( + views.Base( fmt.Sprintf(lc.Get("edit.title"), util.BeautifulName(hyphaName)), - views.EditHTML(rq, hyphaName, textAreaFill, warning), + views.Editor(rq, hyphaName, textAreaFill, warning), lc, u)) } @@ -212,9 +212,9 @@ func handlerUploadText(w http.ResponseWriter, rq *http.Request) { util.HTTP200Page( w, - views.BaseHTML( + views.Base( fmt.Sprintf(lc.Get("edit.preview_title"), util.BeautifulName(hyphaName)), - views.PreviewHTML( + views.Preview( rq, hyphaName, textData, diff --git a/web/readers.go b/web/readers.go index f5c12aa..ef66236 100644 --- a/web/readers.go +++ b/web/readers.go @@ -45,9 +45,9 @@ func handlerMedia(w http.ResponseWriter, rq *http.Request) { lc = l18n.FromRequest(rq) ) util.HTTP200Page(w, - views.BaseHTML( + views.Base( lc.Get("ui.media_title", &l18n.Replacements{"name": util.BeautifulName(hyphaName)}), - views.MediaMenuHTML(rq, h, u), + views.MediaMenu(rq, h, u), lc, u)) } @@ -69,9 +69,9 @@ func handlerPrimitiveDiff(w http.ResponseWriter, rq *http.Request) { _, _ = io.WriteString(w, "404 not found") case hyphae.ExistingHypha: util.HTTP200Page(w, - views.BaseHTML( + views.Base( lc.Get("ui.diff_title", &l18n.Replacements{"name": util.BeautifulName(hyphaName), "rev": revHash}), - views.PrimitiveDiffHTML(rq, h, u, revHash), + views.PrimitiveDiff(rq, h, u, revHash), lc, u)) } @@ -135,7 +135,7 @@ func handlerRevision(w http.ResponseWriter, rq *http.Request) { contents = mycomarkup.BlocksToHTML(ctx, mycomarkup.BlockTree(ctx)) } } - page := views.RevisionHTML( + page := views.Revision( rq, lc, h, @@ -146,7 +146,7 @@ func handlerRevision(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusOK) _, _ = fmt.Fprint( w, - views.BaseHTML( + views.Base( lc.Get("ui.revision_title", &l18n.Replacements{"name": util.BeautifulName(hyphaName), "rev": revHash}), page, lc, @@ -198,9 +198,9 @@ func handlerHypha(w http.ResponseWriter, rq *http.Request) { switch h := h.(type) { case *hyphae.EmptyHypha: util.HTTP404Page(w, - views.BaseHTML( + views.Base( util.BeautifulName(hyphaName), - views.HyphaHTML(rq, lc, h, contents), + views.Hypha(rq, lc, h, contents), lc, u, openGraph)) @@ -216,13 +216,13 @@ func handlerHypha(w http.ResponseWriter, rq *http.Request) { } switch h := h.(type) { case *hyphae.MediaHypha: - contents = views.MediaHTML(h, lc) + contents + contents = views.Media(h, lc) + contents } util.HTTP200Page(w, - views.BaseHTML( + views.Base( util.BeautifulName(hyphaName), - views.HyphaHTML(rq, lc, h, contents), + views.Hypha(rq, lc, h, contents), lc, u, openGraph)) diff --git a/web/search.go b/web/search.go index 729c397..06453a1 100644 --- a/web/search.go +++ b/web/search.go @@ -28,9 +28,9 @@ func handlerTitleSearch(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusOK) _, _ = io.WriteString( w, - views.BaseHTML( + views.Base( lc.Get("ui.title_search_title", &l18n.Replacements{"query": query}), - views.TitleSearchHTML(query, shroom.YieldHyphaNamesContainingString, lc), + views.TitleSearch(query, shroom.YieldHyphaNamesContainingString, lc), lc, u, ), diff --git a/web/stuff.go b/web/stuff.go index 8aa2b55..ad5866f 100644 --- a/web/stuff.go +++ b/web/stuff.go @@ -58,8 +58,8 @@ func handlerHelp(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusNotFound) _, _ = io.WriteString( w, - views.BaseHTML(lc.Get("help.entry_not_found"), - views.HelpHTML(views.HelpEmptyErrorHTML(lc), lang, lc), + views.Base(lc.Get("help.entry_not_found"), + views.Help(views.HelpEmptyError(lc), lang, lc), lc, user.FromRequest(rq)), ) @@ -69,8 +69,8 @@ func handlerHelp(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusInternalServerError) _, _ = io.WriteString( w, - views.BaseHTML(err.Error(), - views.HelpHTML(err.Error(), lang, lc), + views.Base(err.Error(), + views.Help(err.Error(), lang, lc), lc, user.FromRequest(rq)), ) @@ -84,8 +84,8 @@ func handlerHelp(w http.ResponseWriter, rq *http.Request) { w.WriteHeader(http.StatusOK) _, _ = io.WriteString( w, - views.BaseHTML(lc.Get("help.title"), - views.HelpHTML(result, lang, lc), + views.Base(lc.Get("help.title"), + views.Help(result, lang, lc), lc, user.FromRequest(rq)), ) @@ -96,7 +96,7 @@ func handlerList(w http.ResponseWriter, rq *http.Request) { u := user.FromRequest(rq) var lc = l18n.FromRequest(rq) util.PrepareRq(rq) - util.HTTP200Page(w, views.BaseHTML(lc.Get("ui.list_title"), views.HyphaListHTML(lc), lc, u)) + util.HTTP200Page(w, views.Base(lc.Get("ui.list_title"), views.HyphaList(lc), lc, u)) } // handlerReindex reindexes all hyphae by checking the wiki storage directory anew. @@ -160,7 +160,7 @@ func handlerAbout(w http.ResponseWriter, rq *http.Request) { lc = l18n.FromRequest(rq) title = lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName}) ) - _, err := io.WriteString(w, views.BaseHTML(title, views.AboutHTML(lc), lc, user.FromRequest(rq))) + _, err := io.WriteString(w, views.Base(title, views.AboutHTML(lc), lc, user.FromRequest(rq))) if err != nil { log.Println(err) } diff --git a/web/web.go b/web/web.go index 1348208..c255b5d 100644 --- a/web/web.go +++ b/web/web.go @@ -26,7 +26,7 @@ func httpErr(w http.ResponseWriter, lc *l18n.Localizer, status int, name, errMsg w.WriteHeader(status) fmt.Fprint( w, - views.BaseHTML( + views.Base( "Error", fmt.Sprintf( `

%s. %s

`, @@ -56,7 +56,7 @@ func handlerUserList(w http.ResponseWriter, rq *http.Request) { lc := l18n.FromRequest(rq) w.Header().Set("Content-Type", mime.TypeByExtension(".html")) w.WriteHeader(http.StatusOK) - w.Write([]byte(views.BaseHTML(lc.Get("ui.users_title"), views.UserListHTML(lc), lc, user.FromRequest(rq)))) + w.Write([]byte(views.Base(lc.Get("ui.users_title"), views.UserList(lc), lc, user.FromRequest(rq)))) } func handlerRobotsTxt(w http.ResponseWriter, rq *http.Request) {