Post-login lands on Spaces empty state instead of a principal dump. Profile menu exposes Session details with identity, tenant, roles/groups, and authz diagnostics for operator refinement (CSOC-WP-0004 T01/T07).
178 lines
5.3 KiB
HTML
178 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}{{ site_name }}{% endblock %}</title>
|
|
<style>
|
|
:root {
|
|
--color-primary: #d08728;
|
|
--color-bg: #ffffff;
|
|
--color-text: #171717;
|
|
--color-muted: #616161;
|
|
--radius: 8px;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
font-family: Inter, Helvetica, system-ui, sans-serif;
|
|
background: var(--color-bg);
|
|
color: var(--color-text);
|
|
line-height: 1.5;
|
|
}
|
|
header.app-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
padding: 0.85rem 1.5rem;
|
|
border-bottom: 1px solid #e5e5e5;
|
|
}
|
|
header.app-header a.brand {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
}
|
|
header .nav-main {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
flex: 1;
|
|
margin-left: 1.5rem;
|
|
}
|
|
header .nav-main a {
|
|
color: var(--color-muted);
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
font-size: 0.95rem;
|
|
}
|
|
header .nav-main a:hover,
|
|
header .nav-main a.active { color: var(--color-text); }
|
|
header .nav-end { display: flex; align-items: center; gap: 0.75rem; }
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 0.75rem 1.25rem;
|
|
background: var(--color-primary);
|
|
color: #fff;
|
|
border-radius: var(--radius);
|
|
text-decoration: none;
|
|
border: none;
|
|
font: inherit;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
.btn.secondary { background: #171717; }
|
|
.btn.small { padding: 0.4rem 0.85rem; font-size: 0.9rem; }
|
|
.muted { color: var(--color-muted); }
|
|
.card {
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: var(--radius);
|
|
padding: 1.25rem;
|
|
margin-top: 1.5rem;
|
|
}
|
|
.messages { list-style: none; padding: 0; }
|
|
.messages li { padding: 0.5rem 0; color: #b45309; }
|
|
label { display: block; margin-top: 0.75rem; font-size: 0.9rem; }
|
|
input[type=text], input[type=email] {
|
|
width: 100%;
|
|
padding: 0.5rem 0.75rem;
|
|
margin-top: 0.25rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 6px;
|
|
}
|
|
dl { display: grid; grid-template-columns: 11rem 1fr; gap: 0.35rem 1rem; }
|
|
dt { color: var(--color-muted); }
|
|
dd { margin: 0; word-break: break-all; }
|
|
main { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.5rem; }
|
|
|
|
/* Profile menu */
|
|
.profile-menu { position: relative; }
|
|
.profile-menu > summary {
|
|
list-style: none;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
padding: 0.4rem 0.75rem;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: 999px;
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
user-select: none;
|
|
}
|
|
.profile-menu > summary::-webkit-details-marker { display: none; }
|
|
.profile-menu > summary:hover { border-color: #ccc; }
|
|
.profile-menu[open] > summary { border-color: var(--color-primary); }
|
|
.profile-menu .menu-panel {
|
|
position: absolute;
|
|
right: 0;
|
|
top: calc(100% + 0.35rem);
|
|
min-width: 14rem;
|
|
background: #fff;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: var(--radius);
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.08);
|
|
padding: 0.4rem 0;
|
|
z-index: 40;
|
|
}
|
|
.profile-menu .menu-panel a,
|
|
.profile-menu .menu-panel button {
|
|
display: block;
|
|
width: 100%;
|
|
text-align: left;
|
|
padding: 0.55rem 1rem;
|
|
border: none;
|
|
background: none;
|
|
font: inherit;
|
|
color: inherit;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
}
|
|
.profile-menu .menu-panel a:hover,
|
|
.profile-menu .menu-panel button:hover { background: #f5f5f5; }
|
|
.profile-menu .menu-meta {
|
|
padding: 0.5rem 1rem 0.35rem;
|
|
font-size: 0.8rem;
|
|
color: var(--color-muted);
|
|
border-bottom: 1px solid #f0f0f0;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
</style>
|
|
{% block extra_head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<header class="app-header">
|
|
<a class="brand" href="{% if user.is_authenticated %}{% url 'core:app_home' %}{% else %}{% url 'core:landing' %}{% endif %}">{{ site_name }}</a>
|
|
{% if user.is_authenticated %}
|
|
<nav class="nav-main" aria-label="Main">
|
|
<a href="{% url 'core:app_home' %}" {% if request.resolver_match.url_name == 'app_home' %}class="active"{% endif %}>Spaces</a>
|
|
</nav>
|
|
<div class="nav-end">
|
|
<details class="profile-menu">
|
|
<summary title="Account menu">{{ nav_display_name|default:user.get_username }}</summary>
|
|
<div class="menu-panel" role="menu">
|
|
<div class="menu-meta">Signed in</div>
|
|
<a href="{% url 'core:account_session' %}" role="menuitem">Session details</a>
|
|
<a href="{% url 'identity:logout' %}" role="menuitem">Sign out</a>
|
|
</div>
|
|
</details>
|
|
</div>
|
|
{% else %}
|
|
<div class="nav-end">
|
|
<a class="btn small" href="{% url 'identity:login' %}">Sign in</a>
|
|
</div>
|
|
{% endif %}
|
|
</header>
|
|
<main>
|
|
{% if messages %}
|
|
<ul class="messages">
|
|
{% for message in messages %}
|
|
<li>{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|