Dramatically improved mobile friendliness on Tempra Conflux, Cosmo Conflux and Cosmo themes.

Made minor improvements to the mobile friendliness on the Tempra Simple theme.
Added levels to the other three themes.
Added the group tags to the Tempra Conflux and Cosmo Conflux themes.
Added more screenshots and updated some of the existing ones.
Made a small cosmetic improvement to the theme list.
This commit is contained in:
Azareal 2017-01-12 14:01:35 +00:00
parent b7c89fd020
commit 2f50da8cd8
28 changed files with 80 additions and 85 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
uploads/avatar_*
bin/*
gosora.exe
install.exe

View File

@ -33,7 +33,8 @@ A responsive design. Looks great on mobile phones, tablets, laptops, desktops an
Go 1.7. You will need to install this. Pick the .msi, if you want everything sorted out for you rather than having to go around updating the environment settings. https://golang.org/doc/install
MySQL Database. You will need to setup a MySQL Database somewhere. A MariaDB Database works equally well and is much faster than MySQL.
MySQL Database. You will need to setup a MySQL Database somewhere. A MariaDB Database works equally well and is much faster than MySQL. You could use something like WNMP / XAMPP which have a little PHP script called PhpMyAdmin for managing MySQL databases or you could install MariaDB directly.
Download the .msi installer from [MariaDB](https://mariadb.com/downloads) and run that. You may want to set it up as a service to avoid running it every-time the computer starts up.
Instructions on how to set MariaDB up on Linux: https://downloads.mariadb.org/mariadb/repositories/

BIN
images/cosmo-320px.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 KiB

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

After

Width:  |  Height:  |  Size: 408 KiB

BIN
images/levels2_test.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View File

Before

Width:  |  Height:  |  Size: 334 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 282 KiB

View File

@ -1,7 +1,7 @@
/* 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 "io"
import "strconv"
import "io"
func init() {
template_forum_handle = template_forum

View File

@ -1,7 +1,7 @@
/* 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 "strconv"
import "io"
import "strconv"
func init() {
template_profile_handle = template_profile

View File

@ -118,6 +118,8 @@ w.Write([]byte(`
`))
if tmpl_topic_alt_vars.Topic.Tag != "" {
w.Write([]byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">` + tmpl_topic_alt_vars.Topic.Tag + `</div><div class="tag_post"></div></div>`))
} else {
w.Write([]byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level ` + strconv.Itoa(tmpl_topic_alt_vars.Topic.Level) + `</div><div class="tag_post"></div></div>`))
}
w.Write([]byte(`
</div>
@ -138,6 +140,8 @@ w.Write([]byte(`
`))
if item.Tag != "" {
w.Write([]byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">` + item.Tag + `</div><div class="tag_post"></div></div>`))
} else {
w.Write([]byte(`<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level ` + strconv.Itoa(item.Level) + `</div><div class="tag_post"></div></div>`))
}
w.Write([]byte(`
</div>

View File

@ -13,7 +13,7 @@
</span>
<span style="float: right;">
{{if .MobileFriendly}}<span class="username" title="Mobile Friendly">📱</span>{{end}}
{{if .Active}}<span>Default</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="username">Make Default</a>{{end}}
{{if .Active}}<span class="username">Default</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="username">Make Default</a>{{end}}
</span>
</div>
{{end}}

View File

@ -26,7 +26,7 @@
<div class="userinfo">
<div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div>
<a href="/user/{{.Topic.CreatedBy}}" class="the_name">{{.Topic.CreatedByName}}</a>
{{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{end}}
{{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}}
</div>
<div class="content_container">
<div class="hide_on_edit topic_content user_content nobuttons">{{.Topic.Content}}</div>
@ -39,7 +39,7 @@
<div class="userinfo">
<div class="avatar_item" style="background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div>
<a href="/user/{{.CreatedBy}}" class="the_name">{{.CreatedByName}}</a>
{{if .Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Tag}}</div><div class="tag_post"></div></div>{{end}}
{{if .Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Level}}</div><div class="tag_post"></div></div>{{end}}
</div>
<div class="content_container">
<div class="editable_block user_content">{{.ContentHtml}}</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 KiB

After

Width:  |  Height:  |  Size: 388 KiB

View File

@ -487,12 +487,12 @@ blockquote p
margin-top: 3px;
margin-bottom: 0;
background: white;
min-height: 129px;
min-height: 145px;
padding-bottom: 0;
width: 100%;
}
.user_content.nobuttons {
min-height: 153px;
min-height: 168px;
}
.button_container {
@ -532,7 +532,11 @@ blockquote p
padding-bottom: 2px;
}
.post_tag {
display: none;
margin-top: 0px;
text-align: center;
color: #505050;
display: block;
font-size: 13px;
}
.the_name {
margin-top: 3px;
@ -575,26 +579,6 @@ blockquote p
/* 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;
@ -716,14 +700,7 @@ blockquote p
@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; }*/
body { background: #505050; margin-bottom: 10px;}
#main
{
width: 100%;
@ -772,8 +749,13 @@ blockquote p
.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; }
}
@media(max-width: 620px)
{
.menu_create_topic { display: none;}
.menu_overview { display: none; }
.hide_on_mobile { display: none; }
}
/* This one is specifically for small mobiles.. */
@ -781,12 +763,12 @@ blockquote p
{
#main { margin-top: 20px; }
.rowblock { box-sizing: border-box; }
.rowblock:first-of-type { margin-top: 2px; }
body { overflow-x: hidden; }
h1 { font-size: 0; }
/*.top { display: none !important; }*/
.topic_name { text-align: left; margin-left: 8px; width: 50%; text-overflow: ellipsis; overflow: hidden; }
.menu_profile { display: none; }
.options { display: none !important; }
/*.top div {display: none;}*/
ul
{
line-height: 30px;
@ -857,23 +839,13 @@ blockquote p
}
.content_container {
margin-left: 73px;
min-height: inherit;
}
.user_content { min-height: 80px !important; }
.user_content.nobuttons { min-height: 103px !important; }
}
@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); }

View File

@ -4,6 +4,7 @@
"Version": "Coming Soon",
"Creator": "Azareal",
"FullImage": "cosmo-conflux.png",
"MobileFriendly": true,
"Templates": [
{
"Name": "topic",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

After

Width:  |  Height:  |  Size: 408 KiB

View File

@ -533,12 +533,13 @@ blockquote p
margin-top: 3px;
margin-bottom: 0;
background: white;
min-height: 129px;
min-height: 167px;
padding-bottom: 0;
width: 100%;
border-radius: 4px;
}
.user_content.nobuttons {
min-height: 153px;
min-height: 190px;
}
.button_container {
@ -615,6 +616,7 @@ blockquote p
margin-bottom: 0;
margin-right: 3px;
box-shadow:0 1px 2px rgba(0,0,0,.1);
border-radius: 4px;
}
/* Responsive Layout */
@ -742,7 +744,7 @@ blockquote p
@media (max-width: 800px)
{
body { background: #cdcdcd; margin-bottom: 10px;}
body { background: #505050; margin-bottom: 10px;}
#main
{
width: 100%;
@ -797,14 +799,23 @@ blockquote p
.cell_last img { display: none; }
}
@media(max-width: 620px)
{
.menu_create_topic { display: none;}
.menu_overview { display: none; }
.hide_on_mobile { display: none; }
}
/* This one is specifically for small mobiles.. */
@media(max-width: 500px)
{
#main { margin-top: 20px; }
.rowblock { box-sizing: border-box; }
.rowblock:first-of-type { margin-top: 2px; }
body { overflow-x: hidden; }
h1 { font-size: 0; }
.topic_name { text-align: left; margin-left: 8px; width: 50%; text-overflow: ellipsis; overflow: hidden; }
.menu_profile { display: none; }
.options { display: none !important; }
ul
{
@ -839,7 +850,6 @@ blockquote p
padding-left: 4px;
padding-right: 6px;
}
.notice
{
width: 100%;
@ -878,7 +888,10 @@ blockquote p
}
.content_container {
margin-left: 73px;
min-height: inherit;
}
.user_content { min-height: 97.5px !important; }
.user_content.nobuttons { min-height: 121px !important; }
}
@media (min-width: 800px)
{

View File

@ -4,6 +4,7 @@
"Version": "Coming Soon",
"Creator": "Azareal",
"FullImage": "cosmo.png",
"MobileFriendly": true,
"Templates": [
{
"Name": "topic",

View File

@ -168,12 +168,10 @@ li a
.formrow
{
/*height: 40px;*/
width: 100%;
}
/* Clearfix */
.formrow:before,
.formrow:after {
.formrow:before, .formrow:after {
content: " ";
display: table;
}
@ -241,10 +239,7 @@ button
color: #505050; /* 80,80,80 */
border-radius: 2px;
}
.topic_status:empty {
display: none;
}
.topic_status:empty { display: none; }
.rowhead {
background: linear-gradient(to bottom, white, hsl(0, 0%, 93%));
@ -329,12 +324,12 @@ button.username
margin-top: 3px;
margin-bottom: 0;
background: white;
min-height: 129px;
min-height: 145px;
padding-bottom: 0;
width: 100%;
}
.user_content.nobuttons {
min-height: 153px;
min-height: 168px;
}
.button_container {
@ -368,7 +363,7 @@ button.username
padding-top: 4px;
padding-left: 5px;
clear: both;
border-bottom: none;
border-bottom: none !important;
padding-right: 4px;
padding-bottom: 2px;
}
@ -376,7 +371,11 @@ button.username
padding-bottom: 7px;
}
.post_tag {
display: none;
margin-top: 0px;
text-align: center;
color: #505050;
display: block;
font-size: 13px;
}
.the_name {
margin-top: 3px;
@ -436,10 +435,7 @@ button.username
font-weight: normal;
text-transform: none;
}
.rowitem
{
text-transform: none;
}
.rowitem { text-transform: none; }
}
@media (max-width: 620px) {
@ -501,7 +497,12 @@ button.username
}
.content_container {
margin-left: 73px;
min-height: inherit !important;
}
.user_content { min-height: 76.5px !important; font-size: 15px; }
.user_content.nobuttons { min-height: 100.5px !important; }
.the_name { font-size: 15px; }
.post_tag { font-size: 12px; }
.container { width: 100% !important; }
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 282 KiB

View File

@ -274,6 +274,7 @@ button.username
position: relative;
top: -0.25px;
}
.username.level {color: #303030;}
.tag-mini
{
text-transform: none;
@ -388,11 +389,12 @@ button.username
position: absolute;
top: 70px;
float: left;
margin-top: 0px;
margin-top: -2px;
padding-top: 3px !important;
margin-right: 2px;
width: 60px;
font-size: 15px;
text-align: center;
}
.container { width: 100% !important; }
}

View File

@ -1,5 +1,4 @@
package main
import "fmt"
import "strings"
import "strconv"
import "net/http"
@ -226,8 +225,8 @@ func increase_post_user_stats(wcount int, uid int, topic bool, user User) error
if err != nil {
return err
}
fmt.Println(user.Score + base_score + mod)
fmt.Println(getLevel(user.Score + base_score + mod))
//fmt.Println(user.Score + base_score + mod)
//fmt.Println(getLevel(user.Score + base_score + mod))
_, err = update_user_level_stmt.Exec(getLevel(user.Score + base_score + mod), uid)
return err
}

View File

@ -107,9 +107,8 @@ func write_file(name string, content string) {
f.Close()
}
func word_count(input string) int {
func word_count(input string) (count int) {
input = strings.TrimSpace(input)
count := 0
in_space := false
for _, value := range input {
if unicode.IsSpace(value) {