{%s lc.Get("ui.revision_warning") %} {%s lc.Get("ui.revision_link") %}
- {%s= NaviTitleHTML(h) %} + {%s= NaviTitle(h) %} {%s= contents %}{%s lc.Get("ui.search_results_query", &l18n.Replacements{"query": query})%}
@@ -98,7 +98,7 @@{%s= lc.Get( @@ -123,24 +123,24 @@
{%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(``)
@@ -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
`,
@@ -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
`,
@@ -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
`,
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) {
%s
%s
%s
%s
%s
%s. %s