package pages import ( "reichard.io/antholume/database" "reichard.io/antholume/graph" "reichard.io/antholume/ngtemplates/common" "reichard.io/antholume/ngtemplates/components" ) templ Home( settings common.Settings, dailyReadSVG graph.SVGGraphData, userStreaks []database.UserStreak, userStatistics common.UserStatistics, userMetadata common.UserMetadata, ) { @layout(settings, "Home") {
@components.DailyReadChart(dailyReadSVG)
@components.InfoCardLink("Documents", userMetadata.DocumentCount, "./documents") @components.InfoCardLink("Activity Records", userMetadata.ActivityCount, "./activity") @components.InfoCardLink("Progress Records", userMetadata.ProgressCount, "./progress") @components.InfoCard("Devices", userMetadata.DeviceCount)
for _, item := range userStreaks { @components.StreakCard(item) }
@components.LeaderboardCard("WPM", userStatistics.WPM) @components.LeaderboardCard("Duration", userStatistics.Duration) @components.LeaderboardCard("Words", userStatistics.Words)
} }