Clean up template
This commit is contained in:
parent
373fc1e0f2
commit
de7f70b11d
12
main.go
12
main.go
|
@ -139,17 +139,21 @@ func generateHTML(sites []HatsSite, w io.Writer) error {
|
|||
<dl>
|
||||
<dt>Fetched</dt>
|
||||
<dd>{{.FetchTime.Format "Mon Jan 2 15:04:05 -0700 MST 2006" }}</dd>
|
||||
<dt>Title</dt>
|
||||
<dd>{{.Title}}</dd>
|
||||
<dt>Owner</dt>
|
||||
<dd><a href="mailto:{{.Registrant.Email}}">{{.Registrant.Name}} <{{.Registrant.Email}}></a></dd>
|
||||
{{with .DomainInfo.CreatedDate}}
|
||||
{{if not .Available}}
|
||||
<dt>Since</dt>
|
||||
<dd>{{(parseTime .).Format "Mon Jan 2 2006" }}</dd>
|
||||
<dd>{{(parseTime .DomainInfo.CreatedDate).Format "Mon Jan 2 2006" }}</dd>
|
||||
{{end}}
|
||||
{{with .Title}}
|
||||
<dt>Title</dt>
|
||||
<dd>{{.}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
{{if .ScreenshotURL}}
|
||||
<img src="{{.ScreenshotURL}}" alt="screenshot of {{.DomainName}} as of {{.FetchTime.Format "Mon Jan 2 15:04:05 -0700 MST 2006" }}">
|
||||
{{end}}
|
||||
{{end}}
|
||||
</body>
|
||||
</html>`)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue