mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 21:29:13 +00:00
Spruce up the 404 page and improve the overall layout for agents pages
This commit is contained in:
@@ -2,14 +2,19 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Khoj: An AI Personal Assistant for your digital brain</title>
|
<title>Khoj: An AI Personal Assistant for your digital brain</title>
|
||||||
<link rel=”stylesheet” href=”static/styles.css”>
|
<link rel="icon" type="image/png" sizes="128x128" href="/static/assets/icons/favicon-128x128.png?v={{ khoj_version }}">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
|
<link rel="manifest" href="/static/khoj.webmanifest?v={{ khoj_version }}">
|
||||||
|
<link rel="stylesheet" href="/static/assets/khoj.css?v={{ khoj_version }}">
|
||||||
</head>
|
</head>
|
||||||
<body class="not-found">
|
<body class="not-found">
|
||||||
|
<!--Add Header Logo and Nav Pane-->
|
||||||
|
{% import 'utils.html' as utils %}
|
||||||
|
{{ utils.heading_pane(user_photo, username, is_active, has_documents) }}
|
||||||
|
|
||||||
<header class=”header”>
|
<header class=”header”>
|
||||||
<h1>Oops, this is awkward. That page couldn't be found.</h1>
|
<h1>Oops, this is awkward. Looks like there's nothing here.</h1>
|
||||||
</header>
|
</header>
|
||||||
<a href="/config">Go Home</a>
|
<a class="redirect-link" href="/">Go Home</a>
|
||||||
|
|
||||||
<footer class=”footer”>
|
<footer class=”footer”>
|
||||||
</footer>
|
</footer>
|
||||||
@@ -18,5 +23,34 @@
|
|||||||
body.not-found {
|
body.not-found {
|
||||||
padding: 0 10%
|
padding: 0 10%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: var(--background-color);
|
||||||
|
color: var(--main-text-color);
|
||||||
|
text-align: center;
|
||||||
|
font-family: var(--font-family);
|
||||||
|
font-size: medium;
|
||||||
|
font-weight: 300;
|
||||||
|
line-height: 1.5em;
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body a.redirect-link {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: var(--primary);
|
||||||
|
text-decoration: none;
|
||||||
|
border: 1px solid var(--main-text-color);
|
||||||
|
color: var(--main-text-color);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body a.redirect-link:hover {
|
||||||
|
background-color: var(--main-text-color);
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
@media only screen and (min-width: 700px) {
|
@media only screen and (min-width: 700px) {
|
||||||
body {
|
body {
|
||||||
grid-template-columns: auto min(70vw, 100%) auto;
|
grid-template-columns: auto min(70vw, 100%) auto;
|
||||||
grid-template-rows: auto minmax(80px, 100%) auto;
|
grid-template-rows: auto auto auto;
|
||||||
}
|
}
|
||||||
body > * {
|
body > * {
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
grid-template-rows: auto minmax(80px, 100%) auto;
|
grid-template-rows: auto auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1#agents-list-title {
|
h1#agents-list-title {
|
||||||
|
|||||||
@@ -169,6 +169,19 @@ def agents_page(request: Request, agent_slug: str):
|
|||||||
|
|
||||||
agent = AgentAdapters.get_agent_by_slug(agent_slug)
|
agent = AgentAdapters.get_agent_by_slug(agent_slug)
|
||||||
|
|
||||||
|
if agent == None:
|
||||||
|
return templates.TemplateResponse(
|
||||||
|
"404.html",
|
||||||
|
context={
|
||||||
|
"request": request,
|
||||||
|
"khoj_version": state.khoj_version,
|
||||||
|
"username": user.username if user else None,
|
||||||
|
"has_documents": False,
|
||||||
|
"is_active": has_required_scope(request, ["premium"]),
|
||||||
|
"user_photo": user_picture,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
agent_metadata = {
|
agent_metadata = {
|
||||||
"slug": agent.slug,
|
"slug": agent.slug,
|
||||||
"avatar": agent.avatar,
|
"avatar": agent.avatar,
|
||||||
|
|||||||
Reference in New Issue
Block a user