feat(ui): Wortmarke neXus mit orangem X (#1065)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -247,7 +247,7 @@ pub(crate) fn refused(status: StatusCode, message: &str) -> Response {
|
||||
status,
|
||||
format!(
|
||||
"{head}<body><main class=\"anmeldung\"><section class=\"card\">\
|
||||
<div class=\"logo gross\">{LOGO}<span>Nexus</span></div>\
|
||||
<div class=\"logo gross\">{LOGO}<span class=\"wordmark\">{WORTMARKE}</span></div>\
|
||||
<p class=\"fehler\" role=\"alert\">{msg}</p><p><a href=\"/ui\">Zur Übersicht</a></p>\
|
||||
</section></main></body></html>",
|
||||
head = head("Abgelehnt"),
|
||||
@ -394,6 +394,9 @@ pub(crate) fn mb(v: Option<u64>) -> String {
|
||||
}
|
||||
|
||||
/// Zeichen von Nexus: Knoten in der Mitte, vier Engines außen.
|
||||
/// Wortmarke „neXus“: Das X steht in der Akzentfarbe, der Text bleibt „neXus“ (→ #1065).
|
||||
const WORTMARKE: &str = "ne<span class=\"wordmark-accent\">X</span>us";
|
||||
|
||||
const LOGO: &str = "<svg class=\"zeichen\" viewBox=\"0 0 1024 1024\" width=\"28\" height=\"28\" aria-hidden=\"true\">\
|
||||
<rect x=\"32\" y=\"32\" width=\"960\" height=\"960\" rx=\"224\" fill=\"var(--accent)\"/>\
|
||||
<g stroke=\"var(--accent-text)\" stroke-width=\"56\" stroke-linecap=\"round\">\
|
||||
@ -407,7 +410,7 @@ fn head(title: &str) -> String {
|
||||
format!(
|
||||
"<!doctype html><html lang=\"de\"><head><meta charset=\"utf-8\">\
|
||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\
|
||||
<title>{} · Nexus</title><link rel=\"icon\" type=\"image/svg+xml\" href=\"/ui/favicon.svg\">\
|
||||
<title>{} · neXus</title><link rel=\"icon\" type=\"image/svg+xml\" href=\"/ui/favicon.svg\">\
|
||||
<link rel=\"stylesheet\" href=\"/ui/app.css\"></head>",
|
||||
esc(title)
|
||||
)
|
||||
@ -453,11 +456,11 @@ pub(crate) fn layout(title: &str, active: &str, viewer: &Viewer, body: &str) ->
|
||||
};
|
||||
format!(
|
||||
"{head}<body data-csrf=\"{csrf}\"><header><div class=\"innen\">\
|
||||
<a class=\"logo\" href=\"/ui\">{LOGO}<span>Nexus</span></a><nav>{nav}</nav>\
|
||||
<a class=\"logo\" href=\"/ui\">{LOGO}<span class=\"wordmark\">{WORTMARKE}</span></a><nav>{nav}</nav>\
|
||||
<form method=\"post\" action=\"/ui/logout\"><a class=\"chip konto\" href=\"/ui/konto\" title=\"Mein Konto\">{key}</a>{role}\
|
||||
<button class=\"sm\" type=\"submit\">Abmelden</button></form></div></header>\
|
||||
<main><h1>{title}</h1>{body}</main>\
|
||||
<footer>Nexus {version} · {mode} · Zeiten in UTC</footer>\
|
||||
<footer>{WORTMARKE} {version} · {mode} · Zeiten in UTC</footer>\
|
||||
<script src=\"/ui/app.js\"></script></body></html>",
|
||||
head = head(title),
|
||||
title = esc(title),
|
||||
@ -566,7 +569,7 @@ fn login_page(message: Option<&str>) -> String {
|
||||
.unwrap_or_default();
|
||||
format!(
|
||||
"{head}<body><main class=\"anmeldung\"><section class=\"card\">\
|
||||
<div class=\"logo gross\">{LOGO}<span>Nexus</span></div>\
|
||||
<div class=\"logo gross\">{LOGO}<span class=\"wordmark\">{WORTMARKE}</span></div>\
|
||||
<p class=\"muted\">Anmelden mit Benutzername und Passwort.</p>{note}\
|
||||
<form method=\"post\" action=\"/ui/login\">\
|
||||
<label for=\"name\">Benutzername</label>\
|
||||
@ -1018,6 +1021,7 @@ a{color:var(--accent)}
|
||||
header{background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:5}
|
||||
header .innen{max-width:76rem;margin:0 auto;padding:.7rem 1rem;display:flex;flex-wrap:wrap;align-items:center;gap:.7rem 1.2rem}
|
||||
.logo{display:inline-flex;align-items:center;gap:.55rem;font-weight:700;font-size:1.1rem;letter-spacing:-.01em;color:var(--text);text-decoration:none}
|
||||
.wordmark{color:var(--text);font-weight:700}.wordmark-accent{color:var(--accent)}
|
||||
.logo.gross{font-size:1.5rem;margin-bottom:.8rem}.logo.gross .zeichen{width:40px;height:40px}
|
||||
header nav{display:flex;flex-wrap:wrap;gap:.3rem;background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:.25rem}
|
||||
header nav a{border-radius:999px;padding:.35rem .65rem;color:var(--muted);text-decoration:none}
|
||||
|
||||
@ -16,8 +16,8 @@ use nexus_core::{check_password_rules, hash_password, verify_password};
|
||||
use nexus_store::UserRole;
|
||||
|
||||
use super::{
|
||||
LOGO, Viewer, audit, csrf_field, esc, form_field, guard, head, html, layout, new_session,
|
||||
notice, redirect, refused, same_origin, session_redirect, session_user, viewer,
|
||||
LOGO, Viewer, WORTMARKE, audit, csrf_field, esc, form_field, guard, head, html, layout,
|
||||
new_session, notice, redirect, refused, same_origin, session_redirect, session_user, viewer,
|
||||
};
|
||||
use crate::state::AppState;
|
||||
|
||||
@ -53,7 +53,7 @@ fn setup_html(csrf: &str, message: Option<&str>) -> String {
|
||||
.unwrap_or_default();
|
||||
format!(
|
||||
"{head}<body><main class=\"anmeldung\"><section class=\"card\">\
|
||||
<div class=\"logo gross\">{LOGO}<span>Nexus</span></div>\
|
||||
<div class=\"logo gross\">{LOGO}<span class=\"wordmark\">{WORTMARKE}</span></div>\
|
||||
<h2>Erste Einrichtung</h2>\
|
||||
<p class=\"muted\">Du bist mit dem Standard-Admin angemeldet. Lege jetzt deinen eigenen Admin-Benutzer an. \
|
||||
Danach wird der Standard-Admin gelöscht, und du meldest dich nur noch mit deinem Benutzer an.</p>{note}\
|
||||
|
||||
@ -1071,6 +1071,11 @@ async fn oberflaeche_ohne_sitzung_leitet_zur_anmeldung_und_teile_geben_401() {
|
||||
assert_eq!(headers["location"], "/ui");
|
||||
let (status, headers, body) = ui_get(&gw, "/ui/login", None).await;
|
||||
assert_eq!(status, 200);
|
||||
assert!(
|
||||
body.contains("ne<span class=\"wordmark-accent\">X</span>us")
|
||||
&& body.contains("· neXus</title>"),
|
||||
"Wortmarke neXus fehlt (#1065)"
|
||||
);
|
||||
let csp = headers["content-security-policy"].to_str().unwrap();
|
||||
assert_eq!(
|
||||
headers["referrer-policy"], "same-origin",
|
||||
|
||||
Reference in New Issue
Block a user