-
Notifications
You must be signed in to change notification settings - Fork 13
/
stats.html
71 lines (70 loc) · 2.25 KB
/
stats.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Statistiques Grafisearch</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<style>
.numbers {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.link {
max-width: 250px;
display: block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
th {
white-space: nowrap;
}
</style>
</head>
<body>
<div class="container">
<h1 class="mb-3 mt-4 fw-bold">Statistiques de recherches</h1>
<div class="numbers">
<div class="card p-3">
<h1 class="fw-bold">{{ .Count }}</h1>
recherches
</div>
<div class="card p-3">
<h1 class="fw-bold">{{ .HitRate }}%</h1>
hits
</div>
<div class="card p-3">
<h1 class="fw-bold">{{ .HitRateGoogle }}%</h1>
hits google fallback
</div>
<div class="card p-3">
<h1 class="fw-bold">{{ .HitRateNotOnGoogle }}%</h1>
exotisme
</div>
</div>
<table class="table mt-3">
<thead>
<tr>
<th>Requête</th>
<th>Duckduckgo</th>
<th>Google</th>
<th>URL</th>
</tr>
</thead>
<tbody>
{{range .Results}}
<tr>
<td>{{ .Query }}</td>
<td>{{ if .Found }}✅{{ else }}❌{{ end }}</td>
<td>{{ if .Google }}✅{{ else }}❌{{ end }}</td>
<td><a class="link" href="{{ .URL }}">{{ .URL }}</a></td>
</tr>
{{end}}
</tbody>
</table>
</div>
</body>
</html>