package pages import ( "fmt" "reichard.io/antholume/database" "reichard.io/antholume/graph" "reichard.io/antholume/ngtemplates/common" ) type UserMetadata struct { DocumentCount int ActivityCount int ProgressCount int DeviceCount int } type UserStatistics struct { WPM map[string][]UserStatisticEntry Duration map[string][]UserStatisticEntry Words map[string][]UserStatisticEntry } type UserStatisticEntry struct { UserID string Value string } templ Home( settings common.Settings, dailyReadSVG graph.SVGGraphData, userStreaks []database.UserStreak, userStatistics UserStatistics, userMetadata UserMetadata, ) { @layout(settings, "Home WAT") {
{ fmt.Sprint(metric) }
{ name }
{ name } Leaderboard
N/A
} else {{ data[0].UserID }
}{ item.UserID }
{ item.UserID }
if streak.Window == "WEEK" { Weekly Read Streak } else { Daily Read Streak }
{ fmt.Sprint(streak.CurrentStreak) }
if streak.Window == "WEEK" { Current Read Streak } else { Current Read Streak }
if streak.Window == "WEEK" { Best Weekly Streak } else { Best Daily Streak }
Daily Read Totals