teste / index.html
Rramos2010's picture
Add 2 files
27ec3ad verified
Raw History Blame Contribute Delete
20.4 kB
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Access Platform</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>
.gradient-bg {
background: linear-gradient(135deg, #6e8efb, #a777e3);
}
.card-hover {
transition: all 0.3s ease;
transform: translateY(0);
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}
.api-endpoint {
font-family: 'Courier New', monospace;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 4px;
padding: 2px 6px;
}
.response-area {
min-height: 200px;
max-height: 400px;
overflow-y: auto;
}
.tab-active {
border-bottom: 3px solid #4f46e5;
color: #4f46e5;
font-weight: 600;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<!-- Header -->
<header class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-cloud text-2xl"></i>
<h1 class="text-2xl font-bold">API Connect</h1>
</div>
<nav>
<ul class="flex space-x-6">
<li><a href="#" class="hover:underline">Documentação</a></li>
<li><a href="#" class="hover:underline">Exemplos</a></li>
<li><a href="#" class="hover:underline">Suporte</a></li>
</ul>
</nav>
<div>
<button class="bg-white text-indigo-600 px-4 py-2 rounded-lg font-medium hover:bg-gray-100 transition">
<i class="fas fa-sign-in-alt mr-2"></i>Login
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- API Dashboard -->
<section class="mb-12">
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-6">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Painel de Controle da API</h2>
<div class="flex border-b mb-6">
<button class="tab-active px-4 py-2 mr-2">Explorar</button>
<button class="px-4 py-2 mr-2 hover:text-indigo-600">Histórico</button>
<button class="px-4 py-2 hover:text-indigo-600">Configurações</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<!-- API Stats Card -->
<div class="card-hover bg-white p-6 rounded-lg border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-indigo-100 p-3 rounded-full mr-4">
<i class="fas fa-bolt text-indigo-600"></i>
</div>
<div>
<p class="text-gray-500">Requisições Hoje</p>
<h3 class="text-2xl font-bold">1,248</h3>
</div>
</div>
<div class="text-sm text-green-500">
<i class="fas fa-arrow-up mr-1"></i> 12% desde ontem
</div>
</div>
<!-- API Keys Card -->
<div class="card-hover bg-white p-6 rounded-lg border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-blue-100 p-3 rounded-full mr-4">
<i class="fas fa-key text-blue-600"></i>
</div>
<div>
<p class="text-gray-500">Chaves de API</p>
<h3 class="text-2xl font-bold">3</h3>
</div>
</div>
<button class="text-sm text-blue-500 hover:underline">
Gerenciar chaves <i class="fas fa-chevron-right ml-1"></i>
</button>
</div>
<!-- Status Card -->
<div class="card-hover bg-white p-6 rounded-lg border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-green-100 p-3 rounded-full mr-4">
<i class="fas fa-check-circle text-green-600"></i>
</div>
<div>
<p class="text-gray-500">Status do Serviço</p>
<h3 class="text-2xl font-bold">Operacional</h3>
</div>
</div>
<div class="text-sm text-gray-500">
Última verificação: 2 minutos atrás
</div>
</div>
</div>
<!-- API Tester -->
<div class="bg-gray-50 p-6 rounded-lg">
<h3 class="text-xl font-semibold mb-4 text-gray-800">Testador de API</h3>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-4">
<select class="col-span-1 bg-white border border-gray-300 rounded-lg px-4 py-2">
<option>GET</option>
<option>POST</option>
<option>PUT</option>
<option>DELETE</option>
</select>
<input type="text" class="col-span-3 bg-white border border-gray-300 rounded-lg px-4 py-2"
placeholder="https://api.example.com/v1/users" value="https://api.example.com/v1/users">
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<!-- Headers -->
<div>
<label class="block text-gray-700 mb-2">Headers</label>
<div class="bg-white border border-gray-300 rounded-lg p-4">
<div class="grid grid-cols-5 gap-2 mb-2">
<input type="text" class="col-span-2 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm"
placeholder="Chave" value="Authorization">
<input type="text" class="col-span-3 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm"
placeholder="Valor" value="Bearer abc123...">
</div>
<button class="text-blue-500 text-sm hover:underline">
<i class="fas fa-plus mr-1"></i> Adicionar Header
</button>
</div>
</div>
<!-- Body -->
<div>
<label class="block text-gray-700 mb-2">Body</label>
<textarea class="w-full bg-white border border-gray-300 rounded-lg p-4 h-32" placeholder="JSON Body">{
"name": "John Doe",
"email": "john@example.com"
}</textarea>
</div>
</div>
<button class="bg-indigo-600 text-white px-6 py-2 rounded-lg font-medium hover:bg-indigo-700 transition">
<i class="fas fa-paper-plane mr-2"></i> Enviar Requisição
</button>
<!-- Response -->
<div class="mt-6">
<label class="block text-gray-700 mb-2">Resposta</label>
<div class="response-area bg-gray-800 text-green-400 p-4 rounded-lg font-mono text-sm">
<p><span class="text-gray-400">Status:</span> 200 OK</p>
<p><span class="text-gray-400">Tempo:</span> 142ms</p>
<p><span class="text-gray-400">Tamanho:</span> 512B</p>
<div class="mt-4">
<pre>{
"id": 12345,
"name": "John Doe",
"email": "john@example.com",
"created_at": "2023-07-15T10:30:00Z",
"updated_at": "2023-07-15T10:30:00Z"
}</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- API Documentation -->
<section class="mb-12">
<div class="bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-6">
<h2 class="text-2xl font-bold text-gray-800 mb-6">Documentação da API</h2>
<div class="grid grid-cols-1 md:grid-cols-4 gap-6">
<!-- Navigation -->
<div class="md:col-span-1">
<div class="bg-gray-50 p-4 rounded-lg sticky top-4">
<h3 class="font-semibold mb-3">Endpoints</h3>
<ul class="space-y-2">
<li>
<a href="#users" class="text-indigo-600 hover:underline block py-1">Usuários</a>
<ul class="ml-4 mt-1 space-y-1">
<li><a href="#get-users" class="text-gray-600 hover:underline block py-1">Listar usuários</a></li>
<li><a href="#create-user" class="text-gray-600 hover:underline block py-1">Criar usuário</a></li>
</ul>
</li>
<li>
<a href="#products" class="text-indigo-600 hover:underline block py-1">Produtos</a>
</li>
<li>
<a href="#orders" class="text-indigo-600 hover:underline block py-1">Pedidos</a>
</li>
</ul>
</div>
</div>
<!-- Content -->
<div class="md:col-span-3">
<!-- Users Section -->
<div id="users" class="mb-8">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i class="fas fa-users mr-2 text-indigo-600"></i> Usuários
</h3>
<!-- Get Users -->
<div id="get-users" class="mb-6 pb-6 border-b border-gray-200">
<div class="flex items-center mb-2">
<span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs font-medium mr-3">GET</span>
<span class="api-endpoint">/v1/users</span>
</div>
<p class="text-gray-600 mb-3">Retorna uma lista de usuários paginada.</p>
<h4 class="font-medium mb-2">Parâmetros</h4>
<div class="bg-gray-50 p-3 rounded mb-3">
<table class="w-full text-sm">
<thead>
<tr class="border-b">
<th class="text-left py-2">Nome</th>
<th class="text-left py-2">Tipo</th>
<th class="text-left py-2">Descrição</th>
</tr>
</thead>
<tbody>
<tr class="border-b">
<td class="py-2">page</td>
<td class="py-2">integer</td>
<td class="py-2">Número da página</td>
</tr>
<tr>
<td class="py-2">limit</td>
<td class="py-2">integer</td>
<td class="py-2">Itens por página (max 100)</td>
</tr>
</tbody>
</table>
</div>
<h4 class="font-medium mb-2">Exemplo de Resposta</h4>
<div class="bg-gray-800 text-green-400 p-4 rounded-lg font-mono text-sm">
<pre>{
"data": [
{
"id": 1,
"name": "John Doe",
"email": "john@example.com"
},
{
"id": 2,
"name": "Jane Smith",
"email": "jane@example.com"
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 10
}
}</pre>
</div>
</div>
<!-- Create User -->
<div id="create-user" class="mb-6">
<div class="flex items-center mb-2">
<span class="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs font-medium mr-3">POST</span>
<span class="api-endpoint">/v1/users</span>
</div>
<p class="text-gray-600 mb-3">Cria um novo usuário no sistema.</p>
<h4 class="font-medium mb-2">Corpo da Requisição</h4>
<div class="bg-gray-800 text-green-400 p-4 rounded-lg font-mono text-sm mb-3">
<pre>{
"name": "string",
"email": "string",
"password": "string"
}</pre>
</div>
<h4 class="font-medium mb-2">Exemplo de Resposta</h4>
<div class="bg-gray-800 text-green-400 p-4 rounded-lg font-mono text-sm">
<pre>{
"id": 3,
"name": "New User",
"email": "new@example.com",
"created_at": "2023-07-15T10:30:00Z",
"updated_at": "2023-07-15T10:30:00Z"
}</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-semibold mb-4">API Connect</h3>
<p class="text-gray-400">A plataforma definitiva para integrar e gerenciar suas APIs.</p>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Links</h3>
<ul class="space-y-2 text-gray-400">
<li><a href="#" class="hover:text-white">Documentação</a></li>
<li><a href="#" class="hover:text-white">Termos de Serviço</a></li>
<li><a href="#" class="hover:text-white">Política de Privacidade</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Suporte</h3>
<ul class="space-y-2 text-gray-400">
<li><a href="#" class="hover:text-white">Central de Ajuda</a></li>
<li><a href="#" class="hover:text-white">Contato</a></li>
<li><a href="#" class="hover:text-white">Status</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Redes Sociais</h3>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-github"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-linkedin"></i></a>
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a>
</div>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 API Connect. Todos os direitos reservados.</p>
</div>
</div>
</footer>
<script>
// Tab functionality
const tabs = document.querySelectorAll('.flex.border-b button');
tabs.forEach(tab => {
tab.addEventListener('click', () => {
tabs.forEach(t => t.classList.remove('tab-active'));
tab.classList.add('tab-active');
});
});
// Simple API tester functionality
const sendButton = document.querySelector('.bg-indigo-600');
sendButton.addEventListener('click', () => {
// This would be replaced with actual API call in a real implementation
alert('Requisição enviada! (Esta é uma demonstração)');
});
</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=Rramos2010/teste" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>