Files
turf_saas/mobile_ideas.html
2026-04-25 17:18:43 +02:00

45 lines
2.0 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>💡 Idées</title>
<style>
body { font-family: sans-serif; padding: 15px; background: #1a1a2e; color: #fff; }
h1 { color: #2ec4b6; }
.card { background: #16213e; padding: 15px; margin: 10px 0; border-radius: 8px; }
.error { background: #e94560; padding: 15px; }
pre { background: #333; padding: 10px; overflow: auto; }
.home-btn{position:fixed;top:10px;left:10px;z-index:9999;background:linear-gradient(135deg,#00d9ff,#7b2cbf);color:#fff;border:none;border-radius:8px;padding:10px 15px;font-size:14px;cursor:pointer;text-decoration:none;display:flex;align-items:center;gap:8px;box-shadow:0 2px 10px rgba(0,217,255,0.3);transition:all 0.3s;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.home-btn:hover{transform:translateY(-2px);box-shadow:0 4px 15px rgba(0,217,255,0.5)}
</style>
</head>
<body>
<a href="https://portal-kolifee.duckdns.org/" class="home-btn" title="Retour au portail"><span style="font-size:18px">🏠</span><span>Accueil</span></a>
<h1>💡 Mes Idées</h1>
<div id="status">Chargement...</div>
<div id="result"></div>
<script>
var req = new XMLHttpRequest();
req.open('GET', '/api/ideas', true);
req.onload = function() {
document.getElementById('status').innerText = 'Status: ' + req.status;
if (req.status === 200) {
var data = JSON.parse(req.responseText);
var html = '<p>✅ ' + data.ideas.length + ' idées trouvées</p>';
data.ideas.forEach(function(i) {
html += '<div class="card"><b>' + i.title + '</b><br>📌 ' + i.status + '</div>';
});
document.getElementById('result').innerHTML = html;
}
};
req.onerror = function() {
document.getElementById('status').innerHTML = '<div class="error">Erreur réseau!</div>';
};
req.send();
</script>
</body>
</html>