package links
import "git.haelnorr.com/h/oslstats/internal/db"
import "fmt"
// PlayerLink renders a player name as a clickable link to their profile page.
// The player's DisplayName() is used as the link text.
templ PlayerLink(player *db.Player) {
{ player.DisplayName() }
}
// PlayerLinkFromStats renders a player name link using a player ID and name string.
// This is useful when only aggregated stats are available (no full Player object).
templ PlayerLinkFromStats(playerID int, playerName string) {
{ playerName }
}
// TeamLinkInSeason renders a team name as a clickable link to the team's
// season-specific detail page, with an optional color dot prefix.
templ TeamLinkInSeason(team *db.Team, season *db.Season, league *db.League) {
if team.Color != "" {
}
{ team.Name }
}
// TeamNameLinkInSeason renders just the team name as a clickable link (no color dot).
// Useful where the color dot is already rendered separately or in inline contexts.
templ TeamNameLinkInSeason(team *db.Team, season *db.Season, league *db.League) {
{ team.Name }
}