First_agent_template / index.html
ZavalaCubas's picture
Upload index.html with huggingface_hub
9298609 verified
Raw History Blame Contribute Delete
7.05 kB
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zavala Cubas · CodeAgent</title>
<link rel="icon" href="https://www.google.com/s2/favicons?domain=zavalacubas.com&sz=128">
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bbf-ink-900: oklch(0 0 0);
--bbf-ink-800: oklch(0.1089 0 0);
--bbf-mint-100: oklch(0.9641 0.0377 186.4);
--bbf-mint-300: oklch(0.7731 0.0377 186.4);
--bbf-accent-400: oklch(0.6936 0.0666 277.6);
--bbf-sea-700: oklch(0.421 0.053 188.1);
--bbf-deep-800: oklch(0.324 0.070 252.9);
}
* { box-sizing: border-box; }
body {
margin: 0; padding: 48px 20px;
font-family: "Space Grotesk", system-ui, sans-serif;
background-color: var(--bbf-ink-900);
background-image:
radial-gradient(circle at 15% 15%, var(--bbf-deep-800) 0%, transparent 55%),
radial-gradient(circle at 85% 85%, var(--bbf-sea-700) 0%, transparent 55%);
color: var(--bbf-mint-100); min-height: 100vh;
}
.shell {
max-width: 720px; margin: 0 auto;
background-color: oklch(0 0 0 / 0.84);
border: 1px solid var(--bbf-sea-700);
border-radius: 20px; padding: 36px 32px;
box-shadow: 0 24px 60px oklch(0 0 0);
}
.topbar {
display: flex; align-items: center; justify-content: space-between;
border-bottom: 1px solid var(--bbf-deep-800);
padding-bottom: 18px; margin-bottom: 26px; flex-wrap: wrap; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img {
width: 34px; height: 34px; border-radius: 8px;
border: 1px solid var(--bbf-accent-400); background: var(--bbf-ink-900); padding: 3px;
}
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: 0.4px; }
.brand-domain { font-size: 11.5px; color: var(--bbf-accent-400); letter-spacing: 0.6px; }
.pill {
padding: 5px 14px; border-radius: 999px; background: var(--bbf-ink-900);
border: 1px solid var(--bbf-accent-400); color: var(--bbf-mint-100);
font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600;
}
h1 { font-size: 1.6rem; margin: 0 0 8px 0; font-weight: 700; letter-spacing: -0.3px; }
.subtitle { color: var(--bbf-mint-300); margin: 0 0 24px 0; font-size: 0.94rem; }
code {
background: var(--bbf-deep-800); color: var(--bbf-mint-100);
padding: 2px 7px; border-radius: 5px; border: 1px solid var(--bbf-sea-700);
}
.quest-box {
background: var(--bbf-ink-900); border: 1px solid var(--bbf-deep-800);
border-radius: 12px; padding: 18px; margin: 22px 0;
}
.quest-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.9rem; gap: 10px; }
.quest-count { font-weight: 700; color: var(--bbf-mint-100); font-size: 0.95rem; white-space: nowrap; }
.progress-track {
width: 100%; height: 12px; background: var(--bbf-ink-800);
border-radius: 999px; overflow: hidden; border: 1px solid var(--bbf-deep-800);
}
.progress-fill {
height: 100%; width: 0%;
background: linear-gradient(90deg, var(--bbf-deep-800), var(--bbf-sea-700), var(--bbf-accent-400), var(--bbf-mint-100));
transition: width 0.5s ease;
}
.quest-footer {
display: flex; justify-content: space-between; align-items: center;
margin-top: 12px; flex-wrap: wrap; gap: 10px;
font-size: 0.78rem; color: var(--bbf-accent-400);
}
.arrow-hint {
color: var(--bbf-mint-300);
font-size: 0.78rem;
display: inline-flex; align-items: center; gap: 6px;
}
.btn-action {
font-family: "Space Grotesk", sans-serif; background: var(--bbf-ink-900);
color: var(--bbf-mint-100); border: 1px solid var(--bbf-accent-400);
padding: 8px 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.btn-action:hover { background: var(--bbf-deep-800); }
.footer-bar {
margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--bbf-deep-800);
display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
</style>
</head>
<body>
<div class="shell">
<div class="topbar">
<div class="brand">
<img src="https://www.google.com/s2/favicons?domain=zavalacubas.com&sz=128" alt="Zavala Cubas">
<div>
<div class="brand-name">ZAVALA CUBAS</div>
<div class="brand-domain">zavalacubas.com</div>
</div>
</div>
<div class="pill">smolagents · Local Runtime</div>
</div>
<h1>⚡ CodeAgent · ReAct Loop</h1>
<p class="subtitle">Orquestación con <code>smolagents</code> + <code>Gradio 6.0</code> + <code>Ollama (qwen2:7b)</code> · Custom <code>@tools</code></p>
<div class="quest-box">
<div class="quest-header">
<span>🎮 <b>Misión Desbloquear HF PRO:</b></span>
<span class="quest-count"><span id="likeNum">0</span> / 50 ♡</span>
</div>
<div class="progress-track"><div class="progress-fill" id="progressBar"></div></div>
<div class="quest-footer">
<span id="statusMsg">🔄 Sincronizado en tiempo real con Hugging Face</span>
<span class="arrow-hint">↗ Pulsa el botón <b>♡ Like</b> en la barra superior para sumar +1</span>
</div>
</div>
<div class="footer-bar">
<a class="btn-action" href="https://huggingface.co/spaces/ZavalaCubas/First_agent_template/tree/main" target="_blank">📂 Ver código en Files (app.py) →</a>
<a class="btn-action" href="https://zavalacubas.com" target="_blank" style="border-color: var(--bbf-sea-700);">zavalacubas.com ↗</a>
</div>
</div>
<script>
localStorage.removeItem("zc_bonus_likes");
const GOAL = 50;
let hfLikes = 0;
function updateUI() {
document.getElementById("likeNum").textContent = hfLikes;
document.getElementById("progressBar").style.width = Math.min(100, Math.round((hfLikes / GOAL) * 100)) + "%";
const msg = document.getElementById("statusMsg");
if (hfLikes >= GOAL) {
msg.textContent = "🎉 ¡Meta alcanzada! Desbloqueando HF PRO.";
} else {
msg.textContent = `🔥 ${hfLikes} ${hfLikes === 1 ? "Like oficial registrado" : "Likes oficiales registrados"} · Faltan ${GOAL - hfLikes}`;
}
}
async function fetchHfLikes() {
try {
const r = await fetch("https://huggingface.co/api/spaces/ZavalaCubas/First_agent_template", { cache: "no-store" });
if (r.ok) {
const d = await r.json();
if (typeof d.likes === "number") {
hfLikes = d.likes;
updateUI();
}
}
} catch (e) {}
}
fetchHfLikes();
setInterval(fetchHfLikes, 5000);
</script>
</body>
</html>