mirror of
https://github.com/ArthurDanjou/artmcp.git
synced 2026-01-14 14:44:21 +01:00
Add MCP documentation page with tools, prompts and resources
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
@@ -1,48 +1,134 @@
|
||||
<script setup lang="ts">
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const colors = ['#f87171', '#fb923c', '#fbbf24', '#facc15', '#a3e635', '#4ade80', '#34d399', '#2dd4bf', '#22d3ee', '#38bdf8', '#60a5fa', '#818cf8', '#a78bfa', '#c084fc', '#e879f9', '#f472b6', '#fb7185']
|
||||
const color = useState('color', () => colors[Math.floor(Math.random() * colors.length)])
|
||||
const { data: documentation } = await useAsyncData('documentation', () =>
|
||||
queryCollection('documentation').first()
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="centered">
|
||||
<h1 :style="{ color }">
|
||||
{{ runtimeConfig.public.helloText }}
|
||||
</h1>
|
||||
<NuxtLink
|
||||
to="/"
|
||||
external
|
||||
<div class="documentation-page">
|
||||
<ContentRenderer
|
||||
v-if="documentation"
|
||||
:value="documentation"
|
||||
class="content"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
class="loading"
|
||||
>
|
||||
refresh
|
||||
</NuxtLink>
|
||||
Loading documentation...
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.centered {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: 0;
|
||||
.documentation-page {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
color: #666;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
h1 {
|
||||
font-size: 64px;
|
||||
}
|
||||
|
||||
.content :deep(h1) {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #1a1a1a;
|
||||
border-bottom: 2px solid #e5e5e5;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
a {
|
||||
color: #888;
|
||||
|
||||
.content :deep(h2) {
|
||||
font-size: 1.75rem;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #2a2a2a;
|
||||
}
|
||||
|
||||
.content :deep(h3) {
|
||||
font-size: 1.25rem;
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.content :deep(p) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.content :deep(hr) {
|
||||
border: none;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
.content :deep(code) {
|
||||
background-color: #f5f5f5;
|
||||
padding: 0.2em 0.4em;
|
||||
border-radius: 3px;
|
||||
font-size: 0.9em;
|
||||
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
}
|
||||
|
||||
.content :deep(pre) {
|
||||
background-color: #1e1e1e;
|
||||
color: #d4d4d4;
|
||||
padding: 1rem;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.content :deep(pre code) {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.content :deep(ul),
|
||||
.content :deep(ol) {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.content :deep(li) {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.content :deep(a) {
|
||||
color: #0066cc;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
}
|
||||
a:hover {
|
||||
|
||||
.content :deep(a:hover) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.content :deep(strong) {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.documentation-page {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.content :deep(h1) {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
.content :deep(h2) {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.content :deep(h3) {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user