package main import "fmt" func pathBuilder(page int, query string) string { base := "/" if page > 1 { base = fmt.Sprintf("/p/%d", page) } if query != "" { return fmt.Sprintf("%s?q=%s", base, query) } return base } templ MainContent(records []Record, query string, page int, hasMore bool) {
if page == 1 && query == "" && len(records) > 0 {
Current Public IP
{ records[0].IP }
{ records[0].Timestamp.Format("Jan 02, 15:04:05 MST") }
} for _, r := range records { }
TimestampIP Address
{ r.Timestamp.Format("2006-01-02 15:04:05") } { r.IP }
} templ Page(records []Record, query string, page int, hasMore bool) { IP History

IP History

A simple timeline of your public IP changes

@MainContent(records, query, page, hasMore)
}