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
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ description: "NEAR Protocol documentation - Build decentralized applications and

import Card from '@site/src/components/UI/Card';
import LandingHero from '@site/src/components/LandingHero';
import AIBadges from '@site/src/components/AIBadges';

<AIBadges />

<LandingHero />

<div className="row" style={{ marginTop: '4rem', gridGap: '3rem 0rem' }}>
<div className="row" style={{ marginTop: '2rem', gridGap: '3rem 0rem' }}>
<div className="auto-col">
<Card
variant="icon"
Expand Down
43 changes: 43 additions & 0 deletions website/src/components/AIBadges/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, { useState } from 'react';
import './styles.scss';

const AIBadges = () => {
const [copiedUrl, setCopiedUrl] = useState(null);

const handleCopyUrl = (e, url) => {
e.preventDefault();
navigator.clipboard.writeText(url).then(() => {
setCopiedUrl(url);
setTimeout(() => setCopiedUrl(null), 1000);
});
};

return (
<div className="ai-badges">
<a
href="https://docs.near.org/mcp"
className="ai-badge"
onClick={(e) => handleCopyUrl(e, 'https://docs.near.org/mcp')}
style={{ cursor: 'pointer' }}
>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.5 4L6 11.5L2.5 8" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
{copiedUrl === 'https://docs.near.org/mcp' ? 'URL Copied!' : 'MCP Ready'}
</a>
<a
href="https://docs.near.org/llms.txt"
className="ai-badge"
target="_blank"
rel="noopener noreferrer"
>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.5 4L6 11.5L2.5 8" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
LLM.txt Ready
</a>
</div>
);
};

export default AIBadges;
36 changes: 36 additions & 0 deletions website/src/components/AIBadges/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.ai-badges {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
justify-content: center;
position: relative;
left: 41.67%; /* 5/12 of the screen */
transform: translateX(-50%); /* Center the badges at this point */
margin-top: -0.5rem;
margin-bottom: 2rem
}

.ai-badge {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 1rem 0.25rem 0.8rem;
border: 1px solid rgba(95, 138, 250, 0.3);
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
color: var(--ifm-font-color-base);
text-decoration: none;
transition: all 0.2s ease;

svg {
flex-shrink: 0;
color: #22c55e;
}

&:hover {
border-color: rgba(95, 138, 250, 0.5);
text-decoration: none;
color: var(--ifm-font-color-base);
}
}
8 changes: 8 additions & 0 deletions website/src/components/LandingHero/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,12 @@ html[data-theme='light'] {
}
}
}
}

@media (max-width: 999px) {
.landing-hero {
&__title-gradient {
margin-top: 0;
}
}
}