fix: replace Home link with clickable AASD nav bar in visitor report

This commit is contained in:
administrator 2026-04-29 07:38:03 +00:00
parent b91406ada4
commit 808fe757e4
2 changed files with 8 additions and 10 deletions

View file

@ -70,15 +70,13 @@ func (g *Generator) BuildReport(token, domain, aiNarrativeHTML string) (string,
</head>
<body class="bg-slate-900 text-slate-100 min-h-screen">
<div class="container mx-auto px-4 py-6 max-w-lg">
<!-- Header + Home -->
<div class="flex items-center justify-between mb-4">
<a href="/" class="text-xs text-slate-500 hover:text-blue-400 transition-colors">&larr; Home</a>
<div class="text-center">
<h1 class="text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">AASD</h1>
<p class="text-sm text-slate-400">API Attack Surface Discovery</p>
<!-- Top Nav Bar -->
<a href="/" class="block bg-slate-800/80 border border-slate-700/50 rounded-xl px-4 py-2.5 mb-4 hover:bg-slate-700/50 transition-colors">
<div class="flex items-center justify-center gap-2">
<span class="text-lg font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">AASD</span>
<span class="text-xs text-slate-500">API Attack Surface Discovery</span>
</div>
<div class="w-10"></div> <!-- spacer -->
</div>
</a>
<!-- Report Content -->
%s

View file

@ -272,8 +272,8 @@ func TestBuildReport_StartNewScanButton(t *testing.T) {
if !strings.Contains(content, "Start New Scan") {
t.Error("expected 'Start New Scan' button in report")
}
if !strings.Contains(content, "Home") {
t.Error("expected 'Home' link in report")
if !strings.Contains(content, "AASD") {
t.Error("expected 'AASD' nav bar title in report")
}
}