Added swagger and elmah return-to-front-end button
This commit is contained in:
54
src/Server/wwwroot/elmah-ui/custom.css
Normal file
54
src/Server/wwwroot/elmah-ui/custom.css
Normal file
@@ -0,0 +1,54 @@
|
||||
.elmah-return-btn {
|
||||
position: fixed;
|
||||
top: 6px;
|
||||
right: 24px;
|
||||
z-index: 9999;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
height: 44px;
|
||||
min-width: 44px;
|
||||
padding: 0 14px;
|
||||
|
||||
background: #85ea2d;
|
||||
color: black;
|
||||
border-radius: 999px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
justify-content: center;
|
||||
text-decoration: none !important;
|
||||
|
||||
transition:
|
||||
top 0.25s ease,
|
||||
background-color 0.2s ease;
|
||||
}
|
||||
|
||||
/* hidden label */
|
||||
.elmah-return-btn::before {
|
||||
content: "Return to Front-end";
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
max-width: 0;
|
||||
opacity: 0;
|
||||
transition:
|
||||
max-width 0.3s ease,
|
||||
opacity 0.2s ease;
|
||||
}
|
||||
|
||||
/* expand on hover */
|
||||
.elmah-return-btn:hover::before {
|
||||
max-width: 220px;
|
||||
padding: 0.5rem;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* hover colors */
|
||||
.elmah-return-btn:hover {
|
||||
background: #0b5ed7;
|
||||
color: white;
|
||||
}
|
||||
10
src/Server/wwwroot/elmah-ui/custom.js
Normal file
10
src/Server/wwwroot/elmah-ui/custom.js
Normal file
@@ -0,0 +1,10 @@
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const url = new URL(window.location.href);
|
||||
const btn = document.createElement("a");
|
||||
btn.href = url.searchParams.get('ReturnUrl') ?? "/";
|
||||
btn.innerText = "⎋";
|
||||
btn.setAttribute("aria-label", "Return to Front-End");
|
||||
btn.className = "elmah-return-btn";
|
||||
|
||||
document.body.appendChild(btn);
|
||||
});
|
||||
Reference in New Issue
Block a user