gosora/site.go
Azareal 91f70d2a4a Add a per-user theme switcher. The CSS might be slightly broken in the themes, that'll be fixed in a follow-up commit.
Added basic support for server sync.

Re-added a few missing defers.
Renamed TO-DO to TODO across the entire codebase.
Renamed StaticForumStore to MemoryForumStore.
The ForumStore is now built on a sync.Map with a view slice for generating /forums rather than a slice.
Renamed many more functions and variables to satisfy the linter.
increase_post_user_stats() and decrease_post_user_stats() are now methods on the User struct. We also fix a bug where they take the moderator's score rather than the target user's into account when recalculating their level after a post / topic is deleted.
Transitioned the topic list to CSS Grid for Tempra Simple, with a float fallback.
Cosmo and Cosmo Conflux are now hidden from the theme list.
Fixed more data races.
Added more debug data to the template compiler logs.
2017-09-10 17:57:22 +01:00

59 lines
1.0 KiB
Go

package main
import "net/http"
var site = &Site{Name: "Magical Fairy Land"}
var db_config = DB_Config{Host: "localhost"}
var config Config
var dev DevConfig
type Site struct {
Name string
Email string
Url string
Port string
EnableSsl bool
EnableEmails bool
HasProxy bool
}
type DB_Config struct {
Host string
Username string
Password string
Dbname string
Port string
}
type Config struct {
SslPrivkey string
SslFullchain string
MaxRequestSize int
CacheTopicUser int
UserCacheCapacity int
TopicCacheCapacity int
SmtpServer string
SmtpUsername string
SmtpPassword string
SmtpPort string
DefaultRoute func(http.ResponseWriter, *http.Request, User)
DefaultGroup int
ActivationGroup int
StaffCss string
UncategorisedForumVisible bool
MinifyTemplates bool
MultiServer bool
Noavatar string
ItemsPerPage int
}
type DevConfig struct {
DebugMode bool
SuperDebug bool
Profiling bool
}