79 lines
3.5 KiB
Go HTML Template
79 lines
3.5 KiB
Go HTML Template
|
{{ template "head.tmpl" . }}
|
||
|
<body class="h-screen bg-white dark:bg-gray-900">
|
||
|
{{ template "navbar.tmpl" . }}
|
||
|
<main class="grow">
|
||
|
<div class="container mx-auto place-items-center px-8 md:px-12 lg:px-14">
|
||
|
<div class="flex justify-between place-items-center">
|
||
|
<h1 class="text-xl font-bold text-fuchsia-600 dark:text-fuchsia-400 capitalize py-2">
|
||
|
Breach search
|
||
|
</h1>
|
||
|
</div>
|
||
|
<div class="flex justify-between place-items-center">
|
||
|
<span class="text-sm text-gray-500 dark:text-gray-300 hover:cursor-help">
|
||
|
<span class="text-lg text-pink-500 dark:text-pink-300">
|
||
|
🛈
|
||
|
</span>
|
||
|
Breach data on this page is sourced from
|
||
|
<a href="https://haveibeenpwned.com" target="_blank" rel="noopener"
|
||
|
class="w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 mx-0 hover:underline dark:text-blue-400">
|
||
|
Have I Been Pwned?</a>
|
||
|
and is
|
||
|
<a href="https://haveibeenpwned.com/API/v3#License" target="_blank" rel="noopener"
|
||
|
class="w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 mx-0 hover:underline dark:text-blue-400">
|
||
|
available</a>
|
||
|
under
|
||
|
<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noopener"
|
||
|
class="w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 mx-0 hover:underline dark:text-blue-400">
|
||
|
CC-BY-4.0
|
||
|
</a>
|
||
|
</span>
|
||
|
</div>
|
||
|
{{- if and .Data .Data.flash -}}
|
||
|
<div class="place-items-center">
|
||
|
<h1 class="text-2xl text-pink-600 dark:text-pink-500 py-2">
|
||
|
{{ .Data.flash -}}
|
||
|
</h1>
|
||
|
</div>
|
||
|
{{- end}}
|
||
|
<div class="mt-6 md:flex md:items-center md:place-items-center md:justify-between">
|
||
|
<form method="POST" class="w-full md:w-5xl" action="/user/hibp-search">
|
||
|
<input type="hidden" name="csrf" value="{{- .CSRF -}}">
|
||
|
<div class="relative mb-2 flex w-full flex-wrap items-stretch">
|
||
|
<input
|
||
|
name="search"
|
||
|
type="search"
|
||
|
placeholder="Search by entering an email address"
|
||
|
aria-label="Search the Have I Been Pwned? API by entering an email address"
|
||
|
required
|
||
|
class="relative m-0 px-3 py-1 block w-[2px] min-w-0 flex-auto rounded border border-solid border-gray-300 bg-transparent bg-clip-padding text-base text-gray-700 outline-none transition duration-100 ease-in-out focus:z-[3] focus:border-gray-300 focus:text-gray-700 dark:focus:text-gray-200 focus:shadow-sm focus:outline-none dark:border-gray-600 dark:text-gray-200 dark:placeholder:text-gray-300 dark:focus:border-gray-300"/>
|
||
|
</div>
|
||
|
<button
|
||
|
class="w-full my-0 text-sm font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-500 rounded-md md:w-1/4 hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-50"
|
||
|
type="submit">Submit
|
||
|
</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
{{ if and .Data .Data.breachNames }}
|
||
|
<div class="mt-6 md:flex md:items-center md:place-items-center md:justify-between">
|
||
|
<div class="block">
|
||
|
<span class="text-sm text-gray-500 dark:text-gray-300">
|
||
|
The account was found in all of the following breaches:
|
||
|
</span>
|
||
|
<ul class="list-none list-outside">
|
||
|
{{ $bn := index .Data.breachNames }}
|
||
|
{{ range $_, $b := $bn }}
|
||
|
<li>
|
||
|
<a href="/user/hibp-breach-details/{{$b.Name}}" target="_blank" rel="noopener"
|
||
|
class="text-xl w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 md:mx-6 lg:mx-4 hover:underline dark:text-blue-400">
|
||
|
{{$b.Name}}
|
||
|
</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
</ul>
|
||
|
{{end}}
|
||
|
</div>
|
||
|
</div>
|
||
|
</main>
|
||
|
{{ template "footer.tmpl" . }}
|