-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_Layout.cshtml
More file actions
76 lines (72 loc) · 2.91 KB
/
_Layout.cshtml
File metadata and controls
76 lines (72 loc) · 2.91 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@ViewData["Title"] - TEA Explorer</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous" />
<style>
.tea-uuid { font-family: monospace; font-size: 0.9em; }
.tea-breadcrumb { margin-bottom: 1rem; }
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-3">
<div class="container">
<a class="navbar-brand" asp-page="/Index">TEA Explorer</a>
<div class="navbar-nav">
<a class="nav-link" asp-page="/Index">Home</a>
</div>
@{
var serverUrl = Context.Session.GetString("Tea:BaseUrl");
}
@if (!string.IsNullOrWhiteSpace(serverUrl))
{
<span class="navbar-text ms-auto">
<span class="badge bg-success">Connected</span>
<span class="text-light ms-1 small">@serverUrl</span>
</span>
}
else
{
<span class="navbar-text ms-auto">
<span class="badge bg-secondary">No server configured</span>
</span>
}
</div>
</nav>
<div class="container">
@if (ViewData["Breadcrumbs"] is List<(string Label, string? Url)> breadcrumbs)
{
<nav aria-label="breadcrumb" class="tea-breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a asp-page="/Index">Home</a></li>
@for (var i = 0; i < breadcrumbs.Count; i++)
{
var crumb = breadcrumbs[i];
if (i == breadcrumbs.Count - 1)
{
<li class="breadcrumb-item active" aria-current="page">@crumb.Label</li>
}
else
{
<li class="breadcrumb-item"><a href="@crumb.Url">@crumb.Label</a></li>
}
}
</ol>
</nav>
}
@RenderBody()
</div>
<footer class="container mt-4 mb-3">
<hr />
<p class="text-muted small">TEA Explorer — Transparency Exchange API browser — <a href="https://github.com/coderpatros/dotnet-tea" class="text-muted">GitHub</a></p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
crossorigin="anonymous"></script>
</body>
</html>