File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,10 +50,11 @@ var (
5050 faint = ac ("#8C959F" , "#4E4E4E" )
5151
5252 // Secondary palette tokens used across multiple files.
53- accent = ac ("#2E59A1" , "#87AFFF" ) // nameservers, headers, DNS records
54- muted = ac ("#57606A" , "#A8A8A8" ) // TXT records, redirect URLs, mail records
55- border = ac ("#D0D7DE" , "#3A3A3A" ) // box and panel borders
56- tabGray = ac ("#57606A" , "#A0A0A0" ) // inactive tab text
53+ accent = ac ("#2E59A1" , "#87AFFF" ) // nameservers, headers, DNS records
54+ muted = ac ("#57606A" , "#A8A8A8" ) // TXT records, redirect URLs, mail records
55+ mutedAlt = ac ("#8C959F" , "#7A7A7A" ) // alternate TXT shade for zebra striping
56+ border = ac ("#D0D7DE" , "#3A3A3A" ) // box and panel borders
57+ tabGray = ac ("#57606A" , "#A0A0A0" ) // inactive tab text
5758
5859 // Styles
5960 domainStyle = lipgloss .NewStyle ().
8586 txtStyle = lipgloss .NewStyle ().
8687 Foreground (muted )
8788
89+ txtStyleAlt = lipgloss .NewStyle ().
90+ Foreground (mutedAlt )
91+
8892 dimStyle = lipgloss .NewStyle ().
8993 Foreground (dim )
9094
Original file line number Diff line number Diff line change @@ -77,13 +77,18 @@ func RenderDNS(records *dns.Records) string {
7777 hasRecords = true
7878 b .WriteString ("\n " )
7979 b .WriteString (section ("TXT" ))
80- for _ , txt := range records .TXT {
80+ for i , txt := range records .TXT {
8181 // Truncate long TXT records for display
8282 display := txt
8383 if len (display ) > 60 {
8484 display = display [:57 ] + "..."
8585 }
86- b .WriteString (row ("" , txtStyle .Render (display )))
86+ // Alternate shades so adjacent records are easy to tell apart.
87+ style := txtStyle
88+ if i % 2 == 1 {
89+ style = txtStyleAlt
90+ }
91+ b .WriteString (row ("" , style .Render (display )))
8792 }
8893 }
8994
You can’t perform that action at this time.
0 commit comments