2021-03-14 20:49:58 +00:00
|
|
|
package templates
|
|
|
|
|
|
|
|
type BaseData struct {
|
|
|
|
Title string
|
|
|
|
CanonicalLink string
|
|
|
|
OpenGraphItems []OpenGraphItem
|
|
|
|
BackgroundImage BackgroundImage
|
|
|
|
Theme string
|
|
|
|
BodyClasses []string
|
2021-03-26 03:33:00 +00:00
|
|
|
|
|
|
|
Project Project
|
|
|
|
User *User
|
2021-03-14 20:49:58 +00:00
|
|
|
}
|
|
|
|
|
2021-04-11 21:46:06 +00:00
|
|
|
type Post struct {
|
|
|
|
Preview string
|
|
|
|
ReadOnly bool
|
|
|
|
|
|
|
|
IP string
|
|
|
|
}
|
|
|
|
|
2021-03-18 01:25:06 +00:00
|
|
|
type Project struct {
|
|
|
|
Name string
|
|
|
|
Subdomain string
|
2021-04-11 21:46:06 +00:00
|
|
|
Color1 string
|
|
|
|
Color2 string
|
2021-03-18 01:25:06 +00:00
|
|
|
|
|
|
|
IsHMN bool
|
|
|
|
|
|
|
|
HasBlog bool
|
|
|
|
HasForum bool
|
|
|
|
HasWiki bool
|
|
|
|
HasLibrary bool
|
|
|
|
}
|
|
|
|
|
2021-03-26 03:33:00 +00:00
|
|
|
type User struct {
|
|
|
|
Username string
|
|
|
|
Email string
|
|
|
|
IsSuperuser bool
|
|
|
|
IsStaff bool
|
2021-04-17 00:01:13 +00:00
|
|
|
|
|
|
|
Name string
|
|
|
|
Blurb string
|
|
|
|
Signature string
|
|
|
|
// TODO: Avatar??
|
|
|
|
|
|
|
|
DarkTheme bool
|
|
|
|
Timezone string
|
|
|
|
ProfileColor1 string
|
|
|
|
ProfileColor2 string
|
|
|
|
|
|
|
|
CanEditLibrary bool
|
|
|
|
DiscordSaveShowcase bool
|
|
|
|
DiscordDeleteSnippetOnMessageDelete bool
|
2021-03-26 03:33:00 +00:00
|
|
|
}
|
|
|
|
|
2021-03-14 20:49:58 +00:00
|
|
|
type OpenGraphItem struct {
|
|
|
|
Property string
|
|
|
|
Name string
|
|
|
|
Value string
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackgroundImage struct {
|
|
|
|
Url string
|
|
|
|
Size string // A valid CSS background-size value
|
|
|
|
}
|