admin / Synapse-Cortex
publicSelf Hosted ITSM Tool with RBAC/Tenanting and MFA
Synapse-Cortex / synapse-cortex / app / templates / base.html
8025 B · main
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | <!DOCTYPE html> <html lang="en" class="dark"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>{% block title %}Synapse-Cortex{% endblock %}</title> <link rel="icon" type="image/webp" href="/static/img/cortex-logo.webp" /> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" /> <script src="https://cdn.tailwindcss.com"></script> <script> tailwind.config = { darkMode: 'class', theme: { extend: { fontFamily: { display: ['"Space Grotesk"', 'system-ui', 'sans-serif'], body: ['Inter', 'system-ui', 'sans-serif'], mono: ['"JetBrains Mono"', 'ui-monospace', 'monospace'], }, colors: { cortex: { bg: '#030d18', panel: '#081823', panel2: '#0c2231', border: '#123a52', 'border-glow': '#1d5778', muted: '#6b8499', }, chrome: '#c8d4e0', 'chrome-dim': '#8aa2b5', 'accent-blue': '#22d3ff', 'accent-blue-bright': '#5ce6ff', 'accent-blue-dim': '#0a8fb8', 'accent-green': '#39ff8a', 'accent-orange': '#ff8a1e', 'accent-red': '#ff3b5c', }, }, }, }; </script> <style> body { background-color: #030d18; background-image: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(34, 211, 255, 0.10), transparent 60%), radial-gradient(ellipse 700px 500px at -10% 0%, rgba(10, 143, 184, 0.10), transparent 60%), linear-gradient(180deg, #030d18 0%, #030d18 100%); background-attachment: fixed; } .scan-line { background-image: repeating-linear-gradient(0deg, rgba(34,211,255,0.025) 0px, rgba(34,211,255,0.025) 1px, transparent 1px, transparent 3px); } .glow-blue { box-shadow: 0 0 0 1px rgba(34,211,255,0.35), 0 0 24px rgba(34,211,255,0.25), 0 0 70px rgba(34,211,255,0.10), inset 0 1px 0 rgba(200,212,224,0.15); } .glow-text { text-shadow: 0 0 24px rgba(34,211,255,0.45); } ::selection { background: #22d3ff; color: #030d18; } </style> {% block head %}{% endblock %} </head> <body class="bg-cortex-bg text-chrome font-body min-h-screen"> {% if user %} <div class="flex min-h-screen"> <aside class="w-60 shrink-0 border-r border-cortex-border bg-cortex-panel flex flex-col"> <div class="px-5 py-5 border-b border-cortex-border flex items-center gap-3"> <img src="/static/img/cortex-logo.webp" alt="Synapse-Cortex" class="h-9 w-9 object-contain shrink-0" /> <div class="min-w-0"> <div class="text-[10px] tracking-[0.3em] text-accent-blue font-display">SYNAPSE</div> <div class="text-lg font-bold tracking-wide font-display leading-tight">CORTEX</div> </div> </div> <nav class="flex-1 px-3 py-4 space-y-1 text-sm overflow-y-auto"> <a href="/" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'dashboard' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> ▣ DASHBOARD </a> <a href="/tickets" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'tickets' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> ☰ TICKETS </a> <a href="/assets" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'assets' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> ◹ ASSETS (CMDB) </a> <div class="pt-4 mt-2 border-t border-cortex-border"> <div class="px-3 pb-1 text-[10px] text-cortex-muted uppercase tracking-widest">Settings</div> <a href="/settings" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'settings' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> ⚙ PROFILE & MFA </a> </div> {% if user.role.value in ('global_admin', 'tenant_admin') %} <div class="pt-4 mt-2 border-t border-cortex-border"> <div class="px-3 pb-1 text-[10px] text-cortex-muted uppercase tracking-widest">Admin</div> <a href="/admin/users" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'admin_users' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> 👤 USERS </a> <a href="/admin/sla-policies" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'sla' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> ⏲ SLA POLICIES </a> <a href="/admin/asset-types" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'admin_asset_types' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> 💻 ASSET TYPES </a> <a href="/admin/integrations" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'admin_integrations' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> 🔗 INTEGRATIONS </a> <a href="/admin/audit" class="block px-3 py-2 rounded font-display text-xs tracking-wide hover:bg-cortex-panel2 hover:text-accent-blue transition {% if active == 'admin_audit' %}bg-cortex-panel2 text-accent-blue border-l-2 border-accent-blue{% else %}border-l-2 border-transparent{% endif %}"> 📜 AUDIT TRAIL </a> </div> {% endif %} </nav> <div class="px-4 py-4 border-t border-cortex-border text-xs"> <div class="text-cortex-muted">TENANT</div> <div class="text-chrome truncate">{{ user.tenant.name if user.tenant else '—' }}</div> </div> </aside> <div class="flex-1 flex flex-col min-w-0"> <header class="h-14 border-b border-cortex-border bg-cortex-panel flex items-center justify-between px-6"> <div class="text-xs text-cortex-muted uppercase tracking-wider">{% block header %}{% endblock %}</div> <div class="flex items-center gap-4 text-sm"> <span class="text-chrome">{{ user.full_name }}</span> <span class="text-[10px] px-2 py-0.5 rounded bg-cortex-panel2 border border-cortex-border text-accent-blue uppercase">{{ user.role.value.replace('_', ' ') }}</span> <a href="/logout" class="text-cortex-muted hover:text-accent-red transition">LOGOUT</a> </div> </header> <main class="flex-1 p-6 scan-line overflow-x-auto"> {% block content %}{% endblock %} </main> </div> </div> {% else %} {% block bare_content %}{% endblock %} {% endif %} </body> </html> |