42 lines
1.9 KiB
HTML
Executable File
42 lines
1.9 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>💡 Boîte à Idées</title>
|
|
<style>
|
|
body { font-family: sans-serif; padding: 20px; background: #1a1a2e; color: #fff; }
|
|
.card { background: #16213e; padding: 20px; margin: 10px 0; border-radius: 10px; }
|
|
h1 { color: #2ec4b6; }
|
|
.error { background: #e94560; padding: 15px; border-radius: 8px; }
|
|
|
|
.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>💡 Boîte à Idées</h1>
|
|
<div id="output">Loading...</div>
|
|
|
|
<script>
|
|
const API_URL = '/turf/api/ideas';
|
|
|
|
fetch(API_URL, {})
|
|
.then(r => {
|
|
document.getElementById('output').innerHTML = 'Status: ' + r.status;
|
|
return r.json();
|
|
})
|
|
.then(d => {
|
|
let html = '<h2>' + d.ideas.length + ' idées trouvées</h2>';
|
|
d.ideas.forEach(i => {
|
|
html += '<div class="card"><b>' + i.title + '</b><br><small>' + i.status + '</small></div>';
|
|
});
|
|
document.getElementById('output').innerHTML = html;
|
|
})
|
|
.catch(e => {
|
|
document.getElementById('output').innerHTML = '<div class="error">Erreur: ' + e.message + '</div>';
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|