From 92a8706709a380d29c376db4f7766b7286ec7191 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sun, 1 Sep 2019 09:39:39 +1000 Subject: [PATCH] Fix the resources not being invalidated properly. Tweak the convo list styling. --- common/pages.go | 13 +++++++++---- templates/convos.html | 2 +- themes/cosora/public/convo.css | 6 ++++++ themes/nox/public/convo.css | 7 +++++++ themes/shadow/public/convo.css | 3 +++ themes/tempra_simple/public/convo.css | 3 +++ 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/common/pages.go b/common/pages.go index 6654560a..03bcf587 100644 --- a/common/pages.go +++ b/common/pages.go @@ -6,6 +6,7 @@ import ( "runtime" "sync" "time" + "log" p "github.com/Azareal/Gosora/common/phrases" ) @@ -51,7 +52,8 @@ type Header struct { } func (h *Header) AddScript(name string) { - if name[0] == '/' && name[1] != '/' { + if name[0] == '/' && name[1] == '/' { + } else { // TODO: Use a secondary static file map to avoid this concatenation? file, ok := StaticFiles.Get("/s/" + name) if ok { @@ -63,7 +65,8 @@ func (h *Header) AddScript(name string) { } func (h *Header) AddPreScriptAsync(name string) { - if name[0] == '/' && name[1] != '/' { + if name[0] == '/' && name[1] == '/' { + } else { file, ok := StaticFiles.Get("/s/" + name) if ok { name = file.OName @@ -73,7 +76,8 @@ func (h *Header) AddPreScriptAsync(name string) { } func (h *Header) AddScriptAsync(name string) { - if name[0] == '/' && name[1] != '/' { + if name[0] == '/' && name[1] == '/' { + } else { file, ok := StaticFiles.Get("/s/" + name) if ok { name = file.OName @@ -87,7 +91,8 @@ func (h *Header) AddScriptAsync(name string) { }*/ func (h *Header) AddSheet(name string) { - if name[0] == '/' && name[1] != '/' { + if name[0] == '/' && name[1] == '/' { + } else { file, ok := StaticFiles.Get("/s/" + name) if ok { name = file.OName diff --git a/templates/convos.html b/templates/convos.html index 4011981f..f8fcd39f 100644 --- a/templates/convos.html +++ b/templates/convos.html @@ -4,7 +4,7 @@ {{if not .CurrentUser.IsBanned}}

Create Convo

{{end}} -
+
{{range .Convos}}
diff --git a/themes/cosora/public/convo.css b/themes/cosora/public/convo.css index e69de29b..15dbfc30 100644 --- a/themes/cosora/public/convo.css +++ b/themes/cosora/public/convo.css @@ -0,0 +1,6 @@ +.rowhead .rowitem { + display: flex; +} +.convos_item_user:not(:last-child):after { + content: ","; +} \ No newline at end of file diff --git a/themes/nox/public/convo.css b/themes/nox/public/convo.css index 7dc83876..a145d67c 100644 --- a/themes/nox/public/convo.css +++ b/themes/nox/public/convo.css @@ -1,6 +1,13 @@ +.rowhead .rowitem, +.convos_list .rowitem { + display: flex; +} .convos_item_user:not(:last-child):after { content: ","; } +.to_right { + margin-left: auto; +} .parti { margin-bottom: 8px; diff --git a/themes/shadow/public/convo.css b/themes/shadow/public/convo.css index e69de29b..a50090b4 100644 --- a/themes/shadow/public/convo.css +++ b/themes/shadow/public/convo.css @@ -0,0 +1,3 @@ +.convos_item_user:not(:last-child):after { + content: ","; +} \ No newline at end of file diff --git a/themes/tempra_simple/public/convo.css b/themes/tempra_simple/public/convo.css index e69de29b..a50090b4 100644 --- a/themes/tempra_simple/public/convo.css +++ b/themes/tempra_simple/public/convo.css @@ -0,0 +1,3 @@ +.convos_item_user:not(:last-child):after { + content: ","; +} \ No newline at end of file