fix: set authentik nodedc favicon

This commit is contained in:
Codex 2026-05-23 10:31:55 +03:00
parent 197a184587
commit 3d205cd2b9
1 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,26 @@
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<script data-id="nodedc-auth-favicon">
"use strict";
(function () {
const faviconHref = "data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cstyle%3E%0A%20%20%20%20.icon-fav-01%20%7B%20fill%3A%20%23333334%3B%20%7D%0A%20%20%20%20%40media%20(prefers-color-scheme%3A%20dark)%20%7B%20.icon-fav-01%20%7B%20fill%3A%20%23FEFEFE%3B%20%7D%20%7D%0A%20%20%20%20%40media%20(prefers-color-scheme%3A%20light)%20%7B%20.icon-fav-01%20%7B%20fill%3A%20%23000000%3B%20%7D%20%7D%0A%20%20%3C%2Fstyle%3E%0A%20%20%3Cpath%20class%3D%22icon-fav-01%22%20d%3D%22M17.8738%2015.9159L16.0002%2018.9718L14.1267%2015.9159H17.8738ZM23.6307%2012.7864H8.36914L15.9999%2025.2308L23.6307%2012.7864Z%22%2F%3E%0A%20%20%3Cpath%20class%3D%22icon-fav-01%22%20d%3D%22M10.9793%2019.4872L6.67269%2011.5918H25.5344L21.2281%2019.4872H25.0581L31.2614%208H0.738281L7.16244%2019.4872H10.9793Z%22%2F%3E%0A%3C%2Fsvg%3E";
const applyFavicon = () => {
if (!document.head) return;
document.querySelectorAll('link[rel~="icon"]').forEach((node) => node.remove());
const link = document.createElement("link");
link.rel = "icon";
link.type = "image/svg+xml";
link.sizes = "any";
link.href = faviconHref;
document.head.appendChild(link);
};
applyFavicon();
window.addEventListener("DOMContentLoaded", applyFavicon, { once: true });
})();
</script>
<style data-id="nodedc-auth-critical-loader">
:root {
--ak-global--primary: rgb(195, 255, 102) !important;