Compare commits

...

6 Commits

Author SHA1 Message Date
b0f8c29d69 Translate noscript content. 2025-04-17 15:09:52 +02:00
f20d7a200e core: Format and lint. 2025-04-17 02:08:45 +02:00
3eb2c9bcc0 core: Format interface templates. 2025-04-17 02:08:27 +02:00
037ef3a2a0 core: Format email templates. 2025-04-17 02:00:56 +02:00
61bc89959b core: Tidy skeleton. 2025-04-17 02:00:04 +02:00
2797d26b93 core: Add noscript. 2025-04-17 01:58:14 +02:00
19 changed files with 699 additions and 509 deletions

View File

@ -3,15 +3,20 @@
{% load authentik_core %} {% load authentik_core %}
{% block title %} {% block title %}
API Browser - {{ brand.branding_title }} API Browser - {{ brand.branding_title }}
{% endblock %} {% endblock %}
{% block head %} {% block head %}
<script src="{% versioned_script 'dist/standalone/api-browser/index-%v.js' %}" type="module"></script> <meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#151515" media="(prefers-color-scheme: light)"> <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#151515" media="(prefers-color-scheme: dark)">
<script
data-test-id="entrypoint"
src="{% versioned_script 'dist/standalone/api-browser/index-%v.js' %}"
type="module">
</script>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<ak-api-browser schemaPath="{{ path }}"></ak-api-browser> <ak-api-browser schemaPath="{{ path }}"></ak-api-browser>
{% endblock %} {% endblock %}

View File

@ -2,30 +2,35 @@
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
<script> <script>
window.authentik = { window.authentik = {
locale: "{{ LANGUAGE_CODE }}", locale: "{{ LANGUAGE_CODE }}",
config: JSON.parse('{{ config_json|escapejs }}'), config: JSON.parse('{{ config_json|escapejs }}' || '{}'),
brand: JSON.parse('{{ brand_json|escapejs }}'), brand: JSON.parse('{{ brand_json|escapejs }}' || '{}'),
versionFamily: "{{ version_family }}", versionFamily: '{{ version_family }}',
versionSubdomain: "{{ version_subdomain }}", versionSubdomain: '{{ version_subdomain }}',
build: "{{ build }}", build: '{{ build }}',
api: { api: {
base: "{{ base_url }}", base: '{{ base_url }}',
relBase: "{{ base_url_rel }}", relBase: '{{ base_url_rel }}',
}, },
}; };
window.addEventListener("DOMContentLoaded", function () {
{% for message in messages %}
window.dispatchEvent(
new CustomEvent("ak-message", {
bubbles: true,
composed: true,
detail: {
level: "{{ message.tags|escapejs }}",
message: "{{ message.message|escapejs }}",
},
}),
);
{% endfor %}
});
</script> </script>
{% if messages %}
<script>
window.addEventListener("DOMContentLoaded", function () {
{% for message in messages %}
window.dispatchEvent(
new CustomEvent("ak-message", {
bubbles: true,
composed: true,
detail: {
level: "{{ message.tags|escapejs }}",
message: "{{ message.message|escapejs }}",
},
}),
);
{% endfor %}
});
</script>
{% endif %}

View File

@ -2,31 +2,85 @@
{% load i18n %} {% load i18n %}
{% load authentik_core %} {% load authentik_core %}
<!DOCTYPE html> <!doctype html>
<html lang="{{ get_current_language }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<html> {% comment %}
<head> Darkreader breaks the site regardless of theme as its not compatible with webcomponents,
<meta charset="UTF-8"> and we default to a dark theme based on preferred colour-scheme.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> {% endcomment %}
{# Darkreader breaks the site regardless of theme as its not compatible with webcomponents, and we default to a dark theme based on preferred colour-scheme #}
<meta name="darkreader-lock"> <meta name="darkreader-lock">
<title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
<link rel="icon" href="{{ brand.branding_favicon_url }}"> <title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
<link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
{% block head_before %} <link rel="icon" href="{{ brand.branding_favicon_url }}">
{% endblock %} <link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
<link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}">
<style>{{ brand.branding_custom_css }}</style> {% block head_before %}
<script src="{% versioned_script 'dist/poly-%v.js' %}" type="module"></script> {% endblock %}
<script src="{% versioned_script 'dist/standalone/loading/index-%v.js' %}" type="module"></script>
{% block head %} <link rel="stylesheet" type="text/css" href="{% static 'dist/authentik.css' %}">
{% endblock %}
<meta name="sentry-trace" content="{{ sentry_trace }}" /> <style data-test-id="color-scheme">
</head> @media (prefers-color-scheme: dark) {
<body> :root {
{% block body %} color-scheme: dark light;
{% endblock %} }
{% block scripts %} }
{% endblock %}
</body> @media (prefers-color-scheme: light) {
:root {
color-scheme: light dark;
}
}
</style>
<style data-test-id="custom-branding-css">
{{ brand.branding_custom_css }}
</style>
<script
data-test-id="entrypoint-polyfill"
src="{% versioned_script 'dist/poly-%v.js' %}"
type="module">
</script>
<script
data-test-id="entrypoint-loading"
src="{% versioned_script 'dist/standalone/loading/index-%v.js' %}"
type="module">
</script>
{% block head %}
{% endblock %}
<meta name="sentry-trace" content="{{ sentry_trace }}">
</head>
<body>
{% block body %}{% endblock %}
{% block scripts %}{% endblock %}
<noscript>
<style>
body {
font-family: var(--ak-font-family-base), sans-serif;
}
</style>
<h1>
{% blocktrans with brand_title=title|default:brand.branding_title %}
JavaScript is required to use {{ brand_title }}
{% endblocktrans %}
</h1>
<p>
{% trans 'Please enable JavaScript in your browser settings and reload the page. If you are using a browser extension that blocks JavaScript, please disable it for this site.' %}
</p>
</noscript>
</body>
</html> </html>

View File

@ -3,15 +3,22 @@
{% load authentik_core %} {% load authentik_core %}
{% block head %} {% block head %}
<script src="{% versioned_script 'dist/admin/AdminInterface-%v.js' %}" type="module"></script> <meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)"> <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
{% include "base/header_js.html" %} {% include "base/header_js.html" %}
<script
data-test-id="entrypoint"
src="{% versioned_script 'dist/admin/AdminInterface-%v.js' %}"
type="module">
</script>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<ak-message-container></ak-message-container> <ak-message-container></ak-message-container>
<ak-interface-admin>
<ak-interface-admin>
<ak-loading></ak-loading> <ak-loading></ak-loading>
</ak-interface-admin> </ak-interface-admin>
{% endblock %} {% endblock %}

View File

@ -4,18 +4,22 @@
{% load i18n %} {% load i18n %}
{% block title %} {% block title %}
{{ brand.branding_title }} {{ brand.branding_title }}
{% endblock %} {% endblock %}
{% block card_title %} {% block card_title %}
{% trans title %} {% trans title %}
{% endblock %} {% endblock %}
{% block card %} {% block card %}
<form method="POST" class="pf-c-form"> <form method="POST" class="pf-c-form">
<p>{% trans message %}</p> <p>{% trans message %}</p>
<a id="ak-back-home" href="{% url 'authentik_core:root-redirect' %}" class="pf-c-button pf-m-primary">
{% trans 'Go home' %} <a
id="ak-back-home"
href="{% url 'authentik_core:root-redirect' %}"
class="pf-c-button pf-m-primary">
{% trans 'Go home' %}
</a> </a>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -3,15 +3,22 @@
{% load authentik_core %} {% load authentik_core %}
{% block head %} {% block head %}
<script src="{% versioned_script 'dist/user/UserInterface-%v.js' %}" type="module"></script> <meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#1c1e21" media="(prefers-color-scheme: light)"> <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#1c1e21" media="(prefers-color-scheme: dark)">
{% include "base/header_js.html" %} {% include "base/header_js.html" %}
<script
data-test-id="entrypoint"
src="{% versioned_script 'dist/user/UserInterface-%v.js' %}"
type="module">
</script>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<ak-message-container></ak-message-container> <ak-message-container></ak-message-container>
<ak-interface-user>
<ak-interface-user>
<ak-loading></ak-loading> <ak-loading></ak-loading>
</ak-interface-user> </ak-interface-user>
{% endblock %} {% endblock %}

View File

@ -4,79 +4,93 @@
{% load i18n %} {% load i18n %}
{% block head_before %} {% block head_before %}
<link rel="prefetch" href="{{ request.brand.branding_default_flow_background_url }}" /> <link rel="prefetch" href="{{ request.brand.branding_default_flow_background_url }}">
<link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'dist/theme-dark.css' %}" media="(prefers-color-scheme: dark)"> <link rel="stylesheet" type="text/css" href="{% static 'dist/patternfly.min.css' %}">
{% include "base/header_js.html" %} <link
rel="stylesheet"
type="text/css"
href="{% static 'dist/theme-dark.css' %}"
media="(prefers-color-scheme: dark)"
>
{% include "base/header_js.html" %}
{% endblock %} {% endblock %}
{% block head %} {% block head %}
<style> <style data-test-id="base-full-root-styles">
:root { :root {
--ak-flow-background: url("{{ request.brand.branding_default_flow_background_url }}"); --ak-flow-background: url("{{ request.brand.branding_default_flow_background_url }}");
--pf-c-background-image--BackgroundImage: var(--ak-flow-background); --pf-c-background-image--BackgroundImage: var(--ak-flow-background);
--pf-c-background-image--BackgroundImage-2x: var(--ak-flow-background); --pf-c-background-image--BackgroundImage-2x: var(--ak-flow-background);
--pf-c-background-image--BackgroundImage--sm: var(--ak-flow-background); --pf-c-background-image--BackgroundImage--sm: var(--ak-flow-background);
--pf-c-background-image--BackgroundImage--sm-2x: var(--ak-flow-background); --pf-c-background-image--BackgroundImage--sm-2x: var(--ak-flow-background);
--pf-c-background-image--BackgroundImage--lg: var(--ak-flow-background); --pf-c-background-image--BackgroundImage--lg: var(--ak-flow-background);
} }
/* Form with user */
.form-control-static { /* Form with user */
margin-top: var(--pf-global--spacer--sm); .form-control-static {
display: flex; margin-top: var(--pf-global--spacer--sm);
align-items: center; display: flex;
justify-content: space-between; align-items: center;
} justify-content: space-between;
.form-control-static .avatar { }
display: flex;
align-items: center; .form-control-static .avatar {
} display: flex;
.form-control-static img { align-items: center;
margin-right: var(--pf-global--spacer--xs); }
}
.form-control-static a { .form-control-static img {
padding-top: var(--pf-global--spacer--xs); margin-right: var(--pf-global--spacer--xs);
padding-bottom: var(--pf-global--spacer--xs); }
line-height: var(--pf-global--spacer--xl);
} .form-control-static a {
</style> padding-top: var(--pf-global--spacer--xs);
padding-bottom: var(--pf-global--spacer--xs);
line-height: var(--pf-global--spacer--xl);
}
</style>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<div class="pf-c-background-image"> <div class="pf-c-background-image"></div>
</div>
<ak-message-container></ak-message-container> <ak-message-container></ak-message-container>
<div class="pf-c-login stacked">
<div class="pf-c-login stacked">
<div class="ak-login-container"> <div class="ak-login-container">
<main class="pf-c-login__main"> <main class="pf-c-login__main">
<div class="pf-c-login__main-header pf-c-brand ak-brand"> <div class="pf-c-login__main-header pf-c-brand ak-brand">
<img src="{{ brand.branding_logo_url }}" alt="authentik Logo" /> <img src="{{ brand.branding_logo_url }}" alt="authentik Logo">
</div> </div>
<header class="pf-c-login__main-header">
<h1 class="pf-c-title pf-m-3xl"> <header class="pf-c-login__main-header">
{% block card_title %} <h1 class="pf-c-title pf-m-3xl">
{% endblock %} {% block card_title %}
</h1> {% endblock %}
</header> </h1>
<div class="pf-c-login__main-body"> </header>
{% block card %}
{% endblock %} <div class="pf-c-login__main-body">
</div> {% block card %}
</main> {% endblock %}
<footer class="pf-c-login__footer"> </div>
<ul class="pf-c-list pf-m-inline"> </main>
{% for link in footer_links %}
<li> <footer class="pf-c-login__footer">
<a href="{{ link.href }}">{{ link.name }}</a> <ul class="pf-c-list pf-m-inline">
</li> {% for link in footer_links %}
{% endfor %} <li>
<li> <a href="{{ link.href }}">{{ link.name }}</a>
<span> </li>
{% trans 'Powered by authentik' %} {% endfor %}
</span>
</li> <li>
</ul> <span>{% trans 'Powered by authentik' %}</span>
</footer> </li>
</ul>
</footer>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -2,53 +2,63 @@
{% load i18n %} {% load i18n %}
{% load authentik_core %} {% load authentik_core %}
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
<link rel="icon" href="{{ brand.branding_favicon_url }}">
<link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
{% block head_before %}
{% endblock %}
<link rel="stylesheet" type="text/css" href="{% static 'dist/sfe/bootstrap.min.css' %}">
<meta name="sentry-trace" content="{{ sentry_trace }}" />
{% include "base/header_js.html" %}
<style>
html,
body {
height: 100%;
}
body {
background-image: url("{{ flow.background_url }}");
background-repeat: no-repeat;
background-size: cover;
}
.card {
padding: 3rem;
}
.form-signin { <title>{% block title %}{% trans title|default:brand.branding_title %}{% endblock %}</title>
max-width: 330px;
padding: 1rem;
}
.form-signin .form-floating:focus-within { <link rel="icon" href="{{ brand.branding_favicon_url }}">
z-index: 2; <link rel="shortcut icon" href="{{ brand.branding_favicon_url }}">
}
.brand-icon { {% block head_before %}
max-width: 100%; {% endblock %}
}
</style> <link rel="stylesheet" type="text/css" href="{% static 'dist/sfe/bootstrap.min.css' %}">
</head> <meta name="sentry-trace" content="{{ sentry_trace }}">
<body class="d-flex align-items-center py-4 bg-body-tertiary">
<div class="card m-auto"> {% include "base/header_js.html" %}
<main class="form-signin w-100 m-auto" id="flow-sfe-container">
</main> <style>
<span class="mt-3 mb-0 text-muted text-center">{% trans 'Powered by authentik' %}</span> html,
</div> body {
<script src="{% static 'dist/sfe/index.js' %}"></script> height: 100%;
</body> }
body {
background-image: url("{{ flow.background_url }}");
background-repeat: no-repeat;
background-size: cover;
}
.card {
padding: 3rem;
}
.form-signin {
max-width: 330px;
padding: 1rem;
}
.form-signin .form-floating:focus-within {
z-index: 2;
}
.brand-icon {
max-width: 100%;
}
</style>
</head>
<body class="d-flex align-items-center py-4 bg-body-tertiary">
<div class="card m-auto">
<main class="form-signin w-100 m-auto" id="flow-sfe-container"></main>
<span class="mt-3 mb-0 text-muted text-center">{% trans 'Powered by authentik' %}</span>
</div>
<script src="{% static 'dist/sfe/index.js' %}"></script>
</body>
</html> </html>

View File

@ -4,31 +4,45 @@
{% load authentik_core %} {% load authentik_core %}
{% block head_before %} {% block head_before %}
{{ block.super }} {{ block.super }}
<link rel="prefetch" href="{{ flow.background_url }}" />
{% if flow.compatibility_mode and not inspector %} <link rel="prefetch" href="{{ flow.background_url }}">
<script>ShadyDOM = { force: !navigator.webdriver };</script>
{% endif %} {% if flow.compatibility_mode and not inspector %}
{% include "base/header_js.html" %} <script>
<script> window.ShadyDOM = { force: !navigator.webdriver };
window.authentik.flow = { </script>
"layout": "{{ flow.layout }}", {% endif %}
};
</script> {% include "base/header_js.html" %}
<script>
window.authentik.flow = {
layout: "{{ flow.layout }}",
};
</script>
<meta name="ak-flow-layout" content="{{ flow.layout }}">
{% endblock %} {% endblock %}
{% block head %} {% block head %}
<script src="{% versioned_script 'dist/flow/FlowInterface-%v.js' %}" type="module"></script> <script
<style> data-test-id="entrypoint"
:root { src="{% versioned_script 'dist/flow/FlowInterface-%v.js' %}"
--ak-flow-background: url("{{ flow.background_url }}"); type="module">
} </script>
</style>
<style data-test-id="flow-root-styles">
:root {
--ak-flow-background: url("{{ flow.background_url }}");
}
</style>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<ak-message-container></ak-message-container> <ak-message-container></ak-message-container>
<ak-flow-executor flowSlug="{{ flow.slug }}"> <ak-flow-executor flowSlug="{{ flow.slug }}">
<ak-loading></ak-loading> <ak-loading></ak-loading>
</ak-flow-executor> </ak-flow-executor>
{% endblock %} {% endblock %}

View File

@ -5,21 +5,28 @@
{% block head %} {% block head %}
{{ block.super }} {{ block.super }}
<script> <script>
let redirecting = false; let redirecting = false;
const checkAuth = async () => { const checkAuth = async () => {
if (redirecting) return true; if (redirecting) return true;
const url = "{{ check_auth_url }}"; const url = "{{ check_auth_url }}";
console.debug("authentik/policies/buffer: Checking authentication..."); console.debug("authentik/policies/buffer: Checking authentication...");
try { try {
const result = await fetch(url, { const result = await fetch(url, {
method: "HEAD", method: "HEAD",
}); });
if (result.status >= 400) { if (result.status >= 400) {
return false return false
} }
console.debug("authentik/policies/buffer: Continuing"); console.debug("authentik/policies/buffer: Continuing");
redirecting = true; redirecting = true;
if ("{{ auth_req_method }}" === "post") { if ("{{ auth_req_method }}" === "post") {
document.querySelector("form").submit(); document.querySelector("form").submit();
} else { } else {
@ -29,61 +36,75 @@
return false; return false;
} }
}; };
let timeout = 100; let timeout = 100;
let offset = 20; let offset = 20;
let attempt = 0; let attempt = 0;
const main = async () => { const main = async () => {
attempt += 1; attempt += 1;
await checkAuth(); await checkAuth();
console.debug(`authentik/policies/buffer: Waiting ${timeout}ms...`); console.debug(`authentik/policies/buffer: Waiting ${timeout}ms...`);
setTimeout(main, timeout); setTimeout(main, timeout);
timeout += (offset * attempt); timeout += (offset * attempt);
if (timeout >= 2000) { if (timeout >= 2000) {
timeout = 2000; timeout = 2000;
} }
} }
document.addEventListener("visibilitychange", async () => { document.addEventListener("visibilitychange", async () => {
if (document.hidden) return; if (document.hidden) return;
console.debug("authentik/policies/buffer: Checking authentication on tab activate..."); console.debug("authentik/policies/buffer: Checking authentication on tab activate...");
await checkAuth(); await checkAuth();
}); });
main(); main();
</script> </script>
{% endblock %} {% endblock %}
{% block title %} {% block title %}
{% trans 'Waiting for authentication...' %} - {{ brand.branding_title }} {% trans 'Waiting for authentication...' %} - {{ brand.branding_title }}
{% endblock %} {% endblock %}
{% block card_title %} {% block card_title %}
{% trans 'Waiting for authentication...' %} {% trans 'Waiting for authentication...' %}
{% endblock %} {% endblock %}
{% block card %} {% block card %}
<form class="pf-c-form" method="{{ auth_req_method }}" action="{{ continue_url }}"> <form class="pf-c-form" method="{{ auth_req_method }}" action="{{ continue_url }}">
{% if auth_req_method == "post" %} {% if auth_req_method == "post" %}
{% for key, value in auth_req_body.items %} {% for key, value in auth_req_body.items %}
<input type="hidden" name="{{ key }}" value="{{ value }}" /> <input type="hidden" name="{{ key }}" value="{{ value }}">
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="pf-c-empty-state">
<div class="pf-c-empty-state__content"> <div class="pf-c-empty-state">
<div class="pf-c-empty-state__icon"> <div class="pf-c-empty-state__content">
<span class="pf-c-spinner pf-m-xl" role="progressbar"> <div class="pf-c-empty-state__icon">
<span class="pf-c-spinner__clipper"></span> <span class="pf-c-spinner pf-m-xl" role="progressbar">
<span class="pf-c-spinner__lead-ball"></span> <span class="pf-c-spinner__clipper"></span>
<span class="pf-c-spinner__tail-ball"></span> <span class="pf-c-spinner__lead-ball"></span>
</span> <span class="pf-c-spinner__tail-ball"></span>
</span>
</div>
<h1 class="pf-c-title pf-m-lg">
{% trans "You're already authenticating in another tab. This page will refresh once authentication is completed." %}
</h1>
</div> </div>
<h1 class="pf-c-title pf-m-lg">
{% trans "You're already authenticating in another tab. This page will refresh once authentication is completed." %}
</h1>
</div> </div>
</div>
<div class="pf-c-form__group pf-m-action"> <div class="pf-c-form__group pf-m-action">
<a href="{{ auth_req_url }}" class="pf-c-button pf-m-primary pf-m-block"> <a href="{{ auth_req_url }}" class="pf-c-button pf-m-primary pf-m-block">
{% trans "Authenticate in this tab" %} {% trans "Authenticate in this tab" %}
</a> </a>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -13,63 +13,69 @@
{% block card %} {% block card %}
<form class="pf-c-form"> <form class="pf-c-form">
{% csrf_token %} {% csrf_token %}
{% if user.is_authenticated %}
<div class="pf-c-form__group"> {% if user.is_authenticated %}
<div class="form-control-static">
<div class="avatar">
<img class="pf-c-avatar" src="{{ user.avatar }}" alt="{% trans "User's avatar" %}" />
{{ user.username }}
</div>
<div slot="link">
<a href="{{ cancel }}">{% trans "Not you?" %}</a>
</div>
</div>
</div>
{% endif %}
<div class="pf-c-form__group"> <div class="pf-c-form__group">
<p> <div class="form-control-static">
<i class="pf-icon pf-icon-error-circle-o"></i> <div class="avatar">
{% trans 'Request has been denied.' %} <img class="pf-c-avatar" src="{{ user.avatar }}" alt="{% trans "User's avatar" %}">
</p> {{ user.username }}
{% if error %} </div>
<hr> <div slot="link">
<p> <a href="{{ cancel }}">{% trans "Not you?" %}</a>
{{ error }} </div>
</p> </div>
{% endif %}
{% if policy_result %}
<hr>
{% if policy_result.messages %}
<em>{% trans 'Messages:' %}</em>
<ul class="pf-c-list">
{% for message in policy_result.messages %}
<li>
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
{% if policy_result.source_results %}
<em>{% trans 'Explanation:' %}</em>
<ul class="pf-c-list">
{% for source_result in policy_result.source_results %}
<li>
{% blocktrans with name=source_result.source_binding result=source_result.passing %}
Policy binding '{{ name }}' returned result '{{ result }}'
{% endblocktrans %}
{% if source_result.messages %}
<ul class="pf-c-list">
{% for message in source_result.messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div> </div>
{% endif %}
<div class="pf-c-form__group">
<p>
<i class="pf-icon pf-icon-error-circle-o"></i>
{% trans 'Request has been denied.' %}
</p>
{% if error %}
<hr>
<p>{{ error }}</p>
{% endif %}
{% if policy_result %}
<hr>
{% if policy_result.messages %}
<em>{% trans 'Messages:' %}</em>
<ul class="pf-c-list">
{% for message in policy_result.messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% if policy_result.source_results %}
<em>{% trans 'Explanation:' %}</em>
<ul class="pf-c-list">
{% for source_result in policy_result.source_results %}
<li>
{% blocktrans with name=source_result.source_binding result=source_result.passing %}
Policy binding '{{ name }}' returned result '{{ result }}'
{% endblocktrans %}
{% if source_result.messages %}
<ul class="pf-c-list">
{% for message in source_result.messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -3,16 +3,22 @@
{% load authentik_core %} {% load authentik_core %}
{% block head %} {% block head %}
<script src="{% versioned_script 'dist/rac/index-%v.js' %}" type="module"></script> <meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#18191a" media="(prefers-color-scheme: dark)"> <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<link rel="icon" href="{{ tenant.branding_favicon_url }}"> <link rel="icon" href="{{ tenant.branding_favicon_url }}">
<link rel="shortcut icon" href="{{ tenant.branding_favicon_url }}"> <link rel="shortcut icon" href="{{ tenant.branding_favicon_url }}">
{% include "base/header_js.html" %}
{% include "base/header_js.html" %}
<script
src="{% versioned_script 'dist/rac/index-%v.js' %}"
type="module">
</script>
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<ak-rac token="{{ url_kwargs.token }}" endpointName="{{ token.endpoint.name }}"> <ak-rac token="{{ url_kwargs.token }}" endpointName="{{ token.endpoint.name }}">
<ak-loading></ak-loading> <ak-loading></ak-loading>
</ak-rac> </ak-rac>
{% endblock %} {% endblock %}

View File

@ -4,41 +4,43 @@
{% load humanize %} {% load humanize %}
{% block content %} {% block content %}
<tr> <tr>
<td align="center"> <td align="center">
<h1> <h1>
{% blocktrans with username=user.username %} {% blocktrans with username=user.username %}
Hi {{ username }}, Hi {{ username }},
{% endblocktrans %} {% endblocktrans %}
</h1> </h1>
</td> </td>
</tr> </tr>
<tr>
<td align="center"> <tr>
<table border="0"> <td align="center">
<tr> <table border="0">
<td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;"> <tr>
{% blocktrans %} <td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;">
Email MFA code. {% blocktrans %}
{% endblocktrans %} Email MFA code.
</td> {% endblocktrans %}
</tr> </td>
<tr> </tr>
<td align="center" class="btn btn-primary">
{{ token }} <tr>
</td> <td align="center" class="btn btn-primary">
</tr> {{ token }}
</table> </td>
</td> </tr>
</tr> </table>
</td>
</tr>
{% endblock %} {% endblock %}
{% block sub_content %} {% block sub_content %}
<tr> <tr>
<td style="padding: 20px; font-size: 12px; color: #212124;" align="center"> <td style="padding: 20px; font-size: 12px; color: #212124;" align="center">
{% blocktrans with expires=expires|timeuntil %} {% blocktrans with expires=expires|timeuntil %}
If you did not request this code, please ignore this email. The code above is valid for {{ expires }}. If you did not request this code, please ignore this email. The code above is valid for {{ expires }}.
{% endblocktrans %} {% endblocktrans %}
</td> </td>
</tr> </tr>
{% endblock %} {% endblock %}

View File

@ -4,38 +4,47 @@
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
<tr> <tr>
<td align="center"> <td align="center">
<h1> <h1>
{% trans 'Welcome!' %} {% trans 'Welcome!' %}
</h1> </h1>
</td> </td>
</tr> </tr>
<tr>
<td align="center"> <tr>
<table border="0"> <td align="center">
<tr> <table border="0">
<td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;"> <tr>
{% trans "We're excited to have you get started. First, you need to confirm your account. Just press the button below."%} <td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;">
</td> {% trans "We're excited to have you get started. First, you need to confirm your account. Just press the button below."%}
</tr> </td>
<tr> </tr>
<td align="center" class="btn btn-primary">
<a id="confirm" href="{{ url }}" rel="noopener noreferrer" target="_blank">{% trans 'Confirm Account' %}</a> <tr>
</td> <td align="center" class="btn btn-primary">
</tr> <a
</table> id="confirm"
</td> href="{{ url }}"
</tr> rel="noopener noreferrer"
<td> target="_blank">
{% trans 'Confirm Account' %}
</a>
</td>
</tr>
</table>
</td>
</tr>
<td>
{% endblock %} {% endblock %}
{% block sub_content %} {% block sub_content %}
<tr> <tr>
<td style="padding: 20px; font-size: 12px; color: #212124;word-break: break-all; overflow-wrap: break-word;" align="center"> <td style="padding: 20px; font-size: 12px; color: #212124;word-break: break-all; overflow-wrap: break-word;" align="center">
{% blocktrans with url=url %} {% blocktrans with url=url %}
If that doesn't work, copy and paste the following link in your browser: {{ url }} If that doesn't work, copy and paste the following link in your browser: {{ url }}
{% endblocktrans %} {% endblocktrans %}
</td> </td>
</tr> </tr>
{% endblock %} {% endblock %}

View File

@ -1,5 +1,6 @@
{% load authentik_stages_email %} {% load authentik_stages_email %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtm=l"> <html xmlns="http://www.w3.org/1999/xhtm=l">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@ -99,11 +100,13 @@
<img src="{% block logo_url %}cid:logo.png{% endblock %}" border="0=" alt="authentik logo" class="flexibleImage logo"> <img src="{% block logo_url %}cid:logo.png{% endblock %}" border="0=" alt="authentik logo" class="flexibleImage logo">
</td> </td>
</tr> </tr>
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</table> </table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<table border="0" style="margin-top: 10px;" width="100%"> <table border="0" style="margin-top: 10px;" width="100%">
@ -118,6 +121,7 @@
</table> </table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
Powered by <a rel="noopener noreferrer" target="_blank" href="https://goauthentik.io?utm_source=authentik&utm_medium=email">authentik</a>. Powered by <a rel="noopener noreferrer" target="_blank" href="https://goauthentik.io?utm_source=authentik&utm_medium=email">authentik</a>.

View File

@ -3,50 +3,52 @@
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
<tr> <tr>
<td align="center"> <td align="center">
<h1> <h1>
{{ title }} {{ title }}
</h1> </h1>
</td> </td>
</tr> </tr>
<tr>
<td align="center"> <tr>
<table border="0"> <td align="center">
<tr> <table border="0">
<td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;"> <tr>
{{ body }} <td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;">
</td> {{ body }}
</tr> </td>
{% if key_value %} </tr>
<tr>
<td> {% if key_value %}
<table class="properties-table" width="100%"> <tr>
<tbody> <td>
{% for key, value in key_value.items %} <table class="properties-table" width="100%">
<tr> <tbody>
<td class="td-right">{{ key }}</td> {% for key, value in key_value.items %}
<td class="td-left">{{ value }}</td> <tr>
</tr> <td class="td-right">{{ key }}</td>
{% endfor %} <td class="td-left">{{ value }}</td>
</tbody> </tr>
</table> {% endfor %}
</td> </tbody>
</tr> </table>
{% endif %} </td>
</table> </tr>
</td> {% endif %}
</tr> </table>
</td>
</tr>
{% endblock %} {% endblock %}
{% block sub_content %} {% block sub_content %}
{% if source %} {% if source %}
<tr> <tr>
<td style="padding: 20px; font-size: 12px; color: #212124;" align="center"> <td style="padding: 20px; font-size: 12px; color: #212124;" align="center">
{% blocktranslate with name=source.from %} {% blocktranslate with name=source.from %}
This email was sent from the notification transport <code>{{ name }}</code>. This email was sent from the notification transport <code>{{ name }}</code>.
{% endblocktranslate %} {% endblocktranslate %}
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -4,41 +4,49 @@
{% load humanize %} {% load humanize %}
{% block content %} {% block content %}
<tr> <tr>
<td align="center"> <td align="center">
<h1> <h1>
{% blocktrans with username=user.username %} {% blocktrans with username=user.username %}
Hi {{ username }}, Hi {{ username }},
{% endblocktrans %} {% endblocktrans %}
</h1> </h1>
</td> </td>
</tr> </tr>
<tr>
<td align="center"> <tr>
<table border="0"> <td align="center">
<tr> <table border="0">
<td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;"> <tr>
{% blocktrans %} <td align="center" style="max-width: 300px; padding: 20px 0; color: #212124;">
You recently requested to change your password for your authentik account. Use the button below to set a new password. {% blocktrans %}
{% endblocktrans %} You recently requested to change your password for your authentik account. Use the button below to set a new password.
</td> {% endblocktrans %}
</tr> </td>
<tr> </tr>
<td align="center" class="btn btn-primary">
<a id="confirm" href="{{ url }}" rel="noopener noreferrer" target="_blank">{% trans 'Reset Password' %}</a> <tr>
</td> <td align="center" class="btn btn-primary">
</tr> <a
</table> id="confirm"
</td> href="{{ url }}"
</tr> rel="noopener noreferrer"
target="_blank">
{% trans 'Reset Password' %}
</a>
</td>
</tr>
</table>
</td>
</tr>
{% endblock %} {% endblock %}
{% block sub_content %} {% block sub_content %}
<tr> <tr>
<td style="padding: 20px; font-size: 12px; color: #212124;" align="center"> <td style="padding: 20px; font-size: 12px; color: #212124;" align="center">
{% blocktrans with expires=expires|naturaltime %} {% blocktrans with expires=expires|naturaltime %}
If you did not request a password change, please ignore this email. The link above is valid for {{ expires }}. If you did not request a password change, please ignore this email. The link above is valid for {{ expires }}.
{% endblocktrans %} {% endblocktrans %}
</td> </td>
</tr> </tr>
{% endblock %} {% endblock %}

View File

@ -4,22 +4,23 @@
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
<tr> <tr>
<td class="alert alert-brand"> <td class="alert alert-brand">
{% trans 'authentik Test-Email' %} {% trans 'authentik Test-Email' %}
</td> </td>
</tr> </tr>
<tr>
<tr>
<td class="content-wrap"> <td class="content-wrap">
<table width="100%" cellpadding="0" cellspacing="0"> <table width="100%" cellpadding="0" cellspacing="0">
<tr> <tr>
<td class="content-block"> <td class="content-block">
{% blocktrans %} {% blocktrans %}
This is a test email to inform you, that you've successfully configured authentik emails. This is a test email to inform you, that you've successfully configured authentik emails.
{% endblocktrans %} {% endblocktrans %}
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
{% endblock %} {% endblock %}

View File

@ -1,59 +1,70 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{{.Title}}</title>
<link rel="shortcut icon" type="image/png" href="/outpost.goauthentik.io/static/dist/assets/icons/icon.png"> <title>{{.Title}}</title>
<link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/patternfly.min.css">
<link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/authentik.css"> <link rel="shortcut icon" type="image/png" href="/outpost.goauthentik.io/static/dist/assets/icons/icon.png">
<link rel="prefetch" href="/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg" />
<style> <link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/patternfly.min.css">
.pf-c-background-image::before { <link rel="stylesheet" type="text/css" href="/outpost.goauthentik.io/static/dist/authentik.css">
--ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
} <link rel="prefetch" href="/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg">
:root {
--ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg"); <style>
--pf-c-background-image--BackgroundImage: var(--ak-flow-background); .pf-c-background-image::before {
--pf-c-background-image--BackgroundImage-2x: var(--ak-flow-background); --ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
--pf-c-background-image--BackgroundImage--sm: var(--ak-flow-background); }
--pf-c-background-image--BackgroundImage--sm-2x: var(--ak-flow-background);
--pf-c-background-image--BackgroundImage--lg: var(--ak-flow-background); :root {
} --ak-flow-background: url("/outpost.goauthentik.io/static/dist/assets/images/flow_background.jpg");
</style> --pf-c-background-image--BackgroundImage: var(--ak-flow-background);
</head> --pf-c-background-image--BackgroundImage-2x: var(--ak-flow-background);
<body> --pf-c-background-image--BackgroundImage--sm: var(--ak-flow-background);
<div class="pf-c-background-image"> --pf-c-background-image--BackgroundImage--sm-2x: var(--ak-flow-background);
--pf-c-background-image--BackgroundImage--lg: var(--ak-flow-background);
}
</style>
</head>
<body>
<div class="pf-c-background-image"></div>
<div class="pf-c-login stacked">
<div class="ak-login-container">
<main class="pf-c-login__main">
<div class="pf-c-login__main-header pf-c-brand ak-brand">
<img src="/outpost.goauthentik.io/static/dist/assets/icons/icon_left_brand.svg" alt="authentik Logo">
</div> </div>
<div class="pf-c-login stacked">
<div class="ak-login-container"> <header class="pf-c-login__main-header">
<main class="pf-c-login__main"> <h1 class="pf-c-title pf-m-3xl">
<div class="pf-c-login__main-header pf-c-brand ak-brand"> {{ .Title }}
<img src="/outpost.goauthentik.io/static/dist/assets/icons/icon_left_brand.svg" alt="authentik Logo" /> </h1>
</div> </header>
<header class="pf-c-login__main-header">
<h1 class="pf-c-title pf-m-3xl"> <div class="pf-c-login__main-body">
{{ .Title }} {{ .Message }}
</h1>
</header>
<div class="pf-c-login__main-body">
{{ .Message }}
</div>
<div class="pf-c-login__main-body">
<a href="/" class="pf-c-button pf-m-primary pf-m-block">Go to home</a>
</div>
</main>
<footer class="pf-c-login__footer">
<ul class="pf-c-list pf-m-inline">
<li>
<span>
Powered by authentik
</span>
</li>
</ul>
</footer>
</div>
</div> </div>
</body>
<div class="pf-c-login__main-body">
<a href="/" class="pf-c-button pf-m-primary pf-m-block">Go to home</a>
</div>
</main>
<footer class="pf-c-login__footer">
<ul class="pf-c-list pf-m-inline">
<li>
<span>
Powered by authentik
</span>
</li>
</ul>
</footer>
</div>
</div>
</body>
</html> </html>