Upload index.html with huggingface_hub
Browse files- index.html +77 -3
index.html
CHANGED
|
@@ -4,14 +4,28 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<title>Zavala Cubas · AI Agent Studio</title>
|
| 6 |
<style>
|
|
|
|
| 7 |
body { font-family: Inter, system-ui, sans-serif; background: #0f172a; color: #f8fafc; margin: 0; padding: 48px 24px; }
|
| 8 |
-
.card { max-width: 720px; margin: auto; background: #1e293b; border: 1px solid #334155; border-radius: 16px; padding: 32px; }
|
| 9 |
-
.badge { display: inline-block; background: #4f46e5; color: white; padding: 4px
|
| 10 |
-
.wink { background: #0f172a; border-left: 3px solid #facc15; padding:
|
| 11 |
.dot { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; margin-right: 6px; animation: blink 1.5s infinite; }
|
| 12 |
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
|
| 13 |
code { background: #0f172a; padding: 2px 6px; border-radius: 5px; color: #38bdf8; }
|
| 14 |
a { color: #818cf8; text-decoration: none; font-weight: 600; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
</style>
|
| 16 |
</head>
|
| 17 |
<body>
|
|
@@ -27,7 +41,67 @@
|
|
| 27 |
</div>
|
| 28 |
</div>
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
<p style="margin-bottom: 0;">📂 <a href="https://huggingface.co/spaces/ZavalaCubas/First_agent_template/tree/main" target="_blank">Ver el código fuente completo en Files (app.py y tools) →</a></p>
|
| 31 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</body>
|
| 33 |
</html>
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<title>Zavala Cubas · AI Agent Studio</title>
|
| 6 |
<style>
|
| 7 |
+
* { box-sizing: border-box; }
|
| 8 |
body { font-family: Inter, system-ui, sans-serif; background: #0f172a; color: #f8fafc; margin: 0; padding: 48px 24px; }
|
| 9 |
+
.card { max-width: 720px; margin: auto; background: #1e293b; border: 1px solid #334155; border-radius: 16px; padding: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
|
| 10 |
+
.badge { display: inline-block; background: #4f46e5; color: white; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; margin-bottom: 12px; }
|
| 11 |
+
.wink { background: #0f172a; border-left: 3px solid #facc15; padding: 14px 16px; border-radius: 8px; font-size: 0.9rem; color: #cbd5e1; margin: 20px 0; }
|
| 12 |
.dot { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; margin-right: 6px; animation: blink 1.5s infinite; }
|
| 13 |
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
|
| 14 |
code { background: #0f172a; padding: 2px 6px; border-radius: 5px; color: #38bdf8; }
|
| 15 |
a { color: #818cf8; text-decoration: none; font-weight: 600; }
|
| 16 |
+
a:hover { text-decoration: underline; }
|
| 17 |
+
|
| 18 |
+
/* Estilos del mini-juego de Likes */
|
| 19 |
+
.quest-box { background: #0f172a; border: 1px solid #334155; border-radius: 12px; padding: 18px; margin: 20px 0; }
|
| 20 |
+
.quest-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.92rem; }
|
| 21 |
+
.quest-count { font-weight: 700; color: #f43f5e; font-size: 1rem; }
|
| 22 |
+
.progress-track { width: 100%; height: 14px; background: #1e293b; border-radius: 999px; overflow: hidden; border: 1px solid #334155; }
|
| 23 |
+
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ec4899, #f43f5e, #facc15); transition: width 0.5s ease; }
|
| 24 |
+
.quest-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; flex-wrap: wrap; gap: 10px; }
|
| 25 |
+
.btn-like { background: #1e293b; color: #f8fafc; border: 1px solid #475569; padding: 7px 13px; border-radius: 8px; font-size: 0.8rem; cursor: pointer; transition: all 0.15s; }
|
| 26 |
+
.btn-like:hover { border-color: #f43f5e; color: #fda4af; }
|
| 27 |
+
.btn-like:active { transform: scale(0.96); }
|
| 28 |
+
.sync-note { font-size: 0.78rem; color: #64748b; }
|
| 29 |
</style>
|
| 30 |
</head>
|
| 31 |
<body>
|
|
|
|
| 41 |
</div>
|
| 42 |
</div>
|
| 43 |
|
| 44 |
+
<div class="quest-box">
|
| 45 |
+
<div class="quest-header">
|
| 46 |
+
<span>🎮 <b>Misión Desbloquear HF PRO:</b> Dale al <b>♡ Like</b> de arriba en la barra</span>
|
| 47 |
+
<span class="quest-count"><span id="likeNum">0</span> / 50 ❤️</span>
|
| 48 |
+
</div>
|
| 49 |
+
<div class="progress-track">
|
| 50 |
+
<div class="progress-fill" id="progressBar"></div>
|
| 51 |
+
</div>
|
| 52 |
+
<div class="quest-actions">
|
| 53 |
+
<span class="sync-note" id="statusMsg">🔄 Sincronizado en vivo con la API oficial de Hugging Face</span>
|
| 54 |
+
<button class="btn-like" onclick="boostLocal()">✨ +1 Like de apoyo moral (Simular)</button>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
<p style="margin-bottom: 0;">📂 <a href="https://huggingface.co/spaces/ZavalaCubas/First_agent_template/tree/main" target="_blank">Ver el código fuente completo en Files (app.py y tools) →</a></p>
|
| 59 |
</div>
|
| 60 |
+
|
| 61 |
+
<script>
|
| 62 |
+
const GOAL = 50;
|
| 63 |
+
let hfLikes = 0;
|
| 64 |
+
let bonusLikes = parseInt(localStorage.getItem("zc_bonus_likes") || "0", 10);
|
| 65 |
+
|
| 66 |
+
function updateUI() {
|
| 67 |
+
const total = hfLikes + bonusLikes;
|
| 68 |
+
const pct = Math.min(100, Math.round((total / GOAL) * 100));
|
| 69 |
+
document.getElementById("likeNum").textContent = total;
|
| 70 |
+
document.getElementById("progressBar").style.width = pct + "%";
|
| 71 |
+
|
| 72 |
+
const msg = document.getElementById("statusMsg");
|
| 73 |
+
if (total >= GOAL) {
|
| 74 |
+
msg.textContent = "🎉 ¡Meta alcanzada! Hora de romper la hucha para el PRO.";
|
| 75 |
+
msg.style.color = "#4ade80";
|
| 76 |
+
} else if (total > 0) {
|
| 77 |
+
msg.textContent = `🔥 ¡Ya llevamos ${hfLikes} Likes oficiales en HF (+${bonusLikes} morales)! Faltan ${GOAL - total}.`;
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
async function fetchHfLikes() {
|
| 82 |
+
try {
|
| 83 |
+
const res = await fetch("https://huggingface.co/api/spaces/ZavalaCubas/First_agent_template", { cache: "no-store" });
|
| 84 |
+
if (res.ok) {
|
| 85 |
+
const data = await res.json();
|
| 86 |
+
if (typeof data.likes === "number") {
|
| 87 |
+
hfLikes = data.likes;
|
| 88 |
+
updateUI();
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
} catch (e) {
|
| 92 |
+
// Fallback silencioso si el navegador bloquea la red
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
function boostLocal() {
|
| 97 |
+
bonusLikes++;
|
| 98 |
+
localStorage.setItem("zc_bonus_likes", bonusLikes);
|
| 99 |
+
updateUI();
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
fetchHfLikes();
|
| 103 |
+
setInterval(fetchHfLikes, 6000);
|
| 104 |
+
updateUI();
|
| 105 |
+
</script>
|
| 106 |
</body>
|
| 107 |
</html>
|