Initialize AutoLibrary website with Gitea deployment
This commit is contained in:
commit
18216953e7
101 files changed
+12581
No files matched your search
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/github.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
|
||||
<title>{{.title}}</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
h1 {
|
||||
color: #dc2626;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
.json-container {
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
font-family: 'Monaco', 'Consolas', monospace;
|
||||
white-space: pre-wrap;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.links {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
.links a {
|
||||
display: inline-block;
|
||||
margin-right: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #2563eb;
|
||||
text-decoration: none;
|
||||
}
|
||||
.links a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.info {
|
||||
background: #eff6ff;
|
||||
border-left: 4px solid #3b82f6;
|
||||
padding: 0.75rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.code {
|
||||
font-size: 0.9em;
|
||||
font-family: 'Monaco', 'Consolas', monospace;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #1a1a1a;
|
||||
color: #e5e5e5;
|
||||
}
|
||||
h1 {
|
||||
color: #f87171;
|
||||
border-bottom-color: #404040;
|
||||
}
|
||||
.json-container {
|
||||
background-color: #2d2d2d;
|
||||
border-color: #404040;
|
||||
color: #d4d4d4;
|
||||
}
|
||||
.json-container > .hljs-string {
|
||||
color: #a8d0ff !important;
|
||||
}
|
||||
.info {
|
||||
background-color: #1e3a5f;
|
||||
border-left-color: #60a5fa;
|
||||
}
|
||||
.links a {
|
||||
color: #93c5fd;
|
||||
}
|
||||
.links a:hover {
|
||||
color: #bfdbfe;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404 - Not Found</h1>
|
||||
<p>The requested API endpoint '<span class="code">{{.path}}</span>' was not found on this server.</p>
|
||||
|
||||
<div class="info">
|
||||
<strong>API Response (JSON format):</strong>
|
||||
</div>
|
||||
|
||||
<div class="json-container" id="jsonData">
|
||||
{{.jsonData}}
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<strong>API links:</strong><br>
|
||||
<a href="/health" target="_blank">Check API health</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
try {
|
||||
const jsonContainer = document.getElementById('jsonData');
|
||||
const jsonData = JSON.parse(jsonContainer.textContent.replace(/"/g, '"'));
|
||||
const formattedJson = JSON.stringify(jsonData, null, 2);
|
||||
jsonContainer.textContent = formattedJson;
|
||||
hljs.highlightElement(jsonContainer);
|
||||
} catch (e) {
|
||||
console.error('Error formatting JSON:', e);
|
||||
jsonContainer.style.color = 'red';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user