diff --git a/README.md b/README.md index 9d17c2a8..6c032492 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,13 @@ Experimental plugins aka the ones in the /experimental/ folder (e.g. plugin_send We're looking for ways to clean-up the plugin system so that all of them (except the experimental ones) are housed in /extend/, however we've encountered some problems with Go's packaging system. We plan to fix this issue in the future. +# Images +[[https://github.com/Azareal/Gosora/blob/master/images/tempra-simple.png|alt=Tempra Simple Theme]] +[[https://github.com/Azareal/Gosora/blob/master/images/tempra-conflux.png|alt=Tempra Conflux Theme]] +[[https://github.com/Azareal/Gosora/blob/master/images/cosmo-conflux.png|alt=Cosmo Conflux Theme]] +[[https://github.com/Azareal/Gosora/blob/master/images/cosmo.png|alt=Cosmo Theme]] + + # TO-DO Oh my, you caught me right at the start of this project. There's nothing to see here yet, asides from the absolute basics. You might want to look again later! diff --git a/files.go b/files.go index 519f4f14..d8bb61cf 100644 --- a/files.go +++ b/files.go @@ -1,7 +1,13 @@ package main -import "io" -import "os" +import "log" +import "strings" +import "mime" import "errors" +import "os" +import "io" +import "io/ioutil" +import "path/filepath" +import "net/http" type SFile struct { @@ -48,4 +54,26 @@ func (r SFile) Seek(offset int64, whence int) (int64, error) { return 0, errors.New("invalid whence") } return r.Pos, nil +} + +func add_static_file(path string, prefix string) error { + data, err := ioutil.ReadFile(path) + if err != nil { + return err + } + fi, err := os.Open(path) + if err != nil { + return err + } + f, err := fi.Stat() + if err != nil { + return err + } + + log.Print("Adding the '" + path + "' static file") + path = strings.TrimPrefix(path, prefix) + log.Print("Added the '" + path + "' static file") + + static_files["/static" + path] = SFile{data,0,int64(len(data)),mime.TypeByExtension(filepath.Ext(prefix + path)),f,f.ModTime().UTC().Format(http.TimeFormat)} + return nil } \ No newline at end of file diff --git a/general_test.go b/general_test.go index f3acc7fb..e4f752ee 100644 --- a/general_test.go +++ b/general_test.go @@ -752,96 +752,145 @@ func BenchmarkBBCodePluginWithRegexp(b *testing.B) { b.ReportAllocs() b.Run("empty_post", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("") + _ = bbcode_regex_parse("") } }) b.Run("short_post", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("Hey everyone, how's it going?") + _ = bbcode_regex_parse("Hey everyone, how's it going?") } }) b.Run("one_smily", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("Hey everyone, how's it going? :)") + _ = bbcode_regex_parse("Hey everyone, how's it going? :)") } }) b.Run("five_smilies", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("Hey everyone, how's it going? :):):):):)") + _ = bbcode_regex_parse("Hey everyone, how's it going? :):):):):)") } }) b.Run("ten_smilies", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("Hey everyone, how's it going? :):):):):):):):):):)") + _ = bbcode_regex_parse("Hey everyone, how's it going? :):):):):):):):):):)") } }) b.Run("twenty_smilies", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("Hey everyone, how's it going? :):):):):):):):):):):):):):):):):):):):)") + _ = bbcode_regex_parse("Hey everyone, how's it going? :):):):):):):):):):):):):):):):):):):):)") } }) b.Run("one_bold", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("[b]H[/b]ey everyone, how's it going?") + _ = bbcode_regex_parse("[b]H[/b]ey everyone, how's it going?") } }) b.Run("five_bold", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b]eryone, how's it going?") + _ = bbcode_regex_parse("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b]eryone, how's it going?") } }) b.Run("ten_bold", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b][b]e[/b][b]r[/b][b]y[/b][b]o[/b][b]n[/b]e, how's it going?") + _ = bbcode_regex_parse("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b][b]e[/b][b]r[/b][b]y[/b][b]o[/b][b]n[/b]e, how's it going?") } }) } -func BenchmarkBBCodePluginWithCustomParser(b *testing.B) { +func BenchmarkBBCodePluginWithoutCodeTag(b *testing.B) { b.ReportAllocs() b.Run("empty_post", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("") + _ = bbcode_parse_without_code("") } }) b.Run("short_post", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("Hey everyone, how's it going?") + _ = bbcode_parse_without_code("Hey everyone, how's it going?") } }) b.Run("one_smily", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("Hey everyone, how's it going? :)") + _ = bbcode_parse_without_code("Hey everyone, how's it going? :)") } }) b.Run("five_smilies", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("Hey everyone, how's it going? :):):):):)") + _ = bbcode_parse_without_code("Hey everyone, how's it going? :):):):):)") } }) b.Run("ten_smilies", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("Hey everyone, how's it going? :):):):):):):):):):)") + _ = bbcode_parse_without_code("Hey everyone, how's it going? :):):):):):):):):):)") } }) b.Run("twenty_smilies", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("Hey everyone, how's it going? :):):):):):):):):):):):):):):):):):):):)") + _ = bbcode_parse_without_code("Hey everyone, how's it going? :):):):):):):):):):):):):):):):):):):):)") } }) b.Run("one_bold", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("[b]H[/b]ey everyone, how's it going?") + _ = bbcode_parse_without_code("[b]H[/b]ey everyone, how's it going?") } }) b.Run("five_bold", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b]eryone, how's it going?") + _ = bbcode_parse_without_code("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b]eryone, how's it going?") } }) b.Run("ten_bold", func(b *testing.B) { for i := 0; i < b.N; i++ { - _ = bbcode_parse2("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b][b]e[/b][b]r[/b][b]y[/b][b]o[/b][b]n[/b]e, how's it going?") + _ = bbcode_parse_without_code("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b][b]e[/b][b]r[/b][b]y[/b][b]o[/b][b]n[/b]e, how's it going?") + } + }) +} + +func BenchmarkBBCodePluginWithFullParser(b *testing.B) { + b.ReportAllocs() + b.Run("empty_post", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("") + } + }) + b.Run("short_post", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("Hey everyone, how's it going?") + } + }) + b.Run("one_smily", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("Hey everyone, how's it going? :)") + } + }) + b.Run("five_smilies", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("Hey everyone, how's it going? :):):):):)") + } + }) + b.Run("ten_smilies", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("Hey everyone, how's it going? :):):):):):):):):):)") + } + }) + b.Run("twenty_smilies", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("Hey everyone, how's it going? :):):):):):):):):):):):):):):):):):):):)") + } + }) + b.Run("one_bold", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("[b]H[/b]ey everyone, how's it going?") + } + }) + b.Run("five_bold", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b]eryone, how's it going?") + } + }) + b.Run("ten_bold", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = bbcode_full_parse("[b]H[/b][b]e[/b][b]y[/b] [b]e[/b][b]v[/b][b]e[/b][b]r[/b][b]y[/b][b]o[/b][b]n[/b]e, how's it going?") } }) } diff --git a/images/cosmo-conflux.png b/images/cosmo-conflux.png new file mode 100644 index 00000000..6afc7984 Binary files /dev/null and b/images/cosmo-conflux.png differ diff --git a/images/cosmo.png b/images/cosmo.png new file mode 100644 index 00000000..7d98fa0e Binary files /dev/null and b/images/cosmo.png differ diff --git a/images/panel-theme-list-test.PNG b/images/panel-theme-list-test.PNG new file mode 100644 index 00000000..f2bd8399 Binary files /dev/null and b/images/panel-theme-list-test.PNG differ diff --git a/images/panel-theme-list-test2.PNG b/images/panel-theme-list-test2.PNG new file mode 100644 index 00000000..efc08d84 Binary files /dev/null and b/images/panel-theme-list-test2.PNG differ diff --git a/images/tempra-simple.png b/images/tempra-simple.png new file mode 100644 index 00000000..b689106c Binary files /dev/null and b/images/tempra-simple.png differ diff --git a/mod_routes.go b/mod_routes.go index d52b011d..1d114945 100644 --- a/mod_routes.go +++ b/mod_routes.go @@ -1255,7 +1255,10 @@ func route_panel_themes(w http.ResponseWriter, r *http.Request){ } pi := Page{"Theme Manager","panel-themes",user,noticeList,themeList,0} - templates.ExecuteTemplate(w,"panel-themes.html", pi) + err := templates.ExecuteTemplate(w,"panel-themes.html", pi) + if err != nil { + log.Print(err) + } } func route_panel_themes_default(w http.ResponseWriter, r *http.Request){ diff --git a/images/ren5.PNG b/old-images/ren5.PNG similarity index 100% rename from images/ren5.PNG rename to old-images/ren5.PNG diff --git a/images/staff-posts.PNG b/old-images/staff-posts.PNG similarity index 100% rename from images/staff-posts.PNG rename to old-images/staff-posts.PNG diff --git a/images/url_tags.PNG b/old-images/url_tags.PNG similarity index 100% rename from images/url_tags.PNG rename to old-images/url_tags.PNG diff --git a/plugin_bbcode.go b/plugin_bbcode.go index 6ba7bb70..4caa8d40 100644 --- a/plugin_bbcode.go +++ b/plugin_bbcode.go @@ -1,4 +1,5 @@ package main +//import "strings" import "regexp" var bbcode_bold *regexp.Regexp @@ -13,7 +14,9 @@ func init() { } func init_bbcode() { - plugins["bbcode"].AddHook("parse_assign", bbcode_parse2) + plugins["bbcode"].AddHook("parse_assign", bbcode_parse_without_code) + //plugins["bbcode"].AddHook("parse_assign", bbcode_full_parse) + bbcode_bold = regexp.MustCompile(`(?s)\[b\](.*)\[/b\]`) bbcode_italic = regexp.MustCompile(`(?s)\[i\](.*)\[/i\]`) bbcode_underline = regexp.MustCompile(`(?s)\[u\](.*)\[/u\]`) @@ -24,10 +27,11 @@ func init_bbcode() { } func deactivate_bbcode() { - plugins["bbcode"].RemoveHook("parse_assign", bbcode_parse2) + plugins["bbcode"].RemoveHook("parse_assign", bbcode_parse_without_code) + //plugins["bbcode"].RemoveHook("parse_assign", bbcode_full_parse) } -func bbcode_parse(data interface{}) interface{} { +func bbcode_regex_parse(data interface{}) interface{} { msg := data.(string) msg = bbcode_bold.ReplaceAllString(msg,"$1") msg = bbcode_italic.ReplaceAllString(msg,"$1") @@ -38,7 +42,47 @@ func bbcode_parse(data interface{}) interface{} { return msg } -func bbcode_parse2(data interface{}) interface{} { +// Only does the simple BBCode like [u], [b], [i] and [s] +func bbcode_simple_parse(data interface{}) interface{} { + msg := data.(string) + msgbytes := []byte(msg) + has_u := false + has_b := false + has_i := false + has_s := false + for i := 0; i < len(msgbytes); i++ { + if msgbytes[i] == '[' && msgbytes[i + 2] == ']' { + if msgbytes[i + 1] == 'b' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_b = true + } else if msgbytes[i + 1] == 'i' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_i = true + } else if msgbytes[i + 1] == 'u' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_u = true + } else if msgbytes[i + 1] == 's' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_s = true + } + i += 2 + } + } + + // There's an unclosed tag in there x.x + if has_i || has_u || has_b || has_s { + closer := []byte("") + msgbytes = append(msgbytes, closer...) + } + return string(msgbytes) +} + +// Here for benchmarking purposes. Might add a plugin setting for disabling [code] as it has it's paws everywhere +func bbcode_parse_without_code(data interface{}) interface{} { msg := data.(string) msgbytes := []byte(msg) has_u := false @@ -110,4 +154,92 @@ func bbcode_parse2(data interface{}) interface{} { msg = bbcode_url_label.ReplaceAllString(msg,"$4") } return msg +} + +// Does every type of BBCode +func bbcode_full_parse(data interface{}) interface{} { + msg := data.(string) + msgbytes := []byte(msg) + has_u := false + has_b := false + has_i := false + has_s := false + has_c := false + complex_bbc := false + for i := 0; i < len(msgbytes); i++ { + if msgbytes[i] == '[' { + if msgbytes[i + 2] != ']' { + if msgbytes[i + 1] == '/' { + if msgbytes[i + 3] == ']' { + if !has_c { + if msgbytes[i + 2] == 'b' { + msgbytes[i] = '<' + msgbytes[i + 3] = '>' + has_b = false + } else if msgbytes[i + 2] == 'i' { + msgbytes[i] = '<' + msgbytes[i + 3] = '>' + has_i = false + } else if msgbytes[i + 2] == 'u' { + msgbytes[i] = '<' + msgbytes[i + 3] = '>' + has_u = false + } else if msgbytes[i + 2] == 's' { + msgbytes[i] = '<' + msgbytes[i + 3] = '>' + has_s = false + } + i += 3 + } + } else { + if msgbytes[i + 2] == 'c' && msgbytes[i + 3] == 'o' && msgbytes[i + 4] == 'd' && msgbytes[i + 5] == 'e' { + has_c = false + i += 6 + } + complex_bbc = true + } + } else { + if msgbytes[i + 1] == 'c' && msgbytes[i + 2] == 'o' && msgbytes[i + 3] == 'd' && msgbytes[i + 4] == 'e' { + has_c = true + i += 5 + } + complex_bbc = true + } + } else if !has_c { + if msgbytes[i + 1] == 'b' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_b = true + } else if msgbytes[i + 1] == 'i' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_i = true + } else if msgbytes[i + 1] == 'u' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_u = true + } else if msgbytes[i + 1] == 's' { + msgbytes[i] = '<' + msgbytes[i + 2] = '>' + has_s = true + } + i += 2 + } + } + } + + // There's an unclosed tag in there x.x + if has_i || has_u || has_b || has_s { + closer := []byte("") + msgbytes = append(msgbytes, closer...) + } + msg = string(msgbytes) + + if complex_bbc { + msg = bbcode_url.ReplaceAllString(msg,"$1$2//$3") + msg = bbcode_url_label.ReplaceAllString(msg,"$4") + //msg = strings.Replace(msg,"[code]","",-1) + //msg = strings.Replace(msg,"[/code]","",-1) + } + return msg } \ No newline at end of file diff --git a/template_forum.go b/template_forum.go index 58b2b2a7..36b87421 100644 --- a/template_forum.go +++ b/template_forum.go @@ -58,7 +58,7 @@ w.Write([]byte(`
-`)) +
`)) if len(tmpl_forum_vars.NoticeList) != 0 { for _, item := range tmpl_forum_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) @@ -66,7 +66,7 @@ w.Write([]byte(`
` + item + `
`)) } w.Write([]byte(`
`)) @@ -102,7 +102,7 @@ w.Write([]byte(`
There aren't any topics in this for w.Write([]byte(`
-
+
`)) } diff --git a/template_forums.go b/template_forums.go index 09e1a3fb..9df8f756 100644 --- a/template_forums.go +++ b/template_forums.go @@ -58,7 +58,7 @@ w.Write([]byte(`
-`)) +
`)) if len(tmpl_forums_vars.NoticeList) != 0 { for _, item := range tmpl_forums_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) @@ -81,7 +81,7 @@ w.Write([]byte(`
You don't have access to any forums w.Write([]byte(`
-
+
`)) } diff --git a/template_profile.go b/template_profile.go index fce15a79..18abf87c 100644 --- a/template_profile.go +++ b/template_profile.go @@ -58,7 +58,7 @@ w.Write([]byte(`
-`)) +
`)) if len(tmpl_profile_vars.NoticeList) != 0 { for _, item := range tmpl_profile_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) @@ -93,7 +93,7 @@ w.Write([]byte(`
-
Comments
+
Comments
`)) @@ -147,7 +147,7 @@ w.Write([]byte(` } w.Write([]byte(` -
+
`)) } diff --git a/template_topic.go b/template_topic.go index 27b47526..f0142925 100644 --- a/template_topic.go +++ b/template_topic.go @@ -1,8 +1,8 @@ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */ package main +import "html/template" import "io" import "strconv" -import "html/template" func init() { template_topic_handle = template_topic @@ -59,7 +59,7 @@ w.Write([]byte(`
-`)) +
`)) if len(tmpl_topic_vars.NoticeList) != 0 { for _, item := range tmpl_topic_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) @@ -136,7 +136,7 @@ w.Write([]byte(` if len(tmpl_topic_vars.ItemList) != 0 { for _, item := range tmpl_topic_vars.ItemList { w.Write([]byte(` -
--> -
+
`)) } diff --git a/template_topic_alt.go b/template_topic_alt.go index dc3385a1..de94884f 100644 --- a/template_topic_alt.go +++ b/template_topic_alt.go @@ -59,7 +59,7 @@ w.Write([]byte(`
-`)) +
`)) if len(tmpl_topic_alt_vars.NoticeList) != 0 { for _, item := range tmpl_topic_alt_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) @@ -68,43 +68,41 @@ w.Write([]byte(`
` + item + `
`)) w.Write([]byte(`
-
` + tmpl_topic_alt_vars.Topic.Title + ` ` + tmpl_topic_alt_vars.Topic.Status + ` - Status + Status `)) if tmpl_topic_alt_vars.CurrentUser.Is_Mod { w.Write([]byte(` - Edit - Delete + Edit + Delete `)) if tmpl_topic_alt_vars.Topic.Sticky { -w.Write([]byte(`Unpin`)) +w.Write([]byte(`Unpin`)) } else { -w.Write([]byte(`Pin`)) +w.Write([]byte(`Pin`)) } w.Write([]byte(` `)) } w.Write([]byte(` - Report + Report
@@ -114,37 +112,49 @@ w.Write([]byte(`
 
` + tmpl_topic_alt_vars.Topic.CreatedByName + `
+ `)) +if tmpl_topic_alt_vars.Topic.Tag != "" { +w.Write([]byte(`
`)) +} +w.Write([]byte(`
-
-
` + string(tmpl_topic_alt_vars.Topic.Content.(template.HTML)) + `
+
+
` + string(tmpl_topic_alt_vars.Topic.Content.(template.HTML)) + `
+
`)) if len(tmpl_topic_alt_vars.ItemList) != 0 { for _, item := range tmpl_topic_alt_vars.ItemList { w.Write([]byte(` -
-
+
+
 
` + item.CreatedByName + `
+ `)) +if item.Tag != "" { +w.Write([]byte(`
`)) +} +w.Write([]byte(`
-
+
` + string(item.ContentHtml) + `
`)) if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply { -w.Write([]byte(`Edit`)) +w.Write([]byte(`Edit`)) } w.Write([]byte(` `)) if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply { -w.Write([]byte(`Delete`)) +w.Write([]byte(`Delete`)) } w.Write([]byte(` - Report + Report
+
`)) } @@ -168,7 +178,7 @@ w.Write([]byte(` } w.Write([]byte(` -
+
`)) } diff --git a/template_topics.go b/template_topics.go index f45f1c3c..ce0e1ff4 100644 --- a/template_topics.go +++ b/template_topics.go @@ -58,7 +58,7 @@ w.Write([]byte(`
-`)) +
`)) if len(tmpl_topics_vars.NoticeList) != 0 { for _, item := range tmpl_topics_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) @@ -66,7 +66,7 @@ w.Write([]byte(`
` + item + `
`)) } w.Write([]byte(`
`)) @@ -92,7 +92,7 @@ w.Write([]byte(`open`)) } w.Write([]byte(` - Status + Status
`)) } @@ -102,7 +102,7 @@ w.Write([]byte(`
There aren't any topics yet.
` w.Write([]byte(`
-
+
`)) } diff --git a/templates/footer.html b/templates/footer.html index 43cfc794..a5b3e7f7 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,4 +1,4 @@ - +
\ No newline at end of file diff --git a/templates/forum.html b/templates/forum.html index acacdd7a..d9c671ca 100644 --- a/templates/forum.html +++ b/templates/forum.html @@ -1,6 +1,6 @@ {{template "header.html" . }}
-
{{.Title}}
+
{{.Title}}
{{range .ItemList}}
diff --git a/templates/header.html b/templates/header.html index 13472b41..b08e70f6 100644 --- a/templates/header.html +++ b/templates/header.html @@ -13,4 +13,4 @@
{{template "menu.html" .}} -{{range .NoticeList}}
{{.}}
{{end}} \ No newline at end of file +
{{range .NoticeList}}
{{.}}
{{end}} \ No newline at end of file diff --git a/templates/menu.html b/templates/menu.html index c50f1da8..3161488c 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -6,15 +6,15 @@ - {{ if .CurrentUser.Loggedin }} + {{if .CurrentUser.Loggedin}} {{ if .CurrentUser.Is_Super_Mod}}{{end}} - {{ else }} + {{else}} - {{ end }} + {{end}}
diff --git a/templates/panel-dashboard.html b/templates/panel-dashboard.html index ec9bda28..b769447b 100644 --- a/templates/panel-dashboard.html +++ b/templates/panel-dashboard.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
Coming Soon...
diff --git a/templates/panel-forums.html b/templates/panel-forums.html index 8e0c0f94..9e31b8cb 100644 --- a/templates/panel-forums.html +++ b/templates/panel-forums.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
{{range .ItemList}} @@ -15,7 +15,7 @@ {{end}}

@@ -24,7 +24,7 @@
-
+
diff --git a/templates/panel-groups.html b/templates/panel-groups.html index efa993ac..a75dae36 100644 --- a/templates/panel-groups.html +++ b/templates/panel-groups.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
{{range .ItemList}} diff --git a/templates/panel-menu.html b/templates/panel-menu.html index 68a70260..80d7194f 100644 --- a/templates/panel-menu.html +++ b/templates/panel-menu.html @@ -1,5 +1,5 @@
- + {{if .CurrentUser.Perms.ManageForums}}{{end}} diff --git a/templates/panel-plugins.html b/templates/panel-plugins.html index f400097d..c38e021a 100644 --- a/templates/panel-plugins.html +++ b/templates/panel-plugins.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
{{range .ItemList}} diff --git a/templates/panel-setting.html b/templates/panel-setting.html index 7eb5db68..75f7404c 100644 --- a/templates/panel-setting.html +++ b/templates/panel-setting.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
diff --git a/templates/panel-settings.html b/templates/panel-settings.html index 28a435aa..fa35f7c3 100644 --- a/templates/panel-settings.html +++ b/templates/panel-settings.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
{{ range $key, $value := .Something }} diff --git a/templates/panel-themes.html b/templates/panel-themes.html index 13460078..10df91cd 100644 --- a/templates/panel-themes.html +++ b/templates/panel-themes.html @@ -2,16 +2,17 @@ {{template "panel-menu.html" . }}
{{range .ItemList}} -
+
{{.FriendlyName}}
Author: {{.Creator}}
+ {{if .MobileFriendly}}📱{{end}} {{if .Active}}Default{{else}}Make Default{{end}}
diff --git a/templates/panel-user-edit.html b/templates/panel-user-edit.html index e0087eb4..938d6f0b 100644 --- a/templates/panel-user-edit.html +++ b/templates/panel-user-edit.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
diff --git a/templates/panel-users.html b/templates/panel-users.html index c5f54aee..e9814bd6 100644 --- a/templates/panel-users.html +++ b/templates/panel-users.html @@ -1,7 +1,7 @@ {{template "header.html" . }} {{template "panel-menu.html" . }}
- +
{{range .ItemList}} diff --git a/templates/profile.html b/templates/profile.html index cc0df4d1..d7e2aea1 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -13,7 +13,7 @@
{{range .ItemList}} diff --git a/templates/topic.html b/templates/topic.html index 8b144dac..90784185 100644 --- a/templates/topic.html +++ b/templates/topic.html @@ -32,7 +32,7 @@

{{range .ItemList}} -
+

{{.ContentHtml}}



{{.CreatedByName}} {{if $.CurrentUser.Perms.EditReply}}{{end}} diff --git a/templates/topic_alt.html b/templates/topic_alt.html index cde54d03..b077bbbb 100644 --- a/templates/topic_alt.html +++ b/templates/topic_alt.html @@ -1,23 +1,23 @@ {{template "header.html" . }}
-
+
{{.Topic.Title}} {{.Topic.Status}} - Status + Status {{if .CurrentUser.Is_Mod}} - Edit - Delete - {{ if .Topic.Sticky }}Unpin{{else}}Pin{{end}} + Edit + Delete + {{ if .Topic.Sticky }}Unpin{{else}}Pin{{end}} {{end}} - Report + Report
@@ -27,26 +27,30 @@
 
{{.Topic.CreatedByName}}
+ {{if .Topic.Tag}}
{{end}}
-
-
{{.Topic.Content}}
+
+
{{.Topic.Content}}
+
{{range .ItemList}} -
-
+
+
 
{{.CreatedByName}}
+ {{if .Tag}}
{{end}}
-
+
{{.ContentHtml}}
- {{if $.CurrentUser.Perms.EditReply}}Edit{{end}} - {{if $.CurrentUser.Perms.DeleteReply}}Delete{{end}} - Report + {{if $.CurrentUser.Perms.EditReply}}Edit{{end}} + {{if $.CurrentUser.Perms.DeleteReply}}Delete{{end}} + Report
+
{{end}}
{{if .CurrentUser.Perms.CreateReply}} diff --git a/templates/topics.html b/templates/topics.html index bc1f36cb..9db97c35 100644 --- a/templates/topics.html +++ b/templates/topics.html @@ -1,12 +1,12 @@ {{template "header.html" . }}
{{range .ItemList}}
{{.Title}} {{if .Is_Closed}}shut {{else}}open{{end}} - Status + Status
{{else}}
There aren't any topics yet.
{{end}}
diff --git a/themes.go b/themes.go index 0a793806..40d701f1 100644 --- a/themes.go +++ b/themes.go @@ -1,7 +1,7 @@ /* Copyright Azareal 2016 - 2017 */ package main -import "fmt" +//import "fmt" import "log" import "io" import "os" @@ -23,6 +23,8 @@ type Theme struct FriendlyName string Version string Creator string + FullImage string + MobileFriendly bool Settings map[string]ThemeSetting Templates []TemplateMapping @@ -62,9 +64,22 @@ func init_themes() { } var theme Theme - json.Unmarshal(themeFile, &theme) + err = json.Unmarshal(themeFile, &theme) + if err != nil { + log.Fatal(err) + } + + theme.Active = false // Set this to false, just in case someone explicitly overrode this value in the JSON file + if theme.FullImage != "" { + log.Print("Adding theme image") + err = add_static_file("./themes/" + themeName + "/" + theme.FullImage, "./themes/" + themeName) + if err != nil { + log.Fatal(err) + } + } + themes[theme.Name] = theme } } @@ -106,7 +121,7 @@ func map_theme_templates(theme Theme) { log.Fatal("Invalid source template name") } - // go generate is one possibility, but it would simply add another step of compilation + // `go generate` is one possibility for letting plugins inject custom page structs, but it would simply add another step of compilation. It might be simpler than the current build process from the perspective of the administrator? dest_tmpl_ptr, ok := tmpl_ptr_map[themeTmpl.Name] if !ok { @@ -123,21 +138,21 @@ func map_theme_templates(theme Theme) { case *func(TopicPage,io.Writer): //overriden_templates[themeTmpl.Name] = d_tmpl_ptr overriden_templates[themeTmpl.Name] = true - log.Print("Topic Handle") - fmt.Println(template_topic_handle) - log.Print("Before") - fmt.Println(d_tmpl_ptr) - fmt.Println(*d_tmpl_ptr) - log.Print("Source") - fmt.Println(s_tmpl_ptr) - fmt.Println(*s_tmpl_ptr) + //log.Print("Topic Handle") + //fmt.Println(template_topic_handle) + //log.Print("Before") + //fmt.Println(d_tmpl_ptr) + //fmt.Println(*d_tmpl_ptr) + //log.Print("Source") + //fmt.Println(s_tmpl_ptr) + //fmt.Println(*s_tmpl_ptr) *d_tmpl_ptr = *s_tmpl_ptr - log.Print("After") - fmt.Println(d_tmpl_ptr) - fmt.Println(*d_tmpl_ptr) - log.Print("Source") - fmt.Println(s_tmpl_ptr) - fmt.Println(*s_tmpl_ptr) + //log.Print("After") + //fmt.Println(d_tmpl_ptr) + //fmt.Println(*d_tmpl_ptr) + //log.Print("Source") + //fmt.Println(s_tmpl_ptr) + //fmt.Println(*s_tmpl_ptr) default: log.Fatal("The source and destination templates are incompatible") } @@ -218,19 +233,19 @@ func reset_template_overrides() { case func(TopicPage,io.Writer): switch d_ptr := dest_tmpl_ptr.(type) { case *func(TopicPage,io.Writer): - log.Print("Topic Handle") - fmt.Println(template_topic_handle) - log.Print("Before") - fmt.Println(d_ptr) - fmt.Println(*d_ptr) - log.Print("Origin") - fmt.Println(o_ptr) + //log.Print("Topic Handle") + //fmt.Println(template_topic_handle) + //log.Print("Before") + //fmt.Println(d_ptr) + //fmt.Println(*d_ptr) + //log.Print("Origin") + //fmt.Println(o_ptr) *d_ptr = o_ptr - log.Print("After") - fmt.Println(d_ptr) - fmt.Println(*d_ptr) - log.Print("Origin") - fmt.Println(o_ptr) + //log.Print("After") + //fmt.Println(d_ptr) + //fmt.Println(*d_ptr) + //log.Print("Origin") + //fmt.Println(o_ptr) default: log.Fatal("The origin and destination templates are incompatible") } diff --git a/themes/cosmo-classic/public/atombb-small.png b/themes/cosmo-classic/public/atombb-small.png new file mode 100644 index 00000000..c74aa292 Binary files /dev/null and b/themes/cosmo-classic/public/atombb-small.png differ diff --git a/themes/cosmo-classic/public/stars-mk1.png b/themes/cosmo-classic/public/stars-mk1.png new file mode 100644 index 00000000..723b7a73 Binary files /dev/null and b/themes/cosmo-classic/public/stars-mk1.png differ diff --git a/themes/cosmo-classic/theme.json b/themes/cosmo-classic/theme.json new file mode 100644 index 00000000..88f20b13 --- /dev/null +++ b/themes/cosmo-classic/theme.json @@ -0,0 +1,12 @@ +{ + "Name": "cosmo-classic", + "FriendlyName": "Cosmo Classic", + "Version": "Coming Soon", + "Creator": "Azareal", + "Templates": [ + { + "Name": "topic", + "Source": "topic_alt" + } + ] +} \ No newline at end of file diff --git a/themes/cosmo-conflux/cosmo-conflux.png b/themes/cosmo-conflux/cosmo-conflux.png new file mode 100644 index 00000000..6afc7984 Binary files /dev/null and b/themes/cosmo-conflux/cosmo-conflux.png differ diff --git a/themes/cosmo-conflux/public/atombb-small.png b/themes/cosmo-conflux/public/atombb-small.png new file mode 100644 index 00000000..c74aa292 Binary files /dev/null and b/themes/cosmo-conflux/public/atombb-small.png differ diff --git a/themes/cosmo-conflux/public/main.css b/themes/cosmo-conflux/public/main.css new file mode 100644 index 00000000..031fd3fc --- /dev/null +++ b/themes/cosmo-conflux/public/main.css @@ -0,0 +1,1032 @@ +/* AtomBB Cosmo Port. Copyright Azareal 2017 */ +/* I'm currently converting the CSS over. Don't use this yet! */ + +* { + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +h1 +{ + text-shadow: 0 1px 0 black; + color: darkgray; + height: 60px; +} + +a +{ + text-decoration: none; + color: black; +} +a img { border: 0; /* IE fix..*/ } + +body +{ + background: url('/static/atombb-small.png') no-repeat left, url('/static/stars-mk1.png'); + color: black; + background-color: #141414; + padding: 0px; + margin: 0px; + font-family: Arial; +} + +ul +{ + background: darkgray; + padding-top: 0px; + padding-bottom: 0px; + list-style-type: none; +} +li +{ + display: block; + float: left; + text-align: center; + margin-top: 1px; + margin-left: -1px; + margin-right: 2px; + padding-left: 1px; + padding-right: 1px; + + border: 1px solid #7a7a7a; + border-top: none; + border-bottom: none; + border-left: none; + font-weight: normal; + color: white; +} +li:first-child { border-left: 1px solid #7a7a7a; } + +li a +{ + color: white; + text-decoration: none; +} + +li:hover a, li a:hover, li a:link, li a:visited +{ + color: white; + text-decoration: none; +} + +li:hover + { + background: rgba(10,10,10,0.5); + font-weight: normal; + color: white; +} + +.menu_right +{ + float: right; + color: white; + font-size: 25px; + font-weight: bold; + padding-left: 10px; + padding-right: 10px; + height: 38px; + text-align: center; +} + +.menu_right:hover +{ + border: #282828 1px solid; + background: #282828; + padding-left: 10px; + padding-right: 10px; + height: 38px; + text-align: center; +} + +#footer +{ + clear: left; + margin: 0px auto; + width: 300px; + text-align: center; +} + +hr { color: silver; border: 1px solid silver; } + +.rowhead +{ + border-top: none; + font-weight: bold; + color: white; +} +.rowhead:hover +{ + color: rgba(200,200,200,1); + transition: color 1s; + -moz-transition: color 1s; + -webkit-transition: color 1s; + -o-transition: color 1s; +} + +.rowblock, .colblock_left, .colblock_right { + background: rgba(240,240,240,1); + border-spacing: 0; + border-collapse: collapse; + width: 100%; + margin: 0px; + border-bottom: 1px solid black; +} + +.rowitem { + padding-left: 8px; + padding-right: 8px; + padding-top: 17px; + padding-bottom: 12px; + border-left: 1px solid black; + border-right: 1px solid black; +} +.rowitem:not(:last-child) +{ + border-bottom: 1px dotted #ccc; +} +.rowblock:first-of-type { + margin-top: 8px; +} + +.rowhead, .colhead { + background: #ce2424; + background: -webkit-gradient(linear, 0 0, 0 bottom, from(#f97779), to(#ce2424)); + background: -moz-linear-gradient(#f97779, #ce2424); + background: linear-gradient(#f97779, #ce2424); + border: 0px solid #b32424; + border-top-right-radius: 5px; + border-top-left-radius: 5px; + box-shadow: inset 0 0 0 1px #e67e7b; + text-shadow: 0 1px 0 #bd2524; + text-align: center; + font-weight: bold; + color: white; + padding: 0px; + margin: 0px; + height: 30px; + border-top-left-radius: 2px; + border-top-right-radius: 2px; + overflow: hidden; + text-overflow: ellipsis; +} +.rowhead a { color: white; display: block; padding-top: 5px; } +.rowhead span { display: block; padding-top: 5px; } +.colhead a { color: white; display: block; padding-top: 5px; } +.colhead span { display: block; padding-top: 5px; } +.open_edit { display: none !important; } +/*.username { display: none !important; }*/ +.show_on_edit { display: none; } +.status_label, .topic_status_e/*, .topic_button*/ { display: none !important; } +.topic_button { float: right; position: relative; top: -22px; margin-right: 2px; border-style: solid !important; } + +.colblock_left +{ + padding: 0px; + padding-top: 0px; + width: 30%; + float: left; + margin-right: 8px; +} +.colblock_right +{ + padding: 0px; + padding-top: 0px; + width: 65%; + overflow: hidden; + word-wrap: break-word; +} +.colblock_left:empty +{ + display: none; +} +.colblock_right:empty +{ + display: none; +} +.colblock_left:first-of-type { + margin-top: 8px; +} +.colblock_right:first-of-type { + margin-top: 8px; +} +.colitem +{ + padding-left: 8px; + padding-right: 8px; + padding-top: 17px; + padding-bottom: 12px; + font-weight: bold; + text-transform: uppercase; +} +.colitem.passive +{ + font-weight: normal; + text-transform: none; +} +.colitem a +{ + text-decoration: none; + color: black; +} +.colitem a:hover +{ + color: silver; +} +.col_left +{ + width: 30%; + float: left; +} +.col_right +{ + width: 69%; + overflow: hidden; +} + +.formrow +{ + /*height: 40px;*/ + width: 100%; +} +/*Clearfix*/ +.formrow:before, +.formrow:after { + content: " "; + display: table; +} +.formrow:after { + clear: both; +} +.formrow:not(:last-child) +{ + border-bottom: 1px dotted #ccc; +} + +.formitem +{ + float: left; + padding-left: 8px; + padding-right: 8px; + padding-top: 13px; + padding-bottom: 8px; + font-weight: bold; +} +.formitem:first-child +{ + font-weight: bold; +} +.formitem:not(:last-child) +{ + border-right: 1px dotted #ccc; +} +.formitem.invisible_border +{ + border: none; +} + +/* Mostly for textareas */ +.formitem:only-child +{ + width: 97%; +} +.formitem textarea +{ + width: 100%; + height: 100px; +} + +.tbody +{ + border-top: 1px solid silver; + margin: 8px; + padding: 8px; +} + +.error +{ + padding: 5px; + margin: 5px; + width: 90%; + background: #FA8072; + color: maroon; + border: 1px solid #FF3C2A; + border-radius: 5px; +} + +.success +{ + padding: 5px; + padding-left: 24px; + margin: 5px; + width: 90%; + background: #CAE08A; + background-repeat: no-repeat; + background-position: 5px center; + background-image: url("../../images/success-16.png"); + color: #667C26; + border: 1px solid #667C26; + border-radius: 5px; +} + +.notice +{ + padding: 5px; + padding-left: 24px; + margin: 5px; + width: 100%; + background: #96CDCD; + background-repeat: no-repeat; + background-position: 5px center; + background-image: url("../../images/info-16.png"); + color: #008080; + border: 1px solid #5F9F9F; + box-sizing: border-box; +} + +button +{ + background: #ce2424; + background: linear-gradient(#f97779, #ce2424); + border: 1px solid #be2424; + color: rgba(255,255,255,1); + box-shadow: inset 0 0 0 1px #e67e7b; + text-shadow: 0 1px 0 #bd2524; + font-weight: bold; + padding: 3px; + margin-bottom: 2px; + border-radius: 5px; +} +button .big { padding: 6px; } + +.formbutton +{ + background: white; + border: 1px solid #8e8e8e; + color: #505050; + box-shadow: none; + text-shadow: none; + font-weight: normal; + border-radius: 0px; +} + +.username +{ + text-transform: none; + text-shadow: none; + margin-left: 0px; + padding-left: 4px; + padding-right: 4px; + padding-top: 2px; + padding-bottom: 2px; + color: #505050 !important; /* 80,80,80 */ + background-color: #FFFFFF; + border-style: dotted; + border-color: #505050; /* 232,232,232. All three RGB colours being the same seems to create a shade of gray */ + border-width: 1px; + font-size: 15px; +} + +.threadHidden { background: orange; } +.threadDeleted { background: rgba(255,0,0,0.5); } + +.pagination +{ + margin-top: 8px; + margin-left: 5px; +} +.pagination a { color: #717171; } + +.page +{ + display: inline-block; + margin-right: 5px; + text-decoration: none; + padding: 5px 10px; + border: solid 1px #c0c0c0; + color: #717171; + background: #e9e9e9; + font-weight: bold; + font-size: 13px; + border-radius: 5px; +} + +blockquote +{ + border: solid 1px darkgray; + background-color: #f8fafd; + color: #758fa3; + font-family: Arial; + font-size: 12px; + border-radius: 5px; + margin: 5px; +} + +blockquote .head +{ + display: block; + font-weight: bold; + font-size: 13px; + padding: 5px 10px; + background-color: lightgray; + margin-bottom: 5px; + border-top: solid 1px #f4f7fa; + border-bottom: solid 1px #dde5ed; +} + +blockquote p +{ + line-height: 20px; + margin-bottom: 10px; + padding-left: 15px; +} + +.rep-upvote { font-size: 13.5px !important; } +.rep-upvote span +{ + position: relative; + top: -4px; + letter-spacing: 0.02em; +} + +.action +{ + background-color: #A0CFEC; + font-style: italic; + padding: 15px; + text-align: center; + font-size: 18px; +} + +.post-content { word-wrap: break-word; } +.sidebar +{ + position: -moz-sticky; + position: -ms-sticky; + position: -o-sticky; + position: -webkit-sticky; + position: sticky; + top: 44px; +} +.gadget { padding-bottom: 20px; } + +/* Topic */ +.post_avatar +{ + border-radius: 5px; + margin-left: auto; + margin-right: auto; + margin-bottom: 5px; + display: block; + max-height: 128px; + max-width: 128px; +} +.bigAvatar +{ + max-height: 64px; + max-width: 64px; +} + +/* From Tempra Conflux */ +.user_content { + padding: 5px; + margin-top: 3px; + margin-bottom: 0; + background: white; + min-height: 129px; + padding-bottom: 0; + width: 100%; +} + +.button_container { + border-top: solid 1px #eaeaea; + border-spacing: 0px; + border-collapse: collapse; + padding: 0; + margin: 0; + margin-top: 3px; + display: block; + height: 20px; +} + +.action_button { + display: block; + float: left; + border-right: solid 1px #eaeaea; + color: #505050; + font-size: 13px; + padding-top: 2px; + padding-bottom: 2px; + padding-left: 5px; + padding-right: 5px; +} +.post_item { + background-color: #eaeaea; + padding-top: 4px; + padding-left: 5px; + clear: both; + border-top: none !important; + border-bottom: none !important; + padding-right: 4px; + padding-bottom: 2px; +} +.post_tag { + display: none; +} +.userinfo { + background: white; + width: 132px; + padding: 2px; + margin-top: 2px; + float: left; + position: sticky; + top: 4px; + box-shadow:0 1px 2px rgba(0,0,0,.1); +} +.content_container { + background: white; + margin-left: 137px; + min-height: 128px; + margin-bottom: 0; + margin-right: 3px; + box-shadow:0 1px 2px rgba(0,0,0,.1); +} + +/* Responsive Layout */ +/* Anything that isn't a small mobile */ +@media(min-width: 501px) +{ + /*.top + { + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + width: 200px; + padding: 0px; + outline: none; + } + + .top h1 + { + text-align: center; + color: darkgray; + text-shadow: 0px 1px 0px #646464; + margin: 0px; + line-height: 60px; + }*/ + + .options + { + float: right; + position: relative; + top: -50px; + border: 1px solid rgba(100,100,110,0.75); + border-left: none; + border-right: none; + padding: 5px; + height: 30px; + width: 30px; + overflow: none; + + transition-property: background; + transition-duration: 0.5s; + transition-timing-function: linear; + } + + .options:last-child { border-left: 1px solid rgba(100,100,110,0.75); } + .right_most { margin-right: 10%; border-right: 1px solid rgba(100,100,110,0.75); } + + #alertFeed { background: url('../../images/bell.png') no-repeat center center / 24px, rgba(30,30,30,0.75); } + #alertFeed:hover { background: url('../../images/bell.png') no-repeat center center / 24px, rgba(90, 90, 90, 0.4); } + #mailFeed { background: url('../../images/mail.png') no-repeat center center / 24px, rgba(30,30,30,0.75); } + #mailFeed:hover { background: url('../../images/mail.png') no-repeat center center / 24px, rgba(90, 90, 90, 0.4); } + #awardFeed { background: url('../../images/emblem.png') no-repeat center center / 24px, rgba(30,30,30,0.75); } + #awardFeed:hover { background: url('../../images/emblem.png') no-repeat center center / 24px, rgba(90, 90, 90, 0.4); } + + .selectedAlert { background: url('../../images/bell.png') no-repeat center center / 24px, rgba(250,250,250, 1) !important; } + .selectedMail { background: url('../../images/mail.png') no-repeat center center / 24px, rgba(250,250,250, 1) !important; } + .selectedAward { background: url('../../images/emblem.png') no-repeat center center / 24px, rgba(250,250,250, 1) !important; } + + .options > .counter + { + background: red; + border-radius: 5px; + color: #FFFFFF; + display: inline-block; + font-weight: bold; + text-align: center; + line-height: 16px; + font-size: 10px; + width: 16px; + + position: absolute; + right: 0px; + } + + .options > .alertList + { + display: none; + position: absolute; + display: block; + width: 250px; + left: -250%; + top: 40px; + opacity: 0; + visibility: hidden; + overflow: hidden; + + background: rgba(250,250,250,1); + word-wrap: none; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); + padding: 0px; + z-index: 50; + } + + .options > .alertList > h2 + { + font-weight: normal; + padding-top: 10px; + padding-left: 0px; + padding-right: 0px; + padding-bottom: 0px; + margin-left: 10px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 5px; + font-size: 20px; + line-height: 30px; + border: none; + } + + .options > .alertList > hr + { + border: 0.5px solid rgba(220,220,220,1); + width: 100%; + margin: 0px; + padding: 0px; + } + + .options > .alertList > .alertItem + { + display: block; + font-size: 13px; + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 3px; + padding-top: 10px; + padding-bottom: 10px; + padding-left: 10px; + padding-right: 0px; + overflow: hidden; + + border-bottom: 1px solid rgb(220, 220, 220); + } + + .options > .alertList > .alertItem:last-child { border: none; } + .options > .alertList > .alertItem > a { color: rgba(25,25,25,1); } + + .options > .alertList > .alertItem > .alertAvatar + { + float: left; + border-radius: 3px; + margin-right: 2px; + } +} + +@media (max-width: 800px) +{ + body { background: #cdcdcd; margin-bottom: 10px;} + /*.top + { + background: url('../../images/atombb-small.png') no-repeat left, url('../../images/head-bg.png'); + width: 100%; + } + .top img { display: none; }*/ + + #main + { + width: 100%; + min-width: 300px; + margin-top: 0px; + margin-bottom: 0px; + padding: 10px; + box-sizing: border-box; + } + + ul + { + margin-top: 0px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + + line-height: 30px; + min-height: 30px; + padding-left: 8px; + padding-right: 8px; + + background-image: linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -moz-linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -o-linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -ms-linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -webkit-linear-gradient(bottom, #2e2e2e, #4c4c4c); + } + li + { + font-size: 14px; + padding-left: 12px; + padding-right: 12px; + height: 30px; + } + li:hover + { + background-image: linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -moz-linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -o-linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -ms-linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -webkit-linear-gradient(bottom, #4c4c4c, #2e2e2e); + } + + .rowblock { border-left: none;border-right: none;border-bottom: none; } + .rowitem { border-left: none;border-right: none; } + .rowhead { border-left: none;border-right: none; } + .tbody { border-left: none;border-right: none; } + .cell_author img { display: none; } + .cell_last img { display: none; } +} + +/* This one is specifically for small mobiles.. */ +@media(max-width: 500px) +{ + #main { margin-top: 20px; } + .rowblock { box-sizing: border-box; } + body { overflow-x: hidden; } + h1 { font-size: 0; } + + /*.top { display: none !important; }*/ + .options { display: none !important; } + /*.top div {display: none;}*/ + ul + { + line-height: 30px; + min-height: 30px; + padding-left: 4px; + padding-right: 4px; + + margin-top: 0px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + + clear: left; + width: 100%; + } + + li + { + font-size: 15px; + padding-left: 6px; + padding-right: 6px; + height: 28px; + } + + #back + { + position: relative; + top: -25px; + } + + #main + { + padding-left: 4px; + padding-right: 6px; + } + + .notice + { + width: 100%; + margin-left: 0px; + margin-right: 0px; + margin-bottom: 8px; + margin-top: 0px; + + padding: 5px; + background: #96CDCD; + background-image: none; + box-sizing: border-box; + } + + .post-content { word-wrap: normal; } + .post-meta { white-space: normal; } + .post_avatar + { + max-height: 80px; + max-width: 80px; + } + .userRibbon { word-wrap: break-word; } + + .notice:first-child { display: inline-block; } + .getTopics { display: none; } +} +@media (min-width: 800px) +{ + /*.top { + min-height: 50px !important; + -webkit-animation-duration: 2s; + -moz-animation-duration: 2s; + animation-duration: 2s; + -webkit-animation-name: slidein; + -moz-animation-name: slidein; + animation-name: slidein; + } + .top a + { + height: 50px !important; + }*/ + @-webkit-keyframes slidein + { + from { transform: translate(0,-50px) scale(0.75); } + to {} + } + @-moz-keyframes slidein + { + from { transform: translate(0,-50px) scale(0.75); } + to {} + } + @keyframes slidein + { + from { transform: translate(0,-50px) scale(0.75); } + to {} + } + /*.top img { min-height: 50px !important; } + .top h1 { display: none; }*/ + .right_most { margin-right: 15%; } + + #back + { + width: 800px; + margin-top: 15px; + margin-left: auto; + margin-right: auto; + margin-bottom: 15px; + + background: none; + border-top: none; + padding: 0px; + padding-top: 0px; + padding-bottom: 10px; + + background-color: rgba(30,30,30,0.75); + border: 1px solid rgba(100,100,110,0.75); + box-shadow: -1px -1px 1px rgba(0, 0, 0, 1), 1px 1px 1px rgba(0,0,0,0.5); + + transition-property: height; + transition-duration: 0.5s; + transition-timing-function: linear; + } + + #main + { + float: left; + clear: left; + width: 765px; + min-width: 300px; + margin-top: 0px; + margin-left: 15px; + margin-right: 12px; + margin-bottom: 15px; + } + + .nav + { + position: sticky; + top: 0px; + width: 800px; + margin-left: auto; + margin-right: auto; + perspective: 1000px; + z-index: 20; + } + + ul + { + line-height: 40px; + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + + margin-top: 0px; + margin-bottom: 0px; + background: none; + background-color: rgba(30,30,30,0.75); + border: 1px solid rgba(90,90,90,0.75); + transition: transform 0.7s; + } + ul:hover + { + transform: rotateX(-15deg); + } + + li + { + font-size: 15px; + padding-left: 15px; + padding-right: 15px; + height: 38px; + } +} +@media (max-width: 1023px) { .left_sidebar { display: none; } .right_sidebar { display: none; } } +@media (min-width: 1024px) +{ + #back + { + width: 1000px; + margin-top: 15px; + margin-left: auto; + margin-right: auto; + margin-bottom: 15px; + + background: none; + border-top: none; + padding: 0px; + padding-top: 0px; + padding-bottom: 10px; + + background-color: rgba(30,30,30,0.75); + border: 1px solid rgba(100,100,110,0.75); + box-shadow: -1px -1px 1px rgba(0, 0, 0, 1), 1px 1px 1px rgba(0,0,0,0.5); + } + #main + { + float: left; + clear: left; + width: 700px; + min-width: 300px; + margin-top: 9px; + margin-left: 15px; + margin-right: 12px; + margin-bottom: 15px; + } + + .left_sidebar { display: none; } /* This theme only supports right sidebars, at the moment.. */ + .right_sidebar { + float: left; + width: 250px; + margin-top: 5px; + margin-left: 0px; + margin-right: 5px; + margin-bottom: 8px; + padding: 8px; + } + .nav { width: 1000px; } + + .bigAvatar + { + max-height: 128px; + max-width: 128px; + } +} + +@media (min-width: 1603px) +{ + #back + { + width: 1548px; + margin-left: auto; + margin-right: auto; + } + + #main { width: 1250px; } +} + +@media (min-width: 2400px) +{ + #back + { + width: 2000px; + margin-left: auto; + margin-right: auto; + } + + #main { width: 1690px; } + .index_category + { + float: left; + width: 835px; + } + .index_category:nth-child(even) { margin-left: 10px; } + .index_category:nth-child(odd) { overflow: hidden; } + .index_category:only-child { width: 100%; } +} + +@media (min-width: 3000px) +{ + #back { width: 2900px; } + #main { width: 2490px; } + .index_category { width: 1230px; } + .index_category:only-child { width: 100%; } + + .right_sidebar { width: 350px; } +} \ No newline at end of file diff --git a/themes/cosmo-conflux/public/stars-mk1.png b/themes/cosmo-conflux/public/stars-mk1.png new file mode 100644 index 00000000..723b7a73 Binary files /dev/null and b/themes/cosmo-conflux/public/stars-mk1.png differ diff --git a/themes/cosmo-conflux/theme.json b/themes/cosmo-conflux/theme.json new file mode 100644 index 00000000..463e0adb --- /dev/null +++ b/themes/cosmo-conflux/theme.json @@ -0,0 +1,13 @@ +{ + "Name": "cosmo-conflux", + "FriendlyName": "Cosmo Conflux", + "Version": "Coming Soon", + "Creator": "Azareal", + "FullImage": "cosmo-conflux.png", + "Templates": [ + { + "Name": "topic", + "Source": "topic_alt" + } + ] +} \ No newline at end of file diff --git a/themes/cosmo/cosmo.png b/themes/cosmo/cosmo.png new file mode 100644 index 00000000..7d98fa0e Binary files /dev/null and b/themes/cosmo/cosmo.png differ diff --git a/themes/cosmo/public/atombb-small.png b/themes/cosmo/public/atombb-small.png new file mode 100644 index 00000000..c74aa292 Binary files /dev/null and b/themes/cosmo/public/atombb-small.png differ diff --git a/themes/cosmo/public/main.css b/themes/cosmo/public/main.css new file mode 100644 index 00000000..7634315e --- /dev/null +++ b/themes/cosmo/public/main.css @@ -0,0 +1,1086 @@ +/* AtomBB Cosmo Port. Copyright Azareal 2017 */ +/* I'm currently converting the CSS over. Don't use this yet! */ + +* { + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +h1 +{ + text-shadow: 0 1px 0 black; + color: darkgray; + height: 60px; +} + +a +{ + text-decoration: none; + color: black; +} +a img { border: 0; /* IE fix..*/ } + +body +{ + background: url('/static/atombb-small.png') no-repeat left, url('/static/stars-mk1.png'); + color: black; + background-color: #141414; + padding: 0px; + margin: 0px; + font-family: Arial; +} + +ul +{ + background: darkgray; + padding-top: 0px; + padding-bottom: 0px; + list-style-type: none; +} + +li +{ + display: block; + float: left; + text-align: center; + margin-top: 1px; + margin-left: -1px; + margin-right: 2px; + padding-left: 1px; + padding-right: 1px; + + border: 1px solid #7a7a7a; + border-top: none; + border-bottom: none; + border-left: none; + font-weight: normal; + color: white; +} +li:first-child { border-left: 1px solid #7a7a7a; } +li a +{ + color: white; + text-decoration: none; +} +li:hover a, li a:hover, li a:link, li a:visited +{ + color: white; + text-decoration: none; +} +li:hover + { + background: rgba(10,10,10,0.5); + font-weight: normal; + color: white; +} + +.menu_right +{ + float: right; + color: white; + font-size: 25px; + font-weight: bold; + padding-left: 10px; + padding-right: 10px; + height: 38px; + text-align: center; +} + +.menu_right:hover +{ + border: #282828 1px solid; + background: #282828; + padding-left: 10px; + padding-right: 10px; + height: 38px; + text-align: center; +} + +#footer +{ + clear: left; + margin: 0px auto; + width: 300px; + text-align: center; +} + +hr { color: silver; border: 1px solid silver; } + +.rowhead +{ + border-top: none; + font-weight: bold; + color: white; +} +.rowhead:hover +{ + color: rgba(200,200,200,1); + transition: color 1s; + -moz-transition: color 1s; + -webkit-transition: color 1s; + -o-transition: color 1s; +} + +.rowblock, .colblock_left, .colblock_right { + background: rgba(240,240,240,1); + border-spacing: 0; + border-collapse: collapse; + width: 100%; + margin: 0px; + border-bottom: 1px solid black; +} +.rowitem { + padding-left: 8px; + padding-right: 8px; + padding-top: 17px; + padding-bottom: 12px; + border-left: 1px solid black; + border-right: 1px solid black; +} +.rowblock:first-of-type { + margin-top: 8px; +} +.rowitem:not(:last-child) +{ + border-bottom: 1px dotted #ccc; +} + +.rowhead, .colhead { + background: #ce2424; + background: -webkit-gradient(linear, 0 0, 0 bottom, from(#f97779), to(#ce2424)); + background: -moz-linear-gradient(#f97779, #ce2424); + background: url('/static/fabric-base-simple-alpha.png'), linear-gradient(#f97779, #ce2424); + border: 0px solid #b32424; + border-top-right-radius: 5px; + border-top-left-radius: 5px; + box-shadow: inset 0 0 0 1px #e67e7b; + text-shadow: 0 1px 0 #bd2524; + text-align: center; + font-weight: bold; + color: white; + padding: 0px; + margin: 0px; + height: 30px; + border-top-left-radius: 2px; + border-top-right-radius: 2px; + overflow: hidden; + text-overflow: ellipsis; +} +.rowhead a { color: white; display: block; padding-top: 5px; } +.rowhead span { display: block; padding-top: 5px; } +.colhead a { color: white; display: block; padding-top: 5px; } +.colhead span { display: block; padding-top: 5px; } +.open_edit { display: none !important; } +/*.username { display: none !important; }*/ +.show_on_edit { display: none; } +.status_label, .topic_status_e/*, .topic_button*/ { display: none !important; } +.topic_button { float: right; position: relative; top: -22px; margin-right: 2px; border-style: solid !important; } + +.colblock_left +{ + padding: 0px; + padding-top: 0px; + width: 30%; + float: left; + margin-right: 8px; +} +.colblock_right +{ + padding: 0px; + padding-top: 0px; + width: 65%; + overflow: hidden; + word-wrap: break-word; +} +.colblock_left:empty +{ + display: none; +} +.colblock_right:empty +{ + display: none; +} +.colblock_left:first-of-type { + margin-top: 8px; +} +.colblock_right:first-of-type { + margin-top: 8px; +} +.colitem +{ + padding-left: 8px; + padding-right: 8px; + padding-top: 17px; + padding-bottom: 12px; + font-weight: bold; + text-transform: uppercase; +} +.colitem.passive +{ + font-weight: normal; + text-transform: none; +} +.colitem a +{ + text-decoration: none; + color: black; +} +.colitem a:hover +{ + color: silver; +} + +.col_left +{ + width: 30%; + float: left; +} +.col_right +{ + width: 69%; + overflow: hidden; +} + +.formrow +{ + /*height: 40px;*/ + width: 100%; +} +/*Clearfix*/ +.formrow:before, +.formrow:after { + content: " "; + display: table; +} +.formrow:after { + clear: both; +} +.formrow:not(:last-child) +{ + border-bottom: 1px dotted #ccc; +} + +.formitem +{ + float: left; + padding-left: 8px; + padding-right: 8px; + padding-top: 13px; + padding-bottom: 8px; + font-weight: bold; +} +.formitem:first-child +{ + font-weight: bold; +} +.formitem:not(:last-child) +{ + border-right: 1px dotted #ccc; +} +.formitem.invisible_border +{ + border: none; +} + +/* Mostly for textareas */ +.formitem:only-child +{ + width: 97%; +} +.formitem textarea +{ + width: 100%; + height: 100px; +} + +.tbody +{ + border-top: 1px solid silver; + margin: 8px; + padding: 8px; +} + +.error +{ + padding: 5px; + margin: 5px; + width: 90%; + background: #FA8072; + color: maroon; + border: 1px solid #FF3C2A; + border-radius: 5px; +} + +.success +{ + padding: 5px; + padding-left: 24px; + margin: 5px; + width: 90%; + background: #CAE08A; + background-repeat: no-repeat; + background-position: 5px center; + background-image: url("../../images/success-16.png"); + color: #667C26; + border: 1px solid #667C26; + border-radius: 5px; +} + +.notice +{ + padding: 5px; + padding-left: 24px; + margin: 5px; + width: 100%; + background: #96CDCD; + background-repeat: no-repeat; + background-position: 5px center; + background-image: url("../../images/info-16.png"); + color: #008080; + border: 1px solid #5F9F9F; + box-sizing: border-box; +} + +button +{ + background: #ce2424; + background: linear-gradient(#f97779, #ce2424); + border: 1px solid #be2424; + color: rgba(255,255,255,1); + box-shadow: inset 0 0 0 1px #e67e7b; + text-shadow: 0 1px 0 #bd2524; + font-weight: bold; + padding: 3px; + margin-bottom: 2px; + border-radius: 5px; +} +button .big { padding: 6px; } + +.formbutton +{ + background: white; + border: 1px solid #8e8e8e; + color: #505050; + box-shadow: none; + text-shadow: none; + font-weight: normal; + border-radius: 0px; +} + +.username +{ + text-transform: none; + text-shadow: none; + margin-left: 0px; + padding-left: 4px; + padding-right: 4px; + padding-top: 2px; + padding-bottom: 2px; + color: #505050 !important; /* 80,80,80 */ + background-color: #FFFFFF; + border-style: dotted; + border-color: #505050; /* 232,232,232. All three RGB colours being the same seems to create a shade of gray */ + border-width: 1px; + font-size: 15px; +} + +.threadHidden { background: orange; } +.threadDeleted { background: rgba(255,0,0,0.5); } + +.pagination +{ + margin-top: 8px; + margin-left: 5px; +} +.pagination a { color: #717171; } + +.page +{ + display: inline-block; + margin-right: 5px; + text-decoration: none; + padding: 5px 10px; + border: solid 1px #c0c0c0; + color: #717171; + background: #e9e9e9; + font-weight: bold; + font-size: 13px; + border-radius: 5px; +} + +blockquote +{ + border: solid 1px darkgray; + background-color: #f8fafd; + color: #758fa3; + font-family: Arial; + font-size: 12px; + border-radius: 5px; + margin: 5px; +} + +blockquote .head +{ + display: block; + font-weight: bold; + font-size: 13px; + padding: 5px 10px; + background-color: lightgray; + margin-bottom: 5px; + border-top: solid 1px #f4f7fa; + border-bottom: solid 1px #dde5ed; +} + +blockquote p +{ + line-height: 20px; + margin-bottom: 10px; + padding-left: 15px; +} + +.rep-upvote { font-size: 13.5px !important; } +.rep-upvote span +{ + position: relative; + top: -4px; + letter-spacing: 0.02em; +} + +.action +{ + background-color: #A0CFEC; + font-style: italic; + padding: 15px; + text-align: center; + font-size: 18px; +} + +.post-content { word-wrap: break-word; } +.sidebar +{ + position: -moz-sticky; + position: -ms-sticky; + position: -o-sticky; + position: -webkit-sticky; + position: sticky; + top: 44px; +} +.gadget { padding-bottom: 20px; } + +.cell_author img { margin-right: 8px; } +.cell_last img { margin-right: 8px; } + +/* User Postbit */ +.tag_block +{ + background: url('/static/fabric-base-simple-alpha.png'), linear-gradient(#DF5B5A,#D93636); + background-color: red; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-color: #EA9090; + border-style: solid; + border-width: 0.6px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 3px 0px; + display: block; + line-height: 24px; + margin-left: -7px; + margin-right: -7px; + margin-top: 2px; + margin-bottom: 5px; + position: relative; + text-align: center; +} + +.tag_block:last-child { margin-bottom: 10px; } +.tag_block .tag_pre, .tag_block .tag_post +{ + background-color: #EA9090; + height: 4px; + position: absolute; + width: 5px; + top: -4px; +} + +.tag_block .tag_pre +{ + border-top-left-radius: 3px; + left: -1px; +} +.post_tag +{ + color: white; + font-size: 13px; + font-style: normal; + text-overflow: ellipsis; + font-weight: bold; +} +.tag_block .tag_post +{ + border-top-right-radius: 3px; + right: -1px; +} + +.post_block.groupRibbon +{ + display: none; +} + +/* From Tempra Conflux */ +.user_content { + padding: 5px; + margin-top: 3px; + margin-bottom: 0; + background: white; + min-height: 129px; + padding-bottom: 0; + width: 100%; +} + +.button_container { + border-top: solid 1px #eaeaea; + border-spacing: 0px; + border-collapse: collapse; + padding: 0; + margin: 0; + margin-top: 3px; + display: block; + height: 20px; +} + +.action_button { + display: block; + float: left; + border-right: solid 1px #eaeaea; + color: #505050; + font-size: 13px; + padding-top: 2px; + padding-bottom: 2px; + padding-left: 5px; + padding-right: 5px; +} +.post_item { + background-color: #eaeaea; + padding-top: 4px; + padding-left: 7px !important; + clear: both; + border-top: none !important; + border-bottom: none !important; + padding-right: 7px !important; + padding-bottom: 2px; +} +.post_item:last-child { + padding-bottom: 7px; +} +.userinfo { + border-radius: 5px; + + background: white; + width: 132px; + padding: 2px; + margin-top: 2px; + float: left; + position: sticky; + top: 4px; + box-shadow:0 1px 2px rgba(0,0,0,.1); +} +.content_container { + background: white; + margin-left: 140px; + min-height: 128px; + margin-bottom: 0; + margin-right: 3px; + box-shadow:0 1px 2px rgba(0,0,0,.1); +} + +/* Responsive Layout */ +/* Anything that isn't a small mobile */ +@media(min-width: 501px) +{ + /*.top + { + margin-top: 0px; + margin-bottom: 0px; + margin-left: auto; + margin-right: auto; + width: 200px; + padding: 0px; + outline: none; + } + + .top h1 + { + text-align: center; + color: darkgray; + text-shadow: 0px 1px 0px #646464; + margin: 0px; + line-height: 60px; + }*/ + + .options + { + float: right; + position: relative; + top: -50px; + border: 1px solid rgba(100,100,110,0.75); + border-left: none; + border-right: none; + padding: 5px; + height: 30px; + width: 30px; + overflow: none; + + transition-property: background; + transition-duration: 0.5s; + transition-timing-function: linear; + } + + .options:last-child { border-left: 1px solid rgba(100,100,110,0.75); } + .right_most { margin-right: 10%; border-right: 1px solid rgba(100,100,110,0.75); } + + #alertFeed { background: url('../../images/bell.png') no-repeat center center / 24px, rgba(30,30,30,0.75); } + #alertFeed:hover { background: url('../../images/bell.png') no-repeat center center / 24px, rgba(90, 90, 90, 0.4); } + #mailFeed { background: url('../../images/mail.png') no-repeat center center / 24px, rgba(30,30,30,0.75); } + #mailFeed:hover { background: url('../../images/mail.png') no-repeat center center / 24px, rgba(90, 90, 90, 0.4); } + #awardFeed { background: url('../../images/emblem.png') no-repeat center center / 24px, rgba(30,30,30,0.75); } + #awardFeed:hover { background: url('../../images/emblem.png') no-repeat center center / 24px, rgba(90, 90, 90, 0.4); } + + .selectedAlert { background: url('../../images/bell.png') no-repeat center center / 24px, rgba(250,250,250, 1) !important; } + .selectedMail { background: url('../../images/mail.png') no-repeat center center / 24px, rgba(250,250,250, 1) !important; } + .selectedAward { background: url('../../images/emblem.png') no-repeat center center / 24px, rgba(250,250,250, 1) !important; } + + .options > .counter + { + background: red; + border-radius: 5px; + color: #FFFFFF; + display: inline-block; + font-weight: bold; + text-align: center; + line-height: 16px; + font-size: 10px; + width: 16px; + + position: absolute; + right: 0px; + } + + .options > .alertList + { + display: none; + position: absolute; + display: block; + width: 250px; + left: -250%; + top: 40px; + opacity: 0; + visibility: hidden; + overflow: hidden; + + background: rgba(250,250,250,1); + word-wrap: none; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); + padding: 0px; + z-index: 50; + } + + .options > .alertList > h2 + { + font-weight: normal; + padding-top: 10px; + padding-left: 0px; + padding-right: 0px; + padding-bottom: 0px; + margin-left: 10px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 5px; + font-size: 20px; + line-height: 30px; + border: none; + } + + .options > .alertList > hr + { + border: 0.5px solid rgba(220,220,220,1); + width: 100%; + margin: 0px; + padding: 0px; + } + + .options > .alertList > .alertItem + { + display: block; + font-size: 13px; + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 3px; + padding-top: 10px; + padding-bottom: 10px; + padding-left: 10px; + padding-right: 0px; + overflow: hidden; + + border-bottom: 1px solid rgb(220, 220, 220); + } + + .options > .alertList > .alertItem:last-child { border: none; } + .options > .alertList > .alertItem > a { color: rgba(25,25,25,1); } + + .options > .alertList > .alertItem > .alertAvatar + { + float: left; + border-radius: 3px; + margin-right: 2px; + } +} + +@media (max-width: 800px) +{ + body { background: #cdcdcd; margin-bottom: 10px;} + /*.top + { + background: url('../../images/atombb-small.png') no-repeat left, url('../../images/head-bg.png'); + width: 100%; + } + .top img { display: none; }*/ + + #main + { + width: 100%; + min-width: 300px; + margin-top: 0px; + margin-bottom: 0px; + padding: 10px; + box-sizing: border-box; + } + + ul + { + margin-top: 0px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + + line-height: 30px; + min-height: 30px; + padding-left: 8px; + padding-right: 8px; + + background-image: linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -moz-linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -o-linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -ms-linear-gradient(bottom, #2e2e2e, #4c4c4c); + background-image: -webkit-linear-gradient(bottom, #2e2e2e, #4c4c4c); + } + li + { + font-size: 14px; + padding-left: 12px; + padding-right: 12px; + height: 30px; + } + li:hover + { + background-image: linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -moz-linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -o-linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -ms-linear-gradient(bottom, #4c4c4c, #2e2e2e); + background-image: -webkit-linear-gradient(bottom, #4c4c4c, #2e2e2e); + } + + .rowblock { border-left: none;border-right: none;border-bottom: none; } + .rowitem { border-left: none;border-right: none; } + .rowhead { border-left: none;border-right: none; } + .tbody { border-left: none;border-right: none; } + .forumLastposter { width: 35%; } + .forumLastposter .title { width: 90px; } + .cell_author img { display: none; } + .cell_last img { display: none; } +} + +/* This one is specifically for small mobiles.. */ +@media(max-width: 500px) +{ + #main { margin-top: 20px; } + .rowblock { box-sizing: border-box; } + body { overflow-x: hidden; } + h1 { font-size: 0; } + + /*.top { display: none !important; }*/ + .options { display: none !important; } + /*.top div {display: none;}*/ + ul + { + line-height: 30px; + min-height: 30px; + padding-left: 4px; + padding-right: 4px; + + margin-top: 0px; + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + + clear: left; + width: 100%; + } + + li + { + font-size: 15px; + padding-left: 6px; + padding-right: 6px; + height: 28px; + } + + #back + { + position: relative; + top: -25px; + } + + #main + { + padding-left: 4px; + padding-right: 6px; + } + + .notice + { + width: 100%; + margin-left: 0px; + margin-right: 0px; + margin-bottom: 8px; + margin-top: 0px; + + padding: 5px; + background: #96CDCD; + background-image: none; + box-sizing: border-box; + } + + .post-content { word-wrap: normal; } + .post-meta { white-space: normal; } + .post_avatar + { + max-height: 80px; + max-width: 80px; + } + .userRibbon { word-wrap: break-word; } + + .notice:first-child { display: inline-block; } + .forumLastposter img { display: none; } + .getTopics { display: none; } +} +@media (min-width: 800px) +{ + /*.top { + min-height: 50px !important; + -webkit-animation-duration: 2s; + -moz-animation-duration: 2s; + animation-duration: 2s; + -webkit-animation-name: slidein; + -moz-animation-name: slidein; + animation-name: slidein; + } + .top a + { + height: 50px !important; + }*/ + @-webkit-keyframes slidein + { + from { transform: translate(0,-50px) scale(0.75); } + to {} + } + @-moz-keyframes slidein + { + from { transform: translate(0,-50px) scale(0.75); } + to {} + } + @keyframes slidein + { + from { transform: translate(0,-50px) scale(0.75); } + to {} + } + /*.top img { min-height: 50px !important; } + .top h1 { display: none; }*/ + .right_most { margin-right: 15%; } + + #back + { + width: 800px; + margin-top: 15px; + margin-left: auto; + margin-right: auto; + margin-bottom: 15px; + + background: none; + border-top: none; + padding: 0px; + padding-top: 0px; + /*padding-bottom: 50px;*/ + padding-bottom: 10px; + + background-color: rgba(30,30,30,0.75); + border: 1px solid rgba(100,100,110,0.75); + box-shadow: -1px -1px 1px rgba(0, 0, 0, 1), 1px 1px 1px rgba(0,0,0,0.5); + + transition-property: height; + transition-duration: 0.5s; + transition-timing-function: linear; + } + + #main + { + float: left; + clear: left; + width: 765px; + min-width: 300px; + margin-top: 0px; + margin-left: 15px; + margin-right: 12px; + margin-bottom: 15px; + } + + .nav + { + position: sticky; + top: 0px; + width: 800px; + margin-left: auto; + margin-right: auto; + perspective: 1000px; + z-index: 20; + } + + ul + { + line-height: 40px; + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + + margin-top: 0px; + margin-bottom: 0px; + background: none; + background-color: rgba(30,30,30,0.75); + border: 1px solid rgba(90,90,90,0.75); + transition: transform 0.7s; + } + ul:hover + { + transform: rotateX(-15deg); + } + + li + { + font-size: 15px; + padding-left: 15px; + padding-right: 15px; + height: 38px; + } +} +@media (max-width: 1023px) { .left_sidebar { display: none; } .right_sidebar { display: none; } } +@media (min-width: 1024px) +{ + #back + { + width: 1000px; + margin-top: 15px; + margin-left: auto; + margin-right: auto; + margin-bottom: 15px; + + background: none; + border-top: none; + padding: 0px; + padding-top: 0px; + padding-bottom: 10px; + + background-color: rgba(30,30,30,0.75); + border: 1px solid rgba(100,100,110,0.75); + box-shadow: -1px -1px 1px rgba(0, 0, 0, 1), 1px 1px 1px rgba(0,0,0,0.5); + } + + #main + { + float: left; + clear: left; + width: 700px; + min-width: 300px; + margin-top: 9px; + margin-left: 15px; + margin-right: 12px; + margin-bottom: 15px; + } + + .left_sidebar { display: none; } /* This theme only supports right sidebars, at the moment.. */ + .right_sidebar { + float: left; + width: 250px; + margin-top: 5px; + margin-left: 0px; + margin-right: 5px; + margin-bottom: 8px; + padding: 8px; + } + .nav { width: 1000px; } + + .bigAvatar + { + max-height: 128px; + max-width: 128px; + } +} + +@media (min-width: 1603px) +{ + #back + { + width: 1548px; + margin-left: auto; + margin-right: auto; + /*background-color: rgba(60,60,60,0.75);*/ + } + + #main { width: 1250px; } + .forumLastposter .title { width: 280px; } +} + +@media (min-width: 2400px) +{ + #back + { + width: 2000px; + margin-left: auto; + margin-right: auto; + } + + #main { width: 1690px; } + .index_category + { + float: left; + width: 835px; + } + .index_category:nth-child(even) { margin-left: 10px; } + .index_category:nth-child(odd) { overflow: hidden; } + .index_category:only-child { width: 100%; } + .forumLastposter { width: 40%; } + .forumLastposter .title { width: 200px; } +} + +@media (min-width: 3000px) +{ + #back { width: 2900px; } + #main { width: 2490px; } + .index_category { width: 1230px; } + .index_category:only-child { width: 100%; } + .forumLastposter .title { width: 300px; } + + .right_sidebar { width: 350px; } + .myinfo_avatar { max-height: 120px;max-width: 120px; } +} \ No newline at end of file diff --git a/themes/cosmo/theme.json b/themes/cosmo/theme.json index f7ae1441..93543f96 100644 --- a/themes/cosmo/theme.json +++ b/themes/cosmo/theme.json @@ -3,6 +3,7 @@ "FriendlyName": "AtomBB Cosmo", "Version": "Coming Soon", "Creator": "Azareal", + "FullImage": "cosmo.png", "Templates": [ { "Name": "topic", diff --git a/themes/tempra-conflux/public/main.css b/themes/tempra-conflux/public/main.css index c0829c13..e963481e 100644 --- a/themes/tempra-conflux/public/main.css +++ b/themes/tempra-conflux/public/main.css @@ -171,18 +171,15 @@ li a /*height: 40px;*/ width: 100%; } - /*Clearfix*/ .formrow:before, .formrow:after { content: " "; display: table; } - .formrow:after { clear: both; } - .formrow:not(:last-child) { border-bottom: 1px dotted #ccc; @@ -197,22 +194,18 @@ li a padding-bottom: 8px; font-weight: bold; } - .formitem:first-child { font-weight: bold; } - .formitem:not(:last-child) { border-right: 1px dotted #ccc; } - .formitem.invisible_border { border: none; } - /* Mostly for textareas */ .formitem:only-child { @@ -249,11 +242,22 @@ button border-radius: 2px; } -.topic_status:empty -{ +.topic_status:empty { display: none; } +.rowhead { + background: linear-gradient(to bottom, white, hsl(0, 0%, 93%)); +} +.topic_sticky_head { + background-color: #FFFFEA; + background: linear-gradient(to bottom, hsl(60, 70%, 96%), hsl(60, 70%, 89%)), url('/static/fabric-base-simple-alpha.png'); +} +.topic_closed_head { + background-color: #eaeaea; + background: linear-gradient(to bottom, #eaeaea, hsl(0,0%,79%)); +} + .username { text-transform: none; @@ -353,6 +357,41 @@ button.username padding-right: 5px; } +.post_item { + background-color: #eaeaea; + padding-top: 4px; + padding-left: 5px; + clear: both; + border-bottom: none; + padding-right: 4px; + padding-bottom: 2px; +} +.post_item:last-child { + padding-bottom: 7px; +} +.post_tag { + display: none; +} + +.userinfo { + background: white; + width: 132px; + padding: 2px; + margin-top: 2px; + float: left; + position: sticky; + top: 4px; + box-shadow:0 1px 2px rgba(0,0,0,.1); +} +.content_container { + background: white; + margin-left: 137px; + min-height: 128px; + margin-bottom: 0; + margin-right: 3px; + box-shadow:0 1px 2px rgba(0,0,0,.1); +} + /* Media Queries from Simple. Probably useless in Conflux */ @media (max-width: 880px) { li diff --git a/themes/tempra-conflux/theme.json b/themes/tempra-conflux/theme.json index 06ded26c..24ba2f2b 100644 --- a/themes/tempra-conflux/theme.json +++ b/themes/tempra-conflux/theme.json @@ -3,6 +3,7 @@ "FriendlyName": "Tempra Conflux", "Version": "0.0.1", "Creator": "Azareal", + "FullImage": "tempra-conflux.png", "Templates": [ { "Name": "topic", diff --git a/themes/tempra-simple/tempra-simple.png b/themes/tempra-simple/tempra-simple.png new file mode 100644 index 00000000..b689106c Binary files /dev/null and b/themes/tempra-simple/tempra-simple.png differ diff --git a/themes/tempra-simple/theme.json b/themes/tempra-simple/theme.json index 2257bbc3..8458126d 100644 --- a/themes/tempra-simple/theme.json +++ b/themes/tempra-simple/theme.json @@ -2,5 +2,7 @@ "Name": "tempra-simple", "FriendlyName": "Tempra Simple", "Version": "0.0.1", - "Creator": "Azareal" + "Creator": "Azareal", + "FullImage": "tempra-simple.png", + "MobileFriendly": true } \ No newline at end of file