diff --git a/go.mod b/go.mod index f2465e7..5e25db4 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.23.5 require github.com/go-jet/jet/v2 v2.12.0 +// replace github.com/cufee/facepaint => ../facepaint + require ( github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9 github.com/PuerkitoBio/goquery v1.10.1 @@ -11,7 +13,7 @@ require ( github.com/bwmarrin/discordgo v0.28.1 github.com/cufee/aftermath-assets v0.1.0 github.com/cufee/am-wg-proxy-next/v2 v2.2.6 - github.com/cufee/facepaint v0.0.6 + github.com/cufee/facepaint v0.0.7 github.com/fogleman/gg v1.3.0 github.com/go-co-op/gocron v1.37.0 github.com/goccy/go-json v0.10.4 diff --git a/go.sum b/go.sum index 5d884eb..148999b 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/cufee/aftermath-assets v0.1.0 h1:r8p2mUN+h/cw1T6/oEX7bntD+lrL9Nz27GXO github.com/cufee/aftermath-assets v0.1.0/go.mod h1:6yCITCiz7POJnUMn1oohvadLA4z5YrFNo3p9EKgRdGU= github.com/cufee/am-wg-proxy-next/v2 v2.2.6 h1:6RAnPuYbPGtaLzOPhTk/N2Hx4KJx14x/c/cIik668xA= github.com/cufee/am-wg-proxy-next/v2 v2.2.6/go.mod h1:x6fkRfYry3l4Ykxl+v6pJAw5ISw+CuGzJzSkc5y5SYs= -github.com/cufee/facepaint v0.0.6 h1:hs565X06BKNGJ2Yx5Iikpi1rSImIPL6Y2KBC9YM89OI= -github.com/cufee/facepaint v0.0.6/go.mod h1:7zR5lQMN3EO3qNtff0J8nzIhDb258UoYbRzhRToLQdg= +github.com/cufee/facepaint v0.0.7 h1:X8ihx5t8Zmwr9Qhx9AdmhiV+fC2qajf1mWEoMB1oo7w= +github.com/cufee/facepaint v0.0.7/go.mod h1:7zR5lQMN3EO3qNtff0J8nzIhDb258UoYbRzhRToLQdg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/stats/render/period/v2/highlight-style.go b/internal/stats/render/period/v2/highlight-style.go index e1a8dea..cc35e4b 100644 --- a/internal/stats/render/period/v2/highlight-style.go +++ b/internal/stats/render/period/v2/highlight-style.go @@ -25,6 +25,7 @@ var styledHighlightCard = highlightCardStyle{ AlignItems: style.AlignItemsCenter, BackgroundColor: common.DefaultCardColor, + BlurBackground: cardBackgroundBlur, BorderRadiusTopLeft: common.BorderRadiusLG, BorderRadiusTopRight: common.BorderRadiusLG, @@ -34,10 +35,10 @@ var styledHighlightCard = highlightCardStyle{ GrowHorizontal: true, Gap: 20, - PaddingLeft: 25, - PaddingRight: 25, - PaddingTop: 20, - PaddingBottom: 20, + PaddingLeft: cardPaddingX / 1.5, + PaddingRight: cardPaddingX / 1.5, + PaddingTop: cardPaddingY / 1.5, + PaddingBottom: cardPaddingY / 1.5, }, titleWrapper: style.Style{ // Debug: true, diff --git a/internal/stats/render/period/v2/misc-style.go b/internal/stats/render/period/v2/misc-style.go index 8eb77ff..84c120c 100644 --- a/internal/stats/render/period/v2/misc-style.go +++ b/internal/stats/render/period/v2/misc-style.go @@ -9,6 +9,10 @@ import ( var ( clanTagBackgroundColor = color.NRGBA{40, 40, 40, 100} + + cardBackgroundBlur = 20.0 + cardPaddingX = 35.0 + cardPaddingY = 30.0 ) func styledPlayerName() style.Style { @@ -30,6 +34,7 @@ var styledPlayerNameWrapper = style.Style{ AlignItems: style.AlignItemsCenter, BackgroundColor: common.DefaultCardColor, + BlurBackground: cardBackgroundBlur, BorderRadiusTopLeft: common.BorderRadiusLG, BorderRadiusTopRight: common.BorderRadiusLG, diff --git a/internal/stats/render/period/v2/overview-style.go b/internal/stats/render/period/v2/overview-style.go index f0a93cf..f072082 100644 --- a/internal/stats/render/period/v2/overview-style.go +++ b/internal/stats/render/period/v2/overview-style.go @@ -71,6 +71,7 @@ var styledUnratedOverviewCard = overviewCardStyle{ JustifyContent: style.JustifyContentSpaceBetween, BackgroundColor: common.DefaultCardColor, + BlurBackground: cardBackgroundBlur, BorderRadiusTopLeft: common.BorderRadiusLG, BorderRadiusTopRight: common.BorderRadiusLG, @@ -80,10 +81,10 @@ var styledUnratedOverviewCard = overviewCardStyle{ GrowHorizontal: true, Gap: 15, - PaddingLeft: 25, - PaddingRight: 25, - PaddingTop: 20, - PaddingBottom: 20, + PaddingLeft: cardPaddingX, + PaddingRight: cardPaddingX, + PaddingTop: cardPaddingY, + PaddingBottom: cardPaddingY, }, column: style.Style{ Debug: debugOverviewCards, diff --git a/render_test.go b/render_test.go index 8b1523a..d52d8f0 100644 --- a/render_test.go +++ b/render_test.go @@ -30,8 +30,8 @@ import ( _ "github.com/joho/godotenv/autoload" ) -var bgImage = "static://bg-default" -var bgIsCustom = false +var bgImage = "static://test_user_background" +var bgIsCustom = true func init() { loadStaticAssets(static)