surtur
6b45213649
All checks were successful
continuous-integration/drone/push Build is passing
* add user onboarding workflow * fix user editing (no edits of passwords of regular users after onboarding) * refresh HIBP breach cache in DB on app start-up * display HIBP breach details * fix request scheduling to prevent panics (this still needs some love..) * fix middleware auth * add TODOs * update head.tmpl * reword some error messages
159 lines
7.9 KiB
Go HTML Template
159 lines
7.9 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 details
|
|
</h1>
|
|
<a href="/user/hibp-search" class="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">
|
|
⏎ Breach search
|
|
</a>
|
|
</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.hibp -}}
|
|
<div class="p-2 mt-3 lg:mx-auto border-2 dark:border-slate-500 rounded-sm space-y-0">
|
|
<div class="flex max-h-14 place-items-baseline justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Name:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2 overflow-x-auto text-ellipsis select-all">
|
|
{{- .Data.hibp.Name -}}
|
|
</span>
|
|
</div><!-- name -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Title:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- .Data.hibp.Title -}}
|
|
</span>
|
|
</div><!-- title -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Domain:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- .Data.hibp.Domain -}}
|
|
</span>
|
|
</div><!-- domain -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Breach date:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- .Data.hibp.BreachDate -}}
|
|
</span>
|
|
</div><!-- breachDate -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Added date:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- .Data.hibp.AddedDate -}}
|
|
</span>
|
|
</div><!-- addedDate -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Modified date:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- .Data.hibp.ModifiedDate -}}
|
|
</span>
|
|
</div><!-- modifiedDate -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Pwn count:</span>
|
|
<span class="text-md text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- .Data.hibp.PwnCount -}}
|
|
</span>
|
|
</div><!-- pwnCount -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Description:</span>
|
|
<span class="text-md italic text-fuchsia-500 dark:text-fuchsia-400 px-2">
|
|
{{- htmlRaw (htmlLinkStyle .Data.hibp.Description) -}}
|
|
</span>
|
|
</div><!-- description -->
|
|
<div class="flex place-items-center justify-left lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Affects:</span>
|
|
<div class="justify-center">
|
|
{{ $dcs := index .Data.hibp.Dataclasses }}
|
|
{{ range $_, $dc := $dcs }}
|
|
<span class="text-sm italic text-pink-500 dark:text-pink-400 px-2">
|
|
{{- $dc -}}
|
|
</span>
|
|
{{end}}
|
|
</div>
|
|
</div><!-- dataClasses -->
|
|
<div class="flex place-items-center justify-left mt-2 lg:justify-between overflow-x-auto text-ellipsis hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
<div class="justify-center">
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Verified:
|
|
{{- if .Data.hibp.IsVerified -}}
|
|
<span class="w-24 md:w-32 px-2 text-blue-500 dark:text-blue-300">true</span>
|
|
{{- else -}}
|
|
<span class="w-16 md:w-16 px-2 text-pink-500 dark:text-pink-300">✗</span>
|
|
{{- end -}}
|
|
</span>
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Fabricated:
|
|
{{- if .Data.hibp.IsFabricated -}}
|
|
<span class="w-24 md:w-32 px-2 text-pink-500 dark:text-pink-300">true</span>
|
|
{{- else -}}
|
|
<span class="w-16 md:w-16 px-2 text-blue-500 dark:text-blue-300">✗</span>
|
|
{{- end -}}
|
|
</span>
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Sensitive:
|
|
{{- if .Data.hibp.IsSensitive -}}
|
|
<span class="w-24 md:w-32 px-2 text-pink-500 dark:text-pink-300">true</span>
|
|
{{- else -}}
|
|
<span class="w-16 md:w-16 px-2 text-blue-500 dark:text-blue-300">✗</span>
|
|
{{- end -}}
|
|
</span>
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Retired:
|
|
{{- if .Data.hibp.IsRetired -}}
|
|
<span class="w-24 md:w-32 px-2 text-pink-500 dark:text-pink-300">true</span>
|
|
{{- else -}}
|
|
<span class="w-16 md:w-16 px-2 text-blue-500 dark:text-blue-300">✗</span>
|
|
{{- end -}}
|
|
</span>
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Spam list:
|
|
{{- if .Data.hibp.IsSpamList -}}
|
|
<span class="w-24 md:w-32 px-2 text-pink-500 dark:text-pink-300">true</span>
|
|
{{- else -}}
|
|
<span class="w-16 md:w-16 px-2 text-blue-500 dark:text-blue-300">✗</span>
|
|
{{- end -}}
|
|
</span>
|
|
<span class="w-24 md:w-32 px-2 text-purple-500 dark:text-purple-300">Malware:
|
|
{{- if .Data.hibp.IsMalware -}}
|
|
<span class="w-24 md:w-32 px-2 text-pink-500 dark:text-pink-300">true</span>
|
|
{{- else -}}
|
|
<span class="w-16 md:w-16 px-2 text-blue-500 dark:text-blue-300">✗</span>
|
|
{{- end -}}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{- else -}}
|
|
<div class="flex justify-between place-items-center">
|
|
<h1 class="text-2xl text-pink-600 dark:text-pink-500 py-2">
|
|
No data in the system for this breach
|
|
</h1>
|
|
</div>
|
|
{{- end -}}
|
|
{{- 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>
|
|
</main>
|
|
{{ template "footer.tmpl" . }}
|