aboutsummaryrefslogtreecommitdiff
path: root/data.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-11-10 01:41:27 +0100
committerAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-11-10 01:41:27 +0100
commitb0a86973a3816335d3410b9e7f22bf1346857d7d (patch)
tree1d40f09c87a11c9285cad034495c15b9164fddca /data.go
parent3b7bc746afe8d7498ce6b8e5b19c2ff82ff72095 (diff)
style(data): rename data with config
Diffstat (limited to 'data.go')
-rw-r--r--data.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/data.go b/data.go
index d085b99..4ccae88 100644
--- a/data.go
+++ b/data.go
@@ -6,7 +6,7 @@ import (
"strconv"
)
-type Data struct {
+type Config struct {
Image string `json:"image"`
Description string `json:"description"`
Person *Person `json:"person"`
@@ -49,8 +49,8 @@ type Legal struct {
ImagesSource []string `json:"images_source"`
}
-func (d *Data) GetBackground() template.CSS {
- bg := d.Color.Background
+func (c *Config) GetBackground() template.CSS {
+ bg := c.Color.Background
css := "background: " + bg.Type + "-gradient("
if bg.Type == "linear" {
css += strconv.Itoa(int(bg.Angle)) + "deg,"
@@ -61,12 +61,12 @@ func (d *Data) GetBackground() template.CSS {
return template.CSS(css[:len(css)-1] + ");")
}
-func (d *Data) GetBackgroundImage() template.CSS {
- return template.CSS("--background-image: url(" + golatt.GetStaticPath(d.Image) + ");")
+func (c *Config) GetBackgroundImage() template.CSS {
+ return template.CSS("--background-image: url(" + golatt.GetStaticPath(c.Image) + ");")
}
-func (d *Data) GetTextColor() template.CSS {
- return template.CSS("--text-color: " + d.Color.Text + ";")
+func (c *Config) GetTextColor() template.CSS {
+ return template.CSS("--text-color: " + c.Color.Text + ";")
}
func (l *Link) GetLinkColor() template.CSS {