Implement pretty time formatting
This commit is contained in:
parent
64a446d04d
commit
ca5a767418
6
main.go
6
main.go
|
@ -102,15 +102,15 @@ func generateHTML(sites []HatsSite, w io.Writer) error {
|
||||||
<h3>{{.DomainName}}</h3>
|
<h3>{{.DomainName}}</h3>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Fetched</dt>
|
<dt>Fetched</dt>
|
||||||
<dd>{{.FetchTime}}</dd>
|
<dd>{{.FetchTime.Format "Mon Jan 2 15:04:05 -0700 MST 2006" }}</dd>
|
||||||
<dt>Title</dt>
|
<dt>Title</dt>
|
||||||
<dd>{{.Title}}</dd>
|
<dd>{{.Title}}</dd>
|
||||||
<dt>Owner</dt>
|
<dt>Owner</dt>
|
||||||
<dd>{{.Owner}}</dd>
|
<dd>{{.Owner}}</dd>
|
||||||
<dt>Since</dt>
|
<dt>Since</dt>
|
||||||
<dd>{{.Since}}</dd>
|
<dd>{{.Since.Format "Mon Jan 2 2006" }}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<img src="{{.ScreenshotURL}}" alt="screenshot of {{.DomainName}} as of {{.FetchTime}}">
|
<img src="{{.ScreenshotURL}}" alt="screenshot of {{.DomainName}} as of {{.FetchTime.Format "Mon Jan 2 15:04:05 -0700 MST 2006" }}">
|
||||||
{{end}}
|
{{end}}
|
||||||
</body>
|
</body>
|
||||||
</html>`)
|
</html>`)
|
||||||
|
|
Loading…
Reference in a new issue