2023-04-13 00:07:08 +02:00
|
|
|
{{ template "head.tmpl" . }}
|
|
|
|
<body class="h-screen bg-white dark:bg-gray-900">
|
|
|
|
{{ template "navbar.tmpl" . }}
|
|
|
|
<main class="grow">
|
2023-08-03 14:55:41 +02:00
|
|
|
<div class="px-2 md:px-0 place-items-center text-center">
|
2023-08-24 18:43:24 +02:00
|
|
|
{{ if and .Data .Data.flash }}
|
2023-09-04 19:21:01 +02:00
|
|
|
<h1 class="mt-8 text-xl text-pink-600 dark:text-pink-500 py-2">
|
2023-08-24 18:43:24 +02:00
|
|
|
{{ .Data.flash }}
|
|
|
|
</h1>
|
|
|
|
{{- end }}
|
2023-09-04 19:21:01 +02:00
|
|
|
{{ if and .Data .Data.info }}
|
|
|
|
<h2 class="mt-4 text-xl font-bold text-green-600 dark:text-green-500 py-2">
|
|
|
|
{{ .Data.info }}
|
|
|
|
</h2>
|
|
|
|
{{- end }}
|
2023-08-03 14:55:41 +02:00
|
|
|
{{ if .Name -}}
|
2023-09-04 19:21:01 +02:00
|
|
|
<h1 class="mt-14 text-2xl text-pink-400 font-bold">
|
|
|
|
Welcome to
|
|
|
|
<code class="p-1 rounded-sm border-l-2 border-fuchsia-200">
|
|
|
|
{{ .AppName }}</code>,
|
|
|
|
<code class="p-1 rounded-sm bg-fuchsia-200">
|
|
|
|
{{.Name}}</code>!
|
2023-08-03 14:55:41 +02:00
|
|
|
</h1>
|
2023-09-04 16:17:14 +02:00
|
|
|
{{if .User}}
|
|
|
|
{{if .User.IsAdmin}}
|
|
|
|
<div class="px-10 mx-16 md:mx-32">
|
|
|
|
<p class="mt-4 px-12 text-sm text-gray-500 dark:text-gray-400">
|
|
|
|
<span class="font-mono text-md">🛈</span> To query
|
|
|
|
the breach APIs, you need to create a <b>user-level</b>
|
|
|
|
account. To use it, log into it in another browser
|
|
|
|
(<em>not</em> just another browser window, as normally that
|
|
|
|
would share the session details of this user). User and
|
|
|
|
administrator-level accounts each have distinct
|
|
|
|
capabilities. Similarly to how it is only possible to
|
|
|
|
manage users using the administrator-level account,
|
|
|
|
browsing breach data is only allowed for user-level
|
|
|
|
accounts
|
|
|
|
<a href="https://git.dotya.ml/mirre-mt/masters-thesis/" rel="noopener"
|
|
|
|
target="_blank"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">
|
|
|
|
🛈 learn more about this project</a>.
|
|
|
|
</p>
|
|
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
|
|
<span class="font-mono text-md">🛈</span> Add a new user
|
|
|
|
<a href="/manage/users/new"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">
|
|
|
|
from here</a>, or
|
|
|
|
<a href="/manage/users"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">
|
|
|
|
view a listing of all existing users</a>.
|
|
|
|
</p>
|
|
|
|
<p class="mt-4 text-sm text-gray-500 dark:text-gray-400">
|
|
|
|
<span class="font-mono text-md">🛈</span> You can also view the configured API keys
|
|
|
|
<a href="/manage/api-keys"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">
|
|
|
|
here</a>.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="px-10 mx-16 md:px-32">
|
|
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
|
|
<span class="font-mono text-md">🛈</span>
|
|
|
|
Check whether your email account is a part of a breach
|
|
|
|
<a href="/user/hibp-search"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">
|
|
|
|
here</a>.
|
|
|
|
</p>
|
|
|
|
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
|
|
<span class="font-mono text-md">🛈</span>
|
|
|
|
Alternatively,
|
|
|
|
<a href="https://git.dotya.ml/mirre-mt/masters-thesis/"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">
|
|
|
|
learn more</a> about this project.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2023-08-03 14:55:41 +02:00
|
|
|
<div class="mt-8 md:flex md:items-center md:place-items-center md:justify-between">
|
|
|
|
<form method="POST" class="w-full md:w-5xl" action="/logout">
|
|
|
|
<input type="hidden" name="csrf" value="{{- .CSRF -}}">
|
|
|
|
<button
|
2023-09-04 16:17:54 +02:00
|
|
|
class="w-full py-3 text-sm font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-500 rounded-lg md:w-1/4 hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-50"
|
2023-08-03 14:55:41 +02:00
|
|
|
type="submit">Logout</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{- else }}
|
2023-04-13 00:07:08 +02:00
|
|
|
<h1 class="mt-20 text-2xl text-pink-400 font-bold">
|
|
|
|
Please log in.
|
|
|
|
</h1>
|
2023-08-03 14:55:41 +02:00
|
|
|
{{- end -}}
|
2023-04-13 00:07:08 +02:00
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
{{ template "footer.tmpl" . }}
|