diff --git a/README.md b/README.md index 391a4dd5..58504fab 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ In-memory static file, forum and group caches. A profile system including profile comments and moderation tools for the profile owner. -A template engine which compiles templates down into machine code. Over ten times faster than html/templates. +A template engine which compiles templates down into machine code. Over ten times faster than html/templates. Compatible with templates written for html/templates, you don't need to learn any new templating language. A plugin system. Under development. diff --git a/general_test.go b/general_test.go index b4fa2eb9..e138d4e5 100644 --- a/general_test.go +++ b/general_test.go @@ -2,6 +2,7 @@ package main //import "fmt" import "log" import "bytes" +import "math/rand" import "testing" import "net/http" import "net/http/httptest" @@ -216,17 +217,170 @@ func BenchmarkRoute(b *testing.B) { forums_handler.ServeHTTP(forums_w,forums_req) } }) +} + +func addEmptyRoutesToMux(routes []string, serveMux *http.ServeMux) { + for _, route := range routes { + serveMux.HandleFunc(route, func(_ http.ResponseWriter,_ *http.Request){}) + } +} + +func BenchmarkRouter(b *testing.B) { + w := httptest.NewRecorder() + req := httptest.NewRequest("get","/topics/",bytes.NewReader(nil)) + routes := make([]string, 0) + routes = append(routes,"/test/") serveMux := http.NewServeMux() - serveMux.HandleFunc("/topics/", route_topics) - b.Run("topics_guest_plus_router", func(b *testing.B) { + serveMux.HandleFunc("/test/", func(_ http.ResponseWriter,_ *http.Request){}) + b.Run("one-route", func(b *testing.B) { for i := 0; i < b.N; i++ { - topics_w.Body.Reset() - serveMux.ServeHTTP(topics_w,topics_req) + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + routes = append(routes,"/topic/") + routes = append(routes,"/forums/") + routes = append(routes,"/forum/") + routes = append(routes,"/panel/") + serveMux = http.NewServeMux() + addEmptyRoutesToMux(routes, serveMux) + b.Run("five-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/panel/plugins/") + routes = append(routes,"/panel/groups/") + routes = append(routes,"/panel/settings/") + routes = append(routes,"/panel/users/") + routes = append(routes,"/panel/forums/") + addEmptyRoutesToMux(routes, serveMux) + b.Run("ten-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/panel/forums/create/submit/") + routes = append(routes,"/panel/forums/delete/") + routes = append(routes,"/users/ban/") + routes = append(routes,"/panel/users/edit/") + routes = append(routes,"/panel/forums/create/") + routes = append(routes,"/users/unban/") + routes = append(routes,"/pages/") + routes = append(routes,"/users/activate/") + routes = append(routes,"/panel/forums/edit/submit/") + routes = append(routes,"/panel/plugins/activate/") + addEmptyRoutesToMux(routes, serveMux) + b.Run("twenty-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/panel/plugins/deactivate/") + routes = append(routes,"/panel/plugins/install/") + routes = append(routes,"/panel/plugins/uninstall/") + routes = append(routes,"/panel/templates/") + routes = append(routes,"/panel/templates/edit/") + routes = append(routes,"/panel/templates/create/") + routes = append(routes,"/panel/templates/delete/") + routes = append(routes,"/panel/templates/edit/submit/") + routes = append(routes,"/panel/themes/") + routes = append(routes,"/panel/themes/edit/") + addEmptyRoutesToMux(routes, serveMux) + b.Run("thirty-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/panel/themes/create/") + routes = append(routes,"/panel/themes/delete/") + routes = append(routes,"/panel/themes/delete/submit/") + routes = append(routes,"/panel/templates/create/submit/") + routes = append(routes,"/panel/templates/delete/submit/") + routes = append(routes,"/panel/widgets/") + routes = append(routes,"/panel/widgets/edit/") + routes = append(routes,"/panel/widgets/activate/") + routes = append(routes,"/panel/widgets/deactivate/") + routes = append(routes,"/panel/magical/wombat/path") + addEmptyRoutesToMux(routes, serveMux) + b.Run("forty-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/report/") + routes = append(routes,"/report/submit/") + routes = append(routes,"/topic/create/submit/") + routes = append(routes,"/topics/create/") + routes = append(routes,"/overview/") + routes = append(routes,"/uploads/") + routes = append(routes,"/static/") + routes = append(routes,"/reply/edit/submit/") + routes = append(routes,"/reply/delete/submit/") + routes = append(routes,"/topic/edit/submit/") + addEmptyRoutesToMux(routes, serveMux) + b.Run("fifty-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/topic/delete/submit/") + routes = append(routes,"/topic/stick/submit/") + routes = append(routes,"/topic/unstick/submit/") + routes = append(routes,"/accounts/login/") + routes = append(routes,"/accounts/create/") + routes = append(routes,"/accounts/logout/") + routes = append(routes,"/accounts/login/submit/") + routes = append(routes,"/accounts/create/submit/") + routes = append(routes,"/user/edit/critical/") + routes = append(routes,"/user/edit/critical/submit/") + addEmptyRoutesToMux(routes, serveMux) + b.Run("sixty-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) + } + }) + + serveMux = http.NewServeMux() + routes = append(routes,"/user/edit/avatar/") + routes = append(routes,"/user/edit/avatar/submit/") + routes = append(routes,"/user/edit/username/") + routes = append(routes,"/user/edit/username/submit/") + routes = append(routes,"/profile/reply/create/") + routes = append(routes,"/profile/reply/edit/submit/") + routes = append(routes,"/profile/reply/delete/submit/") + routes = append(routes,"/arcane/tower/") + routes = append(routes,"/magical/kingdom/") + routes = append(routes,"/insert/name/here/") + addEmptyRoutesToMux(routes, serveMux) + b.Run("seventy-routes", func(b *testing.B) { + for i := 0; i < b.N; i++ { + req = httptest.NewRequest("get",routes[rand.Intn(len(routes))],bytes.NewReader(nil)) + serveMux.ServeHTTP(w,req) } }) } -/*func TestRoute(b *testing.T) { - +/*func TestRoute(t *testing.T) { }*/ \ No newline at end of file diff --git a/gosora.exe b/gosora.exe index 21ab5452..2fd6216a 100644 Binary files a/gosora.exe and b/gosora.exe differ diff --git a/images/bench_round2.PNG b/images/bench_round2.PNG new file mode 100644 index 00000000..69e3ecec Binary files /dev/null and b/images/bench_round2.PNG differ diff --git a/images/laptop-1440px.PNG b/images/laptop-1440px.PNG new file mode 100644 index 00000000..d282f228 Binary files /dev/null and b/images/laptop-1440px.PNG differ diff --git a/images/mobile-320px.PNG b/images/mobile-320px.PNG new file mode 100644 index 00000000..e930823e Binary files /dev/null and b/images/mobile-320px.PNG differ diff --git a/images/mobile-375px.PNG b/images/mobile-375px.PNG new file mode 100644 index 00000000..599a6a5f Binary files /dev/null and b/images/mobile-375px.PNG differ diff --git a/images/mobile-425px.PNG b/images/mobile-425px.PNG new file mode 100644 index 00000000..02bdbfbc Binary files /dev/null and b/images/mobile-425px.PNG differ diff --git a/images/tablet-1024px.PNG b/images/tablet-1024px.PNG new file mode 100644 index 00000000..2ce65433 Binary files /dev/null and b/images/tablet-1024px.PNG differ diff --git a/images/tablet-768px.PNG b/images/tablet-768px.PNG new file mode 100644 index 00000000..ca23a1b3 Binary files /dev/null and b/images/tablet-768px.PNG differ diff --git a/images/user-editor-admin-view.PNG b/images/user-editor-admin-view.PNG new file mode 100644 index 00000000..d7b452a4 Binary files /dev/null and b/images/user-editor-admin-view.PNG differ diff --git a/images/user-editor-mod-view.PNG b/images/user-editor-mod-view.PNG new file mode 100644 index 00000000..e780ebc1 Binary files /dev/null and b/images/user-editor-mod-view.PNG differ diff --git a/main.go b/main.go index e4d1e7c7..7f4985de 100644 --- a/main.go +++ b/main.go @@ -194,6 +194,7 @@ func main(){ http.HandleFunc("/users/activate/", route_activate) // Admin + http.HandleFunc("/panel/", route_panel) http.HandleFunc("/panel/forums/", route_panel_forums) http.HandleFunc("/panel/forums/create/", route_panel_forums_create_submit) http.HandleFunc("/panel/forums/delete/", route_panel_forums_delete) diff --git a/mod_routes.go b/mod_routes.go index 09a5bf21..0071c70f 100644 --- a/mod_routes.go +++ b/mod_routes.go @@ -532,12 +532,27 @@ func route_activate(w http.ResponseWriter, r *http.Request) { http.Redirect(w,r,"/users/" + strconv.Itoa(uid),http.StatusSeeOther) } +/* Control Panel*/ +func route_panel(w http.ResponseWriter, r *http.Request){ + user, noticeList, ok := SessionCheck(w,r) + if !ok { + return + } + if !user.Is_Super_Mod { + NoPermissions(w,r,user) + return + } + + pi := Page{"Control Panel Dashboard","panel",user,noticeList,tList,0} + templates.ExecuteTemplate(w,"panel-dashboard.html", pi) +} + func route_panel_forums(w http.ResponseWriter, r *http.Request){ user, noticeList, ok := SessionCheck(w,r) if !ok { return } - if !user.Perms.ManageForums { + if !user.Is_Super_Mod || !user.Perms.ManageForums { NoPermissions(w,r,user) return } @@ -558,7 +573,7 @@ func route_panel_forums_create_submit(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.ManageForums { + if !user.Is_Super_Mod || !user.Perms.ManageForums { NoPermissions(w,r,user) return } @@ -595,7 +610,7 @@ func route_panel_forums_delete(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.ManageForums { + if !user.Is_Super_Mod || !user.Perms.ManageForums { NoPermissions(w,r,user) return } @@ -628,7 +643,7 @@ func route_panel_forums_delete_submit(w http.ResponseWriter, r *http.Request) { if !ok { return } - if !user.Perms.ManageForums { + if !user.Is_Super_Mod || !user.Perms.ManageForums { NoPermissions(w,r,user) return } @@ -666,7 +681,7 @@ func route_panel_forums_edit_submit(w http.ResponseWriter, r *http.Request) { if !ok { return } - if !user.Perms.ManageForums { + if !user.Is_Super_Mod || !user.Perms.ManageForums { NoPermissions(w,r,user) return } @@ -710,7 +725,7 @@ func route_panel_settings(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.EditSettings { + if !user.Is_Super_Mod || !user.Perms.EditSettings { NoPermissions(w,r,user) return } @@ -766,7 +781,7 @@ func route_panel_setting(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.EditSettings { + if !user.Is_Super_Mod || !user.Perms.EditSettings { NoPermissions(w,r,user) return } @@ -816,7 +831,7 @@ func route_panel_setting_edit(w http.ResponseWriter, r *http.Request) { if !ok { return } - if !user.Perms.EditSettings { + if !user.Is_Super_Mod || !user.Perms.EditSettings { NoPermissions(w,r,user) return } @@ -872,7 +887,7 @@ func route_panel_plugins(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.ManagePlugins { + if !user.Is_Super_Mod || !user.Perms.ManagePlugins { NoPermissions(w,r,user) return } @@ -891,7 +906,7 @@ func route_panel_plugins_activate(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.ManagePlugins { + if !user.Is_Super_Mod || !user.Perms.ManagePlugins { NoPermissions(w,r,user) return } @@ -954,7 +969,7 @@ func route_panel_plugins_deactivate(w http.ResponseWriter, r *http.Request){ if !ok { return } - if !user.Perms.ManagePlugins { + if !user.Is_Super_Mod || !user.Perms.ManagePlugins { NoPermissions(w,r,user) return } @@ -1208,4 +1223,4 @@ func route_panel_users_edit_submit(w http.ResponseWriter, r *http.Request){ } http.Redirect(w,r,"/panel/users/edit/" + strconv.Itoa(targetUser.ID),http.StatusSeeOther) -} \ No newline at end of file +} diff --git a/public/main.css b/public/main.css index 0dff9f92..6fbfc80f 100644 --- a/public/main.css +++ b/public/main.css @@ -28,18 +28,8 @@ body } } -/*.move_left -{ - float: left; - position: relative; - left: 50%; -} -.move_right -{ - float: left; - position: relative; - left: -50%; -}*/ +/*.move_left{float: left;position: relative;left: 50%;} +.move_right{float: left;position: relative;left: -50%;}*/ ul { padding-left: 0px; @@ -340,4 +330,82 @@ button.username border: 1px solid #FF004B; margin-bottom: 8px; background-color: #FEB7CC; +} + +@media (max-width: 880px) { + li + { + height: 25px; + font-size: 15px; + padding-left: 7px; + } + ul { height: 26px; margin-top: 8px; } + .menu_left { padding-right: 7px; } + .menu_right { padding-right: 7px; } + body { padding-left: 4px; padding-right: 4px; margin: 0px !important; width: 100% !important; height: 100% !important; overflow-x: hidden; } + .container { width: auto; } +} + +@media (max-width: 810px) { + li + { + font-weight: normal; + text-transform: none; + } + .rowitem + { + text-transform: none; + } +} + +@media (max-width: 620px) { + li + { + padding-left: 5px; + padding-top: 2px; + padding-bottom: 2px; + height: 23px; + } + ul { height: 24px; } + .menu_left { padding-right: 5px; } + .menu_right { padding-right: 5px; } + .menu_create_topic { display: none;} + .hide_on_mobile { display: none; } +} + +@media (max-width: 470px) { + .menu_overview { display: none; } + .menu_profile { display: none; } + .hide_on_micro { display: none; } + .post_container { + overflow: visible !important; + } + .post_item { + background-position: 0px 2px !important; + background-size: 64px 64px !important; + padding-left: 2px !important; + min-height: 96px; + position: relative !important; + } + .post_item > .user_content { + margin-left: 75px !important; + width: 100% !important; + } + .post_item > .mod_button { + float: right !important; + margin-left: 2px !important; + position: relative; + top: -14px; + } + .post_item > .real_username { + position: absolute; + top: 70px; + float: left; + margin-top: 0px; + padding-top: 3px !important; + margin-right: 2px; + width: 60px; + font-size: 15px; + } + .container { width: 100% !important; } } \ No newline at end of file diff --git a/template_forum.go b/template_forum.go index 88775921..b698e62f 100644 --- a/template_forum.go +++ b/template_forum.go @@ -17,6 +17,7 @@ w.Write([]byte(` var session = "` + tmpl_forum_vars.CurrentUser.Session + `"; +
@@ -32,10 +33,10 @@ w.Write([]byte(` if tmpl_forum_vars.CurrentUser.Loggedin { w.Write([]byte(` - + `)) if tmpl_forum_vars.CurrentUser.Is_Super_Mod { -w.Write([]byte(``)) +w.Write([]byte(``)) } w.Write([]byte(` @@ -79,10 +80,10 @@ if item.(TopicUser).Is_Closed { w.Write([]byte(`closed `)) } else { -w.Write([]byte(`open`)) +w.Write([]byte(`open`)) } w.Write([]byte(` - Status + Status
`)) } diff --git a/template_forums.go b/template_forums.go index 2d33bce2..6b1ccd73 100644 --- a/template_forums.go +++ b/template_forums.go @@ -17,6 +17,7 @@ w.Write([]byte(` var session = "` + tmpl_forums_vars.CurrentUser.Session + `"; +
@@ -32,10 +33,10 @@ w.Write([]byte(` if tmpl_forums_vars.CurrentUser.Loggedin { w.Write([]byte(` - + `)) if tmpl_forums_vars.CurrentUser.Is_Super_Mod { -w.Write([]byte(``)) +w.Write([]byte(``)) } w.Write([]byte(` diff --git a/template_topic.go b/template_topic.go index b21b49d8..ad5a2225 100644 --- a/template_topic.go +++ b/template_topic.go @@ -18,6 +18,7 @@ w.Write([]byte(` var session = "` + tmpl_topic_vars.CurrentUser.Session + `"; +
@@ -33,10 +34,10 @@ w.Write([]byte(` if tmpl_topic_vars.CurrentUser.Loggedin { w.Write([]byte(` - + `)) if tmpl_topic_vars.CurrentUser.Is_Super_Mod { -w.Write([]byte(``)) +w.Write([]byte(``)) } w.Write([]byte(` @@ -68,8 +69,8 @@ w.Write([]byte(` style="background-color: #FFFFEA;"`)) } w.Write([]byte(`> ` + tmpl_topic_vars.Topic.Title + ` - ` + tmpl_topic_vars.Topic.Status + ` - Status + ` + tmpl_topic_vars.Topic.Status + ` + Status `)) if tmpl_topic_vars.CurrentUser.Is_Mod { w.Write([]byte(` @@ -96,8 +97,8 @@ w.Write([]byte(`
-
-
+
- ` + string(tmpl_topic_vars.Topic.Content.(template.HTML)) + ` +

` + string(tmpl_topic_vars.Topic.Content.(template.HTML)) + `



- ` + tmpl_topic_vars.Topic.CreatedByName + ` + ` + tmpl_topic_vars.Topic.CreatedByName + ` `)) if tmpl_topic_vars.Topic.Tag != "" { -w.Write([]byte(`` + tmpl_topic_vars.Topic.Tag + ``)) +w.Write([]byte(`` + tmpl_topic_vars.Topic.Tag + ``)) } else { if tmpl_topic_vars.Topic.URLName != "" { w.Write([]byte(`` + tmpl_topic_vars.Topic.URLName + ` @@ -122,12 +123,12 @@ w.Write([]byte(`

-
+
`)) if len(tmpl_topic_vars.ItemList) != 0 { for _, item := range tmpl_topic_vars.ItemList { w.Write([]byte(` -
- ` + string(item.ContentHtml) + ` +

` + string(item.ContentHtml) + `



-
` + item.CreatedByName + ` + ` + item.CreatedByName + ` `)) if tmpl_topic_vars.CurrentUser.Perms.EditReply { -w.Write([]byte(``)) +w.Write([]byte(``)) } w.Write([]byte(` `)) if tmpl_topic_vars.CurrentUser.Perms.DeleteReply { -w.Write([]byte(``)) +w.Write([]byte(``)) } w.Write([]byte(` - + `)) if item.Tag != "" { -w.Write([]byte(`` + item.Tag + ``)) +w.Write([]byte(`` + item.Tag + ``)) } else { if item.URLName != "" { -w.Write([]byte(`` + item.URLName + ` - ` + item.URLPrefix + ``)) +w.Write([]byte(`` + item.URLName + ` + ` + item.URLPrefix + ``)) } } w.Write([]byte(` diff --git a/template_topics.go b/template_topics.go index eab384f9..6803a52c 100644 --- a/template_topics.go +++ b/template_topics.go @@ -17,6 +17,7 @@ w.Write([]byte(` var session = "` + tmpl_topics_vars.CurrentUser.Session + `"; +
@@ -32,10 +33,10 @@ w.Write([]byte(` if tmpl_topics_vars.CurrentUser.Loggedin { w.Write([]byte(` - + `)) if tmpl_topics_vars.CurrentUser.Is_Super_Mod { -w.Write([]byte(``)) +w.Write([]byte(``)) } w.Write([]byte(` @@ -79,10 +80,10 @@ if item.(TopicUser).Is_Closed { w.Write([]byte(`closed `)) } else { -w.Write([]byte(`open`)) +w.Write([]byte(`open`)) } w.Write([]byte(` - Status + Status
`)) } diff --git a/templates/forum.html b/templates/forum.html index 4ef82420..c9a02e86 100644 --- a/templates/forum.html +++ b/templates/forum.html @@ -5,8 +5,8 @@
{{range .ItemList}}
{{.Title}} {{if .Is_Closed}}closed - {{else}}open{{end}} - Status + {{else}}open{{end}} + Status
{{else}}
There aren't any topics in this forum yet.
{{end}}
diff --git a/templates/header.html b/templates/header.html index 29def7d6..13472b41 100644 --- a/templates/header.html +++ b/templates/header.html @@ -8,6 +8,7 @@ var session = "{{.CurrentUser.Session}}"; +
diff --git a/templates/menu.html b/templates/menu.html index dc7cd02a..c50f1da8 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -8,8 +8,8 @@ {{ if .CurrentUser.Loggedin }} - - {{ if .CurrentUser.Is_Super_Mod}}{{end}} + + {{ if .CurrentUser.Is_Super_Mod}}{{end}} {{ else }} diff --git a/templates/panel-dashboard.html b/templates/panel-dashboard.html new file mode 100644 index 00000000..ec9bda28 --- /dev/null +++ b/templates/panel-dashboard.html @@ -0,0 +1,9 @@ +{{template "header.html" . }} +{{template "panel-menu.html" . }} + +
+
Coming Soon...
+
+{{template "footer.html" . }} \ No newline at end of file diff --git a/templates/panel-forums.html b/templates/panel-forums.html index eb83d538..8e0c0f94 100644 --- a/templates/panel-forums.html +++ b/templates/panel-forums.html @@ -1,16 +1,5 @@ {{template "header.html" . }} - +{{template "panel-menu.html" . }} diff --git a/templates/panel-menu.html b/templates/panel-menu.html new file mode 100644 index 00000000..4a0e5e68 --- /dev/null +++ b/templates/panel-menu.html @@ -0,0 +1,12 @@ +
+ + + + {{if .CurrentUser.Perms.ManageForums}}{{end}} + {{if .CurrentUser.Perms.EditSettings}}{{end}} + {{if .CurrentUser.Perms.ManagePlugins}}{{end}} + + + + +
\ No newline at end of file diff --git a/templates/panel-plugins.html b/templates/panel-plugins.html index b82fdb87..f400097d 100644 --- a/templates/panel-plugins.html +++ b/templates/panel-plugins.html @@ -1,16 +1,5 @@ {{template "header.html" . }} - +{{template "panel-menu.html" . }} diff --git a/templates/panel-setting.html b/templates/panel-setting.html index 5a6fed17..7eb5db68 100644 --- a/templates/panel-setting.html +++ b/templates/panel-setting.html @@ -1,16 +1,5 @@ {{template "header.html" . }} - +{{template "panel-menu.html" . }} diff --git a/templates/panel-settings.html b/templates/panel-settings.html index b9704836..28a435aa 100644 --- a/templates/panel-settings.html +++ b/templates/panel-settings.html @@ -1,16 +1,5 @@ {{template "header.html" . }} - +{{template "panel-menu.html" . }} diff --git a/templates/panel-user-edit.html b/templates/panel-user-edit.html index f67f4488..e0087eb4 100644 --- a/templates/panel-user-edit.html +++ b/templates/panel-user-edit.html @@ -1,16 +1,5 @@ {{template "header.html" . }} - +{{template "panel-menu.html" . }} diff --git a/templates/panel-users.html b/templates/panel-users.html index d6063437..c5f54aee 100644 --- a/templates/panel-users.html +++ b/templates/panel-users.html @@ -1,16 +1,5 @@ {{template "header.html" . }} - +{{template "panel-menu.html" . }} diff --git a/templates/topic.html b/templates/topic.html index 8ca3cd9e..39a00e5f 100644 --- a/templates/topic.html +++ b/templates/topic.html @@ -3,8 +3,8 @@
{{.Topic.Title}} - {{.Topic.Status}} - Status + {{.Topic.Status}} + Status {{if .CurrentUser.Is_Mod}} Edit Delete @@ -21,27 +21,27 @@
-
-
- {{.Topic.Content}} +
+
+

{{.Topic.Content}}



- {{.Topic.CreatedByName}} - {{if .Topic.Tag}}{{.Topic.Tag}}{{else if .Topic.URLName}}{{.Topic.URLName}} + {{.Topic.CreatedByName}} + {{if .Topic.Tag}}{{.Topic.Tag}}{{else if .Topic.URLName}}{{.Topic.URLName}} {{.Topic.URLPrefix}}{{end}}

-
+
{{range .ItemList}} -
- {{.ContentHtml}} +
+

{{.ContentHtml}}



- {{.CreatedByName}} - {{if $.CurrentUser.Perms.EditReply}}{{end}} - {{if $.CurrentUser.Perms.DeleteReply}}{{end}} - - {{if .Tag}}{{.Tag}}{{else if .URLName}}{{.URLName}} - {{.URLPrefix}}{{end}} + {{.CreatedByName}} + {{if $.CurrentUser.Perms.EditReply}}{{end}} + {{if $.CurrentUser.Perms.DeleteReply}}{{end}} + + {{if .Tag}}{{.Tag}}{{else if .URLName}}{{.URLName}} + {{.URLPrefix}}{{end}}
{{end}}
{{if .CurrentUser.Perms.CreateReply}} diff --git a/templates/topics.html b/templates/topics.html index c7efb5e4..96f69543 100644 --- a/templates/topics.html +++ b/templates/topics.html @@ -5,8 +5,8 @@
{{range .ItemList}}
{{.Title}} {{if .Is_Closed}}closed - {{else}}open{{end}} - Status + {{else}}open{{end}} + Status
{{else}}
There aren't any topics yet.
{{end}}