diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-10 01:41:27 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-10 01:41:27 +0100 |
| commit | b0a86973a3816335d3410b9e7f22bf1346857d7d (patch) | |
| tree | 1d40f09c87a11c9285cad034495c15b9164fddca /data.go | |
| parent | 3b7bc746afe8d7498ce6b8e5b19c2ff82ff72095 (diff) | |
style(data): rename data with config
Diffstat (limited to 'data.go')
| -rw-r--r-- | data.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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 { |
