mirror of
https://github.com/Xevion/glance.git
synced 2025-12-17 20:12:03 -06:00
Allow some branding customization.
This commit is contained in:
@@ -8,9 +8,10 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Server Server `yaml:"server"`
|
||||
Theme Theme `yaml:"theme"`
|
||||
Pages []Page `yaml:"pages"`
|
||||
Server Server `yaml:"server"`
|
||||
Theme Theme `yaml:"theme"`
|
||||
Pages []Page `yaml:"pages"`
|
||||
Branding Branding `yaml:"branding"`
|
||||
}
|
||||
|
||||
func NewConfigFromYml(contents io.Reader) (*Config, error) {
|
||||
@@ -40,6 +41,9 @@ func NewConfig() *Config {
|
||||
|
||||
config.Server.Host = ""
|
||||
config.Server.Port = 8080
|
||||
config.Branding.Show = true
|
||||
config.Branding.Name = "Glance"
|
||||
config.Branding.ShortName = "G"
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
@@ -38,10 +38,16 @@ type Theme struct {
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
Host string `yaml:"host"`
|
||||
Port uint16 `yaml:"port"`
|
||||
AssetsPath string `yaml:"assets-path"`
|
||||
StartedAt time.Time `yaml:"-"`
|
||||
Host string `yaml:"host"`
|
||||
Port uint16 `yaml:"port"`
|
||||
AssetsPath string `yaml:"assets-path"`
|
||||
StartedAt time.Time `yaml:"-"`
|
||||
}
|
||||
|
||||
type Branding struct {
|
||||
Show bool `yaml:show`
|
||||
Name string `yaml:name`
|
||||
ShortName string `yaml:"short-name"`
|
||||
}
|
||||
|
||||
type Column struct {
|
||||
|
||||
Reference in New Issue
Block a user