feat(style): custom colors for default buttons
This commit is contained in:
parent
c8ea8d4cd3
commit
7219e5bdf1
3 changed files with 21 additions and 4 deletions
16
data.go
16
data.go
|
@ -29,6 +29,7 @@ type Tag struct {
|
|||
|
||||
type Color struct {
|
||||
Background *BackgroundColor `json:"background"`
|
||||
Button *ButtonColor `json:"buttons"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
|
@ -41,6 +42,13 @@ type BackgroundColor struct {
|
|||
} `json:"colors"`
|
||||
}
|
||||
|
||||
type ButtonColor struct {
|
||||
Text string `json:"text"`
|
||||
TextHover string `json:"text_hover"`
|
||||
Background string `json:"background"`
|
||||
BackgroundHover string `json:"background_hover"`
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
Link string `json:"link"`
|
||||
Content string `json:"content"`
|
||||
|
@ -76,6 +84,14 @@ func (c *Config) GetTextColor() template.CSS {
|
|||
return template.CSS("--text-color: " + c.Color.Text + ";")
|
||||
}
|
||||
|
||||
func (b *ButtonColor) GetTextColor() template.CSS {
|
||||
return template.CSS("--text-color: " + b.Text + ";--text-color-hover: " + b.TextHover + ";")
|
||||
}
|
||||
|
||||
func (b *ButtonColor) GetBackground() template.CSS {
|
||||
return template.CSS("--background: " + b.Background + ";--background-hover: " + b.BackgroundHover + ";")
|
||||
}
|
||||
|
||||
func (l *Link) GetLinkColor() template.CSS {
|
||||
return template.CSS("--text-color: " + l.TextColor + ";--text-color-hover: " + l.TextColorHover + ";")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue