Skip to content

Commit

Permalink
feat: implement user titles in without_soul profile theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ySnoopyDogy committed Nov 2, 2023
1 parent 4a2256e commit ffc742a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/renderers/profiles/without_soul.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,22 @@ func RenderWithoutSoul(User *utils.UserData, I18n *utils.I18n, db *database.Data
ctx.DrawStringWrapped(User.MarryUsername+" | "+strings.Split(User.MarryDate, " ")[0], 440, 325, 0, 1, 600, 1, 0)
}

fontSize := 30
ctx.SetFontFace(*utils.GetFont("Postamt", 30))

ctx.DrawStringAnchored(User.Title, 630, 73, 0.5, 0.5)

if len(User.Username) > 22 {
fontSize = 24
ctx.SetFontFace(*utils.GetFont("Postamt", 24))
}

ctx.SetFontFace(*utils.GetFont("Postamt", float64(fontSize)))
ctx.DrawStringWrapped(User.Username, 630, 127, 0.5, 0.5, 420, 1, 1)
ctx.DrawStringWrapped(User.Username, 630, 125, 0.5, 0.5, 420, 1, 1)

ctx.DrawStringAnchored(User.Title, 630, 73, 0.5, 0.5)

ctx.SetFontFace(*utils.GetFont("Postamt", 30))
ctx.DrawStringAnchored("Upvotes: "+strconv.Itoa(int(User.Votes)), 875, 620, 0.5, 0.5)

utils.DrawBadges(ctx, User, 135, 595)
utils.DrawBadges(ctx, User, 135, 590)

return ctx.Image()
}

0 comments on commit ffc742a

Please sign in to comment.