hats-domains/template.html

80 lines
2.4 KiB
HTML
Raw Normal View History

2021-10-18 19:32:10 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{n}hats.com domains</title>
<style>
body { max-width: 800px; font-family: sans-serif; margin: auto; }
dt { font-weight: bold; }
2021-10-18 22:38:13 -05:00
img { max-width: 100%; box-shadow: 0 0 10px 10px lightgray; }
img:hover { box-shadow: 0 0 10px 10px darkgray}
2021-10-18 19:32:10 -05:00
h3 { margin-top: 100px; }
2021-10-18 23:01:29 -05:00
.errors { padding: 0.5rem; border: 1px solid #f5c6cb; color: #721c24; background: #f8d7da; }
2021-10-18 19:32:10 -05:00
* { line-height: 1.5em; }
</style>
</head>
<body>
<h1>{n}hats.com domains</h1>
2021-10-18 23:01:29 -05:00
{{ $errors := false -}}
{{- range . -}}
{{- with .Error -}}
{{- $errors = true -}}
{{- end -}}
{{- end -}}
{{- if $errors -}}
<div class="errors">
<h4>Errors occurred during processing</h3>
<ol>
{{- range . -}}
{{- if .Error }}
<li>{{.DomainName}}: {{.Error}}</li>
{{ end -}}
{{- end -}}
</ol>
</div>
{{end}}
2021-10-18 19:32:10 -05:00
<h3>Summary</h3>
<ul>
{{range .}}
2021-10-18 23:01:29 -05:00
{{if not .Error}}
{{if .Available}}
<li><a href="#{{.DomainName}}">{{.DomainName}}</a> &ndash; Available!</li>
{{else}}
2021-10-18 23:10:09 -05:00
<li><a href="#{{.DomainName}}">{{.DomainName}}</a> &ndash; Registered since {{(parseTime .DomainInfo.CreatedDate).Format "Jan 2, 2006" }}</li>
2021-10-18 23:01:29 -05:00
{{end}}
2021-10-18 19:32:10 -05:00
{{end}}
{{end}}
</ul>
{{range .}}
2021-10-18 23:01:29 -05:00
{{if not .Error}}
2021-10-18 19:32:10 -05:00
<h3 id="{{.DomainName}}">{{.DomainName}}</h3>
<dl>
<dt>Fetched</dt>
2021-10-18 23:10:09 -05:00
<dd>{{.FetchTime.Format "Jan 2, 2006 15:04:05 -0700" }}</dd>
{{if not .Available}}
2021-10-18 19:32:10 -05:00
<dt>Owner</dt>
<dd><a href="mailto:{{.Registrant.Email}}">{{.Registrant.Name}} &lt;{{.Registrant.Email}}&gt</a></dd>
<dt>Since</dt>
2021-10-18 23:10:09 -05:00
<dd>{{(parseTime .DomainInfo.CreatedDate).Format "Jan 2, 2006" }}</dd>
2021-10-18 19:32:10 -05:00
{{end}}
{{with .Title}}
<dt>Title</dt>
<dd>{{.}}</dd>
{{end}}
{{with .Notes}}
<dt>Notes</dt>
<dd>{{.}}</dd>
{{end}}
2021-10-18 19:32:10 -05:00
</dl>
{{if .ScreenshotURL}}
2021-10-18 22:38:13 -05:00
<a href="http://{{.DomainName}}">
2021-10-18 23:10:09 -05:00
<img src="{{.ScreenshotURL}}" alt="screenshot of {{.DomainName}} as of {{.FetchTime.Format "Jan 2, 2006 15:04:05 -0700" }}">
2021-10-18 22:38:13 -05:00
</a>
2021-10-18 19:32:10 -05:00
{{end}}
{{end}}
2021-10-18 23:01:29 -05:00
{{end}}
2021-10-18 19:32:10 -05:00
</body>
</html>