mcppaypal / index.html
thedruid831's picture
Add 3 files
fa15dc5 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PayPal MCP Server Installation Guide</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.codeblock {
font-family: 'Courier New', monospace;
background-color: #2d3748;
color: #f7fafc;
border-radius: 0.5rem;
overflow-x: auto;
}
.step-number {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 50%;
background-color: #3182ce;
color: white;
margin-right: 1rem;
flex-shrink: 0;
}
.sidebar-link {
transition: all 0.2s ease;
}
.sidebar-link:hover {
background-color: #2d3748;
transform: translateX(3px);
}
.nav-highlight {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 4px;
background-color: #4299e1;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.pulse-animation {
animation: pulse 2s infinite;
}
</style>
</head>
<body class="bg-gray-100 min-h-screen">
<div class="flex">
<!-- Sidebar -->
<div class="w-64 bg-gray-900 text-white h-screen sticky top-0 overflow-y-auto hidden md:block">
<div class="p-6">
<h1 class="text-2xl font-bold mb-6 flex items-center">
<i class="fab fa-paypal text-blue-400 mr-2"></i>
<span>MCP Server</span>
</h1>
<div class="space-y-2">
<div class="relative sidebar-link active">
<div class="nav-highlight"></div>
<a href="#overview" class="flex items-center px-4 py-2 text-blue-200">
<i class="fas fa-home mr-2"></i> Overview
</a>
</div>
<div class="relative sidebar-link">
<a href="#structure" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-folder-open mr-2"></i> Repository Structure
</a>
</div>
<div class="relative sidebar-link">
<a href="#installation" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-download mr-2"></i> Installation Steps
</a>
</div>
<div class="relative sidebar-link">
<a href="#configuration" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-cog mr-2"></i> MCP Configuration
</a>
</div>
<div class="relative sidebar-link">
<a href="#validation" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-check-circle mr-2"></i> Validation Steps
</a>
</div>
<div class="relative sidebar-link">
<a href="#issues" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-exclamation-triangle mr-2"></i> Common Issues
</a>
</div>
<div class="relative sidebar-link">
<a href="#testing" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-vial mr-2"></i> Testing
</a>
</div>
<div class="relative sidebar-link">
<a href="#security" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-shield-alt mr-2"></i> Security
</a>
</div>
<div class="relative sidebar-link">
<a href="#resources" class="flex items-center px-4 py-2 hover:text-blue-200">
<i class="fas fa-book mr-2"></i> Resources
</a>
</div>
</div>
</div>
</div>
<!-- Main content -->
<div class="flex-1 p-8">
<div class="max-w-4xl mx-auto">
<header class="mb-12">
<h1 class="text-4xl font-bold text-gray-800 mb-4">
PayPal MCP Server<br>Installation Guide
</h1>
<p class="text-xl text-gray-600">
Comprehensive guide for setting up the PayPal Model Context Protocol server
</p>
<div class="mt-6 flex flex-wrap gap-4">
<div class="flex items-center bg-blue-100 px-4 py-2 rounded-full">
<i class="fas fa-code-branch text-blue-500 mr-2"></i>
<span class="text-sm font-medium">v2.4.1</span>
</div>
<div class="flex items-center bg-green-100 px-4 py-2 rounded-full">
<i class="fas fa-lock text-green-500 mr-2"></i>
<span class="text-sm font-medium">Production Ready</span>
</div>
<div class="flex items-center bg-purple-100 px-4 py-2 rounded-full">
<i class="fab fa-node-js text-purple-500 mr-2"></i>
<span class="text-sm font-medium">Node.js 16+</span>
</div>
</div>
</header>
<section id="overview" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-home text-blue-500 mr-2"></i>Overview
</h2>
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<p class="text-gray-700 mb-4">
This guide provides detailed instructions for AI agents to assist with installing and configuring the PayPal MCP (Model Context Protocol) server. The MCP server enables secure integration between AI models and PayPal's payment services.
</p>
<div class="grid md:grid-cols-3 gap-4">
<div class="bg-blue-50 p-4 rounded-lg">
<h3 class="font-semibold text-blue-800 mb-2"><i class="fas fa-check-circle mr-2"></i>Key Features</h3>
<ul class="text-sm text-gray-700 space-y-1">
<li>Type-safe PayPal API integration</li>
<li>Secure credential management</li>
<li>Comprehensive error handling</li>
<li>Cross-platform configuration</li>
</ul>
</div>
<div class="bg-purple-50 p-4 rounded-lg">
<h3 class="font-semibold text-purple-800 mb-2"><i class="fas fa-bolt mr-2"></i>Requirements</h3>
<ul class="text-sm text-gray-700 space-y-1">
<li>Node.js 16.x or later</li>
<li>TypeScript 5.0+</li>
<li>PayPal developer account</li>
<li>MCP SDK</li>
</ul>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<h3 class="font-semibold text-green-800 mb-2"><i class="fas fa-clock mr-2"></i>Est. Setup Time</h3>
<ul class="text-sm text-gray-700 space-y-1">
<li>Basic setup: 10-15 mins</li>
<li>Full configuration: 30 mins</li>
<li>Testing/debugging: 15-30 mins</li>
</ul>
</div>
</div>
</div>
</section>
<section id="structure" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-folder-open text-blue-500 mr-2"></i>Repository Structure
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="codeblock p-4 mb-4">
<pre class="text-sm">
paypal-server/
├── src/
│ └── index.ts # Main server implementation
├── .github/
│ └── workflows/
│ └── ci.yml # GitHub Actions workflow
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── README.md # General documentation
├── LICENSE # MIT license
└── .gitignore # Git ignore rules</pre>
</div>
<div class="grid md:grid-cols-2 gap-4">
<div class="bg-gray-50 p-4 rounded-lg">
<h3 class="font-semibold text-gray-800 mb-2"><i class="fas fa-file-code mr-2"></i>Key Files</h3>
<ul class="text-sm text-gray-700 space-y-2">
<li><span class="font-mono text-orange-600">index.ts</span> - Main server implementation</li>
<li><span class="font-mono text-orange-600">ci.yml</span> - CI/CD pipeline configuration</li>
<li><span class="font-mono text-orange-600">package.json</span> - Dependencies and scripts</li>
</ul>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<h3 class="font-semibold text-gray-800 mb-2"><i class="fas fa-info-circle mr-2"></i>Notes</h3>
<ul class="text-sm text-gray-700 space-y-2">
<li>All source files are in <span class="font-mono">src/</span></li>
<li>GitHub Actions handles automated testing</li>
<li>TypeScript configuration must be valid</li>
</ul>
</div>
</div>
</div>
</section>
<section id="installation" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-download text-blue-500 mr-2"></i>Installation Steps
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="space-y-6">
<div class="flex items-start">
<div class="step-number">1</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-800 mb-2">Project Setup</h3>
<p class="text-gray-700 mb-3">Initialize the project directory and install required dependencies.</p>
<div class="codeblock p-4 mb-2">
<pre class="text-sm">
# Create project directory
mkdir paypal-server
cd paypal-server
# Initialize Node.js project
npm init -y
# Install dependencies
npm install @modelcontextprotocol/sdk axios typescript @types/node</pre>
</div>
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-exclamation-triangle text-yellow-400"></i>
</div>
<div class="ml-3">
<p class="text-sm text-yellow-700">
Ensure Node.js version 16 or higher is installed before proceeding.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="flex items-start">
<div class="step-number">2</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-800 mb-2">TypeScript Configuration</h3>
<p class="text-gray-700">Configure TypeScript for ES modules and strict type checking.</p>
</div>
</div>
<div class="flex items-start">
<div class="step-number">3</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-800 mb-2">Environment Configuration</h3>
<p class="text-gray-700">Guide users through setting up PayPal credentials:</p>
<div class="grid md:grid-cols-3 gap-4 mt-4">
<div class="border rounded-lg p-4">
<div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
<i class="fas fa-sign-in-alt text-blue-500 text-xl"></i>
</div>
<h4 class="text-center font-medium text-gray-800">1. Developer Dashboard</h4>
<p class="text-sm text-center text-gray-600 mt-1">
Direct to developer.paypal.com
</p>
</div>
<div class="border rounded-lg p-4">
<div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
<i class="fas fa-cogs text-blue-500 text-xl"></i>
</div>
<h4 class="text-center font-medium text-gray-800">2. Create API App</h4>
<p class="text-sm text-center text-gray-600 mt-1">
Guide through REST API setup
</p>
</div>
<div class="border rounded-lg p-4">
<div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
<i class="fas fa-key text-blue-500 text-xl"></i>
</div>
<h4 class="text-center font-medium text-gray-800">3. Secure Storage</h4>
<p class="text-sm text-center text-gray-600 mt-1">
Help store Client ID/Secret
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="configuration" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-cog text-blue-500 mr-2"></i>MCP Configuration
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<h3 class="font-semibold text-gray-800 mb-4">Settings File Locations</h3>
<div class="grid md:grid-cols-3 gap-4 mb-6">
<div class="border rounded-lg p-4">
<div class="flex items-center">
<i class="fab fa-windows text-blue-500 mr-2"></i>
<span class="font-medium">Windows</span>
</div>
<div class="codeblock text-xs mt-2 p-2">
%APPDATA%/Windsurf/User/globalStorage/.../cline_mcp_settings.json
</div>
</div>
<div class="border rounded-lg p-4">
<div class="flex items-center">
<i class="fab fa-apple text-gray-500 mr-2"></i>
<span class="font-medium">macOS</span>
</div>
<div class="codeblock text-xs mt-2 p-2">
~/Library/Application Support/Claude/..._config.json
</div>
</div>
<div class="border rounded-lg p-4">
<div class="flex items-center">
<i class="fab fa-linux text-yellow-500 mr-2"></i>
<span class="font-medium">Linux</span>
</div>
<div class="codeblock text-xs mt-2 p-2">
~/.config/claude/settings.json
</div>
</div>
</div>
<h3 class="font-semibold text-gray-800 mb-4">Configuration Template</h3>
<div class="codeblock p-4 mb-6">
<pre class="text-sm">
{
"mcpServers": {
"paypal": {
"command": "node",
"args": ["path/to/paypal-server/build/index.js"],
"env": {
"PAYPAL_CLIENT_ID": "your_client_id",
"PAYPAL_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"autoApprove": []
}
}
}</pre>
</div>
<div class="bg-orange-50 border-l-4 border-orange-400 p-4">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-exclamation-circle text-orange-400"></i>
</div>
<div class="ml-3">
<h4 class="text-sm font-medium text-orange-800">Important Security Note</h4>
<p class="text-sm text-orange-700 mt-1">
Never commit these configuration files with real credentials. Use environment variables in production.
</p>
</div>
</div>
</div>
</div>
</section>
<section id="validation" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-check-circle text-blue-500 mr-2"></i>Validation Steps
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="grid md:grid-cols-2 gap-6">
<div>
<h3 class="font-semibold text-gray-800 mb-3 flex items-center">
<i class="fas fa-code text-blue-500 mr-2"></i>TypeScript Checks
</h3>
<ul class="text-gray-700 space-y-3">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Verify TypeScript compilation succeeds</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Check all API endpoints are properly typed</span>
</li>
</ul>
</div>
<div>
<h3 class="font-semibold text-gray-800 mb-3 flex items-center">
<i class="fas fa-bug text-blue-500 mr-2"></i>Error Handling
</h3>
<ul class="text-gray-700 space-y-3">
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Implement interface checks for parameters</span>
</li>
<li class="flex items-start">
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>Handle network and API failures gracefully</span>
</li>
</ul>
</div>
</div>
</div>
</section>
<section id="issues" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-exclamation-triangle text-blue-500 mr-2"></i>Common Issues
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="space-y-6">
<div class="p-4 border rounded-lg">
<h3 class="font-semibold text-gray-800 flex items-center mb-2">
<i class="fas fa-shield-alt text-red-500 mr-2"></i>Type Safety
</h3>
<ul class="text-gray-700 text-sm space-y-2">
<li class="flex items-start">
<i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
<span>Always use proper type validation for PayPal API responses</span>
</li>
<li class="flex items-start">
<i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
<span>Implement interface checks for all input parameters</span>
</li>
</ul>
</div>
<div class="p-4 border rounded-lg">
<h3 class="font-semibold text-gray-800 flex items-center mb-2">
<i class="fas fa-lock text-red-500 mr-2"></i>Authentication
</h3>
<ul class="text-gray-700 text-sm space-y-2">
<li class="flex items-start">
<i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
<span>Handle token expiration and refresh cycles</span>
</li>
<li class="flex items-start">
<i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
<span>Validate credentials before making API calls</span>
</li>
</ul>
</div>
<div class="p-4 border rounded-lg">
<h3 class="font-semibold text-gray-800 flex items-center mb-2">
<i class="fas fa-bug text-red-500 mr-2"></i>Error Handling
</h3>
<ul class="text-gray-700 text-sm space-y-2">
<li class="flex items-start">
<i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
<span>Implement specific error types for different scenarios</span>
</li>
<li class="flex items-start">
<i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
<span>Provide clear, actionable error messages</span>
</li>
</ul>
</div>
</div>
</div>
</section>
<section id="testing" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-vial text-blue-500 mr-2"></i>Testing Instructions
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<h3 class="font-semibold text-gray-800 mb-4">Credential Verification</h3>
<div class="codeblock p-4 mb-6">
<pre class="text-sm">
const result = await mcpClient.useTool('paypal', 'create_order', {
intent: 'CAPTURE',
purchase_units: [{
amount: {
currency_code: 'USD',
value: '1.00'
}
}]
});</pre>
</div>
<h3 class="font-semibold text-gray-800 mb-4">Error Handling Test</h3>
<div class="codeblock p-4 mb-4">
<pre class="text-sm">
// Test invalid credentials
const result = await mcpClient.useTool('paypal', 'create_order', {
// Invalid parameters to test error handling
});</pre>
</div>
</div>
</section>
<section id="security" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-shield-alt text-blue-500 mr-2"></i>Security Best Practices
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="grid md:grid-cols-2 gap2-4">
<div class="space-y-4">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-key text-blue-500"></i>
</div>
<div class="ml-4">
<h3 class="text-lg font-medium text-gray-900">Credential Protection</h3>
<p class="text-gray-600 mt-1">
Never store credentials in source code. Use environment variables for sensitive data.
</p>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-check-circle text-blue-500"></i>
</div>
<div class="ml-4">
<h3 class="text-lg font-medium text-gray-900">Input Validation</h3>
<p class="text-gray-600 mt-1">
Validate all input parameters before processing to prevent injection attacks.
</p>
</div>
</div>
</div>
<div class="space-y-4">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-lock text-blue-500"></i>
</div>
<div class="ml-4">
<h3 class="text-lg font-medium text-gray-900">Secure Communications</h3>
<p class="text-gray-600 mt-1">
Use HTTPS for all API calls to encrypt data in transit.
</p>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-bolt text-blue-500"></i>
</div>
<div class="ml-4">
<h3 class="text-lg font-medium text-gray-900">Error Handling</h3>
<p class="text-gray-600 mt-1">
Never expose sensitive information in error messages.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="resources" class="mb-12">
<h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
<i class="fas fa-book text-blue-500 mr-2"></i>Additional Resources
</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="grid md:grid-cols-2 gap-6">
<div>
<h3 class="font-semibold text-gray-800 mb-3">Documentation Links</h3>
<ul class="space-y-2">
<li>
<a href="https://developer.paypal.com/docs/api/overview/" class="text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-external-link-alt mr-2 text-sm"></i>
PayPal API Documentation
</a>
</li>
<li>
<a href="https://github.com/modelcontextprotocol/typescript-sdk" class="text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-external-link-alt mr-2 text-sm"></i>
MCP SDK Documentation
</a>
</li>
<li>
<a href="https://www.typescriptlang.org/docs/" class="text-blue-600 hover:text-blue-800 flex items-center">
<i class="fas fa-external-link-alt mr-2 text-sm"></i>
TypeScript Documentation
</a>
</li>
</ul>
</div>
<div>
<h3 class="font-semibold text-gray-800 mb-3">Support Contacts</h3>
<ul class="space-y-2">
<li class="flex items-center">
<i class="fas fa-bug text-gray-500 mr-2"></i>
<a href="https://github.com/DynamicEndpoints/Paypal-MCP/issues" class="text-blue-600 hover:text-blue-800">
GitHub Issues
</a>
</li>
<li class="flex items-center">
<i class="fas fa-envelope text-gray-500 mr-2"></i>
<a href="mailto:kameron@dynamicendpoints.com" class="text-blue-600 hover:text-blue-800">
kameron@dynamicendpoints.com
</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<footer class="border-t pt-8 text-center text-gray-600">
<p>PayPal MCP Server Installation Guide v2.4.1</p>
<p class="text-sm mt-2">Last updated: June 2023</p>
</footer>
</div>
</div>
</div>
<!-- Mobile menu button -->
<div class="md:hidden fixed bottom-6 right-6">
<button id="mobileMenuBtn" class="bg-blue-600 text-white p-4 rounded-full shadow-lg hover:bg-blue-700 transition-colors">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
<!-- Mobile menu -->
<div id="mobileMenu" class="hidden fixed inset-0 bg-gray-900 bg-opacity-90 z-50 flex items-center justify-center">
<div class="bg-white rounded-xl p-6 w-11/12 max-w-sm max-h-[80vh] overflow-y-auto">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold">Menu</h2>
<button id="closeMobileMenu" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-4">
<a href="#overview" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Overview</a>
<a href="#structure" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Repository Structure</a>
<a href="#installation" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Installation Steps</a>
<a href="#configuration" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">MCP Configuration</a>
<a href="#validation" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Validation Steps</a>
<a href="#issues" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Common Issues</a>
<a href="#testing" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Testing</a>
<a href="#security" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Security</a>
<a href="#resources" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Resources</a>
</div>
</div>
</div>
<script>
// Mobile menu functionality
const mobileMenuBtn = document.getElementById('mobileMenuBtn');
const mobileMenu = document.getElementById('mobileMenu');
const closeMobileMenu = document.getElementById('closeMobileMenu');
mobileMenuBtn.addEventListener('click', () => {
mobileMenu.classList.remove('hidden');
mobileMenu.classList.add('flex');
});
closeMobileMenu.addEventListener('click', () => {
mobileMenu.classList.add('hidden');
mobileMenu.classList.remove('flex');
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth'
});
// Close mobile menu if open
if (!mobileMenu.classList.contains('hidden')) {
mobileMenu.classList.add('hidden');
mobileMenu.classList.remove('flex');
}
}
});
});
// Highlight current section in sidebar
window.addEventListener('scroll', function() {
const sections = document.querySelectorAll('section');
let currentSection = '';
sections.forEach(section => {
const sectionTop = section.offsetTop - 100;
if (window.pageYOffset >= sectionTop) {
currentSection = section.getAttribute('id');
}
});
document.querySelectorAll('.sidebar-link').forEach(link => {
link.classList.remove('active');
if (link.querySelector('a').getAttribute('href') === `#${currentSection}`) {
link.classList.add('active');
}
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=thedruid831/mcppaypal" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>