Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion webui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, useEffect, useRef, useMemo } from 'preact/hooks';
import { api, Page } from './mcp';
import { Logo } from './Logo';
import { marked } from 'marked';
import mermaid from 'mermaid';

Expand Down Expand Up @@ -628,6 +629,7 @@ export function App() {
) : current ? (
<>
<div class="page-header">
<span class="page-header-logo" aria-hidden="true"><Logo size={72} /></span>
<div class="page-title">
<Highlighted text={current.title} query={searchQuery} />
{!editing && (
Expand Down Expand Up @@ -689,7 +691,10 @@ export function App() {
)}
</>
) : (
<div class="empty">select a page</div>
<div class="empty">
<Logo size={96} />
<span>select a page</span>
</div>
)}
</div>
</div>
Expand Down
20 changes: 20 additions & 0 deletions webui/src/Logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Brand logo. Uses currentColor so it inherits the surrounding text
// color (var(--fg-dim) in the page header), giving the right look in
// both light and dark themes without per-theme assets.

export function Logo({ size = 24 }: { size?: number } = {}) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="41 34 18 18"
width={size}
height={size}
aria-hidden="true"
>
<g fill="currentColor" stroke="none">
<path d="m 52.218,50.524 c 0,0.313 0.25,0.567 0.559,0.567 0.311,0 0.559,-0.254 0.559,-0.567 v -1.883 h 1.318 c 0.836,0 1.516,-0.693 1.516,-1.546 v -1.338 h 1.85 c 0.31,0 0.56,-0.256 0.56,-0.567 0,-0.314 -0.25,-0.57 -0.56,-0.57 h -1.85 v -1.281 h 1.85 c 0.31,0 0.56,-0.254 0.56,-0.566 0,-0.312 -0.25,-0.567 -0.56,-0.567 h -1.85 v -1.282 h 1.85 c 0.31,0 0.56,-0.254 0.56,-0.568 0,-0.312 -0.25,-0.565 -0.56,-0.565 h -1.85 v -1.272 c 0,-0.853 -0.68,-1.543 -1.516,-1.543 H 53.336 V 35.09 c 0,-0.313 -0.249,-0.567 -0.559,-0.567 -0.309,0 -0.559,0.254 -0.559,0.567 v 1.884 H 50.959 V 35.09 c 0,-0.313 -0.25,-0.567 -0.559,-0.567 -0.309,0 -0.557,0.254 -0.557,0.567 v 1.884 H 48.584 V 35.09 c 0,-0.313 -0.251,-0.567 -0.559,-0.567 -0.31,0 -0.56,0.254 -0.56,0.567 v 1.884 H 46.15 c -0.838,0 -1.518,0.692 -1.518,1.545 v 1.58 h -1.85 c -0.309,0 -0.559,0.256 -0.559,0.569 0,0.312 0.25,0.567 0.559,0.567 h 1.85 v 1.279 h -1.85 c -0.309,0 -0.559,0.254 -0.559,0.568 0,0.314 0.25,0.568 0.559,0.568 h 1.85 v 1.281 h -1.85 c -0.309,0 -0.559,0.254 -0.559,0.567 0,0.312 0.25,0.565 0.559,0.565 h 1.85 v 1.029 c 0,0.852 0.68,1.545 1.518,1.545 h 1.316 v 1.883 c 0,0.312 0.25,0.568 0.56,0.568 0.308,0 0.559,-0.256 0.559,-0.568 v -1.88 h 1.259 v 1.883 c 0,0.314 0.248,0.568 0.557,0.568 0.309,0 0.559,-0.254 0.559,-0.568 V 48.64 h 1.259 v 1.884 z m -6.067,-3.019 c -0.222,0 -0.401,-0.184 -0.401,-0.408 v -8.582 c 0,-0.225 0.18,-0.408 0.401,-0.408 h 8.501 c 0.221,0 0.399,0.185 0.399,0.408 v 8.582 c 0,0.225 -0.18,0.408 -0.399,0.408 z" />
<path d="m 53.591,39.054 h -6.378 c -0.31,0 -0.559,0.254 -0.559,0.566 v 6.494 c 0,0.312 0.249,0.568 0.559,0.568 h 6.378 c 0.31,0 0.558,-0.257 0.558,-0.568 V 39.62 c -0.002,-0.312 -0.25,-0.566 -0.558,-0.566 z m -0.559,6.492 H 47.77 v -5.357 h 5.263 v 5.357 z" />
</g>
</svg>
);
}
6 changes: 6 additions & 0 deletions webui/src/assets/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions webui/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,18 @@ html, body, #root {
.page-header {
padding: 32px 40px 16px;
border-bottom: 1px solid var(--border);
position: relative;
}

.page-header-logo {
position: absolute;
top: 20px;
right: 32px;
color: var(--fg-dim);
opacity: 0.6;
pointer-events: none;
display: inline-flex;
align-items: center;
}

.page-title {
Expand Down Expand Up @@ -592,12 +604,15 @@ mark {

.empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
flex: 1;
color: var(--fg-dim);
font-size: 16px;
font-weight: 300;
opacity: 0.6;
}

/* --- Mobile --- */
Expand Down
1 change: 1 addition & 0 deletions webui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
new HtmlWebpackPlugin({
template: './src/index.html',
filename: 'index.html',
favicon: path.resolve(__dirname, 'src/assets/favicon.svg'),
}),
new MiniCssExtractPlugin({ filename: 'index.css' }),
],
Expand Down